types

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConnectionClosed = errors.New("The connection to the backend is closed")
View Source
var NotImplemented = errors.New("This method is not implemented on this backend")
View Source
var QueueNotFound = errors.New("I don't know any queue by that name")
View Source
var SubscriptionCancelled = errors.New("This subscription has been cancelled")
View Source
var UnknownBackend = errors.New("I have never heard of that backend")

Functions

This section is empty.

Types

type HTTPError added in v3.0.9

type HTTPError struct {
	Status int
	Error  error
}

type Handler

type Handler interface {
	Handle(Task) (bool, error)
}

type Tags

type Tags map[string]string

func (Tags) Get added in v3.0.9

func (tags Tags) Get(key string) string

func (*Tags) Scan

func (tags *Tags) Scan(value interface{}) error

func (*Tags) Set added in v3.0.9

func (tags *Tags) Set(key, value string)

func (Tags) Value

func (tags Tags) Value() (driver.Value, error)

type Task

type Task struct {
	ID           string        `json:"id"`
	Body         string        `json:"body"`
	Delay        time.Duration `json:"delay"` // Delay overrides RunAt
	RunAt        time.Time     `json:"run_at"`
	NoExpBackoff bool          `json:"no_exp_backoff"`
	Attempts     int           `json:"attempts"`
	Tags         Tags          `json:"tags"`
	QueueName    string        `json:"queue_name"`
	Token        string        `json:"token"`
	Timeout      time.Duration `json:"timeout"`
}

func (Task) Checksum added in v3.0.9

func (t Task) Checksum() string

func (*Task) FromHTTP added in v3.0.9

func (t *Task) FromHTTP(r *http.Request) error

func (*Task) Marshal

func (t *Task) Marshal(source interface{}) (err error)

func (*Task) Sign added in v3.0.9

func (t *Task) Sign(secret string) error

func (Task) Unmarshal

func (t Task) Unmarshal(res interface{}) (err error)

func (Task) VerifySignature added in v3.0.9

func (task Task) VerifySignature(secret string) error

Jump to

Keyboard shortcuts

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