apiclient

package
v0.0.0-...-22e582f Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 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 Client

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

Client describes API client.

func New

func New(addr string, auth func(*http.Request) error) (*Client, error)

New creates instance of API client.

func (*Client) CreateJob

func (c *Client) CreateJob(jobEncoded []byte) error

CreateJob adds new job.

func (*Client) DeleteJob

func (c *Client) DeleteJob(fqid string) error

DeleteJob removes job.

func (*Client) FindJobs

func (c *Client) FindJobs(filter string) ([]*model.Job, error)

FindJobs returns jobs matching filter.

func (*Client) Health

func (c *Client) Health() (*HealthInfo, error)

Health returns server status info.

func (*Client) ReadJob

func (c *Client) ReadJob(fqid string) (*model.Job, error)

ReadJob returns job's info.

func (*Client) ReadTasks

func (c *Client) ReadTasks(fqid string) ([]*model.Task, error)

ReadTasks returns list of job's runs.

func (*Client) RunJob

func (c *Client) RunJob(fqid string) error

RunJob schedules job for immeddiate run.

func (*Client) UpdateJob

func (c *Client) UpdateJob(fqid string, changesEncoded []byte) error

UpdateJob modifies existing job.

type HealthInfo

type HealthInfo struct {
	Leader     bool
	Version    string
	ServerTime string
}

HealthInfo describes server status.

Jump to

Keyboard shortcuts

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