service

package
v1.0.0-rc-3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 4 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"

	DeciderTypeAllCommandCompleted = "ALL_COMMAND_COMPLETED"
	DeciderTypeAnyCommandCompleted = "ANY_COMMAND_COMPLETED"

	TimerStatusFired     = "FIRED"
	TimerStatusScheduled = "SCHEDULED"

	SignalStatusWaiting  = "WAITING"
	SignalStatusReceived = "RECEIVED"

	InternStateChannelCommandStatusWaiting = "WAITING"
	InternStateChannelCommandReceived      = "RECEIVED"

	SearchAttributeValueTypeKeyword = "KEYWORD"
	SearchAttributeValueTypeInt     = "INT"

	AttributeQueryType = "GetQueryAttributes"

	WorkflowErrorTypeUserWorkflowDecision = "UserWorkflowDecision"
	WorkflowErrorTypeUserWorkflowError    = "UserWorkflowError"
	WorkflowErrorTypeUserInternalError    = "InternalError"

	WorkflowStatusRunning       = "RUNNING"
	WorkflowStatusCompleted     = "COMPLETED"
	WorkflowStatusFailed        = "FAILED"
	WorkflowStatusTimeout       = "TIMEOUT"
	WorkflowStatusTerminated    = "TERMINATED"
	WorkflowStatusCanceled      = "CANCELED"
	WorkflowStatusContinueAsNew = "CONTINUED_AS_NEW"

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

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig

type ApiConfig struct {
	// Port is the port on which the API service will bind to
	Port int `yaml:"port"`
}

type Backend

type Backend struct {
	// Temporal config is the config to connect to Temporal
	Temporal *TemporalConfig `yaml:"temporal"`
	// Cadence config is the config to connect to Cadence
	Cadence *CadenceConfig `yaml:"cadence"`
}

type BackendType

type BackendType string
const BackendTypeCadence BackendType = "cadence"
const BackendTypeTemporal BackendType = "temporal"

type CadenceConfig

type CadenceConfig struct {
	// HostPort to connect to, default to 127.0.0.1:7833
	HostPort string `yaml:"hostPort"`
	// Domain to connect to, default to default
	Domain string `yaml:"domain"`
}

type Config

type Config struct {
	// Api is the API config
	Api ApiConfig `yaml:"api"`
	// Backend is the service behind, either Cadence or Temporal is required
	Backend Backend `yaml:"backend"`
}

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig returns a new decoded Config struct

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"`
}

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 QueryAttributeRequest

type QueryAttributeRequest struct {
	Keys []string
}

type QueryAttributeResponse

type QueryAttributeResponse struct {
	AttributeValues []iwfidl.KeyValue
}

type ResetType

type ResetType string
const ResetTypeBadBinary ResetType = "BAD_BINARY"
const ResetTypeDecisionCompletedTime ResetType = "DECISION_COMPLETED_TIME"
const ResetTypeFirstDecisionCompleted ResetType = "FIRST_DECISION_COMPLETED"
const ResetTypeFirstDecisionScheduled ResetType = "FIRST_DECISION_SCHEDULED"
const ResetTypeHistoryEventId ResetType = "HISTORY_EVENT_ID"
const ResetTypeLastContinuedAsNew ResetType = "LAST_CONTINUED_AS_NEW"
const ResetTypeLastDecisionCompleted ResetType = "LAST_DECISION_COMPLETED"
const ResetTypeLastDecisionScheduled ResetType = "LAST_DECISION_SCHEDULED"

type StateDecideActivityInput

type StateDecideActivityInput struct {
	IwfWorkerUrl string
	Request      iwfidl.WorkflowStateDecideRequest
}

type StateStartActivityInput

type StateStartActivityInput struct {
	IwfWorkerUrl string
	Request      iwfidl.WorkflowStateStartRequest
}

type TemporalConfig

type TemporalConfig struct {
	// HostPort to connect to, default to localhost:7233
	HostPort string `yaml:"hostPort"`
	// Namespace to connect to, default to default
	Namespace string `yaml:"namespace"`
}

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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