ol(cli): add invoke subcommand under existing ol tool#369
ol(cli): add invoke subcommand under existing ol tool#369fairozkhan10 wants to merge 3 commits intoopen-lambda:mainfrom
invoke subcommand under existing ol tool#369Conversation
…ads, headers, timeout, and pretty-print
mock workerpython3 - <<'PY' run from repo/go (Linux container)export OL_URL=http://host.docker.internal:5000 |
Summary
Adds an
ol invokesubcommand (in Go) under the existingoltool to POST to an OL worker endpoint.Features
--func(mutually exclusive, one required)--data(inline JSON)--json(path to JSON file)--file(binary payload; sets Content-Type to application/octet-stream)--header "K: V"support--url(otherwise falls back to $OL_URL, default http://127.0.0.1:5000)--pathroute template (default/invoke/{func})--timeoutseconds--prettypretty-prints JSON responsesWhy under
olRequested by maintainers: keep invocation in the existing CLI (
ol) rather than a separate tool.Manual test (smoke)
With a small mock worker on host port 5000: