Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodecVersion = 0 MaxMessageSize = 24 * units.KiB )
Variables ¶
View Source
var Codec codec.Manager
Functions ¶
This section is empty.
Types ¶
type Payload ¶
type Payload interface { // Bytes returns the binary representation of this payload. Bytes() []byte // contains filtered or unexported methods }
Payload provides a common interface for all payloads implemented by this package.
type Signable ¶
Signable is an optional interface that payloads can implement to allow on-the-fly signing of incoming messages by the warp backend.
type ValidatorUptime ¶
type ValidatorUptime struct { ValidationID ids.ID `serialize:"true"` TotalUptime uint64 `serialize:"true"` // contains filtered or unexported fields }
ValidatorUptime is signed when the ValidationID is known and the validator has been up for TotalUptime seconds.
func NewValidatorUptime ¶
func NewValidatorUptime(validationID ids.ID, totalUptime uint64) (*ValidatorUptime, error)
NewValidatorUptime creates a new *ValidatorUptime and initializes it.
func ParseValidatorUptime ¶
func ParseValidatorUptime(b []byte) (*ValidatorUptime, error)
ParseValidatorUptime converts a slice of bytes into an initialized ValidatorUptime.
func (*ValidatorUptime) Bytes ¶
func (b *ValidatorUptime) Bytes() []byte
Bytes returns the binary representation of this payload. It assumes that the payload is initialized from either NewValidatorUptime or Parse.
Click to show internal directories.
Click to hide internal directories.