viewchangeproto

package
v0.0.0-...-7c35310 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PILOT uint8 = iota
	COPILOT
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptView

type AcceptView struct {
	ViewManagerId           int32
	PilotId                 int32
	LatestCommittedInstance int32
	LatestInstance          int32
	NewView                 View
}

func (*AcceptView) BinarySize

func (t *AcceptView) BinarySize() (nbytes int, sizeKnown bool)

func (*AcceptView) Marshal

func (t *AcceptView) Marshal(wire io.Writer)

func (*AcceptView) New

func (t *AcceptView) New() fastrpc.Serializable

func (*AcceptView) Unmarshal

func (t *AcceptView) Unmarshal(wire io.Reader) error

type AcceptViewCache

type AcceptViewCache struct {
	// contains filtered or unexported fields
}

func NewAcceptViewCache

func NewAcceptViewCache() *AcceptViewCache

func (*AcceptViewCache) Get

func (p *AcceptViewCache) Get() *AcceptView

func (*AcceptViewCache) Put

func (p *AcceptViewCache) Put(t *AcceptView)

type AcceptViewReply

type AcceptViewReply struct {
	PilotId int32
	ViewId  int32
	OK      uint8
}

func (*AcceptViewReply) BinarySize

func (t *AcceptViewReply) BinarySize() (nbytes int, sizeKnown bool)

func (*AcceptViewReply) Marshal

func (t *AcceptViewReply) Marshal(wire io.Writer)

func (*AcceptViewReply) New

func (*AcceptViewReply) Unmarshal

func (t *AcceptViewReply) Unmarshal(wire io.Reader) error

type AcceptViewReplyCache

type AcceptViewReplyCache struct {
	// contains filtered or unexported fields
}

func NewAcceptViewReplyCache

func NewAcceptViewReplyCache() *AcceptViewReplyCache

func (*AcceptViewReplyCache) Get

func (*AcceptViewReplyCache) Put

type InitView

type InitView struct {
	// TODO: consider adding LatestInstance
	PilotId        int32
	NewView        View
	LatestInstance int32
}

func (*InitView) BinarySize

func (t *InitView) BinarySize() (nbytes int, sizeKnown bool)

func (*InitView) Marshal

func (t *InitView) Marshal(wire io.Writer)

func (*InitView) New

func (t *InitView) New() fastrpc.Serializable

func (*InitView) Unmarshal

func (t *InitView) Unmarshal(wire io.Reader) error

type InitViewCache

type InitViewCache struct {
	// contains filtered or unexported fields
}

func NewInitViewCache

func NewInitViewCache() *InitViewCache

func (*InitViewCache) Get

func (p *InitViewCache) Get() *InitView

func (*InitViewCache) Put

func (p *InitViewCache) Put(t *InitView)

type View

type View struct {
	ViewId    int32
	PilotId   int32 // index of this pilot
	ReplicaId int32 // unique id of this pilot replica

}

func (*View) BinarySize

func (t *View) BinarySize() (nbytes int, sizeKnown bool)

func (*View) Marshal

func (t *View) Marshal(wire io.Writer)

func (*View) New

func (t *View) New() fastrpc.Serializable

func (*View) Unmarshal

func (t *View) Unmarshal(wire io.Reader) error

type ViewCache

type ViewCache struct {
	// contains filtered or unexported fields
}

func NewViewCache

func NewViewCache() *ViewCache

func (*ViewCache) Get

func (p *ViewCache) Get() *View

func (*ViewCache) Put

func (p *ViewCache) Put(t *View)

type ViewChange

type ViewChange struct {
	ViewManagerId int32
	PilotId       int32 // indicating electing pilot/copilot
	OldView       View
	NewViewId     int32
}

func (*ViewChange) BinarySize

func (t *ViewChange) BinarySize() (nbytes int, sizeKnown bool)

func (*ViewChange) Marshal

func (t *ViewChange) Marshal(wire io.Writer)

func (*ViewChange) New

func (t *ViewChange) New() fastrpc.Serializable

