Documentation ¶
Index ¶
Constants ¶
View Source
const DQProducerClientId = "delayQueue-producer"
Variables ¶
View Source
var ErrDelayTimeNotRegister = errors.New("The delay is not registered. Check whether the delay is sent by mistake ")
View Source
var ErrRegisteredDelayQueueNotEmpty = errors.New("The registered delay queue cannot be empty ")
Functions ¶
This section is empty.
Types ¶
type DQProducer ¶
type DQProducer struct { sarama.SyncProducer // contains filtered or unexported fields }
func NewDQProducer ¶
func NewDQProducer(name string, registerDelay []time.Duration, addr []string, options ...Options) (*DQProducer, error)
NewDQProducer create a producer
func (*DQProducer) RegisterTopic ¶
func (s *DQProducer) RegisterTopic(delayTime time.Duration) string
RegisterTopic Get topic by delay time.
type Options ¶
type Options func(*DQProducer)
func WithLogger ¶
WithLogger Setting the Log Interface
Click to show internal directories.
Click to hide internal directories.