pb

package
v0.0.0-...-2a45ea8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_messages_proto protoreflect.FileDescriptor

Functions

func MarshalOrPanic

func MarshalOrPanic(m proto.Message) []byte

func MessageFromAPI

func MessageFromAPI(m messages.Message) proto.Message

Types

type Commit

type Commit struct {

	// Replica identifier
	ReplicaId uint32 `protobuf:"varint,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	// Primary's proposal
	Proposal *Message `protobuf:"bytes,2,opt,name=proposal,proto3" json:"proposal,omitempty"`
	// Replica's UI
	Ui []byte `protobuf:"bytes,3,opt,name=ui,proto3" json:"ui,omitempty"`
	// contains filtered or unexported fields
}

Commit represents COMMIT message.

func CommitFromAPI

func CommitFromAPI(comm messages.Commit) *Commit

func (*Commit) Descriptor deprecated

func (*Commit) Descriptor() ([]byte, []int)

Deprecated: Use Commit.ProtoReflect.Descriptor instead.

func (*Commit) GetProposal

func (x *Commit) GetProposal() *Message

func (*Commit) GetReplicaId

func (x *Commit) GetReplicaId() uint32

func (*Commit) GetUi

func (x *Commit) GetUi() []byte

func (*Commit) ProtoMessage

func (*Commit) ProtoMessage()

func (*Commit) ProtoReflect

func (x *Commit) ProtoReflect() protoreflect.Message

func (*Commit) Reset

func (x *Commit) Reset()

func (*Commit) String

func (x *Commit) String() string

type Hello

type Hello struct {

	// Replica identifier
	ReplicaId uint32 `protobuf:"varint,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	// contains filtered or unexported fields
}

Hello represents HELLO message.

func HelloFromAPI

func HelloFromAPI(h messages.Hello) *Hello

func (*Hello) Descriptor deprecated

func (*Hello) Descriptor() ([]byte, []int)

Deprecated: Use Hello.ProtoReflect.Descriptor instead.

func (*Hello) GetReplicaId

func (x *Hello) GetReplicaId() uint32

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) ProtoReflect

func (x *Hello) ProtoReflect() protoreflect.Message

func (*Hello) Reset

func (x *Hello) Reset()

func (*Hello) String

func (x *Hello) String() string

type Message

type Message struct {

	// Types that are assignable to Typed:
	//	*Message_Hello
	//	*Message_Request
	//	*Message_Reply
	//	*Message_Prepare
	//	*Message_Commit
	//	*Message_ReqViewChange
	//	*Message_ViewChange
	//	*Message_NewView
	Typed isMessage_Typed `protobuf_oneof:"typed"`
	// contains filtered or unexported fields
}

Message represents arbitrary protocol message.

func WrapMessage

func WrapMessage(m proto.Message) *Message

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetCommit

func (x *Message) GetCommit() *Commit

func (*Message) GetHello

func (x *Message) GetHello() *Hello

func (*Message) GetNewView

func (x *Message) GetNewView() *NewView

func (*Message) GetPrepare

func (x *Message) GetPrepare() *Prepare

func (*Message) GetReply

func (x *Message) GetReply() *Reply

func (*Message) GetReqViewChange

func (x *Message) GetReqViewChange() *ReqViewChange

func (*Message) GetRequest

func (x *Message) GetRequest() *Request

func (*Message) GetTyped

func (m *Message) GetTyped() isMessage_Typed

func (*Message) GetViewChange

func (x *Message) GetViewChange() *ViewChange

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_Commit

type Message_Commit struct {
	Commit *Commit `protobuf:"bytes,5,opt,name=commit,proto3,oneof"`
}

type Message_Hello

type Message_Hello struct {
	Hello *Hello `protobuf:"bytes,1,opt,name=hello,proto3,oneof"`
}

type Message_NewView

type Message_NewView struct {
	NewView *NewView `protobuf:"bytes,8,opt,name=new_view,json=newView,proto3,oneof"`
}

type Message_Prepare

type Message_Prepare struct {
	Prepare *Prepare `protobuf:"bytes,4,opt,name=prepare,proto3,oneof"`
}

type Message_Reply

type Message_Reply struct {
	Reply *Reply `protobuf:"bytes,3,opt,name=reply,proto3,oneof"`
}

type Message_ReqViewChange

