Documentation ¶
Index ¶
- Constants
- func Enqueue(queue string, message interface{}, delayTime time.Duration) (string, error)
- func GetGoroutineID() uint64
- func InitClient(opt *redis.Options)
- func InitClusterClient(opt *redis.ClusterOptions)
- func Process(queue string, delayFunc delayFunc, concurrency int, params ...Params)
- func RetryEnqueue(queue string, member interface{}) (string, error)
- func Run()
- func Stats(w http.ResponseWriter, req *http.Request)
- func StatsServer(port int)
- type EnqueueData
- type Params
Constants ¶
View Source
const ( RetryNum = 2 // 最大重试次数 RetryInterval = 1 // 重试时间间隔(秒) )
View Source
const ( MaxCount = 10000 DefaultCount = 1 DefaultSleep = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func InitClusterClient ¶ added in v0.0.2
func InitClusterClient(opt *redis.ClusterOptions)
InitClusterClient ...
func RetryEnqueue ¶ added in v0.0.2
RetryEnqueue ...
func StatsServer ¶
func StatsServer(port int)
Types ¶
type EnqueueData ¶
type EnqueueData struct { MsgId string `json:"msg_id"` Message interface{} `json:"message"` RetryNum uint64 `json:"retry_num"` // 最大重试次数 RetryInterval int64 `json:"retry_interval"` // 重试时间间隔(秒) }
EnqueueData ...
Click to show internal directories.
Click to hide internal directories.