Documentation
¶
Overview ¶
Package stepfunctions provides emulation of AWS Step Functions. See docs/services/stepfunctions.md for the support matrix (when available).
Wire protocol: JSON 1.0 (X-Amz-Target: AWSStepFunctions.*) and RPC v2 CBOR. Implements: CreateStateMachine, DescribeStateMachine, ListStateMachines, StartExecution, DeleteStateMachine.
Index ¶
- type Execution
- type Handler
- func (h *Handler) CreateStateMachine(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DeleteStateMachine(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DescribeStateMachine(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ListStateMachines(w http.ResponseWriter, r *http.Request)
- func (h *Handler) StartExecution(w http.ResponseWriter, r *http.Request)
- type Service
- func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)
- func (s *Service) InitBus(bus *events.Bus)
- func (s *Service) Name() string
- func (s *Service) Operations() []op.Operation
- func (s *Service) RegisterRoutes(_ chi.Router)
- func (s *Service) SupportedProtocols() []codec.Codec
- func (s *Service) TargetPrefix() string
- type StateMachine
- type Store
- func (st *Store) DeleteStateMachine(ctx context.Context, name string) error
- func (st *Store) GetStateMachine(ctx context.Context, name string) (*StateMachine, error)
- func (st *Store) ListStateMachines(ctx context.Context) ([]*StateMachine, error)
- func (st *Store) PutExecution(ctx context.Context, exec *Execution) error
- func (st *Store) PutStateMachine(ctx context.Context, sm *StateMachine) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Execution ¶
type Execution struct {
ExecutionArn string `json:"ExecutionArn"`
StateMachineArn string `json:"StateMachineArn"`
Name string `json:"Name"`
Input string `json:"Input"`
Status string `json:"Status"`
StartDate time.Time `json:"StartDate"`
}
Execution represents a Step Functions execution.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler holds Step Functions handler dependencies.
func (*Handler) CreateStateMachine ¶
func (h *Handler) CreateStateMachine(w http.ResponseWriter, r *http.Request)
func (*Handler) DeleteStateMachine ¶
func (h *Handler) DeleteStateMachine(w http.ResponseWriter, r *http.Request)
func (*Handler) DescribeStateMachine ¶
func (h *Handler) DescribeStateMachine(w http.ResponseWriter, r *http.Request)
func (*Handler) ListStateMachines ¶
func (h *Handler) ListStateMachines(w http.ResponseWriter, r *http.Request)
func (*Handler) StartExecution ¶
func (h *Handler) StartExecution(w http.ResponseWriter, r *http.Request)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements router.Service and router.TargetDispatcher for Step Functions.
func (*Service) Dispatch ¶
func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)
Dispatch satisfies router.TargetDispatcher.
func (*Service) Operations ¶
Operations implements router.ProtocolService.
func (*Service) RegisterRoutes ¶
RegisterRoutes satisfies router.Service. Step Functions has no path-routed endpoints.
func (*Service) SupportedProtocols ¶
SupportedProtocols implements router.ProtocolService.
func (*Service) TargetPrefix ¶
TargetPrefix satisfies router.TargetDispatcher. The AWS SDK sends "AWSStepFunctions." as the target prefix; "AmazonStates." is an older alias.
type StateMachine ¶
type StateMachine struct {
Name string `json:"Name"`
ARN string `json:"ARN"`
Definition string `json:"Definition"`
RoleArn string `json:"RoleArn"`
Type string `json:"Type"` // "STANDARD" or "EXPRESS"
Status string `json:"Status"`
CreatedAt time.Time `json:"CreatedAt"`
}
StateMachine represents a Step Functions state machine.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store wraps state.Store with Step Functions-specific helpers.
func (*Store) DeleteStateMachine ¶
DeleteStateMachine removes a state machine by name.
func (*Store) GetStateMachine ¶
GetStateMachine retrieves a state machine by name. Returns nil, nil if not found.
func (*Store) ListStateMachines ¶
func (st *Store) ListStateMachines(ctx context.Context) ([]*StateMachine, error)
ListStateMachines returns all state machines.
func (*Store) PutExecution ¶
PutExecution saves an execution record.
func (*Store) PutStateMachine ¶
func (st *Store) PutStateMachine(ctx context.Context, sm *StateMachine) error
PutStateMachine saves a state machine record.