Documentation ¶
Index ¶
- Variables
- func IsAcceptorStateEqual(a AcceptorState, b AcceptorState) bool
- func IsEmptyState(a State) bool
- func IsStateEqual(a State, b State) bool
- type AcceptorState
- func (*AcceptorState) Descriptor() ([]byte, []int)
- func (m *AcceptorState) GetAcceptedBallot() BallotNumber
- func (m *AcceptorState) GetAccetpedValue() []byte
- func (m *AcceptorState) GetInstanceID() uint64
- func (m *AcceptorState) GetPromiseBallot() BallotNumber
- func (m *AcceptorState) Marshal() (dAtA []byte, err error)
- func (m *AcceptorState) MarshalTo(dAtA []byte) (int, error)
- func (*AcceptorState) ProtoMessage()
- func (m *AcceptorState) Reset()
- func (m *AcceptorState) Size() (n int)
- func (m *AcceptorState) SizeUpperLimit() int
- func (m *AcceptorState) String() string
- func (m *AcceptorState) Unmarshal(dAtA []byte) error
- func (m *AcceptorState) XXX_DiscardUnknown()
- func (m *AcceptorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AcceptorState) XXX_Merge(src proto.Message)
- func (m *AcceptorState) XXX_Size() int
- func (m *AcceptorState) XXX_Unmarshal(b []byte) error
- type BallotNumber
- func (*BallotNumber) Descriptor() ([]byte, []int)
- func (m *BallotNumber) GetNodeID() uint64
- func (m *BallotNumber) GetProposalID() uint64
- func (m *BallotNumber) IsEqual(b BallotNumber) bool
- func (m *BallotNumber) IsNil() bool
- func (m *BallotNumber) IsNotLessThan(b BallotNumber) bool
- func (m *BallotNumber) Marshal() (dAtA []byte, err error)
- func (m *BallotNumber) MarshalTo(dAtA []byte) (int, error)
- func (*BallotNumber) ProtoMessage()
- func (m *BallotNumber) Reset()
- func (m *BallotNumber) Size() (n int)
- func (m *BallotNumber) String() string
- func (m *BallotNumber) Unmarshal(dAtA []byte) error
- func (m *BallotNumber) XXX_DiscardUnknown()
- func (m *BallotNumber) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BallotNumber) XXX_Merge(src proto.Message)
- func (m *BallotNumber) XXX_Size() int
- func (m *BallotNumber) XXX_Unmarshal(b []byte) error
- type Bootstrap
- func (*Bootstrap) Descriptor() ([]byte, []int)
- func (m *Bootstrap) GetAddresses() map[uint64]string
- func (m *Bootstrap) GetJoin() bool
- 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 (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 Entry
- func (*Entry) Descriptor() ([]byte, []int)
- func (m *Entry) GetAcceptorState() AcceptorState
- func (m *Entry) GetKey() uint64
- func (m *Entry) GetType() EntryType
- func (e *Entry) IsConfigChange() bool
- func (e *Entry) IsEmpty() bool
- 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) SizeUpperLimit() 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 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) 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 Membership
- func (*Membership) Descriptor() ([]byte, []int)
- func (m *Membership) GetAddresses() map[uint64]string
- func (m *Membership) GetConfigChangeId() uint64
- func (m *Membership) GetRemoved() map[uint64]bool
- 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 MessageBatch
- func (*MessageBatch) Descriptor() ([]byte, []int)
- func (m *MessageBatch) GetBinVer() uint32
- func (m *MessageBatch) GetRequests() []PaxosMsg
- 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 PaxosDataStatus
- func (*PaxosDataStatus) Descriptor() ([]byte, []int)
- func (m *PaxosDataStatus) GetAddress() string
- func (m *PaxosDataStatus) GetBinVer() uint32
- func (m *PaxosDataStatus) GetHardHash() uint64
- func (m *PaxosDataStatus) Marshal() (dAtA []byte, err error)
- func (m *PaxosDataStatus) MarshalTo(dAtA []byte) (int, error)
- func (*PaxosDataStatus) ProtoMessage()
- func (m *PaxosDataStatus) Reset()
- func (m *PaxosDataStatus) Size() (n int)
- func (m *PaxosDataStatus) String() string
- func (m *PaxosDataStatus) Unmarshal(dAtA []byte) error
- func (m *PaxosDataStatus) XXX_DiscardUnknown()
- func (m *PaxosDataStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaxosDataStatus) XXX_Merge(src proto.Message)
- func (m *PaxosDataStatus) XXX_Size() int
- func (m *PaxosDataStatus) XXX_Unmarshal(b []byte) error
- type PaxosMsg
- func (*PaxosMsg) Descriptor() ([]byte, []int)
- func (m *PaxosMsg) GetFlag() uint32
- func (m *PaxosMsg) GetFrom() uint64
- func (m *PaxosMsg) GetGroupID() uint64
- func (m *PaxosMsg) GetInstanceID() uint64
- func (m *PaxosMsg) GetKey() uint64
- func (m *PaxosMsg) GetMinChosenInstanceID() uint64
- func (m *PaxosMsg) GetMsgType() MessageType
- func (m *PaxosMsg) GetNowInstanceID() uint64
- func (m *PaxosMsg) GetPreAcceptID() uint64
- func (m *PaxosMsg) GetPreAcceptNodeID() uint64
- func (m *PaxosMsg) GetProposalID() uint64
- func (m *PaxosMsg) GetProposalNodeID() uint64
- func (m *PaxosMsg) GetRejectByPromiseID() uint64
- func (m *PaxosMsg) GetTo() uint64
- func (m *PaxosMsg) GetValue() []byte
- func (m *PaxosMsg) Marshal() (dAtA []byte, err error)
- func (m *PaxosMsg) MarshalTo(dAtA []byte) (int, error)
- func (*PaxosMsg) ProtoMessage()
- func (m *PaxosMsg) Reset()
- func (m *PaxosMsg) Size() (n int)
- func (m *PaxosMsg) SizeUpperLimit() int
- func (m *PaxosMsg) String() string
- func (m *PaxosMsg) Unmarshal(dAtA []byte) error
- func (m *PaxosMsg) XXX_DiscardUnknown()
- func (m *PaxosMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaxosMsg) XXX_Merge(src proto.Message)
- func (m *PaxosMsg) XXX_Size() int
- func (m *PaxosMsg) XXX_Unmarshal(b []byte) error
- type SnapshotHeader
- func (*SnapshotHeader) Descriptor() ([]byte, []int)
- func (m *SnapshotHeader) GetChecksumType() ChecksumType
- func (m *SnapshotHeader) GetDataStoreSize() uint64
- func (m *SnapshotHeader) GetGitVersion() string
- func (m *SnapshotHeader) GetHeaderChecksum() []byte
- func (m *SnapshotHeader) GetPayloadChecksum() []byte
- 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) GetAcceptorState() AcceptorState
- func (m *State) GetCommit() 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 Update
- type UpdateCommit
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthPaxos = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPaxos = fmt.Errorf("proto: integer overflow") )
View Source
var ChecksumType_name = map[int32]string{
0: "CRC32IEEE",
1: "HIGHWAY",
}
View Source
var ChecksumType_value = map[string]int32{
"CRC32IEEE": 0,
"HIGHWAY": 1,
}
View Source
var EntryType_name = map[int32]string{
0: "ApplicationEntry",
1: "ConfigChangeEntry",
}
View Source
var EntryType_value = map[string]int32{
"ApplicationEntry": 0,
"ConfigChangeEntry": 1,
}
View Source
var MessageType_name = map[int32]string{
0: "LocalTick",
1: "PaxosPrepare",
2: "PaxosPrepareReply",
3: "PaxosAccept",
4: "PaxosAcceptReply",
5: "PaxosLearnerAskForLearn",
6: "PaxosLearnerSendNowInstanceID",
7: "PaxosLearnerConfirmAskForLearn",
8: "PaxosLearnerSendLearnValue",
9: "PaxosLearnerProposerSendSuccess",
10: "Propose",
11: "NoOP",
12: "PaxosProposalSendNewValue",
}
View Source
var MessageType_value = map[string]int32{
"LocalTick": 0,
"PaxosPrepare": 1,
"PaxosPrepareReply": 2,
"PaxosAccept": 3,
"PaxosAcceptReply": 4,
"PaxosLearnerAskForLearn": 5,
"PaxosLearnerSendNowInstanceID": 6,
"PaxosLearnerConfirmAskForLearn": 7,
"PaxosLearnerSendLearnValue": 8,
"PaxosLearnerProposerSendSuccess": 9,
"Propose": 10,
"NoOP": 11,
"PaxosProposalSendNewValue": 12,
}
Functions ¶
func IsAcceptorStateEqual ¶
func IsAcceptorStateEqual(a AcceptorState, b AcceptorState) bool
IsAcceptorStateEqual ...
Types ¶
type AcceptorState ¶
type AcceptorState struct { InstanceID uint64 `protobuf:"varint,1,opt,name=InstanceID,json=instanceID" json:"InstanceID"` PromiseBallot BallotNumber `protobuf:"bytes,2,opt,name=PromiseBallot,json=promiseBallot" json:"PromiseBallot"` AcceptedBallot BallotNumber `protobuf:"bytes,3,opt,name=AcceptedBallot,json=acceptedBallot" json:"AcceptedBallot"` AccetpedValue []byte `protobuf:"bytes,4,opt,name=AccetpedValue,json=accetpedValue" json:"AccetpedValue"` }
func (*AcceptorState) Descriptor ¶
func (*AcceptorState) Descriptor() ([]byte, []int)
func (*AcceptorState) GetAcceptedBallot ¶
func (m *AcceptorState) GetAcceptedBallot() BallotNumber
func (*AcceptorState) GetAccetpedValue ¶
func (m *AcceptorState) GetAccetpedValue() []byte
func (*AcceptorState) GetInstanceID ¶
func (m *AcceptorState) GetInstanceID() uint64
func (*AcceptorState) GetPromiseBallot ¶
func (m *AcceptorState) GetPromiseBallot() BallotNumber
func (*AcceptorState) Marshal ¶
func (m *AcceptorState) Marshal() (dAtA []byte, err error)
func (*AcceptorState) ProtoMessage ¶
func (*AcceptorState) ProtoMessage()
func (*AcceptorState) Reset ¶
func (m *AcceptorState) Reset()
func (*AcceptorState) Size ¶
func (m *AcceptorState) Size() (n int)
func (*AcceptorState) SizeUpperLimit ¶
func (m *AcceptorState) SizeUpperLimit() int
SizeUpperLimit returns the upper limit size of an entry.
func (*AcceptorState) String ¶
func (m *AcceptorState) String() string
func (*AcceptorState) Unmarshal ¶
func (m *AcceptorState) Unmarshal(dAtA []byte) error
func (*AcceptorState) XXX_DiscardUnknown ¶
func (m *AcceptorState) XXX_DiscardUnknown()
func (*AcceptorState) XXX_Marshal ¶
func (m *AcceptorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AcceptorState) XXX_Merge ¶
func (m *AcceptorState) XXX_Merge(src proto.Message)
func (*AcceptorState) XXX_Size ¶
func (m *AcceptorState) XXX_Size() int
func (*AcceptorState) XXX_Unmarshal ¶
func (m *AcceptorState) XXX_Unmarshal(b []byte) error
type BallotNumber ¶
type BallotNumber struct { ProposalID uint64 `protobuf:"varint,1,opt,name=ProposalID,json=proposalID" json:"ProposalID"` NodeID uint64 `protobuf:"varint,2,opt,name=NodeID,json=nodeID" json:"NodeID"` }
func (*BallotNumber) Descriptor ¶
func (*BallotNumber) Descriptor() ([]byte, []int)
func (*BallotNumber) GetNodeID ¶
func (m *BallotNumber) GetNodeID() uint64
func (*BallotNumber) GetProposalID ¶
func (m *BallotNumber) GetProposalID() uint64
func (*BallotNumber) IsNotLessThan ¶
func (m *BallotNumber) IsNotLessThan(b BallotNumber) bool
IsNotLessThan ...
func (*BallotNumber) Marshal ¶
func (m *BallotNumber) Marshal() (dAtA []byte, err error)
func (*BallotNumber) ProtoMessage ¶
func (*BallotNumber) ProtoMessage()
func (*BallotNumber) Reset ¶
func (m *BallotNumber) Reset()
func (*BallotNumber) Size ¶
func (m *BallotNumber) Size() (n int)
func (*BallotNumber) String ¶
func (m *BallotNumber) String() string
func (*BallotNumber) Unmarshal ¶
func (m *BallotNumber) Unmarshal(dAtA []byte) error
func (*BallotNumber) XXX_DiscardUnknown ¶
func (m *BallotNumber) XXX_DiscardUnknown()
func (*BallotNumber) XXX_Marshal ¶
func (m *BallotNumber) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BallotNumber) XXX_Merge ¶
func (m *BallotNumber) XXX_Merge(src proto.Message)
func (*BallotNumber) XXX_Size ¶
func (m *BallotNumber) XXX_Size() int
func (*BallotNumber) XXX_Unmarshal ¶
func (m *BallotNumber) XXX_Unmarshal(b []byte) error
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"` }
func (*Bootstrap) Descriptor ¶
func (*Bootstrap) GetAddresses ¶
func (*Bootstrap) ProtoMessage ¶
func (*Bootstrap) ProtoMessage()
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 Entry ¶
type Entry struct { Type EntryType `protobuf:"varint,1,opt,name=Type,json=type,enum=paxospb.EntryType" json:"Type"` Key uint64 `protobuf:"varint,2,opt,name=Key,json=key" json:"Key"` AcceptorState AcceptorState `protobuf:"bytes,3,opt,name=AcceptorState,json=acceptorState" json:"AcceptorState"` }
func (*Entry) Descriptor ¶
func (*Entry) GetAcceptorState ¶
func (m *Entry) GetAcceptorState() AcceptorState
func (*Entry) IsConfigChange ¶
IsConfigChange returns a boolean value indicating whether the entry is for config change.
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) String ¶
func (m *EntryBatch) String() string
func (*EntryBatch) Unmarshal ¶
func (m *EntryBatch) Unmarshal(dAtA []byte) error
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 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 */ }
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) GetRemoved ¶
func (m *Membership) GetRemoved() map[uint64]bool
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 MessageBatch ¶
type MessageBatch struct { Requests []PaxosMsg `protobuf:"bytes,1,rep,name=requests" json:"requests"` SourceAddress string `protobuf:"bytes,2,opt,name=source_address,json=sourceAddress" json:"source_address"` BinVer uint32 `protobuf:"varint,3,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) GetRequests ¶
func (m *MessageBatch) GetRequests() []PaxosMsg
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 an entry.
func (*MessageBatch) String ¶
func (m *MessageBatch) String() string
func (*MessageBatch) Unmarshal ¶
func (m *MessageBatch) Unmarshal(dAtA []byte) error
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 PaxosPrepare MessageType = 1 PaxosPrepareReply MessageType = 2 PaxosAccept MessageType = 3 PaxosAcceptReply MessageType = 4 PaxosLearnerAskForLearn MessageType = 5 PaxosLearnerSendNowInstanceID MessageType = 6 PaxosLearnerConfirmAskForLearn MessageType = 7 PaxosLearnerSendLearnValue MessageType = 8 PaxosLearnerProposerSendSuccess MessageType = 9 Propose MessageType = 10 NoOP MessageType = 11 PaxosProposalSendNewValue MessageType = 12 )
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 PaxosDataStatus ¶
type PaxosDataStatus 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"` }
func (*PaxosDataStatus) Descriptor ¶
func (*PaxosDataStatus) Descriptor() ([]byte, []int)
func (*PaxosDataStatus) GetAddress ¶
func (m *PaxosDataStatus) GetAddress() string
func (*PaxosDataStatus) GetBinVer ¶
func (m *PaxosDataStatus) GetBinVer() uint32
func (*PaxosDataStatus) GetHardHash ¶
func (m *PaxosDataStatus) GetHardHash() uint64
func (*PaxosDataStatus) Marshal ¶
func (m *PaxosDataStatus) Marshal() (dAtA []byte, err error)
func (*PaxosDataStatus) ProtoMessage ¶
func (*PaxosDataStatus) ProtoMessage()
func (*PaxosDataStatus) Reset ¶
func (m *PaxosDataStatus) Reset()
func (*PaxosDataStatus) Size ¶
func (m *PaxosDataStatus) Size() (n int)
func (*PaxosDataStatus) String ¶
func (m *PaxosDataStatus) String() string
func (*PaxosDataStatus) Unmarshal ¶
func (m *PaxosDataStatus) Unmarshal(dAtA []byte) error
func (*PaxosDataStatus) XXX_DiscardUnknown ¶
func (m *PaxosDataStatus) XXX_DiscardUnknown()
func (*PaxosDataStatus) XXX_Marshal ¶
func (m *PaxosDataStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PaxosDataStatus) XXX_Merge ¶
func (m *PaxosDataStatus) XXX_Merge(src proto.Message)
func (*PaxosDataStatus) XXX_Size ¶
func (m *PaxosDataStatus) XXX_Size() int
func (*PaxosDataStatus) XXX_Unmarshal ¶
func (m *PaxosDataStatus) XXX_Unmarshal(b []byte) error
type PaxosMsg ¶
type PaxosMsg struct { MsgType MessageType `protobuf:"varint,1,opt,name=MsgType,json=msgType,enum=paxospb.MessageType" json:"MsgType"` To uint64 `protobuf:"varint,2,opt,name=To,json=to" json:"To"` From uint64 `protobuf:"varint,3,opt,name=From,json=from" json:"From"` GroupID uint64 `protobuf:"varint,4,opt,name=GroupID,json=groupID" json:"GroupID"` InstanceID uint64 `protobuf:"varint,5,opt,name=InstanceID,json=instanceID" json:"InstanceID"` ProposalID uint64 `protobuf:"varint,6,opt,name=ProposalID,json=proposalID" json:"ProposalID"` ProposalNodeID uint64 `protobuf:"varint,7,opt,name=ProposalNodeID,json=proposalNodeID" json:"ProposalNodeID"` Key uint64 `protobuf:"varint,15,opt,name=Key,json=key" json:"Key"` Value []byte `protobuf:"bytes,8,opt,name=Value,json=value" json:"Value"` PreAcceptID uint64 `protobuf:"varint,9,opt,name=PreAcceptID,json=preAcceptID" json:"PreAcceptID"` PreAcceptNodeID uint64 `protobuf:"varint,10,opt,name=PreAcceptNodeID,json=preAcceptNodeID" json:"PreAcceptNodeID"` RejectByPromiseID uint64 `protobuf:"varint,11,opt,name=RejectByPromiseID,json=rejectByPromiseID" json:"RejectByPromiseID"` NowInstanceID uint64 `protobuf:"varint,12,opt,name=NowInstanceID,json=nowInstanceID" json:"NowInstanceID"` MinChosenInstanceID uint64 `protobuf:"varint,13,opt,name=MinChosenInstanceID,json=minChosenInstanceID" json:"MinChosenInstanceID"` Flag uint32 `protobuf:"varint,14,opt,name=Flag,json=flag" json:"Flag"` }
func (*PaxosMsg) Descriptor ¶
func (*PaxosMsg) GetGroupID ¶
func (*PaxosMsg) GetInstanceID ¶
func (*PaxosMsg) GetMinChosenInstanceID ¶
func (*PaxosMsg) GetMsgType ¶
func (m *PaxosMsg) GetMsgType() MessageType
func (*PaxosMsg) GetNowInstanceID ¶
func (*PaxosMsg) GetPreAcceptID ¶
func (*PaxosMsg) GetPreAcceptNodeID ¶
func (*PaxosMsg) GetProposalID ¶
func (*PaxosMsg) GetProposalNodeID ¶
func (*PaxosMsg) GetRejectByPromiseID ¶
func (*PaxosMsg) ProtoMessage ¶
func (*PaxosMsg) ProtoMessage()
func (*PaxosMsg) SizeUpperLimit ¶
SizeUpperLimit returns the upper limit size of an entry.
func (*PaxosMsg) XXX_DiscardUnknown ¶
func (m *PaxosMsg) XXX_DiscardUnknown()
func (*PaxosMsg) XXX_Marshal ¶
func (*PaxosMsg) XXX_Unmarshal ¶
type SnapshotHeader ¶
type SnapshotHeader struct { DataStoreSize uint64 `protobuf:"varint,1,opt,name=data_store_size,json=dataStoreSize" json:"data_store_size"` UnreliableTime uint64 `protobuf:"varint,2,opt,name=unreliable_time,json=unreliableTime" json:"unreliable_time"` GitVersion string `protobuf:"bytes,3,opt,name=git_version,json=gitVersion" json:"git_version"` HeaderChecksum []byte `protobuf:"bytes,4,opt,name=header_checksum,json=headerChecksum" json:"header_checksum"` PayloadChecksum []byte `protobuf:"bytes,5,opt,name=payload_checksum,json=payloadChecksum" json:"payload_checksum"` ChecksumType ChecksumType `protobuf:"varint,6,opt,name=checksum_type,json=checksumType,enum=paxospb.ChecksumType" json:"checksum_type"` Version uint64 `protobuf:"varint,7,opt,name=version" json:"version"` }
func (*SnapshotHeader) Descriptor ¶
func (*SnapshotHeader) Descriptor() ([]byte, []int)
func (*SnapshotHeader) GetChecksumType ¶
func (m *SnapshotHeader) GetChecksumType() ChecksumType
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) 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 { Commit uint64 `protobuf:"varint,1,opt,name=commit" json:"commit"` AcceptorState AcceptorState `protobuf:"bytes,2,opt,name=AcceptorState,json=acceptorState" json:"AcceptorState"` }
func (*State) Descriptor ¶
func (*State) GetAcceptorState ¶
func (m *State) GetAcceptorState() AcceptorState
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) XXX_DiscardUnknown ¶
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶
func (*State) XXX_Unmarshal ¶
type Update ¶
type Update struct { State GroupID uint64 NodeID uint64 EntriesToSave []Entry CommittedEntries []Entry Messages []PaxosMsg LastApplied uint64 UpdateCommit UpdateCommit }
Update is a collection of state, entries and messages that are expected to be processed by paxos's upper layer to progress the raft node modelled as state machine.
type UpdateCommit ¶
type UpdateCommit struct {
AppliedTo uint64
}
UpdateCommit is used to describe how to commit the Update instance to progress the state of paxos
Click to show internal directories.
Click to hide internal directories.