func (*ViewChange) Unmarshal

func (t *ViewChange) Unmarshal(wire io.Reader) error

type ViewChangeCache

type ViewChangeCache struct {
	// contains filtered or unexported fields
}

func NewViewChangeCache

func NewViewChangeCache() *ViewChangeCache

func (*ViewChangeCache) Get

func (p *ViewChangeCache) Get() *ViewChange

func (*ViewChangeCache) Put

func (p *ViewChangeCache) Put(t *ViewChange)

type ViewChangeOK

type ViewChangeOK struct {
	PilotId                 int32
	ViewId                  int32 // used to identify the associated ViewChange message
	LatestCommittedInstance int32
	LatestInstance          int32
	AcceptedView            View
}

func (*ViewChangeOK) BinarySize

func (t *ViewChangeOK) BinarySize() (nbytes int, sizeKnown bool)

func (*ViewChangeOK) Marshal

func (t *ViewChangeOK) Marshal(wire io.Writer)

func (*ViewChangeOK) New

func (*ViewChangeOK) Unmarshal

func (t *ViewChangeOK) Unmarshal(wire io.Reader) error

type ViewChangeOKCache

type ViewChangeOKCache struct {
	// contains filtered or unexported fields
}

func NewViewChangeOKCache

func NewViewChangeOKCache() *ViewChangeOKCache

func (*ViewChangeOKCache) Get

func (p *ViewChangeOKCache) Get() *ViewChangeOK

func (*ViewChangeOKCache) Put

func (p *ViewChangeOKCache) Put(t *ViewChangeOK)

type ViewChangeReject

type ViewChangeReject struct {
	PilotId   int32
	ViewId    int32 // used to identify the associated ViewChange message
	OldView   View
	NewViewId int32
}

func (*ViewChangeReject) BinarySize

func (t *ViewChangeReject) BinarySize() (nbytes int, sizeKnown bool)

func (*ViewChangeReject) Marshal

func (t *ViewChangeReject) Marshal(wire io.Writer)

func (*ViewChangeReject) New

func (*ViewChangeReject) Unmarshal

func (t *ViewChangeReject) Unmarshal(wire io.Reader) error

type ViewChangeRejectCache

type ViewChangeRejectCache struct {
	// contains filtered or unexported fields
}

func NewViewChangeRejectCache

func NewViewChangeRejectCache() *ViewChangeRejectCache

func (*ViewChangeRejectCache) Get

func (*ViewChangeRejectCache) Put

type ViewChangeReply

type ViewChangeReply struct {
	PilotId       int32
	ViewId        int32 // used to identify the associated ViewChange message
	MaxSeenViewId int32
	OK            uint8
	/* Next 3 fields for OK = true */
	LatestCommittedInstance int32
	LatestInstance          int32
	AcceptedView            View

	OldView View /*used by OK = FALSE*/
}

func (*ViewChangeReply) BinarySize

func (t *ViewChangeReply) BinarySize() (nbytes int, sizeKnown bool)

func (*ViewChangeReply) Marshal

func (t *ViewChangeReply) Marshal(wire io.Writer)

func (*ViewChangeReply) New

func (*ViewChangeReply) Unmarshal

func (t *ViewChangeReply) Unmarshal(wire io.Reader) error

type ViewChangeReplyCache

type ViewChangeReplyCache struct {
	// contains filtered or unexported fields
}

func NewViewChangeReplyCache

func NewViewChangeReplyCache() *ViewChangeReplyCache

func (*ViewChangeReplyCache) Get

func (*ViewChangeReplyCache) Put

type ViewChangeRole

type ViewChangeRole uint8
const (
	ACTIVE    ViewChangeRole = iota // active in a formed view
	MANAGER                         // proposing a new view
	UNDERLING                       // invited to join a new view
)

type ViewChangeStatus

type ViewChangeStatus uint8
const (
	PREPARING ViewChangeStatus = iota
	PREPARED
	ACCEPTING
	ACCEPTED
	INITIATING
	INITIATED
)

Jump to

Keyboard shortcuts

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