Documentation ¶
Index ¶
- Variables
- type ConfChange
- func (*ConfChange) Descriptor() ([]byte, []int)
- func (m *ConfChange) Marshal() (dAtA []byte, err error)
- func (m *ConfChange) MarshalTo(dAtA []byte) (int, error)
- func (m *ConfChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConfChange) ProtoMessage()
- func (m *ConfChange) Reset()
- func (m *ConfChange) Size() (n int)
- func (m *ConfChange) String() string
- func (m *ConfChange) Unmarshal(dAtA []byte) error
- func (m *ConfChange) XXX_DiscardUnknown()
- func (m *ConfChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConfChange) XXX_Merge(src proto.Message)
- func (m *ConfChange) XXX_Size() int
- func (m *ConfChange) XXX_Unmarshal(b []byte) error
- type ConfChangeType
- type ConfState
- func (*ConfState) Descriptor() ([]byte, []int)
- func (m *ConfState) Marshal() (dAtA []byte, err error)
- func (m *ConfState) MarshalTo(dAtA []byte) (int, error)
- func (m *ConfState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConfState) ProtoMessage()
- func (m *ConfState) Reset()
- func (m *ConfState) Size() (n int)
- func (m *ConfState) String() string
- func (m *ConfState) Unmarshal(dAtA []byte) error
- func (m *ConfState) XXX_DiscardUnknown()
- func (m *ConfState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConfState) XXX_Merge(src proto.Message)
- func (m *ConfState) XXX_Size() int
- func (m *ConfState) XXX_Unmarshal(b []byte) error
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) Marshal() (dAtA []byte, err error)
- func (m *Entry) MarshalTo(dAtA []byte) (int, error)
- func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Entry) ProtoMessage()
- func (m *Entry) Reset()
- func (m *Entry) Size() (n int)
- func (m *Entry) String() string
- func (m *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 EntryType
- type HardState
- func (*HardState) Descriptor() ([]byte, []int)
- func (m *HardState) Marshal() (dAtA []byte, err error)
- func (m *HardState) MarshalTo(dAtA []byte) (int, error)
- func (m *HardState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HardState) ProtoMessage()
- func (m *HardState) Reset()
- func (m *HardState) Size() (n int)
- func (m *HardState) String() string
- func (m *HardState) Unmarshal(dAtA []byte) error
- func (m *HardState) XXX_DiscardUnknown()
- func (m *HardState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HardState) XXX_Merge(src proto.Message)
- func (m *HardState) XXX_Size() int
- func (m *HardState) XXX_Unmarshal(b []byte) error
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) Size() (n 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 MessageType
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)
- func (m *Snapshot) Marshal() (dAtA []byte, err error)
- func (m *Snapshot) MarshalTo(dAtA []byte) (int, error)
- func (m *Snapshot) MarshalToSizedBuffer(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 (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 SnapshotMetadata
- func (*SnapshotMetadata) Descriptor() ([]byte, []int)
- func (m *SnapshotMetadata) Marshal() (dAtA []byte, err error)
- func (m *SnapshotMetadata) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotMetadata) ProtoMessage()
- func (m *SnapshotMetadata) Reset()
- func (m *SnapshotMetadata) Size() (n int)
- func (m *SnapshotMetadata) String() string
- func (m *SnapshotMetadata) Unmarshal(dAtA []byte) error
- func (m *SnapshotMetadata) XXX_DiscardUnknown()
- func (m *SnapshotMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotMetadata) XXX_Merge(src proto.Message)
- func (m *SnapshotMetadata) XXX_Size() int
- func (m *SnapshotMetadata) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow") )
View Source
var ConfChangeType_name = map[int32]string{
0: "ConfChangeAddNode",
1: "ConfChangeRemoveNode",
2: "ConfChangeUpdateNode",
3: "ConfChangeAddLearnerNode",
}
View Source
var ConfChangeType_value = map[string]int32{
"ConfChangeAddNode": 0,
"ConfChangeRemoveNode": 1,
"ConfChangeUpdateNode": 2,
"ConfChangeAddLearnerNode": 3,
}
View Source
var EntryType_name = map[int32]string{
0: "EntryNormal",
1: "EntryConfChange",
}
View Source
var EntryType_value = map[string]int32{
"EntryNormal": 0,
"EntryConfChange": 1,
}
View Source
var MessageType_name = map[int32]string{
0: "MsgHup",
1: "MsgBeat",
2: "MsgProp",
3: "MsgApp",
4: "MsgAppResp",
5: "MsgVote",
6: "MsgVoteResp",
7: "MsgSnap",
8: "MsgHeartbeat",
9: "MsgHeartbeatResp",
10: "MsgUnreachable",
11: "MsgSnapStatus",
12: "MsgCheckQuorum",
13: "MsgTransferLeader",
14: "MsgTimeoutNow",
15: "MsgReadIndex",
16: "MsgReadIndexResp",
17: "MsgPreVote",
18: "MsgPreVoteResp",
}
View Source
var MessageType_value = map[string]int32{
"MsgHup": 0,
"MsgBeat": 1,
"MsgProp": 2,
"MsgApp": 3,
"MsgAppResp": 4,
"MsgVote": 5,
"MsgVoteResp": 6,
"MsgSnap": 7,
"MsgHeartbeat": 8,
"MsgHeartbeatResp": 9,
"MsgUnreachable": 10,
"MsgSnapStatus": 11,
"MsgCheckQuorum": 12,
"MsgTransferLeader": 13,
"MsgTimeoutNow": 14,
"MsgReadIndex": 15,
"MsgReadIndexResp": 16,
"MsgPreVote": 17,
"MsgPreVoteResp": 18,
}
Functions ¶
This section is empty.
Types ¶
type ConfChange ¶
type ConfChange struct { ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"` Type ConfChangeType `protobuf:"varint,2,opt,name=Type,enum=raftpb.ConfChangeType" json:"Type"` NodeID uint64 `protobuf:"varint,3,opt,name=NodeID" json:"NodeID"` Context []byte `protobuf:"bytes,4,opt,name=Context" json:"Context,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConfChange) Descriptor ¶
func (*ConfChange) Descriptor() ([]byte, []int)
func (*ConfChange) Marshal ¶
func (m *ConfChange) Marshal() (dAtA []byte, err error)
func (*ConfChange) MarshalToSizedBuffer ¶
func (m *ConfChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConfChange) ProtoMessage ¶
func (*ConfChange) ProtoMessage()
func (*ConfChange) Reset ¶
func (m *ConfChange) Reset()
func (*ConfChange) Size ¶
func (m *ConfChange) Size() (n int)
func (*ConfChange) String ¶
func (m *ConfChange) String() string
func (*ConfChange) Unmarshal ¶
func (m *ConfChange) Unmarshal(dAtA []byte) error
func (*ConfChange) XXX_DiscardUnknown ¶
func (m *ConfChange) XXX_DiscardUnknown()
func (*ConfChange) XXX_Marshal ¶
func (m *ConfChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConfChange) XXX_Merge ¶
func (m *ConfChange) XXX_Merge(src proto.Message)
func (*ConfChange) XXX_Size ¶
func (m *ConfChange) XXX_Size() int
func (*ConfChange) XXX_Unmarshal ¶
func (m *ConfChange) XXX_Unmarshal(b []byte) error
type ConfChangeType ¶
type ConfChangeType int32
const ( ConfChangeAddNode ConfChangeType = 0 ConfChangeRemoveNode ConfChangeType = 1 ConfChangeUpdateNode ConfChangeType = 2 ConfChangeAddLearnerNode ConfChangeType = 3 )
func (ConfChangeType) Enum ¶
func (x ConfChangeType) Enum() *ConfChangeType
func (ConfChangeType) EnumDescriptor ¶
func (ConfChangeType) EnumDescriptor() ([]byte, []int)
func (ConfChangeType) String ¶
func (x ConfChangeType) String() string
func (*ConfChangeType) UnmarshalJSON ¶
func (x *ConfChangeType) UnmarshalJSON(data []byte) error
type ConfState ¶
type ConfState struct { Nodes []uint64 `protobuf:"varint,1,rep,name=nodes" json:"nodes,omitempty"` Learners []uint64 `protobuf:"varint,2,rep,name=learners" json:"learners,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConfState) Descriptor ¶
func (*ConfState) MarshalToSizedBuffer ¶
func (*ConfState) ProtoMessage ¶
func (*ConfState) ProtoMessage()
func (*ConfState) XXX_DiscardUnknown ¶
func (m *ConfState) XXX_DiscardUnknown()
func (*ConfState) XXX_Marshal ¶
func (*ConfState) XXX_Unmarshal ¶
type Entry ¶
type Entry struct { Term uint64 `protobuf:"varint,2,opt,name=Term" json:"Term"` Index uint64 `protobuf:"varint,3,opt,name=Index" json:"Index"` Type EntryType `protobuf:"varint,1,opt,name=Type,enum=raftpb.EntryType" json:"Type"` Data []byte `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Entry) Descriptor ¶
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
func (*Entry) XXX_DiscardUnknown ¶
func (m *Entry) XXX_DiscardUnknown()
func (*Entry) XXX_Marshal ¶
func (*Entry) XXX_Unmarshal ¶
type EntryType ¶
type EntryType int32
func (EntryType) EnumDescriptor ¶
func (*EntryType) UnmarshalJSON ¶
type HardState ¶
type HardState 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HardState) Descriptor ¶
func (*HardState) MarshalToSizedBuffer ¶
func (*HardState) ProtoMessage ¶
func (*HardState) ProtoMessage()
func (*HardState) XXX_DiscardUnknown ¶
func (m *HardState) XXX_DiscardUnknown()
func (*HardState) XXX_Marshal ¶
func (*HardState) XXX_Unmarshal ¶
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"` Term uint64 `protobuf:"varint,4,opt,name=term" json:"term"` LogTerm uint64 `protobuf:"varint,5,opt,name=logTerm" json:"logTerm"` Index uint64 `protobuf:"varint,6,opt,name=index" json:"index"` Entries []Entry `protobuf:"bytes,7,rep,name=entries" json:"entries"` Commit uint64 `protobuf:"varint,8,opt,name=commit" json:"commit"` Snapshot Snapshot `protobuf:"bytes,9,opt,name=snapshot" json:"snapshot"` Reject bool `protobuf:"varint,10,opt,name=reject" json:"reject"` RejectHint uint64 `protobuf:"varint,11,opt,name=rejectHint" json:"rejectHint"` Context []byte `protobuf:"bytes,12,opt,name=context" json:"context,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Message) Descriptor ¶
func (*Message) MarshalToSizedBuffer ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type MessageType ¶
type MessageType int32
const ( MsgHup MessageType = 0 MsgBeat MessageType = 1 MsgProp MessageType = 2 MsgApp MessageType = 3 MsgAppResp MessageType = 4 MsgVote MessageType = 5 MsgVoteResp MessageType = 6 MsgSnap MessageType = 7 MsgHeartbeat MessageType = 8 MsgHeartbeatResp MessageType = 9 MsgUnreachable MessageType = 10 MsgSnapStatus MessageType = 11 MsgCheckQuorum MessageType = 12 MsgTransferLeader MessageType = 13 MsgTimeoutNow MessageType = 14 MsgReadIndex MessageType = 15 MsgReadIndexResp MessageType = 16 MsgPreVote MessageType = 17 MsgPreVoteResp MessageType = 18 )
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 Snapshot ¶
type Snapshot struct { Data []byte `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` Metadata SnapshotMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Snapshot) Descriptor ¶
func (*Snapshot) MarshalToSizedBuffer ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) XXX_DiscardUnknown ¶
func (m *Snapshot) XXX_DiscardUnknown()
func (*Snapshot) XXX_Marshal ¶
func (*Snapshot) XXX_Unmarshal ¶
type SnapshotMetadata ¶
type SnapshotMetadata struct { ConfState ConfState `protobuf:"bytes,1,opt,name=conf_state,json=confState" json:"conf_state"` Index uint64 `protobuf:"varint,2,opt,name=index" json:"index"` Term uint64 `protobuf:"varint,3,opt,name=term" json:"term"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SnapshotMetadata) Descriptor ¶
func (*SnapshotMetadata) Descriptor() ([]byte, []int)
func (*SnapshotMetadata) Marshal ¶
func (m *SnapshotMetadata) Marshal() (dAtA []byte, err error)
func (*SnapshotMetadata) MarshalToSizedBuffer ¶
func (m *SnapshotMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotMetadata) ProtoMessage ¶
func (*SnapshotMetadata) ProtoMessage()
func (*SnapshotMetadata) Reset ¶
func (m *SnapshotMetadata) Reset()
func (*SnapshotMetadata) Size ¶
func (m *SnapshotMetadata) Size() (n int)
func (*SnapshotMetadata) String ¶
func (m *SnapshotMetadata) String() string
func (*SnapshotMetadata) Unmarshal ¶
func (m *SnapshotMetadata) Unmarshal(dAtA []byte) error
func (*SnapshotMetadata) XXX_DiscardUnknown ¶
func (m *SnapshotMetadata) XXX_DiscardUnknown()
func (*SnapshotMetadata) XXX_Marshal ¶
func (m *SnapshotMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotMetadata) XXX_Merge ¶
func (m *SnapshotMetadata) XXX_Merge(src proto.Message)
func (*SnapshotMetadata) XXX_Size ¶
func (m *SnapshotMetadata) XXX_Size() int
func (*SnapshotMetadata) XXX_Unmarshal ¶
func (m *SnapshotMetadata) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.