client

package
v0.0.0-...-b6e1bc8 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

This package provides an HTTP client to use with pm-enabled processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
	BaseURI string
	Headers map[string]string
}

func NewClient

func NewClient(uri string) *Client

NewClient returns a new client set to connect to the given URI.

func (*Client) History

func (c *Client) History(id string) (*pm.HistoryResponse, error)

History issues a GET to /proc/<id>/history for a given id, thus returning the complete history for the task <id> at the server.

func (*Client) Kill

func (c *Client) Kill(id, message string) error

Kill requests the cancellation of a given task. Note that it will effectively be cancelled as soon as the task reaches its next cancellation point.

func (*Client) Processes

func (c *Client) Processes() (*pm.ProcResponse, error)

Processes issues a GET to /proc, thus retrieving the full process list from the server. The result is provided as a ProcResponse.

Jump to

Keyboard shortcuts

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