temporal

package
v0.0.0-...-75a017b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

封装 temporal 客户端 必须先调用 Init 初始化客户端,才能调用其它函数

Index

Constants

This section is empty.

Variables

View Source
var ErrTemporalClientNil = errors.New("temporal client nil")

Functions

func CancelWorkflow

func CancelWorkflow(ctx context.Context, workflowID string) error

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相同的旧工作流

func Init

func Init(addr string) error

Init 初始化客户端 addr 传空的话,默认连接 localhost:7233

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL