Documentation ¶
Index ¶
- func Exit()
- func Init(cfg *Config, log mq.Logger, redis Redis, queueName string, removeCert bool) error
- func Publish(topic string, header map[string]string, msg []byte, opts ...mq.PublishOption) error
- func Subscribe(group string, h Handler, topics []string) error
- func SubscribeWithStrategyOfRetry(group string, h Handler, topics []string, retryNum int) error
- func SubscribeWithStrategyOfSendBack(group string, h Handler, topics []string) error
- type Config
- type Handler
- type Redis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Address string `json:"address" required:"true"` Version string `json:"version"` // e.g 2.1.0 MQCert string `json:"mq_cert"` OTEL bool `json:"otel"` // Whether otel tracing is enabled Username string `json:"user_name"` Password string `json:"password"` Algorithm string `json:"algorithm"` SkipCertVerify bool `json:"skip_cert_verify"` }
Click to show internal directories.
Click to hide internal directories.