Documentation ¶
Index ¶
- Constants
- Variables
- func GetEntrySliceInMemSize(ents []Entry) uint64
- func GetEntrySliceSize(ents []Entry) uint64
- 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) GetType() StateMachineType
- 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, smType StateMachineType) bool
- func (m *Bootstrap) XXX_DiscardUnknown()
- func (m *Bootstrap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Bootstrap) XXX_Merge(src proto.Message)
- func (m *Bootstrap) XXX_Size() int
- func (m *Bootstrap) XXX_Unmarshal(b []byte) error
- type ChecksumType
- type Chunk
- func (*Chunk) Descriptor() ([]byte, []int)
- func (m *Chunk) GetBinVer() uint32
- func (m *Chunk) GetChunkCount() uint64
- func (m *Chunk) GetChunkId() uint64
- func (m *Chunk) GetChunkSize() uint64
- func (m *Chunk) GetClusterId() uint64
- func (m *Chunk) GetData() []byte
- func (m *Chunk) GetDeploymentId() uint64
- func (m *Chunk) GetFileChunkCount() uint64
- func (m *Chunk) GetFileChunkId() uint64
- func (m *Chunk) GetFileInfo() SnapshotFile
- func (m *Chunk) GetFileSize() uint64
- func (m *Chunk) GetFilepath() string
- func (m *Chunk) GetFrom() uint64
- func (m *Chunk) GetHasFileInfo() bool
- func (m *Chunk) GetIndex() uint64
- func (m *Chunk) GetMembership() Membership
- func (m *Chunk) GetNodeId() uint64
- func (m *Chunk) GetOnDiskIndex() uint64
- func (m *Chunk) GetTerm() uint64
- func (m *Chunk) GetWitness() bool
- func (c Chunk) IsLastChunk() bool
- func (c Chunk) IsLastFileChunk() bool
- func (c Chunk) IsPoisonChunk() bool
- func (m *Chunk) Marshal() (dAtA []byte, err error)
- func (m *Chunk) MarshalTo(dAtA []byte) (int, error)
- func (*Chunk) ProtoMessage()
- func (m *Chunk) Reset()
- func (m *Chunk) Size() (n int)
- func (m *Chunk) String() string
- func (m *Chunk) Unmarshal(dAtA []byte) error
- func (m *Chunk) XXX_DiscardUnknown()
- func (m *Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Chunk) XXX_Merge(src proto.Message)
- func (m *Chunk) XXX_Size() int
- func (m *Chunk) XXX_Unmarshal(b []byte) error
- type ColferError
- type ColferMax
- type ColferTail
- type CompressionType
- 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 (m *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) IsProposal() 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 (m *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 (m *EntryBatch) XXX_Merge(src proto.Message)
- func (m *EntryBatch) XXX_Size() int
- func (m *EntryBatch) XXX_Unmarshal(b []byte) error
- type EntryType
- type IChunkSink
- 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) GetWitnesses() map[uint64]string
- 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 (m *Membership) XXX_Merge(src proto.Message)
- func (m *Membership) XXX_Size() int
- func (m *Membership) XXX_Unmarshal(b []byte) error
- type Message
- func (m *Message) CanDrop() bool
- 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 (m *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 (m *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) GetAddressByNodeHostId() bool
- func (m *RaftDataStatus) GetBinVer() uint32
- func (m *RaftDataStatus) GetDeploymentId() uint64
- func (m *RaftDataStatus) GetEntryBatchSize() uint64
- func (m *RaftDataStatus) GetHardHash() uint64
- func (m *RaftDataStatus) GetHostname() string
- func (m *RaftDataStatus) GetLogdbShardCount() uint64
- func (m *RaftDataStatus) GetLogdbType() string
- func (m *RaftDataStatus) GetMaxSessionCount() uint64
- func (m *RaftDataStatus) GetStepWorkerCount() 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 (m *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 (m *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) GetChecksum() []byte
- func (m *Snapshot) GetClusterId() uint64
- func (m *Snapshot) GetDummy() bool
- func (m *Snapshot) GetFileSize() uint64
- func (m *Snapshot) GetFilepath() string
- func (m *Snapshot) GetFiles() []*SnapshotFile
- func (m *Snapshot) GetImported() bool
- func (m *Snapshot) GetIndex() uint64
- func (m *Snapshot) GetMembership() Membership
- func (m *Snapshot) GetOnDiskIndex() uint64
- func (m *Snapshot) GetTerm() uint64
- func (m *Snapshot) GetType() StateMachineType
- func (m *Snapshot) GetWitness() bool
- 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(fs vfs.IFS) bool
- func (m *Snapshot) XXX_DiscardUnknown()
- func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Snapshot) XXX_Merge(src proto.Message)
- func (m *Snapshot) XXX_Size() int
- func (m *Snapshot) 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 (m *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) GetCompressionType() CompressionType
- 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 (m *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 (m *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type StateMachineType
- type SystemCtx
- type Update
- type UpdateCommit
Constants ¶
const ( // NoNode is the flag used to indicate that the node id field is not set. NoNode uint64 = 0 )
const (
// RaftEntryEncodingScheme is the scheme name of the codec.
RaftEntryEncodingScheme = "colfer"
)
Variables ¶
var ( // LastChunkCount is the special chunk count value used to indicate that the // chunk is the last one. LastChunkCount uint64 = math.MaxUint64 // PoisonChunkCount is the special chunk count value used to indicate that // the processing goroutine should return. PoisonChunkCount uint64 = math.MaxUint64 - 1 )
var ( ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow") )
var ChecksumType_name = map[int32]string{
0: "CRC32IEEE",
1: "HIGHWAY",
}
var ChecksumType_value = map[string]int32{
"CRC32IEEE": 0,
"HIGHWAY": 1,
}
var ( // ColferSizeMax is the upper limit for serial byte sizes ColferSizeMax uint64 = 8 * 1024 * 1024 * 1024 * 1024 )
Colfer configuration attributes
var CompressionType_name = map[int32]string{
0: "NoCompression",
1: "Snappy",
}
var CompressionType_value = map[string]int32{
"NoCompression": 0,
"Snappy": 1,
}
var ConfigChangeType_name = map[int32]string{
0: "AddNode",
1: "RemoveNode",
2: "AddObserver",
3: "AddWitness",
}
var ConfigChangeType_value = map[string]int32{
"AddNode": 0,
"RemoveNode": 1,
"AddObserver": 2,
"AddWitness": 3,
}
var EntryType_name = map[int32]string{
0: "ApplicationEntry",
1: "ConfigChangeEntry",
2: "EncodedEntry",
3: "MetadataEntry",
}
var EntryType_value = map[string]int32{
"ApplicationEntry": 0,
"ConfigChangeEntry": 1,
"EncodedEntry": 2,
"MetadataEntry": 3,
}
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",
25: "RateLimit",
}
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,
"RateLimit": 25,
}
var StateMachineType_name = map[int32]string{
0: "UnknownStateMachine",
1: "RegularStateMachine",
2: "ConcurrentStateMachine",
3: "OnDiskStateMachine",
}
var StateMachineType_value = map[string]int32{
"UnknownStateMachine": 0,
"RegularStateMachine": 1,
"ConcurrentStateMachine": 2,
"OnDiskStateMachine": 3,
}
Functions ¶
func GetEntrySliceInMemSize ¶
GetEntrySliceInMemSize returns the in memory size of the specified entry slice. Size 24 bytes used to hold ents itself is not counted.
func GetEntrySliceSize ¶
GetEntrySliceSize returns the upper limit of the entry slice size.
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.
func IsStateEqual ¶
IsStateEqual returns whether two input state instances are equal.
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"` Type StateMachineType `protobuf:"varint,3,opt,name=Type,enum=raftpb.StateMachineType" json:"Type"` }
func NewBootstrapInfo ¶
func NewBootstrapInfo(join bool, smType StateMachineType, nodes map[uint64]string) Bootstrap
NewBootstrapInfo creates and returns a new bootstrap record.
func (*Bootstrap) Descriptor ¶
func (*Bootstrap) GetAddresses ¶
func (*Bootstrap) GetType ¶
func (m *Bootstrap) GetType() StateMachineType
func (*Bootstrap) ProtoMessage ¶
func (*Bootstrap) ProtoMessage()
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_DiscardUnknown ¶
func (m *Bootstrap) XXX_DiscardUnknown()
func (*Bootstrap) XXX_Marshal ¶
func (*Bootstrap) XXX_Unmarshal ¶
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 Chunk ¶
type Chunk 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"` OnDiskIndex uint64 `protobuf:"varint,20,opt,name=on_disk_index,json=onDiskIndex" json:"on_disk_index"` Witness bool `protobuf:"varint,21,opt,name=witness" json:"witness"` }
field id 11 was used for optional string filename
func (*Chunk) Descriptor ¶
func (*Chunk) GetChunkCount ¶
func (*Chunk) GetChunkId ¶
func (*Chunk) GetChunkSize ¶
func (*Chunk) GetClusterId ¶
func (*Chunk) GetDeploymentId ¶
func (*Chunk) GetFileChunkCount ¶
func (*Chunk) GetFileChunkId ¶
func (*Chunk) GetFileInfo ¶
func (m *Chunk) GetFileInfo() SnapshotFile
func (*Chunk) GetFileSize ¶
func (*Chunk) GetFilepath ¶
func (*Chunk) GetHasFileInfo ¶
func (*Chunk) GetMembership ¶
func (m *Chunk) GetMembership() Membership
func (*Chunk) GetOnDiskIndex ¶
func (*Chunk) GetWitness ¶
func (Chunk) IsLastChunk ¶
IsLastChunk returns a boolean value indicating whether the chunk is the last chunk of a snapshot.
func (Chunk) IsLastFileChunk ¶
IsLastFileChunk returns a boolean value indicating whether the chunk is the last chunk of a snapshot file.
func (Chunk) IsPoisonChunk ¶
IsPoisonChunk returns a boolean value indicating whether the chunk is a special poison chunk.
func (*Chunk) ProtoMessage ¶
func (*Chunk) ProtoMessage()
func (*Chunk) Unmarshal ¶
func (m *MessageBatch) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MessageBatch: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MessageBatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRaft } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRaft } if postIndex > l { return io.ErrUnexpectedEOF } m.Requests = append(m.Requests, Message{}) if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DeploymentId", wireType) } m.DeploymentId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.DeploymentId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthRaft } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRaft } if postIndex > l { return io.ErrUnexpectedEOF } m.SourceAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BinVer", wireType) } m.BinVer = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.BinVer |= uint32(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipRaft(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthRaft } if (iNdEx + skippy) < 0 { return ErrInvalidLengthRaft } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil }
func (*Chunk) XXX_DiscardUnknown ¶
func (m *Chunk) XXX_DiscardUnknown()
func (*Chunk) XXX_Marshal ¶
func (*Chunk) XXX_Unmarshal ¶
type CompressionType ¶
type CompressionType int32
const ( NoCompression CompressionType = 0 Snappy CompressionType = 1 )
func (CompressionType) Enum ¶
func (x CompressionType) Enum() *CompressionType
func (CompressionType) EnumDescriptor ¶
func (CompressionType) EnumDescriptor() ([]byte, []int)
func (CompressionType) String ¶
func (x CompressionType) String() string
func (*CompressionType) UnmarshalJSON ¶
func (x *CompressionType) 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) 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 (m *Message) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Message: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Type |= MessageType(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } m.To = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.To |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } m.From = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.From |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ClusterId", wireType) } m.ClusterId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ClusterId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) } m.Term = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Term |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LogTerm", wireType) } m.LogTerm = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LogTerm |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LogIndex", wireType) } m.LogIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.LogIndex |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) } m.Commit = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Commit |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Reject", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Reject = bool(v != 0) case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } m.Hint = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Hint |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRaft } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRaft } if postIndex > l { return io.ErrUnexpectedEOF } m.Entries = append(m.Entries, Entry{}) if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthRaft } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRaft } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field HintHigh", wireType) } m.HintHigh = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.HintHigh |= uint64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipRaft(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthRaft } if (iNdEx + skippy) < 0 { return ErrInvalidLengthRaft } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil }
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 (m *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 AddWitness ConfigChangeType = 3 )
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) Descriptor ¶
func (*Entry) GetClientID ¶
func (*Entry) GetRespondedTo ¶
func (*Entry) GetSeriesID ¶
func (*Entry) IsConfigChange ¶
IsConfigChange returns a boolean value indicating whether the entry is for config change.
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) IsProposal ¶
IsProposal returns a boolean value indicating whether the entry is a regular update entry.
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) ProtoMessage ¶
func (*Entry) ProtoMessage()
func (*Entry) SizeUpperLimit ¶
SizeUpperLimit returns the upper limit size of an entry.
func (*Entry) XXX_DiscardUnknown ¶
func (m *Entry) XXX_DiscardUnknown()
func (*Entry) XXX_Marshal ¶
func (*Entry) XXX_Unmarshal ¶
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) 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 (m *Entry) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Entry: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) } m.Term = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Term |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } m.Index = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Index |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Type |= EntryType(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } m.Key = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Key |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ClientID", wireType) } m.ClientID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ClientID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SeriesID", wireType) } m.SeriesID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.SeriesID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RespondedTo", wireType) } m.RespondedTo = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RespondedTo |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cmd", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRaft } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthRaft } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthRaft } if postIndex > l { return io.ErrUnexpectedEOF } m.Cmd = append(m.Cmd[:0], dAtA[iNdEx:postIndex]...) if m.Cmd == nil { m.Cmd = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRaft(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthRaft } if (iNdEx + skippy) < 0 { return ErrInvalidLengthRaft } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil }
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 (m *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 EntryType ¶
type EntryType int32
func (EntryType) EnumDescriptor ¶
func (*EntryType) UnmarshalJSON ¶
type IChunkSink ¶
type IChunkSink interface { // return (sent, stopped) Receive(chunk Chunk) (bool, bool) Stop() ClusterID() uint64 ToNodeID() uint64 }
IChunkSink is the snapshot chunk sink for handling snapshot chunks being streamed.
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 */ Witnesses 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) GetWitnesses ¶
func (m *Membership) GetWitnesses() map[uint64]string
func (*Membership) Marshal ¶
func (m *Membership) Marshal() (dAtA []byte, err 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 (m *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) CanDrop ¶
CanDrop returns a boolean value indicating whether the message can be safely dropped.
func (*Message) Descriptor ¶
func (*Message) GetClusterId ¶
func (*Message) GetEntries ¶
func (*Message) GetHintHigh ¶
func (*Message) GetLogIndex ¶
func (*Message) GetLogTerm ¶
func (*Message) GetSnapshot ¶
func (*Message) GetType ¶
func (m *Message) GetType() MessageType
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) SizeUpperLimit ¶
SizeUpperLimit returns the upper limit size of the message.
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
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) 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 (m *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 RateLimit MessageType = 25 )
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"` LogdbType string `protobuf:"bytes,4,opt,name=logdb_type,json=logdbType" json:"logdb_type"` Hostname string `protobuf:"bytes,5,opt,name=hostname" json:"hostname"` DeploymentId uint64 `protobuf:"varint,6,opt,name=deployment_id,json=deploymentId" json:"deployment_id"` StepWorkerCount uint64 `protobuf:"varint,7,opt,name=step_worker_count,json=stepWorkerCount" json:"step_worker_count"` LogdbShardCount uint64 `protobuf:"varint,8,opt,name=logdb_shard_count,json=logdbShardCount" json:"logdb_shard_count"` MaxSessionCount uint64 `protobuf:"varint,9,opt,name=max_session_count,json=maxSessionCount" json:"max_session_count"` EntryBatchSize uint64 `protobuf:"varint,10,opt,name=entry_batch_size,json=entryBatchSize" json:"entry_batch_size"` AddressByNodeHostId bool `protobuf:"varint,11,opt,name=address_by_node_host_id,json=addressByNodeHostId" json:"address_by_node_host_id"` }
func (*RaftDataStatus) Descriptor ¶
func (*RaftDataStatus) Descriptor() ([]byte, []int)
func (*RaftDataStatus) GetAddress ¶
func (m *RaftDataStatus) GetAddress() string
func (*RaftDataStatus) GetAddressByNodeHostId ¶
func (m *RaftDataStatus) GetAddressByNodeHostId() bool
func (*RaftDataStatus) GetBinVer ¶
func (m *RaftDataStatus) GetBinVer() uint32
func (*RaftDataStatus) GetDeploymentId ¶
func (m *RaftDataStatus) GetDeploymentId() uint64
func (*RaftDataStatus) GetEntryBatchSize ¶
func (m *RaftDataStatus) GetEntryBatchSize() uint64
func (*RaftDataStatus) GetHardHash ¶
func (m *RaftDataStatus) GetHardHash() uint64
func (*RaftDataStatus) GetHostname ¶
func (m *RaftDataStatus) GetHostname() string
func (*RaftDataStatus) GetLogdbShardCount ¶
func (m *RaftDataStatus) GetLogdbShardCount() uint64
func (*RaftDataStatus) GetLogdbType ¶
func (m *RaftDataStatus) GetLogdbType() string
func (*RaftDataStatus) GetMaxSessionCount ¶
func (m *RaftDataStatus) GetMaxSessionCount() uint64
func (*RaftDataStatus) GetStepWorkerCount ¶
func (m *RaftDataStatus) GetStepWorkerCount() uint64
func (*RaftDataStatus) Marshal ¶
func (m *RaftDataStatus) Marshal() (dAtA []byte, err 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 (m *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 Response ¶
type Response struct { }
dummy message used by grpc
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
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"` Checksum []byte `protobuf:"bytes,8,opt,name=checksum" json:"checksum"` Dummy bool `protobuf:"varint,9,opt,name=dummy" json:"dummy"` ClusterId uint64 `protobuf:"varint,10,opt,name=cluster_id,json=clusterId" json:"cluster_id"` Type StateMachineType `protobuf:"varint,11,opt,name=type,enum=raftpb.StateMachineType" json:"type"` Imported bool `protobuf:"varint,12,opt,name=imported" json:"imported"` OnDiskIndex uint64 `protobuf:"varint,13,opt,name=on_disk_index,json=onDiskIndex" json:"on_disk_index"` Witness bool `protobuf:"varint,14,opt,name=witness" json:"witness"` }
field id 1 was used for optional string filename
func (*Snapshot) Descriptor ¶
func (*Snapshot) GetChecksum ¶
func (*Snapshot) GetClusterId ¶
func (*Snapshot) GetFileSize ¶
func (*Snapshot) GetFilepath ¶
func (*Snapshot) GetFiles ¶
func (m *Snapshot) GetFiles() []*SnapshotFile
func (*Snapshot) GetImported ¶
func (*Snapshot) GetMembership ¶
func (m *Snapshot) GetMembership() Membership
func (*Snapshot) GetOnDiskIndex ¶
func (*Snapshot) GetType ¶
func (m *Snapshot) GetType() StateMachineType
func (*Snapshot) GetWitness ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) XXX_DiscardUnknown ¶
func (m *Snapshot) XXX_DiscardUnknown()
func (*Snapshot) XXX_Marshal ¶
func (*Snapshot) XXX_Unmarshal ¶
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) 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 (m *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"` CompressionType CompressionType `protobuf:"varint,9,opt,name=compression_type,json=compressionType,enum=raftpb.CompressionType" json:"compression_type"` }
func (*SnapshotHeader) Descriptor ¶
func (*SnapshotHeader) Descriptor() ([]byte, []int)
func (*SnapshotHeader) GetChecksumType ¶
func (m *SnapshotHeader) GetChecksumType() ChecksumType
func (*SnapshotHeader) GetCompressionType ¶
func (m *SnapshotHeader) GetCompressionType() CompressionType
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) 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 (m *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) Descriptor ¶
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) XXX_DiscardUnknown ¶
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶
func (*State) XXX_Unmarshal ¶
type StateMachineType ¶
type StateMachineType int32
const ( UnknownStateMachine StateMachineType = 0 RegularStateMachine StateMachineType = 1 ConcurrentStateMachine StateMachineType = 2 OnDiskStateMachine StateMachineType = 3 )
func (StateMachineType) Enum ¶
func (x StateMachineType) Enum() *StateMachineType
func (StateMachineType) EnumDescriptor ¶
func (StateMachineType) EnumDescriptor() ([]byte, []int)
func (StateMachineType) String ¶
func (x StateMachineType) String() string
func (*StateMachineType) UnmarshalJSON ¶
func (x *StateMachineType) UnmarshalJSON(data []byte) error
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 // whether CommittedEntries can be applied without waiting for the Update // to be persisted to disk FastApply bool // 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 // DroppedEntries is a list of entries dropped when no leader is available DroppedEntries []Entry // DroppedReadIndexes is a list of read index requests dropped when no leader // is available. DroppedReadIndexes []SystemCtx }
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.
type UpdateCommit ¶
type UpdateCommit struct { // the last index known to be pushed to rsm for execution. Processed uint64 // the last index confirmed to be executed. LastApplied uint64 StableLogTo uint64 StableLogTerm uint64 StableSnapshotTo uint64 ReadyToRead uint64 }
UpdateCommit is used to describe how to commit the Update instance to progress the state of raft.