Documentation
¶
Index ¶
- type Broker
- func (b *Broker) Consume(pipe *jobs.Pipeline, execPool chan jobs.Handler, errHandler jobs.ErrorHandler) error
- func (b *Broker) Init(cfg *Config) (bool, error)
- func (b *Broker) Listen(lsn func(event int, ctx interface{}))
- func (b *Broker) Push(pipe *jobs.Pipeline, j *jobs.Job) (string, error)
- func (b *Broker) Register(pipe *jobs.Pipeline) error
- func (b *Broker) Serve() (err error)
- func (b *Broker) Stat(pipe *jobs.Pipeline) (stat *jobs.Stat, err error)
- func (b *Broker) Stop()
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker run consume using Broker service.
func (*Broker) Consume ¶ added in v1.0.0
func (b *Broker) Consume(pipe *jobs.Pipeline, execPool chan jobs.Handler, errHandler jobs.ErrorHandler) error
Consume configures pipeline to be consumed. With execPool to nil to reset consuming. Method can be called before the service is started!
type Config ¶
type Config struct { // Addr of beanstalk server. Addr string // Timeout to allocate the connection. Default 10 seconds. Timeout int }
Config defines beanstalk broker configuration.
func (*Config) TimeoutDuration ¶ added in v1.0.0
TimeoutDuration returns number of seconds allowed to allocate the connection.
Click to show internal directories.
Click to hide internal directories.