Documentation ¶
Overview ¶
Package commonpb is a generated protocol buffer package.
It is generated from these files:
commonpb/raft.proto
It has these top-level messages:
Entry Snapshot ReconfRequest ReconfResponse
Index ¶
- Variables
- type Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) Marshal() (dAtA []byte, err error)
- func (m *Entry) MarshalTo(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
- type EntryType
- type ReconfRequest
- func (*ReconfRequest) Descriptor() ([]byte, []int)
- func (m *ReconfRequest) Marshal() (dAtA []byte, err error)
- func (m *ReconfRequest) MarshalTo(dAtA []byte) (int, error)
- func (*ReconfRequest) ProtoMessage()
- func (m *ReconfRequest) Reset()
- func (m *ReconfRequest) Size() (n int)
- func (m *ReconfRequest) String() string
- func (m *ReconfRequest) Unmarshal(dAtA []byte) error
- type ReconfResponse
- func (*ReconfResponse) Descriptor() ([]byte, []int)
- func (m *ReconfResponse) Marshal() (dAtA []byte, err error)
- func (m *ReconfResponse) MarshalTo(dAtA []byte) (int, error)
- func (*ReconfResponse) ProtoMessage()
- func (m *ReconfResponse) Reset()
- func (m *ReconfResponse) Size() (n int)
- func (m *ReconfResponse) String() string
- func (m *ReconfResponse) Unmarshal(dAtA []byte) error
- type ReconfStatus
- type ReconfType
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)
- 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
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 EntryType_name = map[int32]string{
0: "EntryInternal",
1: "EntryNormal",
2: "EntryReconf",
}
View Source
var EntryType_value = map[string]int32{
"EntryInternal": 0,
"EntryNormal": 1,
"EntryReconf": 2,
}
View Source
var ReconfStatus_name = map[int32]string{
0: "ReconfOK",
1: "ReconfTimeout",
2: "ReconfNotLeader",
}
View Source
var ReconfStatus_value = map[string]int32{
"ReconfOK": 0,
"ReconfTimeout": 1,
"ReconfNotLeader": 2,
}
View Source
var ReconfType_name = map[int32]string{
0: "ReconfAdd",
1: "ReconfRemove",
}
View Source
var ReconfType_value = map[string]int32{
"ReconfAdd": 0,
"ReconfRemove": 1,
}
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { Term uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"` Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` EntryType EntryType `protobuf:"varint,3,opt,name=entryType,proto3,enum=commonpb.EntryType" json:"entryType,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` }
func (*Entry) Descriptor ¶
func (*Entry) ProtoMessage ¶
func (*Entry) ProtoMessage()
type ReconfRequest ¶
type ReconfRequest struct { ServerID uint64 `protobuf:"varint,1,opt,name=serverID,proto3" json:"serverID,omitempty"` ReconfType ReconfType `protobuf:"varint,2,opt,name=reconfType,proto3,enum=commonpb.ReconfType" json:"reconfType,omitempty"` }
func (*ReconfRequest) Descriptor ¶
func (*ReconfRequest) Descriptor() ([]byte, []int)
func (*ReconfRequest) Marshal ¶
func (m *ReconfRequest) Marshal() (dAtA []byte, err error)
func (*ReconfRequest) ProtoMessage ¶
func (*ReconfRequest) ProtoMessage()
func (*ReconfRequest) Reset ¶
func (m *ReconfRequest) Reset()
func (*ReconfRequest) Size ¶
func (m *ReconfRequest) Size() (n int)
func (*ReconfRequest) String ¶
func (m *ReconfRequest) String() string
func (*ReconfRequest) Unmarshal ¶
func (m *ReconfRequest) Unmarshal(dAtA []byte) error
type ReconfResponse ¶
type ReconfResponse struct { Status ReconfStatus `protobuf:"varint,1,opt,name=status,proto3,enum=commonpb.ReconfStatus" json:"status,omitempty"` LeaderHint string `protobuf:"bytes,2,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"` }
func (*ReconfResponse) Descriptor ¶
func (*ReconfResponse) Descriptor() ([]byte, []int)
func (*ReconfResponse) Marshal ¶
func (m *ReconfResponse) Marshal() (dAtA []byte, err error)
func (*ReconfResponse) ProtoMessage ¶
func (*ReconfResponse) ProtoMessage()
func (*ReconfResponse) Reset ¶
func (m *ReconfResponse) Reset()
func (*ReconfResponse) Size ¶
func (m *ReconfResponse) Size() (n int)
func (*ReconfResponse) String ¶
func (m *ReconfResponse) String() string
func (*ReconfResponse) Unmarshal ¶
func (m *ReconfResponse) Unmarshal(dAtA []byte) error
type ReconfStatus ¶
type ReconfStatus int32
const ( ReconfOK ReconfStatus = 0 ReconfTimeout ReconfStatus = 1 ReconfNotLeader ReconfStatus = 2 )
func (ReconfStatus) EnumDescriptor ¶
func (ReconfStatus) EnumDescriptor() ([]byte, []int)
func (ReconfStatus) String ¶
func (x ReconfStatus) String() string
type ReconfType ¶
type ReconfType int32
const ( ReconfAdd ReconfType = 0 ReconfRemove ReconfType = 1 )
func (ReconfType) EnumDescriptor ¶
func (ReconfType) EnumDescriptor() ([]byte, []int)
func (ReconfType) String ¶
func (x ReconfType) String() string
type Snapshot ¶
type Snapshot struct { LeaderID uint64 `protobuf:"varint,1,opt,name=leaderID,proto3" json:"leaderID,omitempty"` Term uint64 `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"` LastIncludedIndex uint64 `protobuf:"varint,3,opt,name=lastIncludedIndex,proto3" json:"lastIncludedIndex,omitempty"` LastIncludedTerm uint64 `protobuf:"varint,4,opt,name=lastIncludedTerm,proto3" json:"lastIncludedTerm,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` }
func (*Snapshot) Descriptor ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.