rpc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AlreadyRegistered = "protocol code already registered."
	UnknownType       = "unknown model type."
	UnrecognizedCode  = "unrecognized protocol code."
	NoProtocolCode    = "no protocol code found."

	ErrDupRegistered    = errors.New(AlreadyRegistered)
	ErrUnknownType      = errors.New(UnknownType)
	ErrUnrecognizedCode = errors.New(UnrecognizedCode)
	ErrNoProtocolCode   = errors.New(NoProtocolCode)
)

Functions

func NewEngine

func NewEngine(encoder types.Encoder, decoder types.Decoder) types.ProtocolEngine

func NewMixedEngine

func NewMixedEngine() types.ProtocolEngine

Types

type RespStatus

type RespStatus interface {
	RespStatus() uint32
}

ResponseStatus describe that the model has the [response status] information

type RpcCmd

type RpcCmd interface {
	types.HeaderMap

	ProtocolCode() byte

	RequestID() uint64

	SetRequestID(requestID uint64)

	Header() map[string]string

	Data() types.IoBuffer

	SetHeader(header map[string]string)

	SetData(data types.IoBuffer)

	GetTimeout() int
}

RpcCmd act as basic model for different protocols

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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