Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SSVSyncMsgType extends spec msg type SSVSyncMsgType spectypes.MsgType = 100 // SSVEventMsgType extends spec msg type SSVEventMsgType spectypes.MsgType = 200 )
View Source
const EntryNotFoundError = "EntryNotFoundError"
EntryNotFoundError is the error message for when an entry is not found
Variables ¶
This section is empty.
Functions ¶
func Aggregate ¶
func Aggregate(signedMsg *specqbft.SignedMessage, s spectypes.MessageSignature) error
Aggregate is a utility that helps to ensure sorted signers
func BeaconRoleFromString ¶
func BeaconRoleFromString(s string) (spectypes.BeaconRole, error)
BeaconRoleFromString returns BeaconRole from string
func MsgTypeToString ¶
MsgTypeToString extension for spec msg type. convert spec msg type to string
Types ¶
type Encoder ¶
type Encoder interface { // Encode encodes the message Encode() ([]byte, error) // Decode decodes the message Decode(data []byte) error }
Encoder encodes or decodes the message
type StatusCode ¶
type StatusCode uint32
StatusCode is the response status code
const ( // StatusUnknown represents an unknown state StatusUnknown StatusCode = iota // StatusSuccess means the request went successfully StatusSuccess // StatusNotFound means the desired objects were not found StatusNotFound // StatusError means that the node experienced some general error StatusError // StatusBadRequest means the request was bad StatusBadRequest // StatusInternalError means that the node experienced an internal error StatusInternalError // StatusBackoff means we exceeded rate limits for the protocol StatusBackoff )
func (*StatusCode) String ¶
func (sc *StatusCode) String() string
type SyncMessage ¶
type SyncMessage struct { // Protocol is the protocol of the message // TODO: remove after v0 Protocol SyncMsgType // Params holds request parameters Params *SyncParams // Data holds the results Data []*specqbft.SignedMessage // Status is the status code of the operation Status StatusCode }
SyncMessage is the message being passed in sync operations
func (*SyncMessage) Decode ¶
func (sm *SyncMessage) Decode(data []byte) error
Decode decodes the message
func (*SyncMessage) Encode ¶
func (sm *SyncMessage) Encode() ([]byte, error)
Encode encodes the message
func (*SyncMessage) UpdateResults ¶
func (sm *SyncMessage) UpdateResults(err error, results ...*specqbft.SignedMessage)
UpdateResults updates the given sync message with results or potential error
type SyncMsgType ¶
type SyncMsgType int32
SyncMsgType represent the type of sync messages TODO: remove after v0
const ( // LastDecidedType is the last decided message type LastDecidedType SyncMsgType = iota // DecidedHistoryType is the decided history message type DecidedHistoryType )
Click to show internal directories.
Click to hide internal directories.