httpclient

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 4 Imported by: ? 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
	// contains filtered or unexported fields
}

Client is a pgqueue HTTP client that wraps the base HTTP client and provides typed methods for interacting with the pgqueue API.

func New

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

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) GetQueue added in v1.4.3

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

GetQueue returns a queue by name

func (*Client) GetTask added in v1.4.3

func (c *Client) GetTask(ctx context.Context, id uint64) (*schema.TaskWithStatus, error)

GetTask returns a task by id, with its status. The task isn't retained or changed

func (*Client) GetTicker added in v1.4.3

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

GetTicker returns a ticker by name

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

Jump to

Keyboard shortcuts

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