Documentation ¶
Index ¶
- type Blero
- func (bl *Blero) EnqueueJob(name string, data []byte) (uint64, error)
- func (bl *Blero) RegisterProcessor(p Processor) int
- func (bl *Blero) RegisterProcessorFunc(f func(j *Job) error) int
- func (bl *Blero) Start(db *badger.DB) error
- func (bl *Blero) Stop() error
- func (bl *Blero) UnregisterProcessor(pID int)
- type Job
- type Processor
- type ProcessorFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blero ¶
type Blero struct {
// contains filtered or unexported fields
}
Blero struct
func (*Blero) EnqueueJob ¶
EnqueueJob enqueues a new Job and returns the job id
func (*Blero) RegisterProcessor ¶
RegisterProcessor registers a new processor and returns the processor id
func (*Blero) RegisterProcessorFunc ¶
RegisterProcessorFunc registers a new ProcessorFunc and returns the processor id
func (*Blero) UnregisterProcessor ¶
UnregisterProcessor unregisters a processor No more jobs will be assigned but if will not cancel a job that already started processing
type ProcessorFunc ¶
ProcessorFunc is a processor function
func (ProcessorFunc) Run ¶
func (pf ProcessorFunc) Run(j *Job) error
Run allows using ProcessorFunc as a Processor
Click to show internal directories.
Click to hide internal directories.