command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelSubWorkflowCommandAttr added in v0.1.0

type CancelSubWorkflowCommandAttr struct {
	SubWorkflowInstance *core.WorkflowInstance
}

type CancelTimerCommandAttr

type CancelTimerCommandAttr struct {
	TimerScheduleEventID int64
}

type Command

type Command struct {
	State CommandState

	ID int64

	Type CommandType

	Attr interface{}
}

func NewCancelSubWorkflowCommand added in v0.1.0

func NewCancelSubWorkflowCommand(id int64, subWorkflowInstance *core.WorkflowInstance) Command

func NewCancelTimerCommand

func NewCancelTimerCommand(id int64, timerID int64) Command

func NewCompleteWorkflowCommand

func NewCompleteWorkflowCommand(id int64, result payload.Payload, err error) Command

func NewScheduleActivityTaskCommand

func NewScheduleActivityTaskCommand(id int64, name string, inputs []payload.Payload) Command

func NewScheduleSubWorkflowCommand

func NewScheduleSubWorkflowCommand(id int64, parentInstance *core.WorkflowInstance, subWorkflowInstanceID, name string, inputs []payload.Payload) Command

func NewScheduleTimerCommand

func NewScheduleTimerCommand(id int64, at time.Time) Command

func NewSideEffectCommand

func NewSideEffectCommand(id int64, result payload.Payload) Command

type CommandState

type CommandState int
const (
	CommandState_Pending CommandState = iota
	CommandState_Committed
	CommandState_Done
)

type CommandType

type CommandType int
const (
	CommandType_ScheduleActivityTask CommandType

	CommandType_ScheduleSubWorkflow
	CommandType_CancelSubWorkflow

	CommandType_ScheduleTimer
	CommandType_CancelTimer

	CommandType_SideEffect

	CommandType_CompleteWorkflow
)

type CompleteWorkflowCommandAttr

type CompleteWorkflowCommandAttr struct {
	Result payload.Payload
	Error  string
}

type ScheduleActivityTaskCommandAttr

type ScheduleActivityTaskCommandAttr struct {
	Name   string
	Inputs []payload.Payload
}

type ScheduleSubWorkflowCommandAttr

type ScheduleSubWorkflowCommandAttr struct {
	Instance *core.WorkflowInstance
	Name     string
	Inputs   []payload.Payload
}

type ScheduleTimerCommandAttr

type ScheduleTimerCommandAttr struct {
	At time.Time
}

type SideEffectCommandAttr

type SideEffectCommandAttr struct {
	Result payload.Payload
}

Jump to

Keyboard shortcuts

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