command

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelTimerCommandAttr

type CancelTimerCommandAttr struct {
	TimerID int
}

type Command

type Command struct {
	State CommandState

	ID int

	Type CommandType

	Attr interface{}
}

func NewCancelTimerCommand

func NewCancelTimerCommand(id, timerID int) Command

func NewCompleteWorkflowCommand

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

func NewScheduleActivityTaskCommand

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

func NewScheduleSubWorkflowCommand

func NewScheduleSubWorkflowCommand(id int, instanceID, name string, inputs []payload.Payload) Command

func NewScheduleTimerCommand

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

func NewSideEffectCommand

func NewSideEffectCommand(id int, 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_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 {
	InstanceID string
	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