client

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	CreateJob(*job.Job) error
	CreateSignatureSet(*sign.SignatureSet) error
	DestroyJob(string) error
	Job(string) (*job.Job, error)
	Jobs() ([]job.Job, error)
	JobSignatureSet(string) (*sign.SignatureSet, error)
	LatestVersion() (*semver.Version, error)
	Machines() ([]machine.MachineState, error)
	SetJobTargetState(string, job.JobState) error
}

func NewHTTPClient

func NewHTTPClient(c *http.Client) (API, error)

func NewRegistryClient

func NewRegistryClient(trans *http.Transport, endpoint, keyPrefix string) (API, error)

type HTTPClient

type HTTPClient struct {

	//NOTE(bcwaldon): This is only necessary until the API interface
	// is fully implemented by HTTPClient
	API
	// contains filtered or unexported fields
}

func (*HTTPClient) CreateJob

func (c *HTTPClient) CreateJob(j *job.Job) error

func (*HTTPClient) DestroyJob

func (c *HTTPClient) DestroyJob(name string) error

func (*HTTPClient) Job

func (c *HTTPClient) Job(name string) (*job.Job, error)

func (*HTTPClient) Jobs

func (c *HTTPClient) Jobs() ([]job.Job, error)

func (*HTTPClient) LatestVersion

func (c *HTTPClient) LatestVersion() (*semver.Version, error)

NOTE(bcwaldon): This is only temporary until a better version negotiation mechanism is in place

func (*HTTPClient) Machines

func (c *HTTPClient) Machines() ([]machine.MachineState, error)

func (*HTTPClient) SetJobTargetState

func (c *HTTPClient) SetJobTargetState(name string, state job.JobState) error

Jump to

Keyboard shortcuts

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