Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PluginName contains the human readable name of the plugin. PluginName = "NetworkDelay" // CfgNetworkDelayOriginPublicKey defines the config flag of the issuer node public key. CfgNetworkDelayOriginPublicKey = "networkdelay.originPublicKey" )
View Source
const (
// PayloadName defines the name of the networkdelay payload.
PayloadName = "networkdelay"
)
Variables ¶
View Source
var Type = payload.NewType(payloadType, PayloadName, func(data []byte) (payload payload.Payload, err error) { var consumedBytes int payload, consumedBytes, err = FromBytes(data) if err != nil { return nil, err } if consumedBytes != len(data) { return nil, errors.New("not all payload bytes were consumed") } return })
Type represents the identifier which addresses the network delay Payload type.
Functions ¶
Types ¶
type Payload ¶ added in v0.6.4
type Payload struct {
// contains filtered or unexported fields
}
Payload represents the network delay payload type.
func FromBytes ¶
FromBytes parses the marshaled version of a Payload into a Go object. It either returns a new Payload or fills an optionally provided Payload with the parsed information.
func NewPayload ¶ added in v0.6.4
NewPayload creates a new network delay payload.
func Parse ¶
func Parse(marshalUtil *marshalutil.MarshalUtil) (result *Payload, err error)
Parse unmarshals a Payload using the given marshalUtil (for easier marshaling/unmarshaling).
Click to show internal directories.
Click to hide internal directories.