Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EpochPrepending indicates we have sent an epoch-change, but waiting for a quorum EpochPrepending = iota // EpochPending indicates that we have a quorum of epoch-change messages, waits on new-epoch EpochPending // EpochVerifying indicates we have received a new view message but it references epoch changes we cannot yet verify EpochVerifying // EpochFetching indicates we have received and verified a new epoch messages, and are waiting to get state EpochFetching // EpochEchoing indicates we have received and validated a new-epoch, waiting for a quorum of echos EpochEchoing // EpochReadying indicates we have received a quorum of echos, waiting a on qourum of readies EpochReadying // EpochReady indicates the new epoch is ready to begin EpochReady // EpochInProgress indicates the epoch is currently active EpochInProgress // EpochDone indicates this epoch has ended, either gracefully or because we sent an epoch change EpochDone )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct { ID uint64 `json:"id"` Leader bool `json:"leader"` Sequences []SequenceState `json:"sequences"` }
type Checkpoint ¶
type ClientTracker ¶
type EpochChange ¶
type EpochChange struct { Source uint64 `json:"source"` Msgs []*EpochChangeMsg `json:"messages"` }
type EpochChangeMsg ¶
type EpochTarget ¶
type EpochTarget struct { Number uint64 `json:"number"` State EpochTargetState `json:"state"` EpochChanges []*EpochChange `json:"epoch_changes"` Echos []uint64 `json:"echos"` Readies []uint64 `json:"readies"` Suspicions []uint64 `json:"suspicions"` Leaders []uint64 `json:"leaders"` }
type EpochTargetState ¶
type EpochTargetState int
type EpochTracker ¶
type EpochTracker struct {
ActiveEpoch *EpochTarget `json:"last_active_epoch"`
}
type MsgBuffer ¶
type MsgBuffer struct { Component string `json:"component"` Size int `json:"size"` Msgs int `json:"msgs"` }
type NodeBucket ¶
type NodeBuffer ¶
type SequenceState ¶
type SequenceState int
const ( // SequenceUnitialized indicates no batch has been assigned to this sequence. SequenceUninitialized SequenceState = iota // SequenceAllocated indicates that a potentially valid batch has been assigned to this sequence. SequenceAllocated // SequencePendingRequests indicates that we are waiting for missing requests to arrive or be validated. SequencePendingRequests // SequenceReady indicates that we have all requests and are ready to proceed with the 3-phase commit. SequenceReady // SequencePreprepared indicates that we have sent a Prepare/Preprepare as follow/leader respectively. SequencePreprepared // SequencePreprepared indicates that we have sent a Commit message. SequencePrepared // SequenceCommitted indicates that we have a quorum of commit messages and the sequence is // eligible to commit. Note though, that all prior sequences must commit prior to the consumer // seeing this commit event. SequenceCommitted )
type StateMachine ¶
type StateMachine struct { NodeID uint64 `json:"node_id"` LowWatermark uint64 `json:"low_watermark"` HighWatermark uint64 `json:"high_watermark"` EpochTracker *EpochTracker `json:"epoch_tracker"` NodeBuffers []*NodeBuffer `json:"node_buffers"` Buckets []*Bucket `json:"buckets"` Checkpoints []*Checkpoint `json:"checkpoints"` ClientWindows []*ClientTracker `json:"client_tracker"` }
func (*StateMachine) Pretty ¶
func (s *StateMachine) Pretty() string
Click to show internal directories.
Click to hide internal directories.