package
module
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Sep 5, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 17
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
golang+redis 简单版mq ,有ack功能
func NewJob(name, persistentPath string, num int64, conn *radix.Pool, handler handlerFn) *job
example:
job := mq.NewJob("test", "/fail-queue.json", 1, redis.GetPool(), func(message mq.Message) bool {
data := message.Data
fmt.Println(data)
return true
})
type Message struct {
Id string
Data interface{}
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.