package raftpb
import "github.com/coreos/etcd/raft/raftpb"
Package raftpb is a generated protocol buffer package.
It is generated from these files:
raft.proto
It has these top-level messages:
Entry Snapshot Message HardState ConfChange
Index ¶
- Variables
- type ConfChange
- func (m *ConfChange) Marshal() (data []byte, err error)
- func (m *ConfChange) MarshalTo(data []byte) (n int, err 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
- type ConfChangeType
- func (x ConfChangeType) Enum() *ConfChangeType
- func (x ConfChangeType) String() string
- func (x *ConfChangeType) UnmarshalJSON(data []byte) error
- type Entry
- func (m *Entry) Marshal() (data []byte, err error)
- func (m *Entry) MarshalTo(data []byte) (n int, err 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
- type EntryType
- func (x EntryType) Enum() *EntryType
- func (x EntryType) String() string
- func (x *EntryType) UnmarshalJSON(data []byte) error
- type HardState
- func (m *HardState) Marshal() (data []byte, err error)
- func (m *HardState) MarshalTo(data []byte) (n int, err 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
- type Message
- func (m *Message) Marshal() (data []byte, err error)
- func (m *Message) MarshalTo(data []byte) (n int, err 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
- type MessageType
- func (x MessageType) Enum() *MessageType
- func (x MessageType) String() string
- func (x *MessageType) UnmarshalJSON(data []byte) error
- type Snapshot
Variables ¶
var MessageType_name = map[int32]string{ 0: "MsgHup", 1: "MsgBeat", 2: "MsgProp", 3: "MsgApp", 4: "MsgAppResp", 5: "MsgVote", 6: "MsgVoteResp", 7: "MsgSnap", 8: "MsgDenied", }
var MessageType_value = map[string]int32{ "MsgHup": 0, "MsgBeat": 1, "MsgProp": 2, "MsgApp": 3, "MsgAppResp": 4, "MsgVote": 5, "MsgVoteResp": 6, "MsgSnap": 7, "MsgDenied": 8, }
Types ¶
type ConfChange ¶
type ConfChange struct { ID uint64 `protobuf:"varint,1,req" json:"ID"` Type ConfChangeType `protobuf:"varint,2,req,enum=raftpb.ConfChangeType" json:"Type"` NodeID uint64 `protobuf:"varint,3,req" json:"NodeID"` Context []byte `protobuf:"bytes,4,opt" json:"Context"` XXX_unrecognized []byte `json:"-"` }
func (*ConfChange) Marshal ¶
func (m *ConfChange) Marshal() (data []byte, err error)
func (*ConfChange) MarshalTo ¶
func (m *ConfChange) MarshalTo(data []byte) (n int, err 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
type ConfChangeType ¶
type ConfChangeType int32
const ( ConfChangeAddNode ConfChangeType = 0 ConfChangeRemoveNode ConfChangeType = 1 )
func (ConfChangeType) Enum ¶
func (x ConfChangeType) Enum() *ConfChangeType
func (ConfChangeType) String ¶
func (x ConfChangeType) String() string
func (*ConfChangeType) UnmarshalJSON ¶
func (x *ConfChangeType) UnmarshalJSON(data []byte) error
type Entry ¶
type Entry struct { Type EntryType `protobuf:"varint,1,req,enum=raftpb.EntryType" json:"Type"` Term uint64 `protobuf:"varint,2,req" json:"Term"` Index uint64 `protobuf:"varint,3,req" json:"Index"` Data []byte `protobuf:"bytes,4,opt" json:"Data"` XXX_unrecognized []byte `json:"-"` }
func (*Entry) Marshal ¶
func (*Entry) MarshalTo ¶
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
func (*Entry) Reset ¶
func (m *Entry) Reset()
func (*Entry) Size ¶
func (*Entry) String ¶
func (*Entry) Unmarshal ¶
type EntryType ¶
type EntryType int32
func (EntryType) Enum ¶
func (EntryType) String ¶
func (*EntryType) UnmarshalJSON ¶
type HardState ¶
type HardState struct { Term uint64 `protobuf:"varint,1,req,name=term" json:"term"` Vote uint64 `protobuf:"varint,2,req,name=vote" json:"vote"` Commit uint64 `protobuf:"varint,3,req,name=commit" json:"commit"` XXX_unrecognized []byte `json:"-"` }
func (*HardState) Marshal ¶
func (*HardState) MarshalTo ¶
func (*HardState) ProtoMessage ¶
func (*HardState) ProtoMessage()
func (*HardState) Reset ¶
func (m *HardState) Reset()
func (*HardState) Size ¶
func (*HardState) String ¶
func (*HardState) Unmarshal ¶
type Message ¶
type Message struct { Type MessageType `protobuf:"varint,1,req,name=type,enum=raftpb.MessageType" json:"type"` To uint64 `protobuf:"varint,2,req,name=to" json:"to"` From uint64 `protobuf:"varint,3,req,name=from" json:"from"` Term uint64 `protobuf:"varint,4,req,name=term" json:"term"` LogTerm uint64 `protobuf:"varint,5,req,name=logTerm" json:"logTerm"` Index uint64 `protobuf:"varint,6,req,name=index" json:"index"` Entries []Entry `protobuf:"bytes,7,rep,name=entries" json:"entries"` Commit uint64 `protobuf:"varint,8,req,name=commit" json:"commit"` Snapshot Snapshot `protobuf:"bytes,9,req,name=snapshot" json:"snapshot"` Reject bool `protobuf:"varint,10,req,name=reject" json:"reject"` XXX_unrecognized []byte `json:"-"` }
func (*Message) Marshal ¶
func (*Message) MarshalTo ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) Reset ¶
func (m *Message) Reset()
func (*Message) Size ¶
func (*Message) String ¶
func (*Message) 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 MsgDenied MessageType = 8 )
func (MessageType) Enum ¶
func (x MessageType) Enum() *MessageType
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,req,name=data" json:"data"` Nodes []uint64 `protobuf:"varint,2,rep,name=nodes" json:"nodes"` Index uint64 `protobuf:"varint,3,req,name=index" json:"index"` Term uint64 `protobuf:"varint,4,req,name=term" json:"term"` XXX_unrecognized []byte `json:"-"` }
func (*Snapshot) Marshal ¶
func (*Snapshot) MarshalTo ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) Reset ¶
func (m *Snapshot) Reset()
func (*Snapshot) Size ¶
func (*Snapshot) String ¶
func (*Snapshot) Unmarshal ¶
Source Files ¶
- Version
- v0.5.0-alpha.0
- Published
- Oct 25, 2014
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 8 minutes ago –
Tools for package owners.