api

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPApiClient

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

HTTPApiClient talks to the dureq monitoring HTTP API.

func NewHTTPApiClient

func NewHTTPApiClient(baseURL string) *HTTPApiClient

func (*HTTPApiClient) CancelBatch

func (a *HTTPApiClient) CancelBatch(id string) error

func (*HTTPApiClient) CancelJob

func (a *HTTPApiClient) CancelJob(id string) error

func (*HTTPApiClient) CancelWorkflow

func (a *HTTPApiClient) CancelWorkflow(id string) error

func (*HTTPApiClient) GetBatch

func (a *HTTPApiClient) GetBatch(id string) (*types.BatchInstance, error)

func (*HTTPApiClient) GetJob

func (a *HTTPApiClient) GetJob(id string) (*types.Job, error)

func (*HTTPApiClient) GetStats

func (a *HTTPApiClient) GetStats() (*StatsResponse, error)

func (*HTTPApiClient) GetWorkflow

func (a *HTTPApiClient) GetWorkflow(id string) (*types.WorkflowInstance, error)

func (*HTTPApiClient) Health

func (a *HTTPApiClient) Health() error

func (*HTTPApiClient) ListBatches

func (a *HTTPApiClient) ListBatches(status string) ([]*types.BatchInstance, error)

func (*HTTPApiClient) ListDLQ

func (a *HTTPApiClient) ListDLQ(limit int) ([]json.RawMessage, error)

func (*HTTPApiClient) ListHistoryRuns

func (a *HTTPApiClient) ListHistoryRuns(status, jobID string) ([]*types.JobRun, error)

func (*HTTPApiClient) ListJobs

func (a *HTTPApiClient) ListJobs(status string) ([]*types.Job, error)

func (*HTTPApiClient) ListNodes

func (a *HTTPApiClient) ListNodes() ([]*types.NodeInfo, error)

func (*HTTPApiClient) ListQueues

func (a *HTTPApiClient) ListQueues() ([]QueueInfo, error)

func (*HTTPApiClient) ListSchedules

func (a *HTTPApiClient) ListSchedules() ([]*types.ScheduleEntry, error)

func (*HTTPApiClient) ListWorkflows

func (a *HTTPApiClient) ListWorkflows(status string) ([]*types.WorkflowInstance, error)

func (*HTTPApiClient) PauseQueue

func (a *HTTPApiClient) PauseQueue(tierName string) error

func (*HTTPApiClient) ResumeQueue

func (a *HTTPApiClient) ResumeQueue(tierName string) error

func (*HTTPApiClient) RetryBatch

func (a *HTTPApiClient) RetryBatch(id string) error

func (*HTTPApiClient) RetryJob

func (a *HTTPApiClient) RetryJob(id string) error

func (*HTTPApiClient) RetryWorkflow

func (a *HTTPApiClient) RetryWorkflow(id string) error

type QueueInfo

type QueueInfo struct {
	Name       string `json:"name"`
	Weight     int    `json:"weight"`
	FetchBatch int    `json:"fetch_batch"`
	Paused     bool   `json:"paused"`
	Size       int64  `json:"size"`
}

QueueInfo mirrors monitor.QueueInfo.

type StatsResponse

type StatsResponse struct {
	JobCounts       map[string]int `json:"job_counts"`
	ActiveSchedules int            `json:"active_schedules"`
	ActiveRuns      int            `json:"active_runs"`
	ActiveNodes     int            `json:"active_nodes"`
}

StatsResponse mirrors monitor.statsResponse.

Jump to

Keyboard shortcuts

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