Documentation
¶
Overview ¶
Package durablequeue provides a scoped client for the durable work queue. A 204 claim response means no task is claimable now, not that the run ended.
Index ¶
- Variables
- type Client
- func (c *Client) Claim(ctx context.Context, run, worker string, lease time.Duration) (Lease, bool, error)
- func (c *Client) Complete(ctx context.Context, run string, l Lease, result json.RawMessage) error
- func (c *Client) CreateRun(ctx context.Context, run string) error
- func (c *Client) Enqueue(ctx context.Context, run string, tasks []Task) error
- func (c *Client) Fail(ctx context.Context, run string, l Lease, code string, retry bool, ...) error
- func (c *Client) Renew(ctx context.Context, run string, l Lease, lease time.Duration) error
- func (c *Client) Seal(ctx context.Context, run string, expected int64) error
- func (c *Client) SetPaused(ctx context.Context, run string, paused bool) error
- func (c *Client) Stats(ctx context.Context, run string) (Stats, error)
- type Config
- type Lease
- type Stats
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConflict = errors.New("durablequeue: conflict or stale lease")
View Source
var ErrInvalid = errors.New("durablequeue: invalid request")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
URL, Token, TokenFile string
Timeout time.Duration
Transport http.RoundTripper
}
Click to show internal directories.
Click to hide internal directories.