Documentation ¶
Index ¶
- Variables
- func WrapMessageInner(msg proto.Message) isDispelMessage_Type
- type ConsensusMessage
- func (*ConsensusMessage) Descriptor() ([]byte, []int)
- func (m *ConsensusMessage) GetAux() []int32
- func (m *ConsensusMessage) GetEpochNum() Epoch
- func (m *ConsensusMessage) GetEstimate() int32
- func (m *ConsensusMessage) GetPeerID() github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID
- func (m *ConsensusMessage) GetRoundNum() Round
- func (m *ConsensusMessage) GetType() ConsensusMessage_Type
- func (m *ConsensusMessage) Marshal() (dAtA []byte, err error)
- func (m *ConsensusMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *ConsensusMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConsensusMessage) ProtoMessage()
- func (m *ConsensusMessage) Reset()
- func (m *ConsensusMessage) Size() (n int)
- func (m *ConsensusMessage) String() string
- func (m *ConsensusMessage) Unmarshal(dAtA []byte) error
- func (m *ConsensusMessage) XXX_DiscardUnknown()
- func (m *ConsensusMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsensusMessage) XXX_Merge(src proto.Message)
- func (m *ConsensusMessage) XXX_Size() int
- func (m *ConsensusMessage) XXX_Unmarshal(b []byte) error
- type ConsensusMessage_Type
- type DispelMessage
- func (*DispelMessage) Descriptor() ([]byte, []int)
- func (m *DispelMessage) GetBroadcast() *RBMessage
- func (m *DispelMessage) GetConsensus() *ConsensusMessage
- func (m *DispelMessage) GetType() isDispelMessage_Type
- func (m *DispelMessage) Marshal() (dAtA []byte, err error)
- func (m *DispelMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *DispelMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DispelMessage) ProtoMessage()
- func (m *DispelMessage) Reset()
- func (m *DispelMessage) Size() (n int)
- func (m *DispelMessage) String() string
- func (m *DispelMessage) Unmarshal(dAtA []byte) error
- func (m *DispelMessage) XXX_DiscardUnknown()
- func (m *DispelMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DispelMessage) XXX_Merge(src proto.Message)
- func (*DispelMessage) XXX_OneofWrappers() []interface{}
- func (m *DispelMessage) XXX_Size() int
- func (m *DispelMessage) XXX_Unmarshal(b []byte) error
- type DispelMessage_Broadcast
- type DispelMessage_Consensus
- type Epoch
- type RBMessage
- func (*RBMessage) Descriptor() ([]byte, []int)
- func (m *RBMessage) Equals(other *RBMessage) bool
- func (m *RBMessage) GetCommand() *commandpb.Command
- func (m *RBMessage) GetCommandHash() []byte
- func (m *RBMessage) GetEpochNum() Epoch
- func (m *RBMessage) GetPeerID() github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID
- func (m *RBMessage) GetType() RBMessage_Type
- func (m *RBMessage) Marshal() (dAtA []byte, err error)
- func (m *RBMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *RBMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RBMessage) ProtoMessage()
- func (m *RBMessage) Reset()
- func (m *RBMessage) Size() (n int)
- func (m *RBMessage) String() string
- func (m *RBMessage) Unmarshal(dAtA []byte) error
- func (m *RBMessage) XXX_DiscardUnknown()
- func (m *RBMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RBMessage) XXX_Merge(src proto.Message)
- func (m *RBMessage) XXX_Size() int
- func (m *RBMessage) XXX_Unmarshal(b []byte) error
- type RBMessage_Type
- type RBState
- func (*RBState) Descriptor() ([]byte, []int)
- func (m *RBState) GetCommand() *commandpb.Command
- func (m *RBState) GetCommandHash() []byte
- func (m *RBState) GetPeerID() github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID
- func (m *RBState) GetStatus() RBState_Status
- func (s *RBState) HasEchoed() bool
- func (s *RBState) HasReadied() bool
- func (s *RBState) HasReceived() bool
- func (m *RBState) Marshal() (dAtA []byte, err error)
- func (m *RBState) MarshalTo(dAtA []byte) (int, error)
- func (m *RBState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RBState) ProtoMessage()
- func (m *RBState) Reset()
- func (m *RBState) Size() (n int)
- func (m *RBState) String() string
- func (m *RBState) Unmarshal(dAtA []byte) error
- func (m *RBState) XXX_DiscardUnknown()
- func (m *RBState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RBState) XXX_Merge(src proto.Message)
- func (m *RBState) XXX_Size() int
- func (m *RBState) XXX_Unmarshal(b []byte) error
- type RBState_Status
- type Round
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 ¶
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) GetPeerID ¶
func (m *ConsensusMessage) GetPeerID() github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID
func (*ConsensusMessage) GetRoundNum ¶
func (m *ConsensusMessage) GetRoundNum() Round
func (*ConsensusMessage) GetType ¶
func (m *ConsensusMessage) GetType() ConsensusMessage_Type
func (*ConsensusMessage) Marshal ¶
func (m *ConsensusMessage) Marshal() (dAtA []byte, err 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) 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 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) GetCommand ¶
func (*RBMessage) GetCommandHash ¶
func (*RBMessage) GetEpochNum ¶
func (*RBMessage) GetPeerID ¶
func (m *RBMessage) GetPeerID() github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID
func (*RBMessage) GetType ¶
func (m *RBMessage) GetType() RBMessage_Type
func (*RBMessage) MarshalToSizedBuffer ¶
func (*RBMessage) ProtoMessage ¶
func (*RBMessage) ProtoMessage()
func (*RBMessage) XXX_DiscardUnknown ¶
func (m *RBMessage) XXX_DiscardUnknown()
func (*RBMessage) XXX_Marshal ¶
func (*RBMessage) XXX_Unmarshal ¶
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) GetCommand ¶
func (*RBState) GetCommandHash ¶
func (*RBState) GetPeerID ¶
func (m *RBState) GetPeerID() github_com_ibalajiarun_go_consensus_peer_peerpb.PeerID
func (*RBState) GetStatus ¶
func (m *RBState) GetStatus() RBState_Status
func (*RBState) HasReadied ¶
func (*RBState) HasReceived ¶
func (*RBState) MarshalToSizedBuffer ¶
func (*RBState) ProtoMessage ¶
func (*RBState) ProtoMessage()
func (*RBState) XXX_DiscardUnknown ¶
func (m *RBState) XXX_DiscardUnknown()
func (*RBState) XXX_Marshal ¶
func (*RBState) XXX_Unmarshal ¶
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
Click to show internal directories.
Click to hide internal directories.