client

package
v0.0.0-...-e65d92b Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	models.ErrorResponse
}

func (*APIError) Conflict

func (e *APIError) Conflict() bool

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) NotFound

func (e *APIError) NotFound() bool

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(o *Opt) *Client

func (*Client) CancelJob

func (c *Client) CancelJob(ctx context.Context, id string, version int32) (models.JobResponse, error)

func (*Client) DeleteJob

func (c *Client) DeleteJob(ctx context.Context, id string) error

func (*Client) GetAttemptLogs

func (c *Client) GetAttemptLogs(ctx context.Context, jobID, attemptID string, q LogQuery) (models.JobLogListResponse, error)

func (*Client) GetHandler

func (c *Client) GetHandler(ctx context.Context, name string) (models.HandlerDetailResponse, error)

func (*Client) GetHandlers

func (c *Client) GetHandlers(ctx context.Context) (models.HandlerListResponse, error)

func (*Client) GetJob

func (c *Client) GetJob(ctx context.Context, id string) (models.JobResponse, error)

func (*Client) GetJobAttempts

func (c *Client) GetJobAttempts(ctx context.Context, id string, q PageQuery) (models.JobAttemptListResponse, error)

func (*Client) GetJobs

func (c *Client) GetJobs(ctx context.Context, q JobQuery) (models.JobListResponse, error)

func (*Client) GetQueues

func (c *Client) GetQueues(ctx context.Context) (models.QueueListResponse, error)

func (*Client) GetWorkers

func (c *Client) GetWorkers(ctx context.Context) (models.WorkerListResponse, error)

func (*Client) PauseJob

func (c *Client) PauseJob(ctx context.Context, id string, version int32, paused bool) (models.JobResponse, error)

func (*Client) PostJob

func (c *Client) PostJob(ctx context.Context, j models.CreateJobRequest, idempotencyKey string) (models.JobResponse, error)

func (*Client) RerunJob

func (c *Client) RerunJob(ctx context.Context, id string, version int32) (models.JobResponse, error)

func (*Client) RescheduleJob

func (c *Client) RescheduleJob(ctx context.Context, id string, s models.RescheduleRequest) (models.JobResponse, error)

type JobQuery

type JobQuery struct {
	States  []string
	Queue   string
	Handler string
	JobType string
	Search  string
	Limit   int32
	Offset  int32
}

type LogQuery

type LogQuery struct {
	AfterSeq int32
	Limit    int32
}

type Opt

type Opt struct {
	RootURL    string
	HTTPClient *http.Client
}

type PageQuery

type PageQuery struct {
	Limit  int32
	Offset int32
}

Jump to

Keyboard shortcuts

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