Versions in this module Expand all Collapse all v1 v1.0.3 Jul 10, 2020 v1.0.2 Jul 10, 2020 Changes in this version + func GetRealValue(val *reflect.Value) interface + func NewAMQPConnection(host string) (*amqp.Connection, *amqp.Channel) + func NewRedisPool(uri string) *redis.Pool + type AMQPCeleryBackend struct + func NewAMQPCeleryBackend(host string) *AMQPCeleryBackend + func NewAMQPCeleryBackendByConnAndChannel(conn *amqp.Connection, channel *amqp.Channel) *AMQPCeleryBackend + func (b *AMQPCeleryBackend) GetResult(taskID string) (*ResultMessage, error) + func (b *AMQPCeleryBackend) Reconnect() + func (b *AMQPCeleryBackend) SetResult(taskID string, result *ResultMessage) error + type AMQPCeleryBroker struct + func NewAMQPCeleryBroker(host string) *AMQPCeleryBroker + func NewAMQPCeleryBrokerByConnAndChannel(conn *amqp.Connection, channel *amqp.Channel) *AMQPCeleryBroker + func (b *AMQPCeleryBroker) CreateExchange() error + func (b *AMQPCeleryBroker) CreateQueue() error + func (b *AMQPCeleryBroker) GetTaskMessage() (*TaskMessage, error) + func (b *AMQPCeleryBroker) SendCeleryMessage(message *CeleryMessage) error + func (b *AMQPCeleryBroker) StartConsumingChannel() error + type AMQPExchange struct + AutoDelete bool + Durable bool + Name string + Type string + func NewAMQPExchange(name string) *AMQPExchange + type AMQPQueue struct + AutoDelete bool + Durable bool + Name string + func NewAMQPQueue(name string) *AMQPQueue + type AsyncResult struct + TaskID string + func (ar *AsyncResult) AsyncGet() (interface{}, error) + func (ar *AsyncResult) Get(timeout time.Duration) (interface{}, error) + func (ar *AsyncResult) Ready() (bool, error) + type CeleryBackend interface + GetResult func(string) (*ResultMessage, error) + SetResult func(taskID string, result *ResultMessage) error + type CeleryBroker interface + GetTaskMessage func() (*TaskMessage, error) + SendCeleryMessage func(*CeleryMessage) error + type CeleryClient struct + func NewCeleryClient(broker CeleryBroker, backend CeleryBackend, numWorkers int) (*CeleryClient, error) + func (cc *CeleryClient) Delay(task string, args ...interface{}) (*AsyncResult, error) + func (cc *CeleryClient) DelayKwargs(task string, args map[string]interface{}) (*AsyncResult, error) + func (cc *CeleryClient) Register(name string, task interface{}) + func (cc *CeleryClient) StartWorker() + func (cc *CeleryClient) StartWorkerWithContext(ctx context.Context) + func (cc *CeleryClient) StopWorker() + func (cc *CeleryClient) WaitForStopWorker() + type CeleryDeliveryInfo struct + Exchange string + Priority int + RoutingKey string + type CeleryMessage struct + Body string + ContentEncoding string + ContentType string + Headers map[string]interface{} + Properties CeleryProperties + func (cm *CeleryMessage) GetTaskMessage() *TaskMessage + type CeleryProperties struct + BodyEncoding string + CorrelationID string + DeliveryInfo CeleryDeliveryInfo + DeliveryMode int + DeliveryTag string + ReplyTo string + type CeleryTask interface + ParseKwargs func(map[string]interface{}) error + RunTask func() (interface{}, error) + type CeleryWorker struct + func NewCeleryWorker(broker CeleryBroker, backend CeleryBackend, numWorkers int) *CeleryWorker + func (w *CeleryWorker) GetNumWorkers() int + func (w *CeleryWorker) GetTask(name string) interface{} + func (w *CeleryWorker) Register(name string, task interface{}) + func (w *CeleryWorker) RunTask(message *TaskMessage) (*ResultMessage, error) + func (w *CeleryWorker) StartWorker() + func (w *CeleryWorker) StartWorkerWithContext(ctx context.Context) + func (w *CeleryWorker) StopWait() + func (w *CeleryWorker) StopWorker() + type RedisCeleryBackend struct + func NewRedisBackend(conn *redis.Pool) *RedisCeleryBackend + func NewRedisCeleryBackend(uri string) *RedisCeleryBackend + func (cb *RedisCeleryBackend) GetResult(taskID string) (*ResultMessage, error) + func (cb *RedisCeleryBackend) SetResult(taskID string, result *ResultMessage) error + type RedisCeleryBroker struct + func NewRedisBroker(conn *redis.Pool) *RedisCeleryBroker + func NewRedisCeleryBroker(uri string) *RedisCeleryBroker + func (cb *RedisCeleryBroker) GetCeleryMessage() (*CeleryMessage, error) + func (cb *RedisCeleryBroker) GetTaskMessage() (*TaskMessage, error) + func (cb *RedisCeleryBroker) SendCeleryMessage(message *CeleryMessage) error + func (cb *RedisCeleryBroker) SetQueueName(queueName string) + type ResultMessage struct + Children []interface{} + ID string + Result interface{} + Status string + Traceback interface{} + type TaskMessage struct + Args []interface{} + ETA *string + ID string + Kwargs map[string]interface{} + Retries int + Task string + func DecodeTaskMessage(encodedBody string) (*TaskMessage, error) + func (tm *TaskMessage) Encode() (string, error)