Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶
func (HandlerFunc) HandlerMessage ¶
func (h HandlerFunc) HandlerMessage(message *Message) error
HandlerMessage implements the Handler interface
type MQ ¶
type MQ interface {
NewProducer() MQ // new producer
NewConsumer(topic, channel string) MQ // new consumer
Stop() // consumer Stop
Pub(topic string, msg any) error // pub any message
MultiPub(topic string, msgs ...any) error // MultiPub ...any message
Sub(handler HandlerFunc) error // sub func to handle your work
}
MQ message platform
func NewConsumer ¶
NewConsumer new consumer
type Nsg ¶
type Nsg struct {
// contains filtered or unexported fields
}
Nsg nsq
func (*Nsg) NewConsumer ¶
func (*Nsg) NewProducer ¶
func (*Nsg) Sub ¶
func (n *Nsg) Sub(handler HandlerFunc) error
Click to show internal directories.
Click to hide internal directories.