Documentation ¶
Overview ¶
封装 temporal 客户端 必须先调用 Init 初始化客户端,才能调用其它函数
Index ¶
- Variables
- func CancelWorkflow(ctx context.Context, workflowID string) error
- func ExecuteWorkflow(ctx context.Context, id, queue string, workflow any, args ...any) (client.WorkflowRun, error)
- func ExecuteWorkflowSync(ctx context.Context, id, queue string, workflow any, args ...any) (client.WorkflowRun, error)
- func Init(addr string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTemporalClientNil = errors.New("temporal client nil")
Functions ¶
func CancelWorkflow ¶
CancelWorkflow 取消工作流
func ExecuteWorkflow ¶
func ExecuteWorkflow( ctx context.Context, id, queue string, workflow any, args ...any, ) (client.WorkflowRun, error)
ExecuteWorkflow 异步执行工作流
func ExecuteWorkflowSync ¶
func ExecuteWorkflowSync( ctx context.Context, id, queue string, workflow any, args ...any, ) (client.WorkflowRun, error)
ExecuteWorkflowSync 同步执行工作流,停止任务id相同的旧工作流
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.