genericsmrproto

package
v0.0.0-...-ef9f1ab Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROPOSE uint8 = iota
	PROPOSE_REPLY
	READ
	READ_REPLY
	PROPOSE_AND_READ
	PROPOSE_AND_READ_REPLY
	GENERIC_SMR_BEACON
	GENERIC_SMR_BEACON_REPLY
	REGISTER_CLIENT_ID
	REGISTER_CLIENT_ID_REPLY
	GET_VIEW
	GET_VIEW_REPLY
	GET_STATE
	GET_STATE_REPLY
	SLOWDOWN
	SLOWDOWN_REPLY
	CONNECT
	CONNECT_REPLY
	DISCONNECT
	DISCONNECT_REPLY
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeTheLeaderArgs

type BeTheLeaderArgs struct {
}

func (*BeTheLeaderArgs) BinarySize

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

func (*BeTheLeaderArgs) Marshal

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

func (*BeTheLeaderArgs) Unmarshal

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

type BeTheLeaderArgsCache

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

func NewBeTheLeaderArgsCache

func NewBeTheLeaderArgsCache() *BeTheLeaderArgsCache

func (*BeTheLeaderArgsCache) Get

func (*BeTheLeaderArgsCache) Put

type BeTheLeaderReply

type BeTheLeaderReply struct {
}

func (*BeTheLeaderReply) BinarySize

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

func (*BeTheLeaderReply) Marshal

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

func (*BeTheLeaderReply) Unmarshal

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

type BeTheLeaderReplyCache

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

func NewBeTheLeaderReplyCache

func NewBeTheLeaderReplyCache() *BeTheLeaderReplyCache

func (*BeTheLeaderReplyCache) Get

func (*BeTheLeaderReplyCache) Put

type Beacon

type Beacon struct {
	Timestamp uint64
}

func (*Beacon) BinarySize

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

func (*Beacon) Marshal

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

func (*Beacon) Unmarshal

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

type BeaconCache

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

func NewBeaconCache

func NewBeaconCache() *BeaconCache

func (*BeaconCache) Get

func (p *BeaconCache) Get() *Beacon

func (*BeaconCache) Put

func (p *BeaconCache) Put(t *Beacon)

type BeaconReply

type BeaconReply struct {
	Timestamp uint64
}

func (*BeaconReply) BinarySize

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

func (*BeaconReply) Marshal

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

func (*BeaconReply) Unmarshal

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

type BeaconReplyCache

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

func NewBeaconReplyCache

func NewBeaconReplyCache() *BeaconReplyCache

func (*BeaconReplyCache) Get

func (p *BeaconReplyCache) Get() *BeaconReply

func (*BeaconReplyCache) Put

func (p *BeaconReplyCache) Put(t *BeaconReply)

type Connect

type Connect struct {
}

func (*Connect) BinarySize

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

func (*Connect) Marshal

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

func (*Connect) Unmarshal

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

type ConnectCache

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

func NewConnectCache

func NewConnectCache() *ConnectCache

func (*ConnectCache) Get

func (p *ConnectCache) Get() *Connect

func (*ConnectCache) Put

func (p *ConnectCache) Put(t *Connect)

type ConnectReply

type ConnectReply struct {
	Success uint8
}

func (*ConnectReply) BinarySize

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

func (*ConnectReply) Marshal

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

func (*ConnectReply) Unmarshal

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

type ConnectReplyCache

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

func NewConnectReplyCache

func NewConnectReplyCache() *ConnectReplyCache

func (*ConnectReplyCache) Get

func (p *ConnectReplyCache) Get() *ConnectReply

func (*ConnectReplyCache) Put

func (p *ConnectReplyCache) Put(t *ConnectReply)

type Disconnect

type Disconnect struct {
}

func (*Disconnect) BinarySize

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

func (*Disconnect) Marshal

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

func (*Disconnect) Unmarshal

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

type DisconnectCache

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

func NewDisconnectCache

func NewDisconnectCache() *DisconnectCache

func (*DisconnectCache) Get

func (p *DisconnectCache) Get() *Disconnect

func (*DisconnectCache) Put

func (p *DisconnectCache) Put(t *Disconnect)

type DisconnectReply

type DisconnectReply struct {
	Success uint8
}

func (*DisconnectReply) BinarySize

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

func (*DisconnectReply) Marshal

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

func (*DisconnectReply) Unmarshal

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

type DisconnectReplyCache

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

func NewDisconnectReplyCache

func NewDisconnectReplyCache() *DisconnectReplyCache

func (*DisconnectReplyCache) Get

func (*DisconnectReplyCache) Put

