models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupReq

type GroupReq struct {
	GroupID     string   `json:"group_id"`
	Concurrency int      `json:"concurrency"`
	Jobs        []JobReq `json:"jobs"`
}

GroupReq represents a Jobrequest group.

type GroupResp

type GroupResp struct {
	GroupID string    `json:"group_id"`
	Jobs    []JobResp `json:"jobs"`
}

GroupResp is the response sent to a group job request.

type GroupStatusResp

type GroupStatusResp struct {
	GroupID string          `json:"group_id"`
	State   string          `json:"state"`
	Jobs    []JobStatusResp `json:"jobs"`
}

GroupStatusResp represents the status of a group job.

type HTTPResp

type HTTPResp struct {
	Status  string      `json:"status"`
	Message string      `json:"message,omitempty"`
	Data    interface{} `json:"data"`
}

HTTPResp represents a container for generic outgoing HTTP responses.

type JobReq

type JobReq struct {
	TaskName string   `json:"task"`
	JobID    string   `json:"job_id"`
	Queue    string   `json:"queue"`
	ETA      string   `json:"eta"`
	Retries  int      `json:"retries"`
	TTL      int      `json:"ttl"`
	Args     []string `json:"args"`
	DB       string   `json:"db"`
	// contains filtered or unexported fields
}

JobReq represents a job request.

type JobResp

type JobResp struct {
	JobID    string     `json:"job_id"`
	TaskName string     `json:"task"`
	Queue    string     `json:"queue"`
	ETA      *time.Time `json:"eta"`
	Retries  int        `json:"retries"`
}

JobResp is the response sent to a job request.

type JobStatusResp

type JobStatusResp struct {
	JobID   string              `json:"job_id"`
	State   string              `json:"state"`
	Results []*tasks.TaskResult `json:"results"`
	Error   string              `json:"error"`
}

JobStatusResp represents the response of a single job.

Jump to

Keyboard shortcuts

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