Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultLogger ¶
func SetDefaultLogger() pgq.WorkerOption
Types ¶
type CallbackWithContext ¶
type CallbackWithContext struct {
// contains filtered or unexported fields
}
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer implements messaging.Consumer and interface.autoscaler.qbas.Queue
func NewConsumer ¶
func NewConsumer(db *sql.DB, queueName string, opts ...ConsumerOption) *Consumer
NewConsumer returns a pg queue consumer. A consumer cannot share the worker with another instance
type ConsumerOption ¶
type ConsumerOption func(o *Consumer)
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher implements messaging.Publisher
func NewPublisher ¶
func NewPublisher(w *pgq.Worker, queueName string, opts ...PublisherOption) *Publisher
NewPublisher returns a pg queue publisher. A publisher can share its worker with another instance
type PublisherOption ¶
type PublisherOption func(o *Publisher)
func WithJobRetryWaits ¶ added in v1.0.1
func WithJobRetryWaits(waits []time.Duration) PublisherOption
func WithMaxRetries ¶
func WithMaxRetries(maxRetries int) PublisherOption
Click to show internal directories.
Click to hide internal directories.