type GetState

type GetState struct {
}

func (*GetState) BinarySize

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

func (*GetState) Marshal

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

func (*GetState) Unmarshal

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

type GetStateCache

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

func NewGetStateCache

func NewGetStateCache() *GetStateCache

func (*GetStateCache) Get

func (p *GetStateCache) Get() *GetState

func (*GetStateCache) Put

func (p *GetStateCache) Put(t *GetState)

type GetStateReply

type GetStateReply struct {
	IsLeader uint8 // 0: not leader; 1: leader
}

func (*GetStateReply) BinarySize

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

func (*GetStateReply) Marshal

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

func (*GetStateReply) Unmarshal

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

type GetStateReplyCache

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

func NewGetStateReplyCache

func NewGetStateReplyCache() *GetStateReplyCache

func (*GetStateReplyCache) Get

func (*GetStateReplyCache) Put

func (p *GetStateReplyCache) Put(t *GetStateReply)

type GetStatus

type GetStatus struct {
}

func (*GetStatus) BinarySize

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

func (*GetStatus) Marshal

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

func (*GetStatus) Unmarshal

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

type GetStatusCache

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

func NewGetStatusCache

func NewGetStatusCache() *GetStatusCache

func (*GetStatusCache) Get

func (p *GetStatusCache) Get() *GetStatus

func (*GetStatusCache) Put

func (p *GetStatusCache) Put(t *GetStatus)

type GetView

type GetView struct {
	PilotId int32
}

func (*GetView) BinarySize

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

func (*GetView) Marshal

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

func (*GetView) Unmarshal

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

type GetViewCache

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

func NewGetViewCache

func NewGetViewCache() *GetViewCache

func (*GetViewCache) Get

func (p *GetViewCache) Get() *GetView

func (*GetViewCache) Put

func (p *GetViewCache) Put(t *GetView)

type GetViewReply

type GetViewReply struct {
	OK        uint8 // 1: ACTIVE; 0: PENDING
	ViewId    int32
	PilotId   int32 // index of this pilot
	ReplicaId int32 // unique id of this pilot replica
}

func (*GetViewReply) BinarySize

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

func (*GetViewReply) Marshal

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

func (*GetViewReply) Unmarshal

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

type GetViewReplyCache

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

func NewGetViewReplyCache

func NewGetViewReplyCache() *GetViewReplyCache

func (*GetViewReplyCache) Get

func (p *GetViewReplyCache) Get() *GetViewReply

func (*GetViewReplyCache) Put

func (p *GetViewReplyCache) Put(t *GetViewReply)

type PingArgs

type PingArgs struct {
	ActAsLeader uint8
}

func (*PingArgs) BinarySize

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

func (*PingArgs) Marshal

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

func (*PingArgs) Unmarshal

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

type PingArgsCache

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

func NewPingArgsCache

func NewPingArgsCache() *PingArgsCache

func (*PingArgsCache) Get

func (p *PingArgsCache) Get() *PingArgs

func (*PingArgsCache) Put

func (p *PingArgsCache) Put(t *PingArgs)

type PingReply

type PingReply struct {
}

func (*PingReply) BinarySize

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

func (*PingReply) Marshal

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

func (*PingReply) Unmarshal

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

type PingReplyCache

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

func NewPingReplyCache

func NewPingReplyCache() *PingReplyCache

func (*PingReplyCache) Get

func (p *PingReplyCache) Get() *PingReply

func (*PingReplyCache) Put

func (p *PingReplyCache) Put(t *PingReply)

type Propose

type Propose struct {
	CommandId int32
	Command   state.Command
	Timestamp int64
}

func (*Propose) BinarySize

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

func (*Propose) Marshal

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

func (*Propose) Unmarshal

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

type ProposeAndRead

type ProposeAndRead struct {
	CommandId int32
	Command   state.Command
	Key       state.Key
}

func (*ProposeAndRead) BinarySize

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

func (*ProposeAndRead) Marshal

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

func (*ProposeAndRead) Unmarshal

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

type ProposeAndReadCache

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

func NewProposeAndReadCache

func NewProposeAndReadCache() *ProposeAndReadCache

func (*ProposeAndReadCache) Get

func (*ProposeAndReadCache) Put

type ProposeAndReadReply

type ProposeAndReadReply struct {
	OK        uint8
	CommandId int32
	Value     state.Value
}

func (*ProposeAndReadReply) BinarySize

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

func (*ProposeAndReadReply) Marshal

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

func (*ProposeAndReadReply) Unmarshal

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

type ProposeAndReadReplyCache

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

func NewProposeAndReadReplyCache

