Documentation ¶
Index ¶
- Constants
- type Accept
- type AcceptCache
- type AcceptReply
- type AcceptReplyCache
- type Commit
- type CommitCache
- type CommitShort
- type CommitShortCache
- type Instance
- type InstanceStatus
- type LeaderBookkeeping
- type Prepare
- type PrepareCache
- type PrepareReply
- type PrepareReplyCache
- type ProposeReplyTS
- type ProposeReplyTSCache
Constants ¶
View Source
const ( PREPARE uint8 = iota PREPARE_REPLY ACCEPT ACCEPT_REPLY COMMIT COMMIT_SHORT )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accept ¶
type Accept struct { LeaderId int32 Instance int32 Ballot int32 LastCommitted int32 Command []state.Command CatchUpLog []Instance }
func (*Accept) BinarySize ¶
func (*Accept) New ¶
func (t *Accept) New() fastrpc.Serializable
type AcceptCache ¶
type AcceptCache struct {
// contains filtered or unexported fields
}
func NewAcceptCache ¶
func NewAcceptCache() *AcceptCache
func (*AcceptCache) Get ¶
func (p *AcceptCache) Get() *Accept
func (*AcceptCache) Put ¶
func (p *AcceptCache) Put(t *Accept)
type AcceptReply ¶
func (*AcceptReply) BinarySize ¶
func (t *AcceptReply) BinarySize() (nbytes int, sizeKnown bool)
func (*AcceptReply) Marshal ¶
func (t *AcceptReply) Marshal(wire io.Writer)
func (*AcceptReply) New ¶
func (t *AcceptReply) New() fastrpc.Serializable
type AcceptReplyCache ¶
type AcceptReplyCache struct {
// contains filtered or unexported fields
}
func NewAcceptReplyCache ¶
func NewAcceptReplyCache() *AcceptReplyCache
func (*AcceptReplyCache) Get ¶
func (p *AcceptReplyCache) Get() *AcceptReply
func (*AcceptReplyCache) Put ¶
func (p *AcceptReplyCache) Put(t *AcceptReply)
type Commit ¶
func (*Commit) BinarySize ¶
func (*Commit) New ¶
func (t *Commit) New() fastrpc.Serializable
type CommitCache ¶
type CommitCache struct {
// contains filtered or unexported fields
}
func NewCommitCache ¶
func NewCommitCache() *CommitCache
func (*CommitCache) Get ¶
func (p *CommitCache) Get() *Commit
func (*CommitCache) Put ¶
func (p *CommitCache) Put(t *Commit)
type CommitShort ¶
func (*CommitShort) BinarySize ¶
func (t *CommitShort) BinarySize() (nbytes int, sizeKnown bool)
func (*CommitShort) Marshal ¶
func (t *CommitShort) Marshal(wire io.Writer)
func (*CommitShort) New ¶
func (t *CommitShort) New() fastrpc.Serializable
type CommitShortCache ¶
type CommitShortCache struct {
// contains filtered or unexported fields
}
func NewCommitShortCache ¶
func NewCommitShortCache() *CommitShortCache
func (*CommitShortCache) Get ¶
func (p *CommitShortCache) Get() *CommitShort
func (*CommitShortCache) Put ¶
func (p *CommitShortCache) Put(t *CommitShort)
type Instance ¶
type Instance struct { Ballot int32 Status InstanceStatus Lb *LeaderBookkeeping Cmds []state.Command }
type InstanceStatus ¶
type InstanceStatus int32
const ( PREPARING InstanceStatus = iota PREPARED ACCEPTED COMMITTED )
type LeaderBookkeeping ¶
type LeaderBookkeeping struct { MaxRecvBallot int32 AcceptOKs int32 Nacks int32 ClientProposals []*genericsmr.Propose }
type Prepare ¶
type Prepare struct { LeaderId int32 // Instance int32 Ballot int32 // ToInfinity uint8 LastCommitted int32 }
func (*Prepare) BinarySize ¶
func (*Prepare) New ¶
func (t *Prepare) New() fastrpc.Serializable
type PrepareCache ¶
type PrepareCache struct {
// contains filtered or unexported fields
}
func NewPrepareCache ¶
func NewPrepareCache() *PrepareCache
func (*PrepareCache) Get ¶
func (p *PrepareCache) Get() *Prepare
func (*PrepareCache) Put ¶
func (p *PrepareCache) Put(t *Prepare)
type PrepareReply ¶
type PrepareReply struct { Id int32 Instance int32 //next instance after last committed OK uint8 Ballot int32 LastCommitted int32 Command []state.Command // the value you've accept already, if any CatchUpLog []Instance }
func (*PrepareReply) BinarySize ¶
func (t *PrepareReply) BinarySize() (nbytes int, sizeKnown bool)
func (*PrepareReply) Marshal ¶
func (t *PrepareReply) Marshal(wire io.Writer)
func (*PrepareReply) New ¶
func (t *PrepareReply) New() fastrpc.Serializable
type PrepareReplyCache ¶
type PrepareReplyCache struct {
// contains filtered or unexported fields
}
func NewPrepareReplyCache ¶
func NewPrepareReplyCache() *PrepareReplyCache
func (*PrepareReplyCache) Get ¶
func (p *PrepareReplyCache) Get() *PrepareReply
func (*PrepareReplyCache) Put ¶
func (p *PrepareReplyCache) Put(t *PrepareReply)
type ProposeReplyTS ¶
type ProposeReplyTS struct { OK uint8 CommandId int32 Value state.Value Timestamp int64 Leader int32 }
func (*ProposeReplyTS) BinarySize ¶
func (t *ProposeReplyTS) BinarySize() (nbytes int, sizeKnown bool)
func (*ProposeReplyTS) Marshal ¶
func (t *ProposeReplyTS) Marshal(wire io.Writer)
type ProposeReplyTSCache ¶
type ProposeReplyTSCache struct {
// contains filtered or unexported fields
}
func NewProposeReplyTSCache ¶
func NewProposeReplyTSCache() *ProposeReplyTSCache
func (*ProposeReplyTSCache) Get ¶
func (p *ProposeReplyTSCache) Get() *ProposeReplyTS
func (*ProposeReplyTSCache) Put ¶
func (p *ProposeReplyTSCache) Put(t *ProposeReplyTS)
Click to show internal directories.
Click to hide internal directories.