dispelpb

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDispel        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDispel          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDispel = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ConsensusMessage_Type_name = map[int32]string{
	0: "Estimate",
	1: "CoordValue",
	2: "Aux",
}
View Source
var ConsensusMessage_Type_value = map[string]int32{
	"Estimate":   0,
	"CoordValue": 1,
	"Aux":        2,
}
View Source
var RBMessage_Type_name = map[int32]string{
	0: "Send",
	1: "Echo",
	2: "Ready",
}
View Source
var RBMessage_Type_value = map[string]int32{
	"Send":  0,
	"Echo":  1,
	"Ready": 2,
}
View Source
var RBState_Status_name = map[int32]string{
	0: "None",
	1: "Received",
	2: "Echoed",
	3: "Readied",
	4: "Executed",
}
View Source
var RBState_Status_value = map[string]int32{
	"None":     0,
	"Received": 1,
	"Echoed":   2,
	"Readied":  3,
	"Executed": 4,
}

Functions

func WrapMessageInner

func WrapMessageInner(msg proto.Message) isDispelMessage_Type

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

Types

type ConsensusMessage

type ConsensusMessage struct {
	EpochNum Epoch                                                  `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3,casttype=Epoch" json:"epoch_num,omitempty"`
	PeerID   github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 144-byte string literal not displayed */
	RoundNum Round                                                  `protobuf:"varint,3,opt,name=round_num,json=roundNum,proto3,casttype=Round" json:"round_num,omitempty"`
	Type     ConsensusMessage_Type                                  `protobuf:"varint,4,opt,name=type,proto3,enum=mirbftpb.ConsensusMessage_Type" json:"type,omitempty"`
	Estimate int32                                                  `protobuf:"varint,5,opt,name=estimate,proto3" json:"estimate,omitempty"`
	Aux      []int32                                                `protobuf:"varint,6,rep,packed,name=aux,proto3" json:"aux,omitempty"`
}

func (*ConsensusMessage) Descriptor

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

func (*ConsensusMessage) GetAux

func (m *ConsensusMessage) GetAux() []int32

func (*ConsensusMessage) GetEpochNum

func (m *ConsensusMessage) GetEpochNum() Epoch

func (*ConsensusMessage) GetEstimate

func (m *ConsensusMessage) GetEstimate() int32

func (*ConsensusMessage) GetRoundNum

func (m *ConsensusMessage) GetRoundNum() Round

func (*ConsensusMessage) GetType

func (*ConsensusMessage) Marshal

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

func (*ConsensusMessage) MarshalTo

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

func (*ConsensusMessage) MarshalToSizedBuffer

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

func (*ConsensusMessage) ProtoMessage

func (*ConsensusMessage) ProtoMessage()

func (*ConsensusMessage) Reset

func (m *ConsensusMessage) Reset()

func (*ConsensusMessage) Size

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

func (*ConsensusMessage) String

func (m *ConsensusMessage) String() string

func (*ConsensusMessage) Unmarshal

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

func (*ConsensusMessage) XXX_DiscardUnknown

func (m *ConsensusMessage) XXX_DiscardUnknown()

func (*ConsensusMessage) XXX_Marshal

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

func (*ConsensusMessage) XXX_Merge

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

func (*ConsensusMessage) XXX_Size

func (m *ConsensusMessage) XXX_Size() int

func (*ConsensusMessage) XXX_Unmarshal

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

type ConsensusMessage_Type

type ConsensusMessage_Type int32
const (
	ConsensusMessage_Estimate   ConsensusMessage_Type = 0
	ConsensusMessage_CoordValue ConsensusMessage_Type = 1
	ConsensusMessage_Aux        ConsensusMessage_Type = 2
)

func (ConsensusMessage_Type) EnumDescriptor

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

func (ConsensusMessage_Type) String

func (x ConsensusMessage_Type) String() string

type DispelMessage

type DispelMessage struct {
	// Types that are valid to be assigned to Type:
	//	*DispelMessage_Broadcast
	//	*DispelMessage_Consensus
	Type isDispelMessage_Type `protobuf_oneof:"type"`
}

func WrapDispelMessage

func WrapDispelMessage(msg proto.Message) *DispelMessage

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

func (*DispelMessage) Descriptor

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

func (*DispelMessage) GetBroadcast

func (m *DispelMessage) GetBroadcast() *RBMessage

func (*DispelMessage) GetConsensus

func (m *DispelMessage) GetConsensus() *ConsensusMessage

func (*DispelMessage) GetType

func (m *DispelMessage) GetType() isDispelMessage_Type

func (*DispelMessage) Marshal

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

func (*DispelMessage) MarshalTo

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

func (*DispelMessage) MarshalToSizedBuffer

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

func (*DispelMessage) ProtoMessage

func (*DispelMessage) ProtoMessage()

func (*DispelMessage) Reset

func (m *DispelMessage) Reset()

func (*DispelMessage) Size

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

func (*DispelMessage) String

func (m *DispelMessage) String() string

func (*DispelMessage) Unmarshal

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

func (*DispelMessage) XXX_DiscardUnknown

