Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { AsyncWorker bool AsyncPoolSize int32 ConnectionString string ConnectionConfig amqp.Config ExchangeName string QueueName string ConsumerName string QueueDurable bool QueueArguments map[string]interface{} QueueAutoDelete bool QueueExclusive bool QueueNoWait bool QueueAutoACK bool PrefetchCount int UseDelayedQueue bool DelayedQueueArguments map[string]interface{} DefaultRetryCount int32 DefaultRetryDelay time.Duration }
Configuration is basic configuration for worker
type RunnableConsumer ¶
type RunnableConsumer interface {
ProcessQueueTask(amqpMSG *amqp.Delivery) (retryCnt int32, retryDelay time.Duration, err error)
}
RunnableConsumer interface for processing function
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker basic client
func NewWorker ¶
func NewWorker(config *Configuration, processor RunnableConsumer) (*Worker, chan error)
NewWorker returns main worker base
Click to show internal directories.
Click to hide internal directories.