Documentation ¶
Index ¶
- func NewFSM(buffer *ringbuffer.RingBuffer) rafthashi.FSM
- func NewSnapshotStore() rafthashi.SnapshotStore
- func NewStableStore() rafthashi.StableStore
- func NewTransport(bufferName, intraAddr string, clientFetcher ClientFetcher, ...) rafthashi.Transport
- func WithBufferSize(size int) func(*Config)
- func WithLogger(logger *log.Logger) func(*Config)
- func WithPeers(peers []string) func(*Config)
- type BufferReader
- type BuildOp
- type ClientFetcher
- type Config
- type ConsumerFetcher
- type Node
- type PeerRepair
- type PeerStore
- type Raft
- func (r *Raft) ExpectedPeers() (peers []string)
- func (r *Raft) LastIndex() uint64
- func (r *Raft) Leader() string
- func (r *Raft) ReadAt(index uint64) (entry []byte, seq uint64, err error)
- func (r *Raft) SetExpectedPeers(peers []string)
- func (r *Raft) Shutdown() rafthashi.Future
- func (r *Raft) Write(storedData stored.Data, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFSM ¶
func NewFSM(buffer *ringbuffer.RingBuffer) rafthashi.FSM
func NewSnapshotStore ¶
func NewSnapshotStore() rafthashi.SnapshotStore
func NewStableStore ¶
func NewStableStore() rafthashi.StableStore
func NewTransport ¶
func WithBufferSize ¶
func WithLogger ¶
Types ¶
type BufferReader ¶
type ClientFetcher ¶
type ClientFetcher interface {
Fetch(target string) intra.NodeRaftClient
}
type ConsumerFetcher ¶
type PeerRepair ¶
type PeerRepair struct {
// contains filtered or unexported fields
}
func NewPeerRepair ¶
func NewPeerRepair(store rafthashi.PeerStore, node Node) *PeerRepair
func (*PeerRepair) ExpectedPeers ¶
func (r *PeerRepair) ExpectedPeers() (peers []string)
func (*PeerRepair) SetExpectedPeers ¶
func (r *PeerRepair) SetExpectedPeers(peers []string)
type Raft ¶
type Raft struct {
// contains filtered or unexported fields
}
func Build ¶
func Build(bufferName string, consumerFetcher ConsumerFetcher, ops ...BuildOp) (*Raft, error)
func (*Raft) ExpectedPeers ¶
func (*Raft) SetExpectedPeers ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.