gomsgrunner

package
v1.0.1-rel-01 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorCodeInternal = 500

定义错误代码常量

Variables

This section is empty.

Functions

func InjectGomsgCheck

func InjectGomsgCheck(s *GomsgCheck)

func InjectGomsgRunner

func InjectGomsgRunner(s *GomsgRunner)

func LoadGomsgCheck

func LoadGomsgCheck() baseiface.ISingleton

func LoadGomsgRunner

func LoadGomsgRunner() baseiface.ISingleton

Types

type GomsgCheck

type GomsgCheck struct {
	basedto.BaseEntitySingle
}

func FindBeanGomsgCheck

func FindBeanGomsgCheck() *GomsgCheck

FindBeanGomsgCheck

func NewGomsgCheck

func NewGomsgCheck() *GomsgCheck

func (*GomsgCheck) Check

func (g *GomsgCheck) Check(msg *gomsg.GonatsMsg) error

Check 检查消息

func (*GomsgCheck) CheckDomain

func (g *GomsgCheck) CheckDomain(msg *gomsg.GonatsMsg) error

CheckDomain 检查域名有效性

func (*GomsgCheck) CheckEmpty

func (g *GomsgCheck) CheckEmpty(msg *gomsg.GonatsMsg) error

CheckEmpty 检查消息字段是否为空

func (*GomsgCheck) CheckHeader

func (g *GomsgCheck) CheckHeader(msg *gomsg.GonatsMsg) error

CheckHeader 检查消息头

func (*GomsgCheck) CheckTopic

func (g *GomsgCheck) CheckTopic(msg *gomsg.GonatsMsg) error

CheckTopic 检查话题有效性

type GomsgRunner

type GomsgRunner struct {
	basedto.BaseEntitySingle
}

GomsgRunner 结构体,实现复杂的业务逻辑,并返回结果

func FindBeanGomsgRunner

func FindBeanGomsgRunner() *GomsgRunner

FindBeanGomsgRunner

func NewGonatsMsgexecutor

func NewGonatsMsgexecutor() *GomsgRunner

func (*GomsgRunner) Check

func (this *GomsgRunner) Check(msg *gomsg.GonatsMsg) error

func (*GomsgRunner) EsCmd

func (this *GomsgRunner) EsCmd(msg *gomsg.GonatsMsg) *gomsg.GonatsMsgresp

func (*GomsgRunner) EsKeyword

func (this *GomsgRunner) EsKeyword(msg *gomsg.GonatsMsg) *gomsg.GonatsMsgresp

func (*GomsgRunner) EsMetadata

func (this *GomsgRunner) EsMetadata(msg *gomsg.GonatsMsg) *gomsg.GonatsMsgresp

func (*GomsgRunner) EsQueryResult

func (this *GomsgRunner) EsQueryResult(msg *gomsg.GonatsMsg) *gomsg.GonatsMsgresp

processRequest 对请求进行处理的通用函数

func (*GomsgRunner) Exec

func (this *GomsgRunner) Exec(msg *gomsg.GonatsMsg) *gomsg.GonatsMsgresp

func (*GomsgRunner) Execute

func (this *GomsgRunner) Execute(msg *gomsg.GonatsMsg) *gomsg.GonatsMsgresp

Jump to

Keyboard shortcuts

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