跳到主要内容

RPC

查看 Markdown

This page lists the Go SDK names for RPCs. The doc comment of each API gives its parameters, defaults, and errors. Read them in the Go SDK API reference.

API names​

TaskGo APIDex behavior
Define an RPC handlerDefineRPC with a bound Flow method, returned from GetRPCsFlow definition
Set the durable RPC nameName of RPCOptions. It defaults to the Go method name.Flow definition
Set the RPC timeoutTimeout of RPCOptionsRPC timeout
Lock Attributes for the whole callLockAttributes of RPCOptionsLocks
Request transactional reads and writes without locksIsTransactional of RPCOptionsTransactional RPCs
Load AttributeMap values and Channel messagesLoadAttributeMaps, LoadAttributeMapInstances, LoadChannels, LoadChannelMaps, and LoadChannelMapInstances of RPCOptionsSelective state loading
Return the output and start next StepsRPCResult, with Output and NextStepsRPCs
Cancel running StepsRPCResult.CancelStepsCancel running Steps
Let a person invoke the RPC from Dex WebAction of RPCOptions, with DefineActionActions
Invoke the RPC from a ClientClient.InvokeRPCInvoke an RPC
Lock or load map instances chosen at call timeRPCInvokeOptions, with Client.InvokeRPCWithOptionsRuntime-selected map instances

Example​

Example: examples/go/primitives/rpc/workflow.go