client

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client
}

func New

func New(url string, opts ...client.ClientOpt) (*Client, error)

Create a new client

func (*Client) CleanQueue

func (c *Client) CleanQueue(ctx context.Context, name string) ([]schema.Task, error)

func (*Client) CreateQueue

func (c *Client) CreateQueue(ctx context.Context, meta schema.QueueMeta) (*schema.Queue, error)

func (*Client) CreateTask

func (c *Client) CreateTask(ctx context.Context, queue string, task schema.TaskMeta) (*schema.Task, error)

func (*Client) CreateTicker

func (c *Client) CreateTicker(ctx context.Context, meta schema.TickerMeta) (*schema.Ticker, error)

func (*Client) DeleteQueue

func (c *Client) DeleteQueue(ctx context.Context, name string) error

func (*Client) DeleteTicker

func (c *Client) DeleteTicker(ctx context.Context, name string) error

func (*Client) GetQueue

func (c *Client) GetQueue(ctx context.Context, name string) (*schema.Queue, error)

func (*Client) GetTicker

func (c *Client) GetTicker(ctx context.Context, name string) (*schema.Ticker, error)

func (*Client) ListQueues

func (c *Client) ListQueues(ctx context.Context, opts ...Opt) (*schema.QueueList, error)

func (*Client) ListTickers

func (c *Client) ListTickers(ctx context.Context, opts ...Opt) (*schema.TickerList, error)

func (*Client) NextTicker

func (c *Client) NextTicker(ctx context.Context) error

func (*Client) ReleaseTask

func (c *Client) ReleaseTask(ctx context.Context, task uint64, err error) (*schema.TaskWithStatus, error)

func (*Client) RetainTask

func (c *Client) RetainTask(ctx context.Context, opts ...Opt) (*schema.Task, error)

func (*Client) UpdateQueue

func (c *Client) UpdateQueue(ctx context.Context, name string, meta schema.QueueMeta) (*schema.Queue, error)

func (*Client) UpdateTicker

func (c *Client) UpdateTicker(ctx context.Context, name string, meta schema.TickerMeta) (*schema.Ticker, error)

type Opt

type Opt func(*opt) error

An Option to set on the client

func OptSet

func OptSet(k, v string) Opt

func WithOffsetLimit

func WithOffsetLimit(offset uint64, limit *uint64) Opt

Set offset and limit

func WithWorker

func WithWorker(v string) Opt

With worker name

Jump to

Keyboard shortcuts

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