Documentation
¶
Index ¶
- func ActivityWithByID(ctx context.Context, user User) error
- func ActivityWithByIDOnly(ctx context.Context, user User) error
- func ActivityWithCustomOptions(ctx context.Context, user User) error
- func ComplexActivity(ctx context.Context, input int) (int, error)
- func ComplexWorkflow(ctx workflow.Context, input int) (int, error)
- func GenerateWorkflowID(input string) string
- func GetActivityOptions(input string) *workflow.ActivityOptions
- func GetStatusQuery(ctx workflow.Context, input string) (string, error)
- func GetUserActivityOptions(user User) *workflow.ActivityOptions
- func GetWorkflowOptions(input string) *workflow.ChildWorkflowOptions
- func QueryHandler(ctx workflow.Context, input string) (string, error)
- func SimpleActivity(ctx context.Context, input string) (string, error)
- func SimpleWorkflow(ctx workflow.Context, input string) (string, error)
- func UpdateHandler(ctx workflow.Context, input string) (string, error)
- func WorkflowWithCallerIDTemplate(ctx workflow.Context, input TaskInput) error
- func WorkflowWithIDCallback(ctx workflow.Context, input string) error
- func WorkflowWithIDTemplate(ctx workflow.Context, input IDInput) error
- func WorkflowWithOptionsCallback(ctx workflow.Context, input string) error
- func WorkflowWithStructIDTemplate(ctx workflow.Context, input IDTemplateInput) error
- type Activities
- type IDInput
- type IDTemplateInput
- type MethodActivities
- type QueueActivity
- type QueueWorkflowRequest
- type TaskInput
- type User
- type Workflows
- type WrapperActivity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivityWithByID ¶
ActivityWithByID demonstrates the by-id pattern @temporal-gen-v2 activity @by-field ID
func ActivityWithByIDOnly ¶
ActivityWithByIDOnly demonstrates the by-id-only pattern @temporal-gen-v2 activity @by-field ID @by-field-only
func ActivityWithCustomOptions ¶
ActivityWithCustomOptions demonstrates callback options @temporal-gen-v2 activity @options-callback GetUserActivityOptions
func ComplexActivity ¶
ComplexActivity demonstrates all available activity options @temporal-gen-v2 activity @schedule-to-close-timeout 1h @start-to-close-timeout 30m @max-retries 5
func ComplexWorkflow ¶
ComplexWorkflow demonstrates all available workflow options @temporal-gen-v2 workflow @execution-timeout 24h @task-timeout 10m @task-queue my-queue @wait-for-cancellation true
func GenerateWorkflowID ¶
func GetActivityOptions ¶
func GetActivityOptions(input string) *workflow.ActivityOptions
func GetStatusQuery ¶
GetStatusQuery demonstrates a query handler for getting status @temporal-gen-v2 query
func GetUserActivityOptions ¶
func GetUserActivityOptions(user User) *workflow.ActivityOptions
func GetWorkflowOptions ¶
func GetWorkflowOptions(input string) *workflow.ChildWorkflowOptions
func QueryHandler ¶
QueryHandler demonstrates a query handler @temporal-gen-v2 query
func SimpleActivity ¶
SimpleActivity is a basic activity with minimal configuration @temporal-gen-v2 activity
func SimpleWorkflow ¶
SimpleWorkflow is a basic workflow @temporal-gen-v2 workflow
func UpdateHandler ¶
UpdateHandler demonstrates an update handler @temporal-gen-v2 update @id my-update-id
func WorkflowWithCallerIDTemplate ¶ added in v0.19.850
WorkflowWithCallerIDTemplate demonstrates nested workflow IDs using CallerID @temporal-gen-v2 workflow @id-template {{.CallerID}}-subtask-{{.Req.TaskID}}
func WorkflowWithIDCallback ¶
WorkflowWithIDCallback demonstrates dynamic ID generation @temporal-gen-v2 workflow @id-generator GenerateWorkflowID
func WorkflowWithIDTemplate ¶
WorkflowWithIDTemplate demonstrates custom ID templating @temporal-gen-v2 workflow @id-template workflow-{{.ID}}
func WorkflowWithOptionsCallback ¶
WorkflowWithOptionsCallback demonstrates custom options callback @temporal-gen-v2 workflow @options-callback GetWorkflowOptions
func WorkflowWithStructIDTemplate ¶
func WorkflowWithStructIDTemplate(ctx workflow.Context, input IDTemplateInput) error
WorkflowWithStructIDTemplate demonstrates ID template with struct input @temporal-gen-v2 workflow @id-template org-{{.Req.OrgID}}-user-{{.Req.UserID}}
Types ¶
type Activities ¶
type Activities struct{}
type IDTemplateInput ¶
type MethodActivities ¶
type MethodActivities struct{}
func (*MethodActivities) MyActivity ¶
@temporal-gen-v2 activity @options-callback "GetActivityOptions"
type QueueActivity ¶
type QueueActivity struct{}
type QueueWorkflowRequest ¶
type QueueWorkflowRequest struct {
QueueID string
}
type WrapperActivity ¶
type WrapperActivity struct{}