Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressedPayload ¶
type AddressedPayload struct { SourceAddress ids.ID `serialize:"true"` DestinationAddress ids.ID `serialize:"true"` Payload []byte `serialize:"true"` // contains filtered or unexported fields }
AddressedPayload defines an optional format for the bytes payload of a Warp message.
func NewAddressedPayload ¶
func NewAddressedPayload(sourceAddress ids.ID, destinationAddress ids.ID, payload []byte) (*AddressedPayload, error)
NewAddressedPayload creates a new *AddressedPayload and initializes it.
func ParseAddressedPayload ¶
func ParseAddressedPayload(b []byte) (*AddressedPayload, error)
ParseAddressedPayload converts a slice of bytes into an initialized *AddressedPayload.
func (*AddressedPayload) Bytes ¶
func (a *AddressedPayload) Bytes() []byte
Bytes returns the binary representation of this payload. It assumes that the payload is initialized from either NewAddressedPayload, ParseAddressedPayload, or an explicit call to Initialize.
func (*AddressedPayload) Initialize ¶
func (a *AddressedPayload) Initialize() error
Initialize recalculates the result of Bytes().
Click to show internal directories.
Click to hide internal directories.