job

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package job represents our SiteHost `/job` endpoint

Index

Constants

View Source
const (
	// SchedulerType is a job that runs on a scheduler,  I am sure someone can fill this out more.
	SchedulerType string = "scheduler"

	// DaemonType is a job that runs on a daemon, I am sure someone can fill this out more.
	DaemonType = "daemon"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a Service to work with API Jobs.

func New

func New(c *api.Client) *Client

New is an initialisation function.

func (*Client) Get

func (s *Client) Get(ctx context.Context, request GetRequest) (response GetResponse, err error)

Get information about a job.

type GetRequest

type GetRequest struct {
	JobID string `json:"job_id"`
	Type  string `json:"type"`
}

GetRequest represents a SiteHost request for GET job api endpoint.

type GetResponse

type GetResponse struct {
	Return models.JobDetails `json:"return"`
	models.APIResponse
}

GetResponse represents a SiteHost response for GET job api endpoint.

Jump to

Keyboard shortcuts

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