client

package
v1.5.17 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

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