Documentation
¶
Index ¶
- Constants
- func ToBytes(msg Msg) ([]byte, error)
- type Common
- type Msg
- type MsgEpochCloseReq
- type MsgEpochCloseResp
- type MsgEpochOpenReq
- type MsgEpochOpenResp
- type MsgEpochRevokeReq
- type MsgEpochRevokeResp
- type MsgEpochSetupReq
- type MsgEpochSetupResp
- type MsgLeasePrepareReq
- type MsgLeasePrepareResp
- type MsgLeaseProposeReq
- type MsgLeaseProposeResp
- type MsgList
- type MsgReplicaCreateReq
- type MsgReplicaCreateResp
- type MsgType
Constants ¶
View Source
const ( MsgTypeNoOp = iota MsgTypeEpochSetupReq // 1 MsgTypeEpochSetupResp // 2 MsgTypeEpochOpenReq // 3 MsgTypeEpochOpenResp // 4 MsgTypeEpochCloseReq // 5 MsgTypeEpochCloseResp // 6 MsgTypeEpochRevokeReq // 7 MsgTypeEpochRevokeResp // 8 MsgTypeLeasePrepareReq // 9 MsgTypeLeasePrepareResp // 10 MsgTypeLeaseProposeReq // 11 MsgTypeLeaseProposeResp // 12 MsgTypeReplicaCreateReq // 13 MsgTypeReplicaCreateResp // 14 MsgTypeReplicaSetInSyncReq // 15 MsgTypeReplicaSetInSyncResp // 16 )
The list of available message types.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Common ¶
type Common struct {
// Type is the type of message
Type MsgType
// Dest is the server IP and port for the destination.
Dest api.Endpoint
// DestID is the server ID for the destination.
DestID uuid.UUID
// SrcID is the server ID for the source.
SrcID uuid.UUID
// ReplicaID is replica context for the message.
ReplicaID uuid.UUID
// EpochID identifies the epoch context for the message.
EpochID uuid.UUID
}
Common provides common attributes for all messages.
type Msg ¶
type Msg interface {
GetCommon() *Common
}
func NewMsgByType ¶
type MsgEpochCloseReq ¶
type MsgEpochCloseReq struct {
Common
}
func (*MsgEpochCloseReq) GetCommon ¶
func (m *MsgEpochCloseReq) GetCommon() *Common
type MsgEpochCloseResp ¶
type MsgEpochCloseResp struct {
Common
}
func (*MsgEpochCloseResp) GetCommon ¶
func (m *MsgEpochCloseResp) GetCommon() *Common
type MsgEpochOpenReq ¶
type MsgEpochOpenReq struct {
Common
}
func (*MsgEpochOpenReq) GetCommon ¶
func (m *MsgEpochOpenReq) GetCommon() *Common
type MsgEpochOpenResp ¶
type MsgEpochOpenResp struct {
Common
}
func (*MsgEpochOpenResp) GetCommon ¶
func (m *MsgEpochOpenResp) GetCommon() *Common
type MsgEpochRevokeReq ¶
type MsgEpochRevokeReq struct {
Common
SuccessorEpochID uuid.UUID
}
func (*MsgEpochRevokeReq) GetCommon ¶
func (m *MsgEpochRevokeReq) GetCommon() *Common
type MsgEpochRevokeResp ¶
type MsgEpochRevokeResp struct {
Common
}
func (*MsgEpochRevokeResp) GetCommon ¶
func (m *MsgEpochRevokeResp) GetCommon() *Common
type MsgEpochSetupReq ¶
type MsgEpochSetupReq struct {
Common
}
func (*MsgEpochSetupReq) GetCommon ¶
func (m *MsgEpochSetupReq) GetCommon() *Common
type MsgEpochSetupResp ¶
type MsgEpochSetupResp struct {
Common
}
func (*MsgEpochSetupResp) GetCommon ¶
func (m *MsgEpochSetupResp) GetCommon() *Common
type MsgLeasePrepareReq ¶
type MsgLeasePrepareReq struct {
Common
BallotNumber api.BallotNumber
SuccessorEpochID *uuid.UUID
}
func (*MsgLeasePrepareReq) GetCommon ¶
func (m *MsgLeasePrepareReq) GetCommon() *Common
type MsgLeasePrepareResp ¶
type MsgLeasePrepareResp struct {
Common
BallotNumber api.BallotNumber
HighestPromised api.BallotNumber
ProposalOwnerID *uuid.UUID
SuccessorMismatch bool
}
func (*MsgLeasePrepareResp) GetCommon ¶
func (m *MsgLeasePrepareResp) GetCommon() *Common
type MsgLeaseProposeReq ¶
type MsgLeaseProposeReq struct {
Common
BallotNumber api.BallotNumber
ProposedTimeout uint16
}
func (*MsgLeaseProposeReq) GetCommon ¶
func (m *MsgLeaseProposeReq) GetCommon() *Common
type MsgLeaseProposeResp ¶
type MsgLeaseProposeResp struct {
Common
BallotNumber api.BallotNumber
HasAcceptedProposal bool
ProposalOwnerID uuid.UUID
EpochState api.State
}
func (*MsgLeaseProposeResp) GetCommon ¶
func (m *MsgLeaseProposeResp) GetCommon() *Common
type MsgReplicaCreateReq ¶
func (*MsgReplicaCreateReq) GetCommon ¶
func (m *MsgReplicaCreateReq) GetCommon() *Common
type MsgReplicaCreateResp ¶
type MsgReplicaCreateResp struct {
Common
}
func (*MsgReplicaCreateResp) GetCommon ¶
func (m *MsgReplicaCreateResp) GetCommon() *Common
Click to show internal directories.
Click to hide internal directories.