service

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskQueue                         = "Interpreter_DEFAULT"
	GracefulCompletingWorkflowStateId = "_SYS_GRACEFUL_COMPLETING_WORKFLOW"
	ForceCompletingWorkflowStateId    = "_SYS_FORCE_COMPLETING_WORKFLOW"
	ForceFailingWorkflowStateId       = "_SYS_FORCE_FAILING_WORKFLOW"

	StateStartApi  = "/api/v1/workflowState/start"
	StateDecideApi = "/api/v1/workflowState/decide"

	GetDataObjectsWorkflowQueryType = "GetDataObjects"
	GetCurrentTimerInfosQueryType   = "GetCurrentTimerInfos"
	DumpAllInternalQueryType        = "DumpAllInternal"

	SearchAttributeGlobalVersion     = "IwfGlobalWorkflowVersion"
	SearchAttributeExecutingStateIds = "IwfExecutingStateIds"
	SearchAttributeIwfWorkflowType   = "IwfWorkflowType"

	BackendTypeCadence  BackendType = "cadence"
	BackendTypeTemporal BackendType = "temporal"

	IwfSystemSignalPrefix      = "__IwfSystem_"
	SkipTimerSignalChannelName = IwfSystemSignalPrefix + "SkipTimerChannel"
)

Variables

View Source
var ValidIwfSystemSignalNames map[string]bool = map[string]bool{
	SkipTimerSignalChannelName: true,
}

Functions

This section is empty.

Types

type BackendType

type BackendType string

type DumpAllInternalResponse added in v1.3.0

type DumpAllInternalResponse struct {
	InterStateChannelReceived               map[string][]*iwfidl.EncodedObject
	SignalChannelReceived                   map[string][]*iwfidl.EncodedObject
	StateExecutionCounterInfo               StateExecutionCounterInfo
	PendingStateExecutionsCompletedCommands map[string]PendingStateExecutionCompletedCommands
	PendingStateExecutionsRequestCommands   map[string]PendingStateExecutionRequestCommands
	DataObjects                             []iwfidl.KeyValue
	SearchAttributes                        []iwfidl.SearchAttribute
}

type GetCurrentTimerInfosQueryResponse added in v1.2.0

type GetCurrentTimerInfosQueryResponse struct {
	StateExecutionCurrentTimerInfos map[string][]*TimerInfo // key is stateExecutionId
}

type GetDataObjectsQueryRequest

type GetDataObjectsQueryRequest struct {
	Keys []string
}

type GetDataObjectsQueryResponse

type GetDataObjectsQueryResponse struct {
	DataObjects []iwfidl.KeyValue
}

type InternalTimerStatus added in v1.2.0

type InternalTimerStatus string
const (
	TimerPending InternalTimerStatus = "Pending"
	TimerFired   InternalTimerStatus = "Fired"
	TimerSkipped InternalTimerStatus = "Skipped"
)

type InterpreterWorkflowInput

type InterpreterWorkflowInput struct {
	IwfWorkflowType string `json:"iwfWorkflowType,omitempty"`

	IwfWorkerUrl string `json:"iwfWorkerUrl,omitempty"`

	StartStateId string `json:"startStateId,omitempty"`

	StateInput iwfidl.EncodedObject `json:"stateInput,omitempty"`

	StateOptions iwfidl.WorkflowStateOptions `json:"stateOptions,omitempty"`

	InitSearchAttributes []iwfidl.SearchAttribute `json:"initSearchAttributes,omitempty"`

	Config WorkflowConfig `json:"config,omitempty"`
}

type InterpreterWorkflowOutput

type InterpreterWorkflowOutput struct {
	StateCompletionOutputs []iwfidl.StateCompletionOutput `json:"stateCompletionOutputs,omitempty"`
}

type IwfWorkflowExecution

type IwfWorkflowExecution struct {
	IwfWorkerUrl     string
	WorkflowType     string
	WorkflowId       string
	RunId            string
	StartedTimestamp int64
}

type PendingStateExecutionCompletedCommands added in v1.3.0

type PendingStateExecutionCompletedCommands struct {
	CompletedTimerCommands             map[int]bool
	CompletedSignalCommands            map[int]*iwfidl.EncodedObject
	CompletedInterStateChannelCommands map[int]*iwfidl.EncodedObject
}

type PendingStateExecutionRequestCommands added in v1.3.0

type PendingStateExecutionRequestCommands struct {
	TimerCommands             []iwfidl.TimerCommand
	SignalCommands            []iwfidl.SignalCommand
	InterStateChannelCommands []iwfidl.InterStateChannelCommand
}

type SkipTimerSignalRequest added in v1.2.0

type SkipTimerSignalRequest struct {
	StateExecutionId string
	CommandId        string
	CommandIndex     int
}

type StateDecideActivityInput

type StateDecideActivityInput struct {
	IwfWorkerUrl string
	Request      iwfidl.WorkflowStateDecideRequest
}

type StateExecutionCounterInfo added in v1.3.0

type StateExecutionCounterInfo struct {
	ExecutedStateIdCount      map[string]int
	PendingStateIdCount       map[string]int
	TotalPendingStateExeCount int
}

type StateStartActivityInput

type StateStartActivityInput struct {
	IwfWorkerUrl string
	Request      iwfidl.WorkflowStateStartRequest
}

type TimerInfo added in v1.2.0

type TimerInfo struct {
	CommandId                  string
	FiringUnixTimestampSeconds int64
	Status                     InternalTimerStatus
}

func ValidateTimerSkipRequest added in v1.2.0

func ValidateTimerSkipRequest(stateExeTimerInfos map[string][]*TimerInfo, stateExeId, timerId string, timerIdx int) (*TimerInfo, bool)

ValidateTimerSkipRequest validates if the skip timer request is valid return true if it's valid, along with the timer pointer use timerIdx if timerId is not empty

type WorkflowConfig added in v1.3.1

type WorkflowConfig struct {
	DisableSystemSearchAttributes bool `json:"disableSystemSearchAttributes,omitempty"`
}

Directories

Path Synopsis
api
common
log
ptr

Jump to

Keyboard shortcuts

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