Documentation
¶
Index ¶
- Variables
- func IntializeWALForNewNode(wal WAL, runtimeParms *state.EventInitialParameters, ...) (*statemachine.EventList, error)
- func ProcessAppActions(app App, actions *statemachine.ActionList) (*statemachine.EventList, error)
- func ProcessHashActions(hasher Hasher, actions *statemachine.ActionList) (*statemachine.EventList, error)
- func ProcessNetActions(selfID uint64, link Link, actions *statemachine.ActionList) (*statemachine.EventList, error)
- func ProcessReqStoreEvents(reqStore RequestStore, events *statemachine.EventList) (*statemachine.EventList, error)
- func ProcessStateMachineEvents(sm *statemachine.StateMachine, i EventInterceptor, ...) (*statemachine.ActionList, error)
- func ProcessWALActions(wal WAL, actions *statemachine.ActionList) (*statemachine.ActionList, error)
- func RecoverWALForExistingNode(wal WAL, runtimeParms *state.EventInitialParameters) (*statemachine.EventList, error)
- type App
- type Client
- type Clients
- type EventInterceptor
- type Hasher
- type Link
- type Replica
- type Replicas
- type RequestStore
- type WAL
- type WorkItems
- func (pi *WorkItems) AddAppResults(events *statemachine.EventList)
- func (pi *WorkItems) AddClientResults(events *statemachine.EventList)
- func (pi *WorkItems) AddHashResults(events *statemachine.EventList)
- func (pi *WorkItems) AddNetResults(events *statemachine.EventList)
- func (pi *WorkItems) AddReqStoreResults(events *statemachine.EventList)
- func (pi *WorkItems) AddStateMachineResults(actions *statemachine.ActionList)
- func (pi *WorkItems) AddWALResults(actions *statemachine.ActionList)
- func (pi *WorkItems) AppActions() *statemachine.ActionList
- func (pi *WorkItems) ClearAppActions()
- func (pi *WorkItems) ClearClientActions()
- func (pi *WorkItems) ClearHashActions()
- func (pi *WorkItems) ClearNetActions()
- func (pi *WorkItems) ClearReqStoreEvents()
- func (pi *WorkItems) ClearResultEvents()
- func (pi *WorkItems) ClearWALActions()
- func (pi *WorkItems) ClientActions() *statemachine.ActionList
- func (pi *WorkItems) HashActions() *statemachine.ActionList
- func (pi *WorkItems) NetActions() *statemachine.ActionList
- func (pi *WorkItems) ReqStoreEvents() *statemachine.EventList
- func (pi *WorkItems) ResultEvents() *statemachine.EventList
- func (pi *WorkItems) WALActions() *statemachine.ActionList
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClientNotExist error = errors.New("client does not exist")
View Source
var ErrStopped = errors.Errorf("stopped")
Functions ¶
func IntializeWALForNewNode ¶
func IntializeWALForNewNode( wal WAL, runtimeParms *state.EventInitialParameters, initialNetworkState *msgs.NetworkState, initialCheckpointValue []byte, ) (*statemachine.EventList, error)
func ProcessAppActions ¶
func ProcessAppActions(app App, actions *statemachine.ActionList) (*statemachine.EventList, error)
func ProcessHashActions ¶
func ProcessHashActions(hasher Hasher, actions *statemachine.ActionList) (*statemachine.EventList, error)
func ProcessNetActions ¶
func ProcessNetActions(selfID uint64, link Link, actions *statemachine.ActionList) (*statemachine.EventList, error)
func ProcessReqStoreEvents ¶
func ProcessReqStoreEvents(reqStore RequestStore, events *statemachine.EventList) (*statemachine.EventList, error)
func ProcessStateMachineEvents ¶
func ProcessStateMachineEvents(sm *statemachine.StateMachine, i EventInterceptor, events *statemachine.EventList) (*statemachine.ActionList, error)
func ProcessWALActions ¶
func ProcessWALActions(wal WAL, actions *statemachine.ActionList) (*statemachine.ActionList, error)
func RecoverWALForExistingNode ¶
func RecoverWALForExistingNode(wal WAL, runtimeParms *state.EventInitialParameters) (*statemachine.EventList, error)
Types ¶
type App ¶
type App interface { Apply(*msgs.QEntry) error Snap(networkConfig *msgs.NetworkState_Config, clientsState []*msgs.NetworkState_Client) ([]byte, []*msgs.Reconfiguration, error) TransferTo(seqNo uint64, snap []byte) (*msgs.NetworkState, error) }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
TODO, client needs to be updated based on the state applied events, to give it a low watermark minimally and to clean up the reqNoMap
type Clients ¶
type Clients struct { Hasher Hasher RequestStore RequestStore // contains filtered or unexported fields }
func (*Clients) ProcessClientActions ¶
func (c *Clients) ProcessClientActions(actions *statemachine.ActionList) (*statemachine.EventList, error)
type EventInterceptor ¶
type EventInterceptor interface { // Intercept is invoked prior to passing each state event to // the state machine. If Intercept returns an error, the // state machine halts. Intercept(s *state.Event) error }
EventInterceptor provides a way for a consumer to gain insight into the internal operation of the state machine. And is usually not interesting outside of debugging or testing scenarios. Note, this is applied inside the serializer, so any blocking will prevent the event from arriving at the state machine until it returns.
type RequestStore ¶
type WorkItems ¶
type WorkItems struct {
// contains filtered or unexported fields
}
func NewWorkItems ¶
func NewWorkItems() *WorkItems
func (*WorkItems) AddAppResults ¶
func (pi *WorkItems) AddAppResults(events *statemachine.EventList)
func (*WorkItems) AddClientResults ¶
func (pi *WorkItems) AddClientResults(events *statemachine.EventList)
func (*WorkItems) AddHashResults ¶
func (pi *WorkItems) AddHashResults(events *statemachine.EventList)
func (*WorkItems) AddNetResults ¶
func (pi *WorkItems) AddNetResults(events *statemachine.EventList)
func (*WorkItems) AddReqStoreResults ¶
func (pi *WorkItems) AddReqStoreResults(events *statemachine.EventList)
func (*WorkItems) AddStateMachineResults ¶
func (pi *WorkItems) AddStateMachineResults(actions *statemachine.ActionList)
func (*WorkItems) AddWALResults ¶
func (pi *WorkItems) AddWALResults(actions *statemachine.ActionList)
func (*WorkItems) AppActions ¶
func (pi *WorkItems) AppActions() *statemachine.ActionList
func (*WorkItems) ClearAppActions ¶
func (pi *WorkItems) ClearAppActions()
func (*WorkItems) ClearClientActions ¶
func (pi *WorkItems) ClearClientActions()
func (*WorkItems) ClearHashActions ¶
func (pi *WorkItems) ClearHashActions()
func (*WorkItems) ClearNetActions ¶
func (pi *WorkItems) ClearNetActions()
func (*WorkItems) ClearReqStoreEvents ¶
func (pi *WorkItems) ClearReqStoreEvents()
func (*WorkItems) ClearResultEvents ¶
func (pi *WorkItems) ClearResultEvents()
func (*WorkItems) ClearWALActions ¶
func (pi *WorkItems) ClearWALActions()
func (*WorkItems) ClientActions ¶
func (pi *WorkItems) ClientActions() *statemachine.ActionList
func (*WorkItems) HashActions ¶
func (pi *WorkItems) HashActions() *statemachine.ActionList
func (*WorkItems) NetActions ¶
func (pi *WorkItems) NetActions() *statemachine.ActionList
func (*WorkItems) ReqStoreEvents ¶
func (pi *WorkItems) ReqStoreEvents() *statemachine.EventList
func (*WorkItems) ResultEvents ¶
func (pi *WorkItems) ResultEvents() *statemachine.EventList
func (*WorkItems) WALActions ¶
func (pi *WorkItems) WALActions() *statemachine.ActionList
Click to show internal directories.
Click to hide internal directories.