stepfunctions

package
v0.0.1-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 18 Imported by: 0

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

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 New

func New(cfg *config.Config, store state.Store, logger *zap.Logger, clk clock.Clock) *Service

New returns a configured Step Functions Service.

func (*Service) Dispatch

func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)

Dispatch satisfies router.TargetDispatcher.

func (*Service) InitBus

func (s *Service) InitBus(bus *events.Bus)

InitBus wires the event bus for state machine lifecycle events.

func (*Service) Name

func (s *Service) Name() string

Name satisfies router.Service.

func (*Service) Operations

func (s *Service) Operations() []op.Operation

Operations implements router.ProtocolService.

func (*Service) RegisterRoutes

func (s *Service) RegisterRoutes(_ chi.Router)

RegisterRoutes satisfies router.Service. Step Functions has no path-routed endpoints.

func (*Service) SupportedProtocols

func (s *Service) SupportedProtocols() []codec.Codec

SupportedProtocols implements router.ProtocolService.

func (*Service) TargetPrefix

func (s *Service) TargetPrefix() string

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

func (st *Store) DeleteStateMachine(ctx context.Context, name string) error

DeleteStateMachine removes a state machine by name.

func (*Store) GetStateMachine

func (st *Store) GetStateMachine(ctx context.Context, name string) (*StateMachine, error)

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

func (st *Store) PutExecution(ctx context.Context, exec *Execution) error

PutExecution saves an execution record.

func (*Store) PutStateMachine

func (st *Store) PutStateMachine(ctx context.Context, sm *StateMachine) error

PutStateMachine saves a state machine record.

Jump to

Keyboard shortcuts

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