Documentation ¶
Index ¶
- func Init(nsqd string, lookupd []string, consumers ...Consumer) error
- func InitWithCfg(nsqd string, lookupd []string, cfg *nsq.Config, consumers ...Consumer) (err error)
- func NextAttemptDelay(attempts uint16) (delay time.Duration)
- func Publish(topic string, msg []byte) error
- func PublishDelay(topic string, msg []byte, delay time.Duration) error
- func SetErrLogger(l *zap.Logger)
- type Consumer
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitWithCfg ¶
InitWithCfg 指定配置初始化
func NextAttemptDelay ¶
NextAttemptDelay 一个帮助方法,用于返回下一次尝试的等待时间
func PublishDelay ¶ added in v1.12.2
PublishDelay 同步推送延迟消息到指定Topic
Types ¶
Click to show internal directories.
Click to hide internal directories.