func (m *DispelMessage) XXX_DiscardUnknown()

func (*DispelMessage) XXX_Marshal

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

func (*DispelMessage) XXX_Merge

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

func (*DispelMessage) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*DispelMessage) XXX_Size

func (m *DispelMessage) XXX_Size() int

func (*DispelMessage) XXX_Unmarshal

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

type DispelMessage_Broadcast

type DispelMessage_Broadcast struct {
	Broadcast *RBMessage `protobuf:"bytes,1,opt,name=broadcast,proto3,oneof" json:"broadcast,omitempty"`
}

func (*DispelMessage_Broadcast) MarshalTo

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

func (*DispelMessage_Broadcast) MarshalToSizedBuffer

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

func (*DispelMessage_Broadcast) Size

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

type DispelMessage_Consensus

type DispelMessage_Consensus struct {
	Consensus *ConsensusMessage `protobuf:"bytes,2,opt,name=consensus,proto3,oneof" json:"consensus,omitempty"`
}

func (*DispelMessage_Consensus) MarshalTo

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

func (*DispelMessage_Consensus) MarshalToSizedBuffer

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

func (*DispelMessage_Consensus) Size

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

type Epoch

type Epoch uint64

type RBMessage

type RBMessage struct {
	EpochNum    Epoch                                                  `protobuf:"varint,1,opt,name=epoch_num,json=epochNum,proto3,casttype=Epoch" json:"epoch_num,omitempty"`
	PeerID      github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 144-byte string literal not displayed */
	Type        RBMessage_Type                                         `protobuf:"varint,3,opt,name=type,proto3,enum=mirbftpb.RBMessage_Type" json:"type,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 (*RBMessage) Descriptor

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

func (*RBMessage) Equals

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

func (*RBMessage) GetCommand

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

func (*RBMessage) GetCommandHash

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

func (*RBMessage) GetEpochNum

func (m *RBMessage) GetEpochNum() Epoch

func (*RBMessage) GetType

func (m *RBMessage) GetType() RBMessage_Type

func (*RBMessage) Marshal

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

func (*RBMessage) MarshalTo

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

func (*RBMessage) MarshalToSizedBuffer

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

func (*RBMessage) ProtoMessage

func (*RBMessage) ProtoMessage()

func (*RBMessage) Reset

func (m *RBMessage) Reset()

func (*RBMessage) Size

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

func (*RBMessage) String

func (m *RBMessage) String() string

func (*RBMessage) Unmarshal

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

func (*RBMessage) XXX_DiscardUnknown

func (m *RBMessage) XXX_DiscardUnknown()

func (*RBMessage) XXX_Marshal

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

func (*RBMessage) XXX_Merge

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

func (*RBMessage) XXX_Size

func (m *RBMessage) XXX_Size() int

func (*RBMessage) XXX_Unmarshal

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

type RBMessage_Type

type RBMessage_Type int32
const (
	RBMessage_Send  RBMessage_Type = 0
	RBMessage_Echo  RBMessage_Type = 1
	RBMessage_Ready RBMessage_Type = 2
)

func (RBMessage_Type) EnumDescriptor

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

func (RBMessage_Type) String

func (x RBMessage_Type) String() string

type RBState

type RBState struct {
	PeerID      github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID `` /* 144-byte string literal not displayed */
	Status      RBState_Status                                         `protobuf:"varint,1,opt,name=status,proto3,enum=mirbftpb.RBState_Status" json:"status,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 (*RBState) Descriptor

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

func (*RBState) GetCommand

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

func (*RBState) GetCommandHash

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

func (*RBState) GetStatus

func (m *RBState) GetStatus() RBState_Status

func (*RBState) HasEchoed

func (s *RBState) HasEchoed() bool

func (*RBState) HasReadied

func (s *RBState) HasReadied() bool

func (*RBState) HasReceived

func (s *RBState) HasReceived() bool

func (*RBState) Marshal

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

func (*RBState) MarshalTo

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

func (*RBState) MarshalToSizedBuffer

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

func (*RBState) ProtoMessage

func (*RBState) ProtoMessage()

func (*RBState) Reset

func (m *RBState) Reset()

func (*RBState) Size

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

func (*RBState) String

func (m *RBState) String() string

func (*RBState) Unmarshal

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

func (*RBState) XXX_DiscardUnknown

func (m *RBState) XXX_DiscardUnknown()

func (*RBState) XXX_Marshal

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

func (*RBState) XXX_Merge

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

func (*RBState) XXX_Size

func (m *RBState) XXX_Size() int

func (*RBState) XXX_Unmarshal

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

type RBState_Status

type RBState_Status int32
const (
	RBState_None     RBState_Status = 0
	RBState_Received RBState_Status = 1
	RBState_Echoed   RBState_Status = 2
	RBState_Readied  RBState_Status = 3
	RBState_Executed RBState_Status = 4
)

func (RBState_Status) EnumDescriptor

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

func (RBState_Status) String

func (x RBState_Status) String() string

type Round

type Round uint64

Jump to

Keyboard shortcuts

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