{"modulePath":"github.com/mutablelogic/go-pg","version":"v1.5.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpclient\n\n## Types\n\n```go\ntype Client struct {\n\t*client.Client\n\t// contains filtered or unexported fields\n}\n```\nClient is a pgqueue HTTP client that wraps the base HTTP client and provides typed methods for interacting with the pgqueue API.\n\n```go\nfunc New(url string, opts ...client.ClientOpt) (*Client, error)\n```\nNew 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](http://localhost:8080/api)\" - each method includes its own path, such as \"queue\", matching how httphandler registers its routes.\n\n```go\nfunc (c *Client) CleanQueue(ctx context.Context, name string) (*schema.QueueCleanResponse, error)\n```\nCleanQueue deletes up to 100 of a queue's done and failed tasks, which finished longer ago than the retention period, and returns them\n\n```go\nfunc (c *Client) DeleteQueue(ctx context.Context, name string) (*schema.Queue, error)\n```\nDeleteQueue deletes a queue, with all its tasks, and returns it\n\n```go\nfunc (c *Client) GetQueue(ctx context.Context, name string) (*schema.QueueWithStatus, error)\n```\nGetQueue returns a queue by name\n\n```go\nfunc (c *Client) GetTask(ctx context.Context, id uint64) (*schema.TaskWithStatus, error)\n```\nGetTask returns a task by id, with its status. The task isn't retained or changed\n\n```go\nfunc (c *Client) GetTicker(ctx context.Context, name string) (*schema.Ticker, error)\n```\nGetTicker returns a ticker by name\n\n```go\nfunc (c *Client) ListQueues(ctx context.Context, req schema.QueueListRequest) (*schema.QueueList, error)\n```\nListQueues returns a page of queues, in name order, with the total number of queues\n\n```go\nfunc (c *Client) ListTasks(ctx context.Context, req schema.TaskListRequest) (*schema.TaskList, error)\n```\nListTasks returns a page of tasks, by priority, highest first, which is the lowest, and then oldest first, with the total number of tasks matching the request, which can have a status\n\n```go\nfunc (c *Client) ListTickers(ctx context.Context, req schema.TickerListRequest) (*schema.TickerList, error)\n```\nListTickers returns a page of tickers in name order, with the total number of tickers\n\n```go\nfunc (c *Client) UpdateQueue(ctx context.Context, name string, meta schema.QueueMeta) (*schema.Queue, error)\n```\nUpdateQueue changes a queue's settings, keeping those which aren't set, and returns the queue\n\n```go\nfunc (c *Client) UpdateTask(ctx context.Context, id uint64, req schema.TaskUpdate) (*schema.TaskWithStatus, error)\n```\nUpdateTask changes the priority of a task which hasn't run yet, so is new, delayed, or waiting to be retried, and returns it, with its status\n\n","path":"github.com/mutablelogic/go-pg/pgqueue/httpclient","name":"httpclient","synopsis":"","isRedistributable":true}
