etcd: github.com/coreos/etcd/raft/raftpb Index | Files

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
SnapshotMetadata
Snapshot
Message
HardState
ConfState
ConfChange

Index

Package Files

raft.pb.go

Variables

var (
    ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowRaft   = fmt.Errorf("proto: integer overflow")
)
var ConfChangeType_name = map[int32]string{
    0:  "ConfChangeAddNode",
    1:  "ConfChangeRemoveNode",
    2:  "ConfChangeUpdateNode",
}
var ConfChangeType_value = map[string]int32{
    "ConfChangeAddNode":    0,
    "ConfChangeRemoveNode": 1,
    "ConfChangeUpdateNode": 2,
}
var EntryType_name = map[int32]string{
    0:  "EntryNormal",
    1:  "EntryConfChange",
}
var EntryType_value = map[string]int32{
    "EntryNormal":     0,
    "EntryConfChange": 1,
}
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",
}
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,
}

type ConfChange Uses

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_unrecognized []byte         `json:"-"`
}

func (*ConfChange) Descriptor Uses

func (*ConfChange) Descriptor() ([]byte, []int)

func (*ConfChange) Marshal Uses

func (m *ConfChange) Marshal() (dAtA []byte, err error)

func (*ConfChange) MarshalTo Uses

func (m *ConfChange) MarshalTo(dAtA []byte) (int, error)

func (*ConfChange) ProtoMessage Uses

func (*ConfChange) ProtoMessage()

func (*ConfChange) Reset Uses

func (m *ConfChange) Reset()

func (*ConfChange) Size Uses

func (m *ConfChange) Size() (n int)

func (*ConfChange) String Uses

func (m *ConfChange) String() string

func (*ConfChange) Unmarshal Uses

func (m *ConfChange) Unmarshal(dAtA []byte) error

type ConfChangeType Uses

type ConfChangeType int32
const (
    ConfChangeAddNode    ConfChangeType = 0
    ConfChangeRemoveNode ConfChangeType = 1
    ConfChangeUpdateNode ConfChangeType = 2
)

func (ConfChangeType) Enum Uses

func (x ConfChangeType) Enum() *ConfChangeType

func (ConfChangeType) EnumDescriptor Uses

func (ConfChangeType) EnumDescriptor() ([]byte, []int)

func (ConfChangeType) String Uses

func (x ConfChangeType) String() string

func (*ConfChangeType) UnmarshalJSON Uses

func (x *ConfChangeType) UnmarshalJSON(data []byte) error

type ConfState Uses

type ConfState struct {
    Nodes            []uint64 `protobuf:"varint,1,rep,name=nodes" json:"nodes,omitempty"`
    XXX_unrecognized []byte   `json:"-"`
}

func (*ConfState) Descriptor Uses

func (*ConfState) Descriptor() ([]byte, []int)

func (*ConfState) Marshal Uses

func (m *ConfState) Marshal() (dAtA []byte, err error)

func (*ConfState) MarshalTo Uses

func (m *ConfState) MarshalTo(dAtA []byte) (int, error)

func (*ConfState) ProtoMessage Uses

func (*ConfState) ProtoMessage()

func (*ConfState) Reset Uses

func (m *ConfState) Reset()

func (*ConfState) Size Uses

func (m *ConfState) Size() (n int)

func (*ConfState) String Uses

func (m *ConfState) String() string

func (*ConfState) Unmarshal Uses

func (m *ConfState) Unmarshal(dAtA []byte) error

type Entry Uses

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_unrecognized []byte    `json:"-"`
}

func (*Entry) Descriptor Uses

func (*Entry) Descriptor() ([]byte, []int)

func (*Entry) Marshal Uses

func (m *Entry) Marshal() (dAtA []byte, err error)

func (*Entry) MarshalTo Uses

func (m *Entry) MarshalTo(dAtA []byte) (int, error)

func (*Entry) ProtoMessage Uses

func (*Entry) ProtoMessage()

func (*Entry) Reset Uses

func (m *Entry) Reset()

func (*Entry) Size Uses

func (m *Entry) Size() (n int)

func (*Entry) String Uses

func (m *Entry) String() string

func (*Entry) Unmarshal Uses

func (m *Entry) Unmarshal(dAtA []byte) error

type EntryType Uses

