serializer

package
v0.0.0-...-5834353 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgpackSerializer

type MsgpackSerializer struct {
}

func (*MsgpackSerializer) Deserialize

func (s *MsgpackSerializer) Deserialize(data []byte) (any, error)

func (*MsgpackSerializer) Serialize

func (s *MsgpackSerializer) Serialize(data any) ([]byte, error)

type Serializer

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

	// Deserialize is used to deserialize []byte to any
	Deserialize(data []byte) (any, 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