Documentation ¶
Index ¶
- Variables
- func Dial(url string) (*amqp.Connection, error)
- type Dialer
- type Option
- type Options
- type Worker
- func (*Worker) DeleteJob(_, _ string) error
- func (w *Worker) Perform(job worker.Job) (*worker.JobInfo, error)
- func (w *Worker) PerformAt(job worker.Job, t time.Time) (*worker.JobInfo, error)
- func (w *Worker) PerformIn(job worker.Job, t time.Duration) (*worker.JobInfo, error)
- func (w *Worker) Register(name string, handler worker.Handler) error
- func (w *Worker) Start() error
- func (w *Worker) Stop() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidConnection = errors.New("invalid connection")
ErrInvalidConnection is returned when the Connection opt is not defined.
Functions ¶
Types ¶
type Dialer ¶
type Dialer interface {
Dial(url string) (*amqp.Connection, error)
}
Dialer is the dialer interface.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option describes how options should be implemented.
func WithConnectionOption ¶
func WithConnectionOption(conn *amqp.Connection) Option
WithConnectionOption configures the connection option.
func WithExchangeOption ¶
WithExchangeOption configures the exchange option.
func WithMaxConcurrency ¶
WithMaxConcurrency configures the maxConcurrency option.
func WithNameOption ¶
WithNameOption configures the name option.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options are used to configure the AMQP worker adapter.
type Worker ¶
type Worker struct { Connection *amqp.Connection Channel *amqp.Channel Logger *zap.Logger // contains filtered or unexported fields }
Worker implements the Worker interface.
Click to show internal directories.
Click to hide internal directories.