type EntryType int32
const (
    EntryNormal     EntryType = 0
    EntryConfChange EntryType = 1
)

func (EntryType) Enum Uses

func (x EntryType) Enum() *EntryType

func (EntryType) EnumDescriptor Uses

func (EntryType) EnumDescriptor() ([]byte, []int)

func (EntryType) String Uses

func (x EntryType) String() string

func (*EntryType) UnmarshalJSON Uses

func (x *EntryType) UnmarshalJSON(data []byte) error

type HardState Uses

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_unrecognized []byte `json:"-"`
}

func (*HardState) Descriptor Uses

func (*HardState) Descriptor() ([]byte, []int)

func (*HardState) Marshal Uses

func (m *HardState) Marshal() (dAtA []byte, err error)

func (*HardState) MarshalTo Uses

func (m *HardState) MarshalTo(dAtA []byte) (int, error)

func (*HardState) ProtoMessage Uses

func (*HardState) ProtoMessage()

func (*HardState) Reset Uses

func (m *HardState) Reset()

func (*HardState) Size Uses

func (m *HardState) Size() (n int)

func (*HardState) String Uses

func (m *HardState) String() string

func (*HardState) Unmarshal Uses

func (m *HardState) Unmarshal(dAtA []byte) error

type Message Uses

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_unrecognized []byte      `json:"-"`
}

func (*Message) Descriptor Uses

func (*Message) Descriptor() ([]byte, []int)

func (*Message) Marshal Uses

func (m *Message) Marshal() (dAtA []byte, err error)

func (*Message) MarshalTo Uses

func (m *Message) MarshalTo(dAtA []byte) (int, error)

func (*Message) ProtoMessage Uses

func (*Message) ProtoMessage()

func (*Message) Reset Uses

func (m *Message) Reset()

func (*Message) Size Uses

func (m *Message) Size() (n int)

func (*Message) String Uses

func (m *Message) String() string

func (*Message) Unmarshal Uses

func (m *Message) Unmarshal(dAtA []byte) error

type MessageType Uses

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 Uses

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor Uses

func (MessageType) EnumDescriptor() ([]byte, []int)

func (MessageType) String Uses

func (x MessageType) String() string

func (*MessageType) UnmarshalJSON Uses

func (x *MessageType) UnmarshalJSON(data []byte) error

type Snapshot Uses

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_unrecognized []byte           `json:"-"`
}

func (*Snapshot) Descriptor Uses

func (*Snapshot) Descriptor() ([]byte, []int)

func (*Snapshot) Marshal Uses

func (m *Snapshot) Marshal() (dAtA []byte, err error)

func (*Snapshot) MarshalTo Uses

func (m *Snapshot) MarshalTo(dAtA []byte) (int, error)

func (*Snapshot) ProtoMessage Uses

func (*Snapshot) ProtoMessage()

func (*Snapshot) Reset Uses

func (m *Snapshot) Reset()

func (*Snapshot) Size Uses

func (m *Snapshot) Size() (n int)

func (*Snapshot) String Uses

func (m *Snapshot) String() string

func (*Snapshot) Unmarshal Uses

func (m *Snapshot) Unmarshal(dAtA []byte) error

type SnapshotMetadata Uses

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_unrecognized []byte    `json:"-"`
}

func (*SnapshotMetadata) Descriptor Uses

func (*SnapshotMetadata) Descriptor() ([]byte, []int)

func (*SnapshotMetadata) Marshal Uses

func (m *SnapshotMetadata) Marshal() (dAtA []byte, err error)

func (*SnapshotMetadata) MarshalTo Uses

func (m *SnapshotMetadata) MarshalTo(dAtA []byte) (int, error)

func (*SnapshotMetadata) ProtoMessage Uses

func (*SnapshotMetadata) ProtoMessage()

func (*SnapshotMetadata) Reset Uses

func (m *SnapshotMetadata) Reset()

func (*SnapshotMetadata) Size Uses

func (m *SnapshotMetadata) Size() (n int)

func (*SnapshotMetadata) String Uses

func (m *SnapshotMetadata) String() string

func (*SnapshotMetadata) Unmarshal Uses

func (m *SnapshotMetadata) Unmarshal(dAtA []byte) error

Package raftpb imports 4 packages (graph) and is imported by 846 packages. Updated 2017-06-14. Refresh now. Tools for package owners.