payload

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2020 License: Apache-2.0, BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const IdLength = 64

Variables

This section is empty.

Functions

func RegisterType

func RegisterType(payloadType Type, unmarshaler Unmarshaler)

func SetGenericUnmarshalerFactory

func SetGenericUnmarshalerFactory(unmarshalerFactory func(payloadType Type) Unmarshaler)

Types

type Id

type Id [IdLength]byte

type Payload

type Payload interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler

	GetType() Type
}

type Type

type Type = uint32

type Unmarshaler

type Unmarshaler func(data []byte) (Payload, error)

func GetUnmarshaler

func GetUnmarshaler(payloadType Type) Unmarshaler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL