Documentation ¶
Index ¶
- type Consensus
- func (c *Consensus) Complain(viewNum uint64, stopView bool)
- func (c *Consensus) Deliver(proposal types.Proposal, signatures []types.Signature) types.Reconfig
- func (c *Consensus) GetLeaderID() uint64
- func (c *Consensus) HandleMessage(sender uint64, m *protos.Message)
- func (c *Consensus) HandleRequest(sender uint64, req []byte)
- func (c *Consensus) Start() error
- func (c *Consensus) Stop()
- func (c *Consensus) SubmitRequest(req []byte) error
- func (c *Consensus) Sync() types.SyncResponse
- func (c *Consensus) ValidateConfiguration(nodes []uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consensus ¶
type Consensus struct { Config types.Configuration Application bft.Application Assembler bft.Assembler WAL bft.WriteAheadLog WALInitialContent [][]byte Comm bft.Comm Signer bft.Signer Verifier bft.Verifier MembershipNotifier bft.MembershipNotifier RequestInspector bft.RequestInspector Synchronizer bft.Synchronizer Logger bft.Logger Metadata protos.ViewMetadata LastProposal types.Proposal LastSignatures []types.Signature Scheduler <-chan time.Time ViewChangerTicker <-chan time.Time Pool *algorithm.Pool // contains filtered or unexported fields }
Consensus submits requests to be total ordered, and delivers to the application proposals by invoking Deliver() on it. The proposals contain batches of requests assembled together by the Assembler.
func (*Consensus) GetLeaderID ¶
GetLeaderID returns the current leader ID or zero if Consensus is not running
func (*Consensus) HandleMessage ¶
func (*Consensus) HandleRequest ¶
func (*Consensus) SubmitRequest ¶
func (*Consensus) Sync ¶
func (c *Consensus) Sync() types.SyncResponse
func (*Consensus) ValidateConfiguration ¶
Click to show internal directories.
Click to hide internal directories.