minbftpb

package
v0.0.0-...-3a733ff Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMinbft        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMinbft          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMinbft = fmt.Errorf("proto: unexpected end of group")
)
View Source
var NormalMessage_Type_name = map[int32]string{
	0: "Prepare",
	1: "Commit",
	3: "ViewChange",
	4: "NewView",
	5: "NewViewAck",
}
View Source
var NormalMessage_Type_value = map[string]int32{
	"Prepare":    0,
	"Commit":     1,
	"ViewChange": 3,
	"NewView":    4,
	"NewViewAck": 5,
}

Functions

func WrapMessageInner

func WrapMessageInner(msg proto.Message) isMinBFTMessage_Type

WrapMessageInner wraps a union type of Message in a new isMessage_Type.

Types

type MinBFTMessage

type MinBFTMessage struct {
	// Types that are valid to be assigned to Type:
	//	*MinBFTMessage_Normal
	Type isMinBFTMessage_Type `protobuf_oneof:"type"`
}

func WrapMinBFTMessage

func WrapMinBFTMessage(msg proto.Message) *MinBFTMessage

WrapMinBFTMessage wraps a union type of Message in a new PBFTMessage without a destination.

func (*MinBFTMessage) Descriptor

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

func (*MinBFTMessage) GetNormal

func (m *MinBFTMessage) GetNormal() *NormalMessage

func (*MinBFTMessage) GetType

func (m *MinBFTMessage) GetType() isMinBFTMessage_Type

func (*MinBFTMessage) Marshal

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

func (*MinBFTMessage) MarshalTo

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

func (*MinBFTMessage) MarshalToSizedBuffer

func (m *MinBFTMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MinBFTMessage) ProtoMessage

func (*MinBFTMessage) ProtoMessage()

func (*MinBFTMessage) Reset

func (m *MinBFTMessage) Reset()

func (*MinBFTMessage) Size

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

func (*MinBFTMessage) String

func (m *MinBFTMessage) String() string

func (*MinBFTMessage) Unmarshal

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

func (*MinBFTMessage) XXX_DiscardUnknown

func (m *MinBFTMessage) XXX_DiscardUnknown()

func (*MinBFTMessage) XXX_Marshal

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

func (*MinBFTMessage) XXX_Merge

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

func (*MinBFTMessage) XXX_OneofWrappers

func (*MinBFTMessage) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*MinBFTMessage) XXX_Size

func (m *MinBFTMessage) XXX_Size() int

func (*MinBFTMessage) XXX_Unmarshal

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

type MinBFTMessage_Normal

type MinBFTMessage_Normal struct {
	Normal *NormalMessage `protobuf:"bytes,1,opt,name=normal,proto3,oneof" json:"normal,omitempty"`
}

func (*MinBFTMessage_Normal) MarshalTo

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

func (*MinBFTMessage_Normal) MarshalToSizedBuffer

func (m *MinBFTMessage_Normal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MinBFTMessage_Normal) Size

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

type NormalMessage

type NormalMessage struct {
	Type        NormalMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=minbftpb.NormalMessage_Type" json:"type,omitempty"`
	View        View               `protobuf:"varint,2,opt,name=view,proto3,casttype=View" json:"view,omitempty"`
	Order       Order              `protobuf:"varint,3,opt,name=order,proto3,casttype=Order" json:"order,omitempty"`
	Command     *commandpb.Command `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"`
	CommandHash []byte             `protobuf:"bytes,5,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
}

func (*NormalMessage) Descriptor

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

func (*NormalMessage) Equals

func (m *NormalMessage) Equals(other *NormalMessage) bool

func (*NormalMessage) GetCommand

func (m *NormalMessage) GetCommand() *commandpb.Command

func (*NormalMessage) GetCommandHash

func (m *NormalMessage) GetCommandHash() []byte

func (*NormalMessage) GetOrder

func (m *NormalMessage) GetOrder() Order

func (*NormalMessage) GetType

func (m *NormalMessage) GetType() NormalMessage_Type

func (*NormalMessage) GetView

func (m *NormalMessage) GetView() View

func (*NormalMessage) Marshal

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

func (*NormalMessage) MarshalTo

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

func (*NormalMessage) MarshalToSizedBuffer

func (m *NormalMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NormalMessage) ProtoMessage

func (*NormalMessage) ProtoMessage()

func (*NormalMessage) Reset

func (m *NormalMessage) Reset()

func (*NormalMessage) Size

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

func (*NormalMessage) String

func (m *NormalMessage) String() string

func (*NormalMessage) Unmarshal

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

func (*NormalMessage) XXX_DiscardUnknown

func (m *NormalMessage) XXX_DiscardUnknown()

func (*NormalMessage) XXX_Marshal

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

func (*NormalMessage) XXX_Merge

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

func (*NormalMessage) XXX_Size

func (m *NormalMessage) XXX_Size() int

func (*NormalMessage) XXX_Unmarshal

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

type NormalMessage_Type

type NormalMessage_Type int32
const (
	NormalMessage_Prepare    NormalMessage_Type = 0
	NormalMessage_Commit     NormalMessage_Type = 1
	NormalMessage_ViewChange NormalMessage_Type = 3
	NormalMessage_NewView    NormalMessage_Type = 4
	NormalMessage_NewViewAck NormalMessage_Type = 5
)

func (NormalMessage_Type) EnumDescriptor

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

func (NormalMessage_Type) String

func (x NormalMessage_Type) String() string

type Order

type Order uint64

Index is the number of an instance slot in a replica's command array.

type View

type View uint64

View is a view

Jump to

Keyboard shortcuts

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