Documentation
¶
Index ¶
- Constants
- func BuildState(data []byte) (interface{}, error)
- func ParseStateType(data []byte) (reflect.Type, error)
- func Process(data []byte, path string) ([]byte, error)
- type AfantyCore
- type BaseState
- type Branches
- type Catcher
- type ChoiceRule
- type ChoiceState
- type Event
- type EventHandler
- type FailState
- type Option
- type ParallelState
- type PassState
- type Retry
- type RetryContext
- type State
- type StateMachine
- type SucceedState
- type TaskState
- type WaitState
Constants ¶
View Source
const ( Name_PassState = "Pass" Name_TaskState = "Task" Name_ChoiceState = "Choice" Name_WaitState = "Wait" Name_ParallelState = "Parallel" Name_SucceedState = "Succeed" Name_FailState = "Fail" Errors_All = "States.ALL" Errors_Timeout = "States.Timeout" Errors_Failed = "States.TaskFailed" Errors_Permissions = "States.Permissions" Errors_ProcessFailed = "States.ProcessFailed" )
Variables ¶
This section is empty.
Functions ¶
func BuildState ¶
Types ¶
type AfantyCore ¶
type AfantyCore struct {
Name string
// contains filtered or unexported fields
}
func NewAfantyInstance ¶
func NewAfantyInstance(name string, options ...Option) *AfantyCore
func (*AfantyCore) Pub ¶
func (c *AfantyCore) Pub(e Event) error
func (*AfantyCore) Shutdown ¶
func (c *AfantyCore) Shutdown()
func (*AfantyCore) Sub ¶
func (c *AfantyCore) Sub(name string, handler EventHandler) error
type ChoiceRule ¶
type ChoiceState ¶
type ChoiceState struct {
// Choice states do not support the End field
State
Choices []*ChoiceRule
Default string
}
type Event ¶
func (*Event) WaitResult ¶
type EventHandler ¶
type EventHandler func(Event)
type Option ¶
type Option func(*AfantyCore)
type ParallelState ¶
type RetryContext ¶
type State ¶
type State struct {
BaseState
Next string
End bool
Comment string
InputPath string
OutputPath string
}
func ExecuteStateJSON ¶
func ExecuteStateJSON(stateJSON json.RawMessage, data *json.RawMessage) (State, error)
type StateMachine ¶
type StateMachine struct {
Version string
Comment string
TimeoutSeconds int32
StartAt string
States map[string]*json.RawMessage
}
func NewStateMachineFromJSON ¶
func NewStateMachineFromJSON(j []byte) (StateMachine, error)
func (*StateMachine) Execute ¶
func (sm *StateMachine) Execute(data *json.RawMessage) error
type SucceedState ¶
Click to show internal directories.
Click to hide internal directories.