Documentation
¶
Index ¶
- type Client
- func (c *Client) GetQueue(ctx context.Context, name string) (*schema.QueueWithStatus, error)
- func (c *Client) GetTask(ctx context.Context, id uint64) (*schema.TaskWithStatus, error)
- func (c *Client) GetTicker(ctx context.Context, name string) (*schema.Ticker, error)
- func (c *Client) ListQueues(ctx context.Context, req schema.QueueListRequest) (*schema.QueueList, error)
- func (c *Client) ListTasks(ctx context.Context, req schema.TaskListRequest) (*schema.TaskList, error)
- func (c *Client) ListTickers(ctx context.Context, req schema.TickerListRequest) (*schema.TickerList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a pgqueue HTTP client that wraps the base HTTP client and provides typed methods for interacting with the pgqueue API.
func New ¶
New creates a new pgqueue HTTP client with the given base URL and options. The url parameter should point to the API endpoint, e.g. "http://localhost:8080/api" - each method includes its own path, such as "queue", matching how httphandler registers its routes.
func (*Client) GetTask ¶ added in v1.4.3
GetTask returns a task by id, with its status. The task isn't retained or changed
func (*Client) ListQueues ¶
func (c *Client) ListQueues(ctx context.Context, req schema.QueueListRequest) (*schema.QueueList, error)
ListQueues returns a page of queues, in name order, with the total number of queues
func (*Client) ListTasks ¶
func (c *Client) ListTasks(ctx context.Context, req schema.TaskListRequest) (*schema.TaskList, error)
ListTasks returns a page of tasks, oldest first, with the total number of tasks matching the request, which can have a status
func (*Client) ListTickers ¶
func (c *Client) ListTickers(ctx context.Context, req schema.TickerListRequest) (*schema.TickerList, error)
ListTickers returns a page of tickers in name order, with the total number of tickers