celery

package
v0.0.0-...-d4cb73b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIMEApplicationJSON = "application/json"
)

Variables

View Source
var (
	ErrIDMissing              = errors.New("celery: task id missing from header")
	ErrTaskMissing            = errors.New("celery: task missing from header")
	ErrUnsupportedContentType = errors.New("celery: unsupported media type")
	ErrBadJSONBody            = errors.New("celery: bad JSON body")
)

Functions

This section is empty.

Types

type Binder

type Binder struct {
}

func NewBinder

func NewBinder() *Binder

func (Binder) Bind

func (Binder) Bind(ctx worq.Context, v interface{}) error

func (Binder) Unbind

func (Binder) Unbind(ctx worq.Context, id string, queue string, sig *worq.Signature) (*worq.Publishing, error)

type Protocol

type Protocol struct {
}

func New

func New() *Protocol

func (Protocol) ID

func (Protocol) ID(msg worq.Message) (string, error)

func (Protocol) Task

func (Protocol) Task(msg worq.Message) (string, error)

type TaskArgs

type TaskArgs []interface{}

type TaskBody

type TaskBody [3]json.RawMessage

TaskBody is a 3-length array with the shape: [TaskArgs, TaskKWArgs, TaskEmbed]

type TaskEmbed

type TaskEmbed struct {
	Callbacks []*TaskSignature `json:"callbacks"`
	Errbacks  []*TaskSignature `json:"errbacks"`
	Chain     []*TaskSignature `json:"chain"`
	Chord     *TaskSignature   `json:"chord"`
}

type TaskKWArgs

type TaskKWArgs map[string]interface{}

type TaskSignature

type TaskSignature struct {
	Task    string                 `json:"task"`
	Args    []interface{}          `json:"args"`
	KWArgs  map[string]interface{} `json:"kwargs"`
	Options map[string]interface{} `json:"options"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL