Documentation
¶
Index ¶
- Constants
- func NewBootstrapRaft(ctx context.Context, isInMemory bool, validators ...ConsensusValidatorFunc) (_ *consensusService, err error)
- func NewMemberRaft(ctx context.Context, consRepo ConsensusStorer, ...) (_ *consensusService, err error)
- func NewWarpnetConsensusTransport(node NodeTransporter, l *consensusLogger) (*raft.NetworkTransport, error)
- type Consensus
- type ConsensusStorer
- type ConsensusValidatorFunc
- type KVState
- type NodeTransporter
- type State
Constants ¶
View Source
const ErrConsensusRejection = warpnet.WarpError("consensus: quorum rejected your node. Try to delete database and update app version")
View Source
const (
ErrNoRaftCluster = warpnet.WarpError("consensus: no cluster found")
)
Variables ¶
This section is empty.
Functions ¶
func NewBootstrapRaft ¶
func NewBootstrapRaft(ctx context.Context, isInMemory bool, validators ...ConsensusValidatorFunc) (_ *consensusService, err error)
func NewMemberRaft ¶
func NewMemberRaft( ctx context.Context, consRepo ConsensusStorer, validators ...ConsensusValidatorFunc, ) (_ *consensusService, err error)
func NewWarpnetConsensusTransport ¶
func NewWarpnetConsensusTransport(node NodeTransporter, l *consensusLogger) (*raft.NetworkTransport, error)
Types ¶
type ConsensusStorer ¶
type ConsensusStorer interface {
raft.StableStore
Reset() error
SnapshotsPath() string
}
type ConsensusValidatorFunc ¶
type NodeTransporter ¶
Click to show internal directories.
Click to hide internal directories.