type Message_ReqViewChange struct {
	ReqViewChange *ReqViewChange `protobuf:"bytes,6,opt,name=req_view_change,json=reqViewChange,proto3,oneof"`
}

type Message_Request

type Message_Request struct {
	Request *Request `protobuf:"bytes,2,opt,name=request,proto3,oneof"`
}

type Message_ViewChange

type Message_ViewChange struct {
	ViewChange *ViewChange `protobuf:"bytes,7,opt,name=view_change,json=viewChange,proto3,oneof"`
}

type NewView

type NewView struct {

	// Replica identifier
	ReplicaId uint32 `protobuf:"varint,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	// New view number
	NewView uint64 `protobuf:"varint,2,opt,name=new_view,json=newView,proto3" json:"new_view,omitempty"`
	// New view certificate
	NvCert []*ViewChange `protobuf:"bytes,3,rep,name=nv_cert,json=nvCert,proto3" json:"nv_cert,omitempty"`
	// Replicas's UI
	Ui []byte `protobuf:"bytes,4,opt,name=ui,proto3" json:"ui,omitempty"`
	// contains filtered or unexported fields
}

NewView represents NEW-VIEW message.

func NewViewFromAPI

func NewViewFromAPI(nv messages.NewView) *NewView

func (*NewView) Descriptor deprecated

func (*NewView) Descriptor() ([]byte, []int)

Deprecated: Use NewView.ProtoReflect.Descriptor instead.

func (*NewView) GetNewView

func (x *NewView) GetNewView() uint64

func (*NewView) GetNvCert

func (x *NewView) GetNvCert() []*ViewChange

func (*NewView) GetReplicaId

func (x *NewView) GetReplicaId() uint32

func (*NewView) GetUi

func (x *NewView) GetUi() []byte

func (*NewView) ProtoMessage

func (*NewView) ProtoMessage()

func (*NewView) ProtoReflect

func (x *NewView) ProtoReflect() protoreflect.Message

func (*NewView) Reset

func (x *NewView) Reset()

func (*NewView) String

func (x *NewView) String() string

type Prepare

type Prepare struct {

	// Replica identifier
	ReplicaId uint32 `protobuf:"varint,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	// View number
	View uint64 `protobuf:"varint,2,opt,name=view,proto3" json:"view,omitempty"`
	// Client's REQUEST
	Request *Request `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
	// Replica's UI
	Ui []byte `protobuf:"bytes,4,opt,name=ui,proto3" json:"ui,omitempty"`
	// contains filtered or unexported fields
}

Prepare represents PREPARE message.

func PrepareFromAPI

func PrepareFromAPI(prep messages.Prepare) *Prepare

func (*Prepare) Descriptor deprecated

func (*Prepare) Descriptor() ([]byte, []int)

Deprecated: Use Prepare.ProtoReflect.Descriptor instead.

func (*Prepare) GetReplicaId

func (x *Prepare) GetReplicaId() uint32

func (*Prepare) GetRequest

func (x *Prepare) GetRequest() *Request

func (*Prepare) GetUi

func (x *Prepare) GetUi() []byte

func (*Prepare) GetView

func (x *Prepare) GetView() uint64

func (*Prepare) ProtoMessage

func (*Prepare) ProtoMessage()

func (*Prepare) ProtoReflect

func (x *Prepare) ProtoReflect() protoreflect.Message

func (*Prepare) Reset

func (x *Prepare) Reset()

func (*Prepare) String

func (x *Prepare) String() string

type Reply

type Reply struct {

	// Replica identifier
	ReplicaId uint32 `protobuf:"varint,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	// Client identifier
	ClientId uint32 `protobuf:"varint,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// Request identifier
	Seq uint64 `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"`
	// Result of requested operation execution
	Result []byte `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"`
	// Replica's signature
	Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Reply represents REPLY message.

func ReplyFromAPI

func ReplyFromAPI(reply messages.Reply) *Reply

func (*Reply) Descriptor deprecated

func (*Reply) Descriptor() ([]byte, []int)

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetClientId

func (x *Reply) GetClientId() uint32

func (*Reply) GetReplicaId

func (x *Reply) GetReplicaId() uint32

func (*Reply) GetResult

func (x *Reply) GetResult() []byte

func (*Reply) GetSeq

func (x *Reply) GetSeq() uint64

func (*Reply) GetSignature

func (x *Reply) GetSignature() []byte

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

func (x *Reply) ProtoReflect() protoreflect.Message

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type ReqViewChange

type ReqViewChange struct {

	// Replica identifier
	ReplicaId uint32 `protobuf:"varint,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	// New view number
	NewView uint64 `protobuf:"varint,2,opt,name=new_view,json=newView,proto3" json:"new_view,omitempty"`
	// Replica's signature
	Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

ReqViewChange represents REQ-VIEW-CHANGE message.

func ReqViewChangeFromAPI

func ReqViewChangeFromAPI(rvc messages.ReqViewChange) *ReqViewChange

func (*ReqViewChange) Descriptor deprecated

func (*ReqViewChange) Descriptor() ([]byte, []int)

Deprecated: Use ReqViewChange.ProtoReflect.Descriptor instead.

func (*ReqViewChange) GetNewView

func (x *ReqViewChange) GetNewView() uint64

func (*ReqViewChange) GetReplicaId

func (x *ReqViewChange) GetReplicaId() uint32

func (*ReqViewChange) GetSignature

func (x *ReqViewChange) GetSignature() []byte

func (*ReqViewChange) ProtoMessage

func (*ReqViewChange) ProtoMessage()

func (*ReqViewChange) ProtoReflect

func (x *ReqViewChange) ProtoReflect() protoreflect.Message

func (*ReqViewChange) Reset

func (x *ReqViewChange) Reset()

func (*ReqViewChange) String

func (x *ReqViewChange) String() string

type Request

type Request struct {

	// Client identifier
	ClientId uint32 `protobuf:"varint,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// Request identifier (timestamp / sequence number)
	Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
	// Operation to execute on replicated state machine
	Operation []byte `protobuf:"bytes,3,opt,name=operation,proto3" json:"operation,omitempty"`
	// Client's signature
	Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Request represents REQUEST message.

func RequestFromAPI

func RequestFromAPI(req messages.Request) *Request

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetClientId

func (x *Request) GetClientId() uint32

func (*Request) GetOperation

func (x *Request) GetOperation() []byte

func (*Request) GetSeq

func (x *Request) GetSeq() uint64

func (*Request) GetSignature

func (x *Request) GetSignature() []byte

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type ViewChange

type ViewChange struct {

	// Replica identifier
	ReplicaId uint32 `protobuf:"varint,1,opt,name=replica_id,json=replicaId,proto3" json:"replica_id,omitempty"`
	// New view number
	NewView uint64 `protobuf:"varint,2,opt,name=new_view,json=newView,proto3" json:"new_view,omitempty"`
	// Message log
	Log []*Message `protobuf:"bytes,4,rep,name=log,proto3" json:"log,omitempty"`
	// View change certificate
	VcCert []*ReqViewChange `protobuf:"bytes,5,rep,name=vc_cert,json=vcCert,proto3" json:"vc_cert,omitempty"`
	// Replicas's UI
	Ui []byte `protobuf:"bytes,6,opt,name=ui,proto3" json:"ui,omitempty"`
	// contains filtered or unexported fields
}

ViewChange represents VIEW-CHANGE message.

func ViewChangeFromAPI

func ViewChangeFromAPI(vc messages.ViewChange) *ViewChange

func (*ViewChange) Descriptor deprecated

func (*ViewChange) Descriptor() ([]byte, []int)

Deprecated: Use ViewChange.ProtoReflect.Descriptor instead.

func (*ViewChange) GetLog

func (x *ViewChange) GetLog() []*Message

func (*ViewChange) GetNewView

func (x *ViewChange) GetNewView() uint64

func (*ViewChange) GetReplicaId

func (x *ViewChange) GetReplicaId() uint32

func (*ViewChange) GetUi

func (x *ViewChange) GetUi() []byte

func (*ViewChange) GetVcCert

func (x *ViewChange) GetVcCert() []*ReqViewChange

func (*ViewChange) ProtoMessage

func (*ViewChange) ProtoMessage()

func (*ViewChange) ProtoReflect

func (x *ViewChange) ProtoReflect() protoreflect.Message

func (*ViewChange) Reset

func (x *ViewChange) Reset()

func (*ViewChange) String

func (x *ViewChange) String() string

Jump to

Keyboard shortcuts

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