registry

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRegistry = New()

Functions

func Register

func Register(initializers ...MessageUnmarshaller)

func Unmarshal

func Unmarshal(typeName string, b []byte) (interface{}, error)

Types

type MessageType

type MessageType interface {
}

type MessageUnmarshaller

type MessageUnmarshaller func(b []byte) (interface{}, error)

type Named

type Named interface {
	Name() string
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func New

func New() *Registry

func (*Registry) Marshal

func (reg *Registry) Marshal(msg interface{}) ([]byte, string, error)

func (*Registry) Register

func (reg *Registry) Register(initializers ...MessageUnmarshaller)

func (*Registry) ToMessage

func (reg *Registry) ToMessage(r record.Record) (streams.Message, error)

func (*Registry) Unmarshal

func (reg *Registry) Unmarshal(typeName string, b []byte) (interface{}, error)

Jump to

Keyboard shortcuts

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