protocol

package
v0.0.0-...-354a747 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MagicNumber

func MagicNumber() byte

Types

type CompressType

type CompressType byte

Extend header

compressor
const (
	CompressNone CompressType = iota
	Gzip
)
type Header [11]byte

func (Header) CheckMagicNumber

func (h Header) CheckMagicNumber() bool

func (Header) TotalLength

func (h Header) TotalLength() TotalLength

func (Header) Version

func (h Header) Version() byte

type HeaderLength

type HeaderLength int16

type Message

type Message struct {
}

Define message

type MessageType

type MessageType byte
const (
	// Request Type
	Request MessageType = iota
	// Response Type
	Response
)

type SerializerType

type SerializerType byte
const (
	// Using raw []byte and don't serialize/deserialize
	SerializerNone SerializerType = iota
	// JSON for Payload
	JSON
	// Protobuf for Payload
	ProtoBuffer
	// MsgPack for Payload
	MsgPack
	// Thrift for Payload
	Thrift
)

type TotalLength

type TotalLength int32

type Version

type Version byte

Jump to

Keyboard shortcuts

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