Version: v1.1.0 Latest Latest

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 3 Imported by: 0




This section is empty.


View Source
var (
	Name        = "hq"
	DisplayName = "HQ"
	Version     = "unknown"
	CommitHash  = "unknown"


This section is empty.


type DeletedJob

type DeletedJob struct {
	ID uint64 `json:"id,string"`

type ErrorResponse

type ErrorResponse struct {
	Status int    `json:"status"`
	Error  string `json:"error"`

type Info

type Info struct {
	Version    string `json:"version"`
	CommitHash string `json:"commitHash"`

type Job

type Job struct {
	ID         uint64            `json:"id,string"`
	Name       string            `json:"name"`
	Comment    string            `json:"comment"`
	URL        string            `json:"url"`
	Payload    json.RawMessage   `json:"payload"`
	Headers    map[string]string `json:"headers"`
	Timeout    int64             `json:"timeout"`
	CreatedAt  time.Time         `json:"createdAt"`
	StartedAt  *time.Time        `json:"startedAt"`
	FinishedAt *time.Time        `json:"finishedAt"`
	Failure    bool              `json:"failure"`
	Success    bool              `json:"success"`
	Canceled   bool              `json:"canceled"`
	StatusCode *int              `json:"statusCode"`
	Err        string            `json:"err"`
	Output     string            `json:"output"`
	// status properties.
	Waiting bool `json:"waiting"`
	Running bool `json:"running"`

func (*Job) MarshalJSON

func (j *Job) MarshalJSON() ([]byte, error)

func (*Job) Status

func (j *Job) Status() string

type JobList

type JobList struct {
	Jobs    []*Job  `json:"jobs"`
	HasNext bool    `json:"hasNext"`
	Next    *uint64 `json:"next,string,omitempty"`
	Count   int     `json:"count"`

type ListJobsRequest

type ListJobsRequest struct {
	Name    string  `query:"name"`
	Term    string  `query:"term"`
	Begin   *uint64 `query:"begin"`
	Reverse bool    `query:"reverse"`
	Limit   int     `query:"limit"`
	Status  string  `query:"status"`

type PushJobRequest

type PushJobRequest struct {
	Name    string            `json:"name" form:"name" query:"name"`
	Comment string            `json:"comment" form:"comment" query:"comment"`
	URL     string            `json:"url" form:"url" query:"url"`
	Payload json.RawMessage   `json:"payload" form:"payload" query:"payload"`
	Headers map[string]string `json:"headers" form:"headers" query:"headers"`
	Timeout int64             `json:"timeout" form:"timeout" query:"timeout"`

type RestartJobRequest

type RestartJobRequest struct {
	Copy bool `json:"copy" form:"copy" query:"copy"`

type Stats

type Stats struct {
	Queues         int64 `json:"queues"`
	Dispatchers    int64 `json:"dispatchers"`
	MaxWorkers     int64 `json:"maxWorkers"`
	QueueUsage     int   `json:"queueUsage"`
	NumWaitingJobs int   `json:"numWaitingJobs"`
	NumRunningJobs int   `json:"numRunningJobs"`
	NumWorkers     int64 `json:"numWorkers"`
	NumJobs        int   `json:"numJobs"`

type StoppedJob

type StoppedJob struct {
	ID uint64 `json:"id,string"`

Jump to

Keyboard shortcuts

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