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)deprecated
- func (x *RaftLog) GetData() []byte
- func (x *RaftLog) GetExtensions() []byte
- func (x *RaftLog) GetIndex() uint64
- func (x *RaftLog) GetTerm() uint64
- func (x *RaftLog) GetType() RaftLogType
- func (*RaftLog) ProtoMessage()
- func (x *RaftLog) ProtoReflect() protoreflect.Message
- func (x *RaftLog) Reset()
- func (x *RaftLog) String() string
- type RaftLogType
- func (RaftLogType) Descriptor() protoreflect.EnumDescriptor
- func (x RaftLogType) Enum() *RaftLogType
- func (RaftLogType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RaftLogType) Number() protoreflect.EnumNumber
- func (x RaftLogType) String() string
- func (RaftLogType) Type() protoreflect.EnumType
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", } RaftLogType_value = map[string]int32{ "LogCommand": 0, "LogNoop": 1, "LogAddPeerDeprecated": 2, "LogRemovePeerDeprecated": 3, "LogBarrier": 4, "LogConfiguration": 5, } )
Enum value maps for RaftLogType.
View Source
var File_raft_badger_proto protoreflect.FileDescriptor
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"` // contains filtered or unexported fields }
func (*RaftLog) Descriptor
deprecated
func (*RaftLog) GetExtensions ¶
func (*RaftLog) GetType ¶
func (x *RaftLog) GetType() RaftLogType
func (*RaftLog) ProtoMessage ¶
func (*RaftLog) ProtoMessage()
func (*RaftLog) ProtoReflect ¶
func (x *RaftLog) ProtoReflect() protoreflect.Message
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) Descriptor ¶
func (RaftLogType) Descriptor() protoreflect.EnumDescriptor
func (RaftLogType) Enum ¶
func (x RaftLogType) Enum() *RaftLogType
func (RaftLogType) EnumDescriptor
deprecated
func (RaftLogType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RaftLogType.Descriptor instead.
func (RaftLogType) Number ¶
func (x RaftLogType) Number() protoreflect.EnumNumber
func (RaftLogType) String ¶
func (x RaftLogType) String() string
func (RaftLogType) Type ¶
func (RaftLogType) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.