Documentation
¶
Overview ¶
Package testworkflow contains a small deterministic graph used only by the bridge integration and recovery tests.
Index ¶
- func NewDefinition(store flow.CheckpointStore) (*bridge.TypedDefinition[CounterState], error)
- func NewDefinitionWithGate(store flow.CheckpointStore, gate <-chan struct{}) (*bridge.TypedDefinition[CounterState], error)
- func NewDefinitionWithGateAndSignal(store flow.CheckpointStore, gate <-chan struct{}, entered chan<- struct{}) (*bridge.TypedDefinition[CounterState], error)
- type CounterState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefinition ¶
func NewDefinition(store flow.CheckpointStore) (*bridge.TypedDefinition[CounterState], error)
NewDefinition builds the two-vertex counter over the caller's neutral Flow checkpoint store. The graph and vertex IDs are stable across restarts.
func NewDefinitionWithGate ¶
func NewDefinitionWithGate(store flow.CheckpointStore, gate <-chan struct{}) (*bridge.TypedDefinition[CounterState], error)
NewDefinitionWithGate is the same graph with an optional test-only gate before each vertex. It lets the integration test prove that workflow_start returns after the durable seed rather than after graph completion.
func NewDefinitionWithGateAndSignal ¶
func NewDefinitionWithGateAndSignal(store flow.CheckpointStore, gate <-chan struct{}, entered chan<- struct{}) (*bridge.TypedDefinition[CounterState], error)
NewDefinitionWithGateAndSignal is the integration-test variant that signals once a live vertex has entered the optional gate. The signal is bounded to one non-blocking send so a test cannot make workflow execution depend on its own observer.
Types ¶
type CounterState ¶
type CounterState struct {
Count int `json:"count"`
}
CounterState is intentionally small so integration tests can assert the durable result without exposing application payloads through activities.