serializer

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Serializers which supported by tinyrpc

Functions

This section is empty.

Types

type ProtoSerializer

type ProtoSerializer struct {
}

ProtoSerializer implements the Serializer interface

func (ProtoSerializer) Marshal

func (_ ProtoSerializer) Marshal(message any) ([]byte, error)

Marshal .

func (ProtoSerializer) Unmarshal

func (_ ProtoSerializer) Unmarshal(data []byte, message any) error

Unmarshal .

type SerializeType

type SerializeType int32

SerializeType serialized type supported by tinyrpc

const (
	Proto SerializeType = iota
)

type Serializer

type Serializer interface {
	Marshal(message any) ([]byte, error)
	Unmarshal(data []byte, message any) error
}

Serializer is interface, each serializer has Marshal and Unmarshal functions

Jump to

Keyboard shortcuts

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