middleware

package
v2.0.0-beta.7.0...-56585fc Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump() rpcx.MiddlewareFunc

func MqMakeHeader

func MqMakeHeader(target, reply string) rpcx.RpcMsgHeader

func Recover

func Recover(allStack bool) rpcx.MiddlewareFunc

func RequestNotNil

func RequestNotNil() rpcx.MiddlewareFunc

func ValidateStruct

func ValidateStruct(flag ValidateFlag, v std.Validator) rpcx.MiddlewareFunc

only validate struct , other values will ignore

Types

type Mq

type Mq struct {
	// contains filtered or unexported fields
}

func NewMq

func NewMq(core rpcx.Core, mqSend MqSendFunc) *Mq

func (*Mq) Middleware

func (this *Mq) Middleware() rpcx.MiddlewareFunc

func (*Mq) OnReceive

func (this *Mq) OnReceive(msg []byte)

type MqSendFunc

type MqSendFunc func(targetTopic, replyTopic string, msg []byte)

type ValidateFlag

type ValidateFlag uint8
const (
	ValidateNone  ValidateFlag = 0x00
	ValidateIn    ValidateFlag = 0x01
	ValidateOut   ValidateFlag = 0x02
	ValidateInOut              = ValidateIn | ValidateOut
)

Jump to

Keyboard shortcuts

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