Documentation ¶
Index ¶
- Variables
- func NewLogStore(db *badger.DB, prefix []byte) raft.LogStore
- func NewStableStore(db *badger.DB, prefix []byte) raft.StableStore
- type RaftLog
- func (*RaftLog) Descriptor() ([]byte, []int)
- func (m *RaftLog) GetData() []byte
- func (m *RaftLog) GetExtensions() []byte
- func (m *RaftLog) GetIndex() uint64
- func (m *RaftLog) GetTerm() uint64
- func (m *RaftLog) GetType() RaftLogType
- func (*RaftLog) ProtoMessage()
- func (m *RaftLog) Reset()
- func (m *RaftLog) String() string
- func (m *RaftLog) XXX_DiscardUnknown()
- func (m *RaftLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RaftLog) XXX_Merge(src proto.Message)
- func (m *RaftLog) XXX_Size() int
- func (m *RaftLog) XXX_Unmarshal(b []byte) error
- type RaftLogType
Constants ¶
This section is empty.
Variables ¶
View Source
var RaftLogType_name = map[int32]string{
0: "LogCommand",
1: "LogNoop",
2: "LogAddPeerDeprecated",
3: "LogRemovePeerDeprecated",
4: "LogBarrier",
5: "LogConfiguration",
}
View Source
var RaftLogType_value = map[string]int32{
"LogCommand": 0,
"LogNoop": 1,
"LogAddPeerDeprecated": 2,
"LogRemovePeerDeprecated": 3,
"LogBarrier": 4,
"LogConfiguration": 5,
}
Functions ¶
func NewLogStore ¶
func NewStableStore ¶
func NewStableStore(db *badger.DB, prefix []byte) raft.StableStore
Types ¶
type RaftLog ¶
type RaftLog struct { Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Term uint64 `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"` Type RaftLogType `protobuf:"varint,3,opt,name=type,proto3,enum=raftbadger.RaftLogType" json:"type,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` Extensions []byte `protobuf:"bytes,5,opt,name=extensions,proto3" json:"extensions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RaftLog) Descriptor ¶
func (*RaftLog) GetExtensions ¶
func (*RaftLog) GetType ¶
func (m *RaftLog) GetType() RaftLogType
func (*RaftLog) ProtoMessage ¶
func (*RaftLog) ProtoMessage()
func (*RaftLog) XXX_DiscardUnknown ¶
func (m *RaftLog) XXX_DiscardUnknown()
func (*RaftLog) XXX_Marshal ¶
func (*RaftLog) XXX_Unmarshal ¶
type RaftLogType ¶
type RaftLogType int32
const ( RaftLogType_LogCommand RaftLogType = 0 RaftLogType_LogNoop RaftLogType = 1 RaftLogType_LogAddPeerDeprecated RaftLogType = 2 RaftLogType_LogRemovePeerDeprecated RaftLogType = 3 RaftLogType_LogBarrier RaftLogType = 4 RaftLogType_LogConfiguration RaftLogType = 5 )
func (RaftLogType) EnumDescriptor ¶
func (RaftLogType) EnumDescriptor() ([]byte, []int)
func (RaftLogType) String ¶
func (x RaftLogType) String() string
Click to show internal directories.
Click to hide internal directories.