package
0.29.0-beta.rc2
Repository: https://github.com/lightninglabs/loop.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

NewCachedObserver creates a new cached observer with the given maximum number of cached notifications.
NewErrConfigError creates a new ErrConfigError.
NewErrWaitingForStateTimeout creates a new ErrWaitingForStateTimeout.
NewExampleFSMContext creates a new example FSM context.
NewFixedSizeSlice initializes a new FixedSlice with a given maximum length.
NewStateMachine creates a new state machine.
NewStateMachineWithState creates a new state machine and sets the initial state.
NoOpAction is a no-op action that can be used by states that don't need to execute any action.
UseLogger uses a specified Logger to output package logging info.
WithAbortEarlyOnErrorOption creates a new AbortEarlyOnErrorOption.
WithWaitForStateOption creates a new InitialWaitOption.

# Constants

ContextValidationFailed can be when the passed context if not of the expected type.
EmptyState represents the default state of the system.
States.
NoOp represents a no-op event.
OnError can be used when an action returns a generic error.
States.
States.
States.
Subsystem defines the sub system name of this package.
States.

# Variables

ErrEventRejected is the error returned when the state machine cannot process an event in the state that it is in.
ErrEventRejected is the error returned when the state machine cannot process an event in the state that it is in.
ErrEventRejected is the error returned when the state machine cannot process an event in the state that it is in.
ErrEventRejected is the error returned when the state machine cannot process an event in the state that it is in.
Events.
Events.
Events.

# Structs

AbortEarlyOnErrorOption is an option that can be passed to the WaitForState function to abort early if an error occurs.
CachedObserver is an observer that caches all states and transitions of the observed state machine.
ErrConfigError is an error returned when the state machine is misconfigured.
ErrWaitingForStateTimeout is an error returned when the state machine times out while waiting for a state.
ExampleFSM implements the FSM and uses the ExampleService and ExampleStore to implement the actions.
FixedSizeSlice is a slice with a fixed size.
InitialWaitOption is an option that can be passed to the WaitForState function to wait for a given duration before checking the state.
InitStuffRequest is the event context for the InitFSM state.
Notification represents a notification sent to the state machine's notification channel.
State binds a state with an action and a set of events it can handle.
StateMachine represents the state machine.

# Interfaces

EventContext represents the context to be passed to the action implementation.
ExampleService is an example service that we want to wait for in the FSM.
ExampleStore is an example store that we want to use in our exitFunc.
Observer is an interface that can be implemented by types that want to observe the state machine.
WaitForStateOption is an option that can be passed to the WaitForState function.

# Type aliases

Action represents the action to be executed in a given state.
EventType represents an extensible event type in the state machine.
States represents a mapping of states and their implementations.
StateType represents an extensible state type in the state machine.
Transitions represents a mapping of events and states.