Documentation ¶
Index ¶
- Variables
- type Delayer
- type Processor
- func (p *Processor) Add(msg *msgqueue.Message) error
- func (p *Processor) AddDelay(msg *msgqueue.Message, delay time.Duration) error
- func (p *Processor) Process(msg *msgqueue.Message) error
- func (p *Processor) ProcessAll() error
- func (p *Processor) ProcessOne() error
- func (p *Processor) Purge() error
- func (p *Processor) Start() error
- func (p *Processor) Stats() *Stats
- func (p *Processor) Stop() error
- func (p *Processor) StopTimeout(timeout time.Duration) error
- func (p *Processor) String() string
- type Queuer
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupported = errors.New("processor: not supported")
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor reserves messages from the queue, processes them, and then either releases or deletes messages from the queue.
func (*Processor) Process ¶
Process is low-level API to process message bypassing the internal queue.
func (*Processor) ProcessAll ¶
ProcessAll starts workers to process messages in the queue and then stops them when all messages are processed.
func (*Processor) ProcessOne ¶
ProcessOne processes at most one message in the queue.
func (*Processor) StopTimeout ¶
StopTimeout waits workers for timeout duration to finish processing current messages and stops workers.
type Queuer ¶
type Queuer interface { Name() string Processor() *Processor Add(msg *msgqueue.Message) error Call(args ...interface{}) error CallOnce(dur time.Duration, args ...interface{}) error ReserveN(n int) ([]msgqueue.Message, error) Release(*msgqueue.Message, time.Duration) error Delete(msg *msgqueue.Message) error DeleteBatch(msg []*msgqueue.Message) error Purge() error Close() error CloseTimeout(time.Duration) error }
Click to show internal directories.
Click to hide internal directories.