func NewProposeAndReadReplyCache() *ProposeAndReadReplyCache

func (*ProposeAndReadReplyCache) Get

func (*ProposeAndReadReplyCache) Put

type ProposeCache

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

func NewProposeCache

func NewProposeCache() *ProposeCache

func (*ProposeCache) Get

func (p *ProposeCache) Get() *Propose

func (*ProposeCache) Put

func (p *ProposeCache) Put(t *Propose)

type ProposeReply

type ProposeReply struct {
	OK        uint8
	CommandId int32
}

func (*ProposeReply) BinarySize

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

func (*ProposeReply) Marshal

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

func (*ProposeReply) Unmarshal

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

type ProposeReplyCache

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

func NewProposeReplyCache

func NewProposeReplyCache() *ProposeReplyCache

func (*ProposeReplyCache) Get

func (p *ProposeReplyCache) Get() *ProposeReply

func (*ProposeReplyCache) Put

func (p *ProposeReplyCache) Put(t *ProposeReply)

type ProposeReplyTS

type ProposeReplyTS struct {
	OK        uint8
	CommandId int32
	Value     state.Value
	Timestamp int64
}

func (*ProposeReplyTS) BinarySize

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

func (*ProposeReplyTS) Marshal

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

func (*ProposeReplyTS) Unmarshal

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

type ProposeReplyTSCache

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

func NewProposeReplyTSCache

func NewProposeReplyTSCache() *ProposeReplyTSCache

func (*ProposeReplyTSCache) Get

func (*ProposeReplyTSCache) Put

type Read

type Read struct {
	CommandId int32
	Key       state.Key
}

func (*Read) BinarySize

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

func (*Read) Marshal

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

func (*Read) Unmarshal

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

type ReadCache

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

func NewReadCache

func NewReadCache() *ReadCache

func (*ReadCache) Get

func (p *ReadCache) Get() *Read

func (*ReadCache) Put

func (p *ReadCache) Put(t *Read)

type ReadReply

type ReadReply struct {
	CommandId int32
	Value     state.Value
}

func (*ReadReply) BinarySize

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

func (*ReadReply) Marshal

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

func (*ReadReply) Unmarshal

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

type ReadReplyCache

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

func NewReadReplyCache

func NewReadReplyCache() *ReadReplyCache

func (*ReadReplyCache) Get

func (p *ReadReplyCache) Get() *ReadReply

func (*ReadReplyCache) Put

func (p *ReadReplyCache) Put(t *ReadReply)

type RegisterClientIdArgs

type RegisterClientIdArgs struct {
	ClientId uint32
}

func (*RegisterClientIdArgs) BinarySize

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

func (*RegisterClientIdArgs) Marshal

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

func (*RegisterClientIdArgs) Unmarshal

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

type RegisterClientIdArgsCache

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

func NewRegisterClientIdArgsCache

func NewRegisterClientIdArgsCache() *RegisterClientIdArgsCache

func (*RegisterClientIdArgsCache) Get

func (*RegisterClientIdArgsCache) Put

type RegisterClientIdReply

type RegisterClientIdReply struct {
	OK uint8
}

func (*RegisterClientIdReply) BinarySize

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

func (*RegisterClientIdReply) Marshal

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

func (*RegisterClientIdReply) Unmarshal

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

type RegisterClientIdReplyCache

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

func NewRegisterClientIdReplyCache

func NewRegisterClientIdReplyCache() *RegisterClientIdReplyCache

func (*RegisterClientIdReplyCache) Get

func (*RegisterClientIdReplyCache) Put

type Slowdown

type Slowdown struct {
	TimeInMs uint32
}

func (*Slowdown) BinarySize

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

func (*Slowdown) Marshal

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

func (*Slowdown) Unmarshal

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

type SlowdownCache

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

func NewSlowdownCache

func NewSlowdownCache() *SlowdownCache

func (*SlowdownCache) Get

func (p *SlowdownCache) Get() *Slowdown

func (*SlowdownCache) Put

func (p *SlowdownCache) Put(t *Slowdown)

type SlowdownReply

type SlowdownReply struct {
	Success uint8
}

func (*SlowdownReply) BinarySize

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

func (*SlowdownReply) Marshal

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

func (*SlowdownReply) Unmarshal

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

type SlowdownReplyCache

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

func NewSlowdownReplyCache

func NewSlowdownReplyCache() *SlowdownReplyCache

func (*SlowdownReplyCache) Get

func (*SlowdownReplyCache) Put

func (p *SlowdownReplyCache) Put(t *SlowdownReply)

Jump to

Keyboard shortcuts

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