stepfunction

package
v0.0.0-...-fefb669 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBaseState = states.BaseState{
	MaxExecuteTimes: 1000,
	InputPath:       "$",
	OutputPath:      "$",
	ResultPath:      "$",
}

DefaultBaseState default state fields config default value from https://states-language.net/spec.html#Default

View Source
var DefaultTaskBody = TaskBody{
	Resource:         "",
	TimeoutSeconds:   0,
	HeartbeatSeconds: 0,
}

DefaultTaskBody ...

View Source
var (
	ErrorStateNameEmpty = errors.New("state name should not be empty")
)

ErrorLackOfRequiredField ...

View Source
var StateMachineFields = struct {
	Comment string
	Version string
	Type    string
	States  string
}{
	Comment: "Comment",
	Version: "Version",
	Type:    "Type",
	States:  "States",
}

StateMachineFields ...

Functions

This section is empty.

Types

type ChoiceBody

type ChoiceBody struct {
	Choices []map[string]any `mapstructure:"Choices"`
	Default string           `mapstructure:"Default"`
}

type StateMachineBody

type StateMachineBody struct {
	StartAt string
	States  map[string]map[string]any
}

StateMachineBody ...

type StepfuncionDecoder

type StepfuncionDecoder struct {
	*decoder.CommonDecoder
	// contains filtered or unexported fields
}

StepfuncionDecoder ...

func NewStepfuncionDecoder

func NewStepfuncionDecoder(config *decoder.ParserConfig, quota *decoder.Quota) *StepfuncionDecoder

NewStepfuncionDecoder ...

func (*StepfuncionDecoder) Decode

func (decoder *StepfuncionDecoder) Decode(definition string) (*states.StateMachine, error)

Decode ...

func (*StepfuncionDecoder) DecodeBaseState

func (sfDecoder *StepfuncionDecoder) DecodeBaseState(ctx context.Context, data map[string]any) (states.State, error)

DecodeBaseState ...

func (*StepfuncionDecoder) DecodeChoiceBody

func (decoder *StepfuncionDecoder) DecodeChoiceBody(ctx context.Context, data map[string]any) (
	*states.ChoiceBody, error)

DecodeTaskBody ...

func (*StepfuncionDecoder) DecodeChoiceState

func (decoder *StepfuncionDecoder) DecodeChoiceState(ctx context.Context, basestate *states.BaseState, data map[string]any) (
	states.State, error)

DecodeTaskState ...

func (*StepfuncionDecoder) DecodePassState

func (sfDecoder *StepfuncionDecoder) DecodePassState(ctx context.Context,
	basestate *states.BaseState, data map[string]any) (
	states.State, error)

DecodePassState ...

func (*StepfuncionDecoder) DecodeState

func (decoder *StepfuncionDecoder) DecodeState(ctx context.Context, data map[string]any) (states.State, error)

DecodeState ...

func (*StepfuncionDecoder) DecodeStateDefintion

func (sfDecoder *StepfuncionDecoder) DecodeStateDefintion(definition string) (states.State, error)

DecodeStateDefintion ...

func (*StepfuncionDecoder) DecodeStateMachine

func (decoder *StepfuncionDecoder) DecodeStateMachine(ctx context.Context, data map[string]any) (*states.StateMachine, error)

DecodeStateMachine ...

func (*StepfuncionDecoder) DecodeStateMachineBody

func (decoder *StepfuncionDecoder) DecodeStateMachineBody(ctx context.Context, data map[string]any) (
	*states.StateMachineBody, error)

DecodeStateMachineBody ...

func (*StepfuncionDecoder) DecodeStateMachineHeader

func (sfdecoder *StepfuncionDecoder) DecodeStateMachineHeader(ctx context.Context, data map[string]interface{}) (
	*states.StateMachineHeader, error)

DecodeStateMachineHeader ...

func (*StepfuncionDecoder) DecodeStateMachineHeaderDefintion

func (sfdecoder *StepfuncionDecoder) DecodeStateMachineHeaderDefintion(definition string) (*states.StateMachineHeader, error)

DecodeStateMachineHeaderDefintion ...

func (*StepfuncionDecoder) DecodeTaskBody

func (decoder *StepfuncionDecoder) DecodeTaskBody(ctx context.Context, data map[string]any) (
	*states.TaskBody, error)

DecodeTaskBody ...

func (*StepfuncionDecoder) DecodeTaskState

func (decoder *StepfuncionDecoder) DecodeTaskState(ctx context.Context, basestate *states.BaseState, data map[string]any) (
	states.State, error)

DecodeTaskState ...

func (*StepfuncionDecoder) DecodeWaitState

func (sfDecoder *StepfuncionDecoder) DecodeWaitState(ctx context.Context,
	basestate *states.BaseState, data map[string]any) (
	states.State, error)

DecodeWaitState ...

type TaskBody

type TaskBody struct {
	Resource         string           `mapstructure:"Resource"`
	TimeoutSeconds   uint             `mapstructure:"TimeoutSeconds"`
	HeartbeatSeconds uint             `mapstructure:"HeartbeatSeconds"`
	Retry            []map[string]any `mapstructure:"Retry"`
	Catch            []map[string]any `mapstructure:"Catch"`
}

TaskBody task body for stepfunction

Jump to

Keyboard shortcuts

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