serializer

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Serializer

type Serializer interface {
	// Marshal encodes v and returns a byte slice and possible error.
	Marshal(v interface{}) ([]byte, error)

	// Unmarshal decodes the encoded data and stores the result in the value pointed to by v.
	Unmarshal(data []byte, v interface{}) error
}

Serializer interface responsible for encoding/decoding values to transmit over network between Olric nodes.

func NewGobSerializer

func NewGobSerializer() Serializer

NewGobSerializer returns a gob serializer. It's the default one.

func NewJSONSerializer

func NewJSONSerializer() Serializer

NewJSONSerializer returns a json serializer.

func NewMsgpackSerializer

func NewMsgpackSerializer() Serializer

NewMsgpackSerializer returns a msgpack serializer.

Source Files

Jump to

Keyboard shortcuts

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