Documentation ¶
Overview ¶
Package raftpb contains definitions of Raft internal structs, states and messages that are not visible to typical dragonboat applications. It is required when building your customized LogDB and Raft RPC modules. You can safely ignore this package when building dragonboat applications.
Index ¶
- Constants
- Variables
- func IsEmptySnapshot(s Snapshot) bool
- func IsEmptyState(st State) bool
- func IsStateEqual(a State, b State) bool
- type Bootstrap
- func (*Bootstrap) Descriptor() ([]byte, []int)
- func (m *Bootstrap) GetAddresses() map[uint64]string
- func (m *Bootstrap) GetJoin() bool
- func (m *Bootstrap) Marshal() (dAtA []byte, err error)
- func (m *Bootstrap) MarshalTo(dAtA []byte) (int, error)
- func (*Bootstrap) ProtoMessage()
- func (m *Bootstrap) Reset()
- func (m *Bootstrap) Size() (n int)
- func (m *Bootstrap) String() string
- func (m *Bootstrap) Unmarshal(dAtA []byte) error
- func (b *Bootstrap) Validate(nodes map[uint64]string, join bool) bool
- func (m *Bootstrap) XXX_DiscardUnknown()
- func (m *Bootstrap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Bootstrap) XXX_Merge(src proto.Message)
- func (m *Bootstrap) XXX_Size() int
- func (m *Bootstrap) XXX_Unmarshal(b []byte) error
- type ChecksumType
- type ColferError
- type ColferMax
- type ColferTail
- type ConfigChange
- func (*ConfigChange) Descriptor() ([]byte, []int)
- func (m *ConfigChange) GetAddress() string
- func (m *ConfigChange) GetConfigChangeId() uint64
- func (m *ConfigChange) GetInitialize() bool
- func (m *ConfigChange) GetNodeID() uint64
- func (m *ConfigChange) GetType() ConfigChangeType
- func (m *ConfigChange) Marshal() (dAtA []byte, err error)
- func (m *ConfigChange) MarshalTo(dAtA []byte) (int, error)
- func (*ConfigChange) ProtoMessage()
- func (m *ConfigChange) Reset()
- func (m *ConfigChange) Size() (n int)
- func (m *ConfigChange) String() string
- func (m *ConfigChange) Unmarshal(dAtA []byte) error
- func (m *ConfigChange) XXX_DiscardUnknown()
- func (m *ConfigChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ConfigChange) XXX_Merge(src proto.Message)
- func (m *ConfigChange) XXX_Size() int
- func (m *ConfigChange) XXX_Unmarshal(b []byte) error
- type ConfigChangeType
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) GetClientID() uint64
- func (m *Entry) GetCmd() []byte
- func (m *Entry) GetIndex() uint64
- func (m *Entry) GetKey() uint64
- func (m *Entry) GetRespondedTo() uint64
- func (m *Entry) GetSeriesID() uint64
- func (m *Entry) GetTerm() uint64
- func (m *Entry) GetType() EntryType
- func (e *Entry) IsConfigChange() bool
- func (e *Entry) IsEmpty() bool
- func (e *Entry) IsEndOfSessionRequest() bool
- func (e *Entry) IsNewSessionRequest() bool
- func (e *Entry) IsNoOPSession() bool
- func (e *Entry) IsSessionManaged() bool
- func (e *Entry) IsUpdateEntry() bool
- func (m *Entry) Marshal() (dAtA []byte, err error)
- func (o *Entry) MarshalTo(buf []byte) (int, error)
- func (*Entry) ProtoMessage()
- func (m *Entry) Reset()
- func (o *Entry) Size() int
- func (o *Entry) SizeUpperLimit() int
- func (m *Entry) String() string
- func (o *Entry) Unmarshal(data []byte) error
- func (m *Entry) XXX_DiscardUnknown()
- func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Entry) XXX_Merge(src proto.Message)
- func (m *Entry) XXX_Size() int
- func (m *Entry) XXX_Unmarshal(b []byte) error
- type EntryBatch
- func (*EntryBatch) Descriptor() ([]byte, []int)
- func (m *EntryBatch) GetEntries() []Entry
- func (m *EntryBatch) Marshal() (dAtA []byte, err error)
- func (m *EntryBatch) MarshalTo(dAtA []byte) (int, error)
- func (*EntryBatch) ProtoMessage()
- func (m *EntryBatch) Reset()
- func (m *EntryBatch) Size() (n int)
- func (m *EntryBatch) SizeUpperLimit() (n int)
- func (m *EntryBatch) String() string
- func (m *EntryBatch) Unmarshal(dAtA []byte) error
- func (m *EntryBatch) XXX_DiscardUnknown()
- func (m *EntryBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *EntryBatch) XXX_Merge(src proto.Message)
- func (m *EntryBatch) XXX_Size() int
- func (m *EntryBatch) XXX_Unmarshal(b []byte) error
- type EntryType
- type Membership
- func (*Membership) Descriptor() ([]byte, []int)
- func (m *Membership) GetAddresses() map[uint64]string
- func (m *Membership) GetConfigChangeId() uint64
- func (m *Membership) GetObservers() map[uint64]string
- func (m *Membership) GetRemoved() map[uint64]bool
- func (m *Membership) Marshal() (dAtA []byte, err error)
- func (m *Membership) MarshalTo(dAtA []byte) (int, error)
- func (*Membership) ProtoMessage()
- func (m *Membership) Reset()
- func (m *Membership) Size() (n int)
- func (m *Membership) String() string
- func (m *Membership) Unmarshal(dAtA []byte) error
- func (m *Membership) XXX_DiscardUnknown()
- func (m *Membership) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Membership) XXX_Merge(src proto.Message)
- func (m *Membership) XXX_Size() int
- func (m *Membership) XXX_Unmarshal(b []byte) error
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetClusterId() uint64
- func (m *Message) GetCommit() uint64
- func (m *Message) GetEntries() []Entry
- func (m *Message) GetFrom() uint64
- func (m *Message) GetHint() uint64
- func (m *Message) GetHintHigh() uint64
- func (m *Message) GetLogIndex() uint64
- func (m *Message) GetLogTerm() uint64
- func (m *Message) GetReject() bool
- func (m *Message) GetSnapshot() Snapshot
- func (m *Message) GetTerm() uint64
- func (m *Message) GetTo() uint64
- func (m *Message) GetType() MessageType
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) Size() (n int)
- func (m *Message) SizeUpperLimit() int
- func (m *Message) String() string
- func (m *Message) Unmarshal(dAtA []byte) error
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type MessageBatch
- func (*MessageBatch) Descriptor() ([]byte, []int)
- func (m *MessageBatch) GetBinVer() uint32
- func (m *MessageBatch) GetDeploymentId() uint64
- func (m *MessageBatch) GetRequests() []Message
- func (m *MessageBatch) GetSourceAddress() string
- func (m *MessageBatch) Marshal() (dAtA []byte, err error)
- func (m *MessageBatch) MarshalTo(dAtA []byte) (int, error)
- func (*MessageBatch) ProtoMessage()
- func (m *MessageBatch) Reset()
- func (m *MessageBatch) Size() (n int)
- func (m *MessageBatch) SizeUpperLimit() int
- func (m *MessageBatch) String() string
- func (m *MessageBatch) Unmarshal(dAtA []byte) error
- func (m *MessageBatch) XXX_DiscardUnknown()
- func (m *MessageBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *MessageBatch) XXX_Merge(src proto.Message)
- func (m *MessageBatch) XXX_Size() int
- func (m *MessageBatch) XXX_Unmarshal(b []byte) error
- type MessageType
- type RaftDataStatus
- func (*RaftDataStatus) Descriptor() ([]byte, []int)
- func (m *RaftDataStatus) GetAddress() string
- func (m *RaftDataStatus) GetBinVer() uint32
- func (m *RaftDataStatus) GetHardHash() uint64
- func (m *RaftDataStatus) Marshal() (dAtA []byte, err error)
- func (m *RaftDataStatus) MarshalTo(dAtA []byte) (int, error)
- func (*RaftDataStatus) ProtoMessage()
- func (m *RaftDataStatus) Reset()
- func (m *RaftDataStatus) Size() (n int)
- func (m *RaftDataStatus) String() string
- func (m *RaftDataStatus) Unmarshal(dAtA []byte) error
- func (m *RaftDataStatus) XXX_DiscardUnknown()
- func (m *RaftDataStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RaftDataStatus) XXX_Merge(src proto.Message)
- func (m *RaftDataStatus) XXX_Size() int
- func (m *RaftDataStatus) XXX_Unmarshal(b []byte) error
- type ReadyToRead
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) Marshal() (dAtA []byte, err error)
- func (m *Response) MarshalTo(dAtA []byte) (int, error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (m *Response) String() string
- func (m *Response) Unmarshal(dAtA []byte) error
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)
- func (m *Snapshot) GetFileSize() uint64
- func (m *Snapshot) GetFilepath() string
- func (m *Snapshot) GetFiles() []*SnapshotFile
- func (m *Snapshot) GetIndex() uint64
- func (m *Snapshot) GetMembership() Membership
- func (m *Snapshot) GetTerm() uint64
- func (m *Snapshot) Marshal() (dAtA []byte, err error)
- func (m *Snapshot) MarshalTo(dAtA []byte) (int, error)
- func (*Snapshot) ProtoMessage()
- func (m *Snapshot) Reset()
- func (m *Snapshot) Size() (n int)
- func (m *Snapshot) String() string
- func (m *Snapshot) Unmarshal(dAtA []byte) error
- func (snapshot *Snapshot) Validate() bool
- func (m *Snapshot) XXX_DiscardUnknown()
- func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Snapshot) XXX_Merge(src proto.Message)
- func (m *Snapshot) XXX_Size() int
- func (m *Snapshot) XXX_Unmarshal(b []byte) error
- type SnapshotChunk
- func (*SnapshotChunk) Descriptor() ([]byte, []int)
- func (m *SnapshotChunk) GetBinVer() uint32
- func (m *SnapshotChunk) GetChunkCount() uint64
- func (m *SnapshotChunk) GetChunkId() uint64
- func (m *SnapshotChunk) GetChunkSize() uint64
- func (m *SnapshotChunk) GetClusterId() uint64
- func (m *SnapshotChunk) GetData() []byte
- func (m *SnapshotChunk) GetDeploymentId() uint64
- func (m *SnapshotChunk) GetFileChunkCount() uint64
- func (m *SnapshotChunk) GetFileChunkId() uint64
- func (m *SnapshotChunk) GetFileInfo() SnapshotFile
- func (m *SnapshotChunk) GetFileSize() uint64
- func (m *SnapshotChunk) GetFilepath() string
- func (m *SnapshotChunk) GetFrom() uint64
- func (m *SnapshotChunk) GetHasFileInfo() bool
- func (m *SnapshotChunk) GetIndex() uint64
- func (m *SnapshotChunk) GetMembership() Membership
- func (m *SnapshotChunk) GetNodeId() uint64
- func (m *SnapshotChunk) GetTerm() uint64
- func (m *SnapshotChunk) Marshal() (dAtA []byte, err error)
- func (m *SnapshotChunk) MarshalTo(dAtA []byte) (int, error)
- func (*SnapshotChunk) ProtoMessage()
- func (m *SnapshotChunk) Reset()
- func (m *SnapshotChunk) Size() (n int)
- func (m *SnapshotChunk) String() string
- func (m *SnapshotChunk) Unmarshal(dAtA []byte) error
- func (m *SnapshotChunk) XXX_DiscardUnknown()
- func (m *SnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SnapshotChunk) XXX_Merge(src proto.Message)
- func (m *SnapshotChunk) XXX_Size() int
- func (m *SnapshotChunk) XXX_Unmarshal(b []byte) error
- type SnapshotFile
- func (*SnapshotFile) Descriptor() ([]byte, []int)
- func (f *SnapshotFile) Filename() string
- func (m *SnapshotFile) GetFileId() uint64
- func (m *SnapshotFile) GetFileSize() uint64
- func (m *SnapshotFile) GetFilepath() string
- func (m *SnapshotFile) GetMetadata() []byte
- func (m *SnapshotFile) Marshal() (dAtA []byte, err error)
- func (m *SnapshotFile) MarshalTo(dAtA []byte) (int, error)
- func (*SnapshotFile) ProtoMessage()
- func (m *SnapshotFile) Reset()
- func (m *SnapshotFile) Size() (n int)
- func (m *SnapshotFile) String() string
- func (m *SnapshotFile) Unmarshal(dAtA []byte) error
- func (m *SnapshotFile) XXX_DiscardUnknown()
- func (m *SnapshotFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SnapshotFile) XXX_Merge(src proto.Message)
- func (m *SnapshotFile) XXX_Size() int
- func (m *SnapshotFile) XXX_Unmarshal(b []byte) error
- type SnapshotHeader
- func (*SnapshotHeader) Descriptor() ([]byte, []int)
- func (m *SnapshotHeader) GetChecksumType() ChecksumType
- func (m *SnapshotHeader) GetDataStoreSize() uint64
- func (m *SnapshotHeader) GetGitVersion() string
- func (m *SnapshotHeader) GetHeaderChecksum() []byte
- func (m *SnapshotHeader) GetPayloadChecksum() []byte
- func (m *SnapshotHeader) GetSessionSize() uint64
- func (m *SnapshotHeader) GetUnreliableTime() uint64
- func (m *SnapshotHeader) GetVersion() uint64
- func (m *SnapshotHeader) Marshal() (dAtA []byte, err error)
- func (m *SnapshotHeader) MarshalTo(dAtA []byte) (int, error)
- func (*SnapshotHeader) ProtoMessage()
- func (m *SnapshotHeader) Reset()
- func (m *SnapshotHeader) Size() (n int)
- func (m *SnapshotHeader) String() string
- func (m *SnapshotHeader) Unmarshal(dAtA []byte) error
- func (m *SnapshotHeader) XXX_DiscardUnknown()
- func (m *SnapshotHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SnapshotHeader) XXX_Merge(src proto.Message)
- func (m *SnapshotHeader) XXX_Size() int
- func (m *SnapshotHeader) XXX_Unmarshal(b []byte) error
- type State
- func (*State) Descriptor() ([]byte, []int)
- func (m *State) GetCommit() uint64
- func (m *State) GetTerm() uint64
- func (m *State) GetVote() uint64
- func (m *State) Marshal() (dAtA []byte, err error)
- func (m *State) MarshalTo(dAtA []byte) (int, error)
- func (*State) ProtoMessage()
- func (m *State) Reset()
- func (m *State) Size() (n int)
- func (m *State) String() string
- func (m *State) Unmarshal(dAtA []byte) error
- func (m *State) XXX_DiscardUnknown()
- func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type SystemCtx
- type Update
- type UpdateCommit
Constants ¶
const (
// RaftEntryEncodingScheme is the scheme name of the codec.
RaftEntryEncodingScheme = "colfer"
)
Variables ¶
var ( ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow") )
var (
// ColferSizeMax is the upper limit for serial byte sizes.
ColferSizeMax = 256 * 1024 * 1024
)
Colfer configuration attributes
var ConfigChangeType_name = map[int32]string{
0: "AddNode",
1: "RemoveNode",
2: "AddObserver",
}
var ConfigChangeType_value = map[string]int32{
"AddNode": 0,
"RemoveNode": 1,
"AddObserver": 2,
}
var EntryType_value = map[string]int32{
"ApplicationEntry": 0,
"ConfigChangeEntry": 1,
}
var MessageType_name = map[int32]string{
0: "LocalTick",
1: "Election",
2: "LeaderHeartbeat",
3: "ConfigChangeEvent",
4: "NoOP",
5: "Ping",
6: "Pong",
7: "Propose",
8: "SnapshotStatus",
9: "Unreachable",
10: "CheckQuorum",
11: "BatchedReadIndex",
12: "Replicate",
13: "ReplicateResp",
14: "RequestVote",
15: "RequestVoteResp",
16: "InstallSnapshot",
17: "Heartbeat",
18: "HeartbeatResp",
19: "ReadIndex",
20: "ReadIndexResp",
21: "Quiesce",
22: "SnapshotReceived",
23: "LeaderTransfer",
24: "TimeoutNow",
}
var MessageType_value = map[string]int32{
"LocalTick": 0,
"Election": 1,
"LeaderHeartbeat": 2,
"ConfigChangeEvent": 3,
"NoOP": 4,
"Ping": 5,
"Pong": 6,
"Propose": 7,
"SnapshotStatus": 8,
"Unreachable": 9,
"CheckQuorum": 10,
"BatchedReadIndex": 11,
"Replicate": 12,
"ReplicateResp": 13,
"RequestVote": 14,
"RequestVoteResp": 15,
"InstallSnapshot": 16,
"Heartbeat": 17,
"HeartbeatResp": 18,
"ReadIndex": 19,
"ReadIndexResp": 20,
"Quiesce": 21,
"SnapshotReceived": 22,
"LeaderTransfer": 23,
"TimeoutNow": 24,
}
Functions ¶
func IsEmptySnapshot ¶
IsEmptySnapshot returns a boolean flag indicating whether the given snapshot is and empty dummy record.
func IsEmptyState ¶
IsEmptyState returns a boolean flag indicating whether the given State is empty.
Types ¶
type Bootstrap ¶
type Bootstrap struct { Addresses map[uint64]string `` /* 139-byte string literal not displayed */ Join bool `protobuf:"varint,2,opt,name=join" json:"join"` }
func (*Bootstrap) Validate ¶
Validate checks whether the incoming nodes parameter and the join flag is valid given the recorded bootstrap infomration in Log DB.
func (*Bootstrap) XXX_Marshal ¶
type ChecksumType ¶
type ChecksumType int32
const ( CRC32IEEE ChecksumType = 0 HIGHWAY ChecksumType = 1 )
func (ChecksumType) Enum ¶
func (x ChecksumType) Enum() *ChecksumType
func (ChecksumType) EnumDescriptor ¶
func (ChecksumType) EnumDescriptor() ([]byte, []int)
func (ChecksumType) String ¶
func (x ChecksumType) String() string
func (*ChecksumType) UnmarshalJSON ¶
func (x *ChecksumType) UnmarshalJSON(data []byte) error
type ConfigChange ¶
type ConfigChange struct { ConfigChangeId uint64 `protobuf:"varint,1,opt,name=config_change_id,json=configChangeId" json:"config_change_id"` Type ConfigChangeType `protobuf:"varint,2,opt,name=Type,enum=raftpb.ConfigChangeType" json:"Type"` NodeID uint64 `protobuf:"varint,3,opt,name=NodeID" json:"NodeID"` Address string `protobuf:"bytes,4,opt,name=Address" json:"Address"` Initialize bool `protobuf:"varint,5,opt,name=Initialize" json:"Initialize"` }
func (*ConfigChange) Descriptor ¶
func (*ConfigChange) Descriptor() ([]byte, []int)
func (*ConfigChange) GetAddress ¶
func (m *ConfigChange) GetAddress() string
func (*ConfigChange) GetConfigChangeId ¶
func (m *ConfigChange) GetConfigChangeId() uint64
func (*ConfigChange) GetInitialize ¶
func (m *ConfigChange) GetInitialize() bool
func (*ConfigChange) GetNodeID ¶
func (m *ConfigChange) GetNodeID() uint64
func (*ConfigChange) GetType ¶
func (m *ConfigChange) GetType() ConfigChangeType
func (*ConfigChange) Marshal ¶
func (m *ConfigChange) Marshal() (dAtA []byte, err error)
func (*ConfigChange) MarshalTo ¶
func (m *ConfigChange) MarshalTo(dAtA []byte) (int, error)
func (*ConfigChange) ProtoMessage ¶
func (*ConfigChange) ProtoMessage()
func (*ConfigChange) Reset ¶
func (m *ConfigChange) Reset()
func (*ConfigChange) Size ¶
func (m *ConfigChange) Size() (n int)
func (*ConfigChange) String ¶
func (m *ConfigChange) String() string
func (*ConfigChange) Unmarshal ¶
func (m *ConfigChange) Unmarshal(dAtA []byte) error
func (*ConfigChange) XXX_DiscardUnknown ¶
func (m *ConfigChange) XXX_DiscardUnknown()
func (*ConfigChange) XXX_Marshal ¶
func (m *ConfigChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConfigChange) XXX_Merge ¶
func (dst *ConfigChange) XXX_Merge(src proto.Message)
func (*ConfigChange) XXX_Size ¶
func (m *ConfigChange) XXX_Size() int
func (*ConfigChange) XXX_Unmarshal ¶
func (m *ConfigChange) XXX_Unmarshal(b []byte) error
type ConfigChangeType ¶
type ConfigChangeType int32
const ( AddNode ConfigChangeType = 0 RemoveNode ConfigChangeType = 1 AddObserver ConfigChangeType = 2 )
func (ConfigChangeType) Enum ¶
func (x ConfigChangeType) Enum() *ConfigChangeType
func (ConfigChangeType) EnumDescriptor ¶
func (ConfigChangeType) EnumDescriptor() ([]byte, []int)
func (ConfigChangeType) String ¶
func (x ConfigChangeType) String() string
func (*ConfigChangeType) UnmarshalJSON ¶
func (x *ConfigChangeType) UnmarshalJSON(data []byte) error
type Entry ¶
type Entry struct { Term uint64 `protobuf:"varint,1,opt,name=Term" json:"Term"` Index uint64 `protobuf:"varint,2,opt,name=Index" json:"Index"` Type EntryType `protobuf:"varint,3,opt,name=Type,enum=raftpb.EntryType" json:"Type"` Key uint64 `protobuf:"varint,4,opt,name=Key" json:"Key"` ClientID uint64 `protobuf:"varint,5,opt,name=ClientID" json:"ClientID"` SeriesID uint64 `protobuf:"varint,6,opt,name=SeriesID" json:"SeriesID"` RespondedTo uint64 `protobuf:"varint,7,opt,name=RespondedTo" json:"RespondedTo"` Cmd []byte `protobuf:"bytes,8,opt,name=Cmd" json:"Cmd"` }
func (*Entry) IsConfigChange ¶
IsConfigChange returns a boolean value indicating whether the entry is for config change.
func (*Entry) IsEmpty ¶
IsEmpty returns a boolean value indicating whether the entry is Empty.
func (*Entry) IsEndOfSessionRequest ¶
IsEndOfSessionRequest returns a boolean value indicating whether the entry is for requesting the session to come to an end.
func (*Entry) IsNewSessionRequest ¶
IsNewSessionRequest returns a boolean value indicating whether the entry is for reqeusting a new client.
func (*Entry) IsNoOPSession ¶
IsNoOPSession returns a boolean value indicating whether the entry is NoOP session managed.
func (*Entry) IsSessionManaged ¶
IsSessionManaged returns a boolean value indicating whether the entry is session managed.
func (*Entry) IsUpdateEntry ¶
IsUpdateEntry returns a boolean flag indicating whether the entry is a regular application entry not used for session management.
func (*Entry) MarshalTo ¶
MarshalTo marshals the entry to the specified byte slice.
func (*Entry) SizeUpperLimit ¶
SizeUpperLimit returns the upper limit size of an entry.
func (*Entry) Unmarshal ¶
Unmarshal unmarshals the input to the current entry instance.
func (*Entry) XXX_Marshal ¶
type EntryBatch ¶
type EntryBatch struct {
Entries []Entry `protobuf:"bytes,1,rep,name=entries" json:"entries"`
}
func (*EntryBatch) Descriptor ¶
func (*EntryBatch) Descriptor() ([]byte, []int)
func (*EntryBatch) GetEntries ¶
func (m *EntryBatch) GetEntries() []Entry
func (*EntryBatch) Marshal ¶
func (m *EntryBatch) Marshal() (dAtA []byte, err error)
func (*EntryBatch) MarshalTo ¶
func (m *EntryBatch) MarshalTo(dAtA []byte) (int, error)
func (*EntryBatch) ProtoMessage ¶
func (*EntryBatch) ProtoMessage()
func (*EntryBatch) Reset ¶
func (m *EntryBatch) Reset()
func (*EntryBatch) Size ¶
func (m *EntryBatch) Size() (n int)
func (*EntryBatch) SizeUpperLimit ¶
func (m *EntryBatch) SizeUpperLimit() (n int)
SizeUpperLimit returns the upper limit size of the entry batch.
func (*EntryBatch) String ¶
func (m *EntryBatch) String() string
func (*EntryBatch) Unmarshal ¶
func (m *EntryBatch) Unmarshal(dAtA []byte) error
func (*EntryBatch) XXX_DiscardUnknown ¶
func (m *EntryBatch) XXX_DiscardUnknown()
func (*EntryBatch) XXX_Marshal ¶
func (m *EntryBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EntryBatch) XXX_Merge ¶
func (dst *EntryBatch) XXX_Merge(src proto.Message)
func (*EntryBatch) XXX_Size ¶
func (m *EntryBatch) XXX_Size() int
func (*EntryBatch) XXX_Unmarshal ¶
func (m *EntryBatch) XXX_Unmarshal(b []byte) error
type Membership ¶
type Membership struct { ConfigChangeId uint64 `protobuf:"varint,1,opt,name=config_change_id,json=configChangeId" json:"config_change_id"` Addresses map[uint64]string `` /* 139-byte string literal not displayed */ Removed map[uint64]bool `` /* 136-byte string literal not displayed */ Observers map[uint64]string `` /* 139-byte string literal not displayed */ }
func (*Membership) Descriptor ¶
func (*Membership) Descriptor() ([]byte, []int)
func (*Membership) GetAddresses ¶
func (m *Membership) GetAddresses() map[uint64]string
func (*Membership) GetConfigChangeId ¶
func (m *Membership) GetConfigChangeId() uint64
func (*Membership) GetObservers ¶
func (m *Membership) GetObservers() map[uint64]string
func (*Membership) GetRemoved ¶
func (m *Membership) GetRemoved() map[uint64]bool
func (*Membership) Marshal ¶
func (m *Membership) Marshal() (dAtA []byte, err error)
func (*Membership) MarshalTo ¶
func (m *Membership) MarshalTo(dAtA []byte) (int, error)
func (*Membership) ProtoMessage ¶
func (*Membership) ProtoMessage()
func (*Membership) Reset ¶
func (m *Membership) Reset()
func (*Membership) Size ¶
func (m *Membership) Size() (n int)
func (*Membership) String ¶
func (m *Membership) String() string
func (*Membership) Unmarshal ¶
func (m *Membership) Unmarshal(dAtA []byte) error
func (*Membership) XXX_DiscardUnknown ¶
func (m *Membership) XXX_DiscardUnknown()
func (*Membership) XXX_Marshal ¶
func (m *Membership) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Membership) XXX_Merge ¶
func (dst *Membership) XXX_Merge(src proto.Message)
func (*Membership) XXX_Size ¶
func (m *Membership) XXX_Size() int
func (*Membership) XXX_Unmarshal ¶
func (m *Membership) XXX_Unmarshal(b []byte) error
type Message ¶
type Message struct { Type MessageType `protobuf:"varint,1,opt,name=type,enum=raftpb.MessageType" json:"type"` To uint64 `protobuf:"varint,2,opt,name=to" json:"to"` From uint64 `protobuf:"varint,3,opt,name=from" json:"from"` ClusterId uint64 `protobuf:"varint,4,opt,name=cluster_id,json=clusterId" json:"cluster_id"` Term uint64 `protobuf:"varint,5,opt,name=term" json:"term"` LogTerm uint64 `protobuf:"varint,6,opt,name=log_term,json=logTerm" json:"log_term"` LogIndex uint64 `protobuf:"varint,7,opt,name=log_index,json=logIndex" json:"log_index"` Commit uint64 `protobuf:"varint,8,opt,name=commit" json:"commit"` Reject bool `protobuf:"varint,9,opt,name=reject" json:"reject"` Hint uint64 `protobuf:"varint,10,opt,name=hint" json:"hint"` Entries []Entry `protobuf:"bytes,11,rep,name=entries" json:"entries"` Snapshot Snapshot `protobuf:"bytes,12,opt,name=snapshot" json:"snapshot"` HintHigh uint64 `protobuf:"varint,13,opt,name=hint_high,json=hintHigh" json:"hint_high"` }
func (*Message) GetType ¶
func (m *Message) GetType() MessageType
func (*Message) SizeUpperLimit ¶
SizeUpperLimit returns the upper limit size of the message.
func (*Message) Unmarshal ¶
Unmarshal unmarshals the message instance using the input byte slice.
func (*Message) XXX_Marshal ¶
type MessageBatch ¶
type MessageBatch struct { Requests []Message `protobuf:"bytes,1,rep,name=requests" json:"requests"` DeploymentId uint64 `protobuf:"varint,2,opt,name=deployment_id,json=deploymentId" json:"deployment_id"` SourceAddress string `protobuf:"bytes,3,opt,name=source_address,json=sourceAddress" json:"source_address"` BinVer uint32 `protobuf:"varint,4,opt,name=bin_ver,json=binVer" json:"bin_ver"` }
func (*MessageBatch) Descriptor ¶
func (*MessageBatch) Descriptor() ([]byte, []int)
func (*MessageBatch) GetBinVer ¶
func (m *MessageBatch) GetBinVer() uint32
func (*MessageBatch) GetDeploymentId ¶
func (m *MessageBatch) GetDeploymentId() uint64
func (*MessageBatch) GetRequests ¶
func (m *MessageBatch) GetRequests() []Message
func (*MessageBatch) GetSourceAddress ¶
func (m *MessageBatch) GetSourceAddress() string
func (*MessageBatch) Marshal ¶
func (m *MessageBatch) Marshal() (dAtA []byte, err error)
func (*MessageBatch) MarshalTo ¶
func (m *MessageBatch) MarshalTo(dAtA []byte) (int, error)
func (*MessageBatch) ProtoMessage ¶
func (*MessageBatch) ProtoMessage()
func (*MessageBatch) Reset ¶
func (m *MessageBatch) Reset()
func (*MessageBatch) Size ¶
func (m *MessageBatch) Size() (n int)
func (*MessageBatch) SizeUpperLimit ¶
func (m *MessageBatch) SizeUpperLimit() int
SizeUpperLimit returns the upper limit size of the message batch.
func (*MessageBatch) String ¶
func (m *MessageBatch) String() string
func (*MessageBatch) Unmarshal ¶
func (m *MessageBatch) Unmarshal(dAtA []byte) error
Unmarshal unmarshals the message batch instance using the input byte slice.
func (*MessageBatch) XXX_DiscardUnknown ¶
func (m *MessageBatch) XXX_DiscardUnknown()
func (*MessageBatch) XXX_Marshal ¶
func (m *MessageBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MessageBatch) XXX_Merge ¶
func (dst *MessageBatch) XXX_Merge(src proto.Message)
func (*MessageBatch) XXX_Size ¶
func (m *MessageBatch) XXX_Size() int
func (*MessageBatch) XXX_Unmarshal ¶
func (m *MessageBatch) XXX_Unmarshal(b []byte) error
type MessageType ¶
type MessageType int32
const ( LocalTick MessageType = 0 Election MessageType = 1 LeaderHeartbeat MessageType = 2 ConfigChangeEvent MessageType = 3 NoOP MessageType = 4 Ping MessageType = 5 Pong MessageType = 6 Propose MessageType = 7 SnapshotStatus MessageType = 8 Unreachable MessageType = 9 CheckQuorum MessageType = 10 BatchedReadIndex MessageType = 11 Replicate MessageType = 12 ReplicateResp MessageType = 13 RequestVote MessageType = 14 RequestVoteResp MessageType = 15 InstallSnapshot MessageType = 16 Heartbeat MessageType = 17 HeartbeatResp MessageType = 18 ReadIndex MessageType = 19 ReadIndexResp MessageType = 20 Quiesce MessageType = 21 SnapshotReceived MessageType = 22 LeaderTransfer MessageType = 23 TimeoutNow MessageType = 24 )
func (MessageType) Enum ¶
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
func (MessageType) String ¶
func (x MessageType) String() string
func (*MessageType) UnmarshalJSON ¶
func (x *MessageType) UnmarshalJSON(data []byte) error
type RaftDataStatus ¶
type RaftDataStatus struct { Address string `protobuf:"bytes,1,opt,name=address" json:"address"` BinVer uint32 `protobuf:"varint,2,opt,name=bin_ver,json=binVer" json:"bin_ver"` HardHash uint64 `protobuf:"varint,3,opt,name=hard_hash,json=hardHash" json:"hard_hash"` }
func (*RaftDataStatus) Descriptor ¶
func (*RaftDataStatus) Descriptor() ([]byte, []int)
func (*RaftDataStatus) GetAddress ¶
func (m *RaftDataStatus) GetAddress() string
func (*RaftDataStatus) GetBinVer ¶
func (m *RaftDataStatus) GetBinVer() uint32
func (*RaftDataStatus) GetHardHash ¶
func (m *RaftDataStatus) GetHardHash() uint64
func (*RaftDataStatus) Marshal ¶
func (m *RaftDataStatus) Marshal() (dAtA []byte, err error)
func (*RaftDataStatus) MarshalTo ¶
func (m *RaftDataStatus) MarshalTo(dAtA []byte) (int, error)
func (*RaftDataStatus) ProtoMessage ¶
func (*RaftDataStatus) ProtoMessage()
func (*RaftDataStatus) Reset ¶
func (m *RaftDataStatus) Reset()
func (*RaftDataStatus) Size ¶
func (m *RaftDataStatus) Size() (n int)
func (*RaftDataStatus) String ¶
func (m *RaftDataStatus) String() string
func (*RaftDataStatus) Unmarshal ¶
func (m *RaftDataStatus) Unmarshal(dAtA []byte) error
func (*RaftDataStatus) XXX_DiscardUnknown ¶
func (m *RaftDataStatus) XXX_DiscardUnknown()
func (*RaftDataStatus) XXX_Marshal ¶
func (m *RaftDataStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RaftDataStatus) XXX_Merge ¶
func (dst *RaftDataStatus) XXX_Merge(src proto.Message)
func (*RaftDataStatus) XXX_Size ¶
func (m *RaftDataStatus) XXX_Size() int
func (*RaftDataStatus) XXX_Unmarshal ¶
func (m *RaftDataStatus) XXX_Unmarshal(b []byte) error
type ReadyToRead ¶
ReadyToRead is used to indicate that a previous batch of ReadIndex requests are now ready for read once the entry specified by the Index value is applied in the state machine.
type Snapshot ¶
type Snapshot struct { Filepath string `protobuf:"bytes,2,opt,name=filepath" json:"filepath"` FileSize uint64 `protobuf:"varint,3,opt,name=file_size,json=fileSize" json:"file_size"` Index uint64 `protobuf:"varint,4,opt,name=index" json:"index"` Term uint64 `protobuf:"varint,5,opt,name=term" json:"term"` Membership Membership `protobuf:"bytes,6,opt,name=membership" json:"membership"` Files []*SnapshotFile `protobuf:"bytes,7,rep,name=files" json:"files,omitempty"` }
field id 1 was used for optional string filename
func (*Snapshot) GetFiles ¶
func (m *Snapshot) GetFiles() []*SnapshotFile
func (*Snapshot) GetMembership ¶
func (m *Snapshot) GetMembership() Membership
func (*Snapshot) Validate ¶
Validate validates the snapshot instance.
func (*Snapshot) XXX_Marshal ¶
type SnapshotChunk ¶
type SnapshotChunk struct { ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId" json:"cluster_id"` NodeId uint64 `protobuf:"varint,2,opt,name=node_id,json=nodeId" json:"node_id"` From uint64 `protobuf:"varint,3,opt,name=from" json:"from"` ChunkId uint64 `protobuf:"varint,4,opt,name=chunk_id,json=chunkId" json:"chunk_id"` ChunkSize uint64 `protobuf:"varint,5,opt,name=chunk_size,json=chunkSize" json:"chunk_size"` ChunkCount uint64 `protobuf:"varint,6,opt,name=chunk_count,json=chunkCount" json:"chunk_count"` Data []byte `protobuf:"bytes,7,opt,name=data" json:"data"` Index uint64 `protobuf:"varint,8,opt,name=index" json:"index"` Term uint64 `protobuf:"varint,9,opt,name=term" json:"term"` Membership Membership `protobuf:"bytes,10,opt,name=membership" json:"membership"` Filepath string `protobuf:"bytes,12,opt,name=filepath" json:"filepath"` FileSize uint64 `protobuf:"varint,13,opt,name=file_size,json=fileSize" json:"file_size"` DeploymentId uint64 `protobuf:"varint,14,opt,name=deployment_id,json=deploymentId" json:"deployment_id"` FileChunkId uint64 `protobuf:"varint,15,opt,name=file_chunk_id,json=fileChunkId" json:"file_chunk_id"` FileChunkCount uint64 `protobuf:"varint,16,opt,name=file_chunk_count,json=fileChunkCount" json:"file_chunk_count"` HasFileInfo bool `protobuf:"varint,17,opt,name=has_file_info,json=hasFileInfo" json:"has_file_info"` FileInfo SnapshotFile `protobuf:"bytes,18,opt,name=file_info,json=fileInfo" json:"file_info"` BinVer uint32 `protobuf:"varint,19,opt,name=bin_ver,json=binVer" json:"bin_ver"` }
field id 11 was used for optional string filename
func (*SnapshotChunk) Descriptor ¶
func (*SnapshotChunk) Descriptor() ([]byte, []int)
func (*SnapshotChunk) GetBinVer ¶
func (m *SnapshotChunk) GetBinVer() uint32
func (*SnapshotChunk) GetChunkCount ¶
func (m *SnapshotChunk) GetChunkCount() uint64
func (*SnapshotChunk) GetChunkId ¶
func (m *SnapshotChunk) GetChunkId() uint64
func (*SnapshotChunk) GetChunkSize ¶
func (m *SnapshotChunk) GetChunkSize() uint64
func (*SnapshotChunk) GetClusterId ¶
func (m *SnapshotChunk) GetClusterId() uint64
func (*SnapshotChunk) GetData ¶
func (m *SnapshotChunk) GetData() []byte
func (*SnapshotChunk) GetDeploymentId ¶
func (m *SnapshotChunk) GetDeploymentId() uint64
func (*SnapshotChunk) GetFileChunkCount ¶
func (m *SnapshotChunk) GetFileChunkCount() uint64
func (*SnapshotChunk) GetFileChunkId ¶
func (m *SnapshotChunk) GetFileChunkId() uint64
func (*SnapshotChunk) GetFileInfo ¶
func (m *SnapshotChunk) GetFileInfo() SnapshotFile
func (*SnapshotChunk) GetFileSize ¶
func (m *SnapshotChunk) GetFileSize() uint64
func (*SnapshotChunk) GetFilepath ¶
func (m *SnapshotChunk) GetFilepath() string
func (*SnapshotChunk) GetFrom ¶
func (m *SnapshotChunk) GetFrom() uint64
func (*SnapshotChunk) GetHasFileInfo ¶
func (m *SnapshotChunk) GetHasFileInfo() bool
func (*SnapshotChunk) GetIndex ¶
func (m *SnapshotChunk) GetIndex() uint64
func (*SnapshotChunk) GetMembership ¶
func (m *SnapshotChunk) GetMembership() Membership
func (*SnapshotChunk) GetNodeId ¶
func (m *SnapshotChunk) GetNodeId() uint64
func (*SnapshotChunk) GetTerm ¶
func (m *SnapshotChunk) GetTerm() uint64
func (*SnapshotChunk) Marshal ¶
func (m *SnapshotChunk) Marshal() (dAtA []byte, err error)
func (*SnapshotChunk) MarshalTo ¶
func (m *SnapshotChunk) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotChunk) ProtoMessage ¶
func (*SnapshotChunk) ProtoMessage()
func (*SnapshotChunk) Reset ¶
func (m *SnapshotChunk) Reset()
func (*SnapshotChunk) Size ¶
func (m *SnapshotChunk) Size() (n int)
func (*SnapshotChunk) String ¶
func (m *SnapshotChunk) String() string
func (*SnapshotChunk) Unmarshal ¶
func (m *SnapshotChunk) Unmarshal(dAtA []byte) error
func (*SnapshotChunk) XXX_DiscardUnknown ¶
func (m *SnapshotChunk) XXX_DiscardUnknown()
func (*SnapshotChunk) XXX_Marshal ¶
func (m *SnapshotChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotChunk) XXX_Merge ¶
func (dst *SnapshotChunk) XXX_Merge(src proto.Message)
func (*SnapshotChunk) XXX_Size ¶
func (m *SnapshotChunk) XXX_Size() int
func (*SnapshotChunk) XXX_Unmarshal ¶
func (m *SnapshotChunk) XXX_Unmarshal(b []byte) error
type SnapshotFile ¶
type SnapshotFile struct { Filepath string `protobuf:"bytes,2,opt,name=filepath" json:"filepath"` FileSize uint64 `protobuf:"varint,3,opt,name=file_size,json=fileSize" json:"file_size"` FileId uint64 `protobuf:"varint,4,opt,name=file_id,json=fileId" json:"file_id"` Metadata []byte `protobuf:"bytes,5,opt,name=metadata" json:"metadata"` }
field id 1 was used for optional string filename
func (*SnapshotFile) Descriptor ¶
func (*SnapshotFile) Descriptor() ([]byte, []int)
func (*SnapshotFile) Filename ¶
func (f *SnapshotFile) Filename() string
Filename returns the filename of the external snapshot file.
func (*SnapshotFile) GetFileId ¶
func (m *SnapshotFile) GetFileId() uint64
func (*SnapshotFile) GetFileSize ¶
func (m *SnapshotFile) GetFileSize() uint64
func (*SnapshotFile) GetFilepath ¶
func (m *SnapshotFile) GetFilepath() string
func (*SnapshotFile) GetMetadata ¶
func (m *SnapshotFile) GetMetadata() []byte
func (*SnapshotFile) Marshal ¶
func (m *SnapshotFile) Marshal() (dAtA []byte, err error)
func (*SnapshotFile) MarshalTo ¶
func (m *SnapshotFile) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotFile) ProtoMessage ¶
func (*SnapshotFile) ProtoMessage()
func (*SnapshotFile) Reset ¶
func (m *SnapshotFile) Reset()
func (*SnapshotFile) Size ¶
func (m *SnapshotFile) Size() (n int)
func (*SnapshotFile) String ¶
func (m *SnapshotFile) String() string
func (*SnapshotFile) Unmarshal ¶
func (m *SnapshotFile) Unmarshal(dAtA []byte) error
func (*SnapshotFile) XXX_DiscardUnknown ¶
func (m *SnapshotFile) XXX_DiscardUnknown()
func (*SnapshotFile) XXX_Marshal ¶
func (m *SnapshotFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotFile) XXX_Merge ¶
func (dst *SnapshotFile) XXX_Merge(src proto.Message)
func (*SnapshotFile) XXX_Size ¶
func (m *SnapshotFile) XXX_Size() int
func (*SnapshotFile) XXX_Unmarshal ¶
func (m *SnapshotFile) XXX_Unmarshal(b []byte) error
type SnapshotHeader ¶
type SnapshotHeader struct { SessionSize uint64 `protobuf:"varint,1,opt,name=session_size,json=sessionSize" json:"session_size"` DataStoreSize uint64 `protobuf:"varint,2,opt,name=data_store_size,json=dataStoreSize" json:"data_store_size"` UnreliableTime uint64 `protobuf:"varint,3,opt,name=unreliable_time,json=unreliableTime" json:"unreliable_time"` GitVersion string `protobuf:"bytes,4,opt,name=git_version,json=gitVersion" json:"git_version"` HeaderChecksum []byte `protobuf:"bytes,5,opt,name=header_checksum,json=headerChecksum" json:"header_checksum"` PayloadChecksum []byte `protobuf:"bytes,6,opt,name=payload_checksum,json=payloadChecksum" json:"payload_checksum"` ChecksumType ChecksumType `protobuf:"varint,7,opt,name=checksum_type,json=checksumType,enum=raftpb.ChecksumType" json:"checksum_type"` Version uint64 `protobuf:"varint,8,opt,name=version" json:"version"` }
func (*SnapshotHeader) Descriptor ¶
func (*SnapshotHeader) Descriptor() ([]byte, []int)
func (*SnapshotHeader) GetChecksumType ¶
func (m *SnapshotHeader) GetChecksumType() ChecksumType
func (*SnapshotHeader) GetDataStoreSize ¶
func (m *SnapshotHeader) GetDataStoreSize() uint64
func (*SnapshotHeader) GetGitVersion ¶
func (m *SnapshotHeader) GetGitVersion() string
func (*SnapshotHeader) GetHeaderChecksum ¶
func (m *SnapshotHeader) GetHeaderChecksum() []byte
func (*SnapshotHeader) GetPayloadChecksum ¶
func (m *SnapshotHeader) GetPayloadChecksum() []byte
func (*SnapshotHeader) GetSessionSize ¶
func (m *SnapshotHeader) GetSessionSize() uint64
func (*SnapshotHeader) GetUnreliableTime ¶
func (m *SnapshotHeader) GetUnreliableTime() uint64
func (*SnapshotHeader) GetVersion ¶
func (m *SnapshotHeader) GetVersion() uint64
func (*SnapshotHeader) Marshal ¶
func (m *SnapshotHeader) Marshal() (dAtA []byte, err error)
func (*SnapshotHeader) MarshalTo ¶
func (m *SnapshotHeader) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotHeader) ProtoMessage ¶
func (*SnapshotHeader) ProtoMessage()
func (*SnapshotHeader) Reset ¶
func (m *SnapshotHeader) Reset()
func (*SnapshotHeader) Size ¶
func (m *SnapshotHeader) Size() (n int)
func (*SnapshotHeader) String ¶
func (m *SnapshotHeader) String() string
func (*SnapshotHeader) Unmarshal ¶
func (m *SnapshotHeader) Unmarshal(dAtA []byte) error
func (*SnapshotHeader) XXX_DiscardUnknown ¶
func (m *SnapshotHeader) XXX_DiscardUnknown()
func (*SnapshotHeader) XXX_Marshal ¶
func (m *SnapshotHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotHeader) XXX_Merge ¶
func (dst *SnapshotHeader) XXX_Merge(src proto.Message)
func (*SnapshotHeader) XXX_Size ¶
func (m *SnapshotHeader) XXX_Size() int
func (*SnapshotHeader) XXX_Unmarshal ¶
func (m *SnapshotHeader) XXX_Unmarshal(b []byte) error
type State ¶
type State struct { Term uint64 `protobuf:"varint,1,opt,name=term" json:"term"` Vote uint64 `protobuf:"varint,2,opt,name=vote" json:"vote"` Commit uint64 `protobuf:"varint,3,opt,name=commit" json:"commit"` }
func (*State) XXX_Marshal ¶
type SystemCtx ¶
SystemCtx is used to identify a ReadIndex operation.
type Update ¶
type Update struct { ClusterID uint64 NodeID uint64 // The current persistent state of a raft node. It must be stored onto // persistent storage before any non-replication can be sent to other nodes. // isStateEqual(emptyState) returns true when the state is empty. State // EntriesToSave are entries waiting to be stored onto persistent storage. EntriesToSave []Entry // CommittedEntries are entries already committed in raft and ready to be // applied by dragonboat applications. CommittedEntries []Entry // Whether there are more committed entries ready to be applied. MoreCommittedEntries bool // Snapshot is the metadata of the snapshot ready to be applied. Snapshot Snapshot // ReadyToReads provides a list of ReadIndex requests ready for local read. ReadyToReads []ReadyToRead // Messages is a list of outgoing messages to be sent to remote nodes. // As stated above, replication messages can be immediately sent, all other // messages must be sent after the persistent state and entries are saved // onto persistent storage. Messages []Message // LastApplied is the actual last applied index reported by the RSM. LastApplied uint64 // UpdateCommit contains info on how the Update instance can be committed // to actually progress the state of raft. UpdateCommit UpdateCommit }
Update is a collection of state, entries and messages that are expected to be processed by raft's upper layer to progress the raft node modelled as state machine.