Documentation ¶
Index ¶
- Constants
- Variables
- type Controller
- type Options
- type Processor
- func (h *Processor) Cleanup(_ sarama.ConsumerGroupSession) error
- func (h *Processor) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
- func (h *Processor) Log(layout string, data ...interface{})
- func (h *Processor) Run(ctx context.Context, wg *sync.WaitGroup)
- func (h *Processor) Setup(session sarama.ConsumerGroupSession) error
Constants ¶
View Source
const DQConsumerClientId = "delayQueue-consumer"
Variables ¶
View Source
var DelayResetErr = errors.New("Delayed resetting session. ")
DelayResetErr Delay, reset session
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(name string, addr []string, delayTime []time.Duration, options ...Options) (*Controller, error)
NewController Create a controller
func (*Controller) Log ¶
func (c *Controller) Log(layout string, data ...interface{})
Log Controller Logs
type Options ¶
type Options func(*Controller)
func WithLogger ¶
WithLogger Setting the Log Interface
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor processor
func NewProcessor ¶
func NewProcessor(adds []string, name string, delayTime time.Duration, log logger.Logger) (*Processor, error)
NewProcessor create a Processor
func (*Processor) ConsumeClaim ¶
func (h *Processor) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
Click to show internal directories.
Click to hide internal directories.