codec

package
v0.0.0-...-87ea4a5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryDecoder

type BinaryDecoder struct {
	Conn net.Conn
	Lock *sync.RWMutex
}

func NewBinaryDecoder

func NewBinaryDecoder(conn net.Conn) *BinaryDecoder

NewBinaryDecoder Usually we will be initiated with a conn that's alive, but just as a failsafe

func (*BinaryDecoder) Decode

func (bd *BinaryDecoder) Decode(e any) error

Decode takes a pointer!

type BinaryEncoder

type BinaryEncoder struct {
	Conn net.Conn
	Lock *sync.RWMutex
}

func NewBinaryEncoder

func NewBinaryEncoder(conn net.Conn) *BinaryEncoder

func (*BinaryEncoder) Encode

func (be *BinaryEncoder) Encode(e any) error

type Encoder

type Encoder interface {
	Encode(e any) error
}

Jump to

Keyboard shortcuts

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