serializer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConverterService

type ConverterService struct {
}

func (*ConverterService) Deserialize

func (s *ConverterService) Deserialize(data []byte) (interface{}, error)

func (*ConverterService) Serialize

func (s *ConverterService) Serialize(data interface{}) ([]byte, error)

type Serializer

type Serializer interface {
	// Serialize is used to serialize and data to a []byte
	Serialize(data interface{}) ([]byte, error)

	// Deserialize is used to deserialize []byte to interface{}
	Deserialize(data []byte) (interface{}, error)
}

Serializer interface is to provide serialize and deserialize methods for EasyRaft Node

func NewMsgPackSerializer

func NewMsgPackSerializer() Serializer

Jump to

Keyboard shortcuts

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