consumer

package
v0.0.0-...-bf36c84 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LuaScriptExec

type LuaScriptExec struct {
	Topic   string           // 订阅key
	Channel string           // 订阅渠道
	Workers LuaScriptWorkers // 消息处理执行
}

func (*LuaScriptExec) GetSubscription

func (c *LuaScriptExec) GetSubscription() (string, string)

func (*LuaScriptExec) HandleMessage

func (c *LuaScriptExec) HandleMessage(msg *nsq.Message) error

type LuaScriptMessageBody

type LuaScriptMessageBody struct {
	ScriptPath   string                 // 脚本地址
	Args         map[string]interface{} // 脚本参数
	CallBackType string                 // 回调方式,api/topic
	CallBack     string                 // 回调地址/消息队列话题
}

type LuaScriptWorkers

type LuaScriptWorkers interface {
	// Before() error
	Processing(body []byte) error
}

Jump to

Keyboard shortcuts

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