forked from cadence-workflow/cadence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support invoking RPC using HTTP and JSON (cadence-workflow#5305)
What changed? Adding HTTP option to RPC part. Why? Related issue: cadence-workflow#5265 How did you test it? Potential risks Release notes Documentation Changes Added additional config file to give an example of possible configuration
- Loading branch information
1 parent
e2a2a94
commit 01b7932
Showing
5 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
services: | ||
frontend: | ||
rpc: | ||
port: 7933 | ||
grpcPort: 7833 | ||
bindOnLocalHost: true | ||
grpcMaxMsgSize: 33554432 | ||
# enable HTTP server, allow to call Start worfklow using HTTP API | ||
# Use curl to start a workflow: | ||
# curl http://0.0.0.0:8800 \ | ||
# -H 'context-ttl-ms: 2000' \ | ||
# -H 'rpc-caller: rpc-client-name' \ | ||
# -H 'rpc-service: cadence-frontend' \ | ||
# -H 'rpc-encoding: json' \ | ||
# -H 'rpc-procedure: uber.cadence.api.v1.WorkflowAPI::StartWorkflowExecution' \ | ||
# -X POST --data @data.json | ||
# Where data.json content looks something like this: | ||
# { | ||
# "domain": "samples-domain", | ||
# "workflowId": "workflowid123", | ||
# "execution_start_to_close_timeout": "11s", | ||
# "task_start_to_close_timeout": "10s", | ||
# "workflowType": { | ||
# "name": "workflow_type" | ||
# }, | ||
# "taskList": { | ||
# "name": "tasklist-name" | ||
# }, | ||
# "identity": "My custom identity", | ||
# "requestId": "4D1E4058-6FCF-4BA8-BF16-8FA8B02F9651" | ||
# } | ||
http: | ||
port: 8800 | ||
procedures: | ||
- uber.cadence.api.v1.WorkflowAPI::StartWorkflowExecution | ||
metrics: | ||
statsd: | ||
hostPort: "127.0.0.1:8125" | ||
prefix: "cadence" | ||
pprof: | ||
port: 7936 |