paxospb

package
v0.0.0-...-17369de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 ...

func IsEmptyState

func IsEmptyState(a State) bool

IsEmptyState ...

func IsStateEqual

func IsStateEqual(a State, b State) bool

IsStateEqual ...

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) MarshalTo

func (m *AcceptorState) MarshalTo(dAtA []byte) (int, 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) IsEqual

func (m *BallotNumber) IsEqual(b BallotNumber) bool

IsEqual ...

func (*BallotNumber) IsNil

func (m *BallotNumber) IsNil() bool

IsNil ...

func (*BallotNumber) IsNotLessThan

func (m *BallotNumber) IsNotLessThan(b BallotNumber) bool

IsNotLessThan ...

func (*BallotNumber) Marshal

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

func (*BallotNumber) MarshalTo

func (m *BallotNumber) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*Bootstrap) GetAddresses

func (m *Bootstrap) GetAddresses() map[uint64]string

func (*Bootstrap) GetJoin

func (m *Bootstrap) GetJoin() bool

func (*Bootstrap) Marshal

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

func (*Bootstrap) MarshalTo

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

func (*Bootstrap) ProtoMessage

func (*Bootstrap) ProtoMessage()

func (*Bootstrap) Reset

func (m *Bootstrap) Reset()

func (*Bootstrap) Size

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

func (*Bootstrap) String

func (m *Bootstrap) String() string

func (*Bootstrap) Unmarshal

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

func (*Bootstrap) XXX_DiscardUnknown

func (m *Bootstrap) XXX_DiscardUnknown()

func (*Bootstrap) XXX_Marshal

func (m *Bootstrap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bootstrap) XXX_Merge

func (m *Bootstrap) XXX_Merge(src proto.Message)

func (*Bootstrap) XXX_Size

func (m *Bootstrap) XXX_Size() int

func (*Bootstrap) XXX_Unmarshal

func (m *Bootstrap) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Entry) GetAcceptorState

func (m *Entry) GetAcceptorState() AcceptorState

func (*Entry) GetKey

func (m *Entry) GetKey() uint64

func (*Entry) GetType

func (m *Entry) GetType() EntryType

func (*Entry) IsConfigChange

func (e *Entry) IsConfigChange() bool

IsConfigChange returns a boolean value indicating whether the entry is for config change.

func (*Entry) IsEmpty

func (e *Entry) IsEmpty() bool

IsEmpty returns a boolean value indicating whether the entry is Empty.

func (*Entry) Marshal

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

func (*Entry) MarshalTo

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

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) Size

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

func (*Entry) SizeUpperLimit

func (m *Entry) SizeUpperLimit() int

SizeUpperLimit returns the upper limit size of an entry.

func (*Entry) String

func (m *Entry) String() string

func (*Entry) Unmarshal

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

func (*Entry) XXX_DiscardUnknown

func (m *Entry) XXX_DiscardUnknown()

func (*Entry) XXX_Marshal

func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entry) XXX_Merge

func (m *Entry) XXX_Merge(src proto.Message)

func (*Entry) XXX_Size

func (m *Entry) XXX_Size() int

func (*Entry) XXX_Unmarshal

func (m *Entry) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *EntryBatch) MarshalTo(dAtA []byte) (int, 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
const (
	ApplicationEntry  EntryType = 0
	ConfigChangeEntry EntryType = 1
)

func (EntryType) Enum

func (x EntryType) Enum() *EntryType

func (EntryType) EnumDescriptor

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

func (EntryType) String

func (x EntryType) String() string

func (*EntryType) UnmarshalJSON

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

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) MarshalTo

func (m *Membership) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *MessageBatch) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *PaxosDataStatus) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*PaxosMsg) GetFlag

func (m *PaxosMsg) GetFlag() uint32

func (*PaxosMsg) GetFrom

func (m *PaxosMsg) GetFrom() uint64

func (*PaxosMsg) GetGroupID

func (m *PaxosMsg) GetGroupID() uint64

func (*PaxosMsg) GetInstanceID

func (m *PaxosMsg) GetInstanceID() uint64

func (*PaxosMsg) GetKey

func (m *PaxosMsg) GetKey() uint64

func (*PaxosMsg) GetMinChosenInstanceID

func (m *PaxosMsg) GetMinChosenInstanceID() uint64

func (*PaxosMsg) GetMsgType

func (m *PaxosMsg) GetMsgType() MessageType

func (*PaxosMsg) GetNowInstanceID

func (m *PaxosMsg) GetNowInstanceID() uint64

func (*PaxosMsg) GetPreAcceptID

func (m *PaxosMsg) GetPreAcceptID() uint64

func (*PaxosMsg) GetPreAcceptNodeID

func (m *PaxosMsg) GetPreAcceptNodeID() uint64

func (*PaxosMsg) GetProposalID

func (m *PaxosMsg) GetProposalID() uint64

func (*PaxosMsg) GetProposalNodeID

func (m *PaxosMsg) GetProposalNodeID() uint64

func (*PaxosMsg) GetRejectByPromiseID

func (m *PaxosMsg) GetRejectByPromiseID() uint64

func (*PaxosMsg) GetTo

func (m *PaxosMsg) GetTo() uint64

func (*PaxosMsg) GetValue

func (m *PaxosMsg) GetValue() []byte

func (*PaxosMsg) Marshal

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

func (*PaxosMsg) MarshalTo

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

func (*PaxosMsg) ProtoMessage

func (*PaxosMsg) ProtoMessage()

func (*PaxosMsg) Reset

func (m *PaxosMsg) Reset()

func (*PaxosMsg) Size

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

func (*PaxosMsg) SizeUpperLimit

func (m *PaxosMsg) SizeUpperLimit() int

SizeUpperLimit returns the upper limit size of an entry.

func (*PaxosMsg) String

func (m *PaxosMsg) String() string

func (*PaxosMsg) Unmarshal

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

func (*PaxosMsg) XXX_DiscardUnknown

func (m *PaxosMsg) XXX_DiscardUnknown()

func (*PaxosMsg) XXX_Marshal

func (m *PaxosMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PaxosMsg) XXX_Merge

func (m *PaxosMsg) XXX_Merge(src proto.Message)

func (*PaxosMsg) XXX_Size

func (m *PaxosMsg) XXX_Size() int

func (*PaxosMsg) XXX_Unmarshal

func (m *PaxosMsg) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *SnapshotHeader) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*State) GetAcceptorState

func (m *State) GetAcceptorState() AcceptorState

func (*State) GetCommit

func (m *State) GetCommit() uint64

func (*State) Marshal

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

func (*State) MarshalTo

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

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) Reset

func (m *State) Reset()

func (*State) Size

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

func (*State) String

func (m *State) String() string

func (*State) Unmarshal

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

func (*State) XXX_DiscardUnknown

func (m *State) XXX_DiscardUnknown()

func (*State) XXX_Marshal

func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*State) XXX_Merge

func (m *State) XXX_Merge(src proto.Message)

func (*State) XXX_Size

func (m *State) XXX_Size() int

func (*State) XXX_Unmarshal

func (m *State) XXX_Unmarshal(b []byte) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL