dobby

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: GPL-2.0 Imports: 6 Imported by: 0

README

dobby

Dobby is NSQ worker Implemented with golang, it like python https://github.com/felinx/nsqworker

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWorker

func NewWorker(workers ...interface{}) (ret *dobby, err error)

func SetupNsqRegister

func SetupNsqRegister(def func(topic string, channel string, handler func(message *nsq.Message) error) error, logger *log.Logger) error

Types

type IWorker

type IWorker interface {
	Launch(topic string) error
}

type NsqMessage

type NsqMessage struct {
	Action   string      `json:"action" msgpack:"action"`
	Message  interface{} `json:"message" msgpack:"message"`
	CreateAt int         `json:"ct,omitempty" msgpack:"ct,omitempty"`
	APP      string      `json:"app" msgpack:"app"`
}

Jump to

Keyboard shortcuts

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