Documentation ¶
Index ¶
- type NodeConf
- type NodeState
- type Peer
- type Proposer
- type RaftServiceContext
- type RaftStorage
- func (r *RaftStorage) Close() error
- func (r *RaftStorage) IsIDRemoved(id uint64) bool
- func (r *RaftStorage) IsLeader() bool
- func (r *RaftStorage) LeaderId() uint64
- func (r *RaftStorage) LoadRaftPersistentState() error
- func (r *RaftStorage) Process(ctx context.Context, m raftpb.Message) error
- func (r *RaftStorage) ReportSnapshot(id uint64, status raft.SnapshotStatus)
- func (r *RaftStorage) ReportUnreachable(id uint64)
- func (r *RaftStorage) SavePersistentState() error
- func (r *RaftStorage) Snapshotter() *snap.Snapshotter
- func (r *RaftStorage) Start()
- type RaftStorageOptions
- type RaftStorageServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct { ID uint64 Context storagepb.PeerContext }
type RaftServiceContext ¶
RaftServiceContext external dependencies which a Raft storage node relies on is passed in dependency injection style.
type RaftStorage ¶
func NewRaftStorage ¶
func NewRaftStorage(options RaftStorageOptions, context *RaftServiceContext) (*RaftStorage, error)
func (*RaftStorage) Close ¶
func (r *RaftStorage) Close() error
func (*RaftStorage) IsIDRemoved ¶
func (r *RaftStorage) IsIDRemoved(id uint64) bool
func (*RaftStorage) IsLeader ¶
func (r *RaftStorage) IsLeader() bool
func (*RaftStorage) LeaderId ¶
func (r *RaftStorage) LeaderId() uint64
func (*RaftStorage) LoadRaftPersistentState ¶
func (r *RaftStorage) LoadRaftPersistentState() error
func (*RaftStorage) ReportSnapshot ¶
func (r *RaftStorage) ReportSnapshot(id uint64, status raft.SnapshotStatus)
func (*RaftStorage) ReportUnreachable ¶
func (r *RaftStorage) ReportUnreachable(id uint64)
func (*RaftStorage) SavePersistentState ¶
func (r *RaftStorage) SavePersistentState() error
func (*RaftStorage) Snapshotter ¶
func (r *RaftStorage) Snapshotter() *snap.Snapshotter
func (*RaftStorage) Start ¶
func (r *RaftStorage) Start()
type RaftStorageOptions ¶
type RaftStorageServer ¶
type RaftStorageServer struct {
// contains filtered or unexported fields
}
func NewRaftStorageServer ¶
func NewRaftStorageServer(bindAddr string, bindPort int, clusterId uint64, rs *RaftStorage) (*RaftStorageServer, error)
func (*RaftStorageServer) Start ¶
func (t *RaftStorageServer) Start() error
func (*RaftStorageServer) Stop ¶
func (t *RaftStorageServer) Stop() error
func (*RaftStorageServer) Storage ¶
func (s *RaftStorageServer) Storage() *RaftStorage
Click to show internal directories.
Click to hide internal directories.