client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2016 License: Apache-2.0 Imports: 8 Imported by: 217

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrorUnitNotFound added in v0.12.0

func IsErrorUnitNotFound(err error) bool

Types

type API

type API interface {
	Machines() ([]machine.MachineState, error)
	SetMachineMetadata(machID, key, value string) error
	DeleteMachineMetadata(machID, key string) error

	Unit(string) (*schema.Unit, error)
	Units() ([]*schema.Unit, error)
	UnitState(string) (*schema.UnitState, error)
	UnitStates() ([]*schema.UnitState, error)

	SetUnitTargetState(name, target string) error
	CreateUnit(*schema.Unit) error
	DestroyUnit(string) error
}

func NewHTTPClient

func NewHTTPClient(c *http.Client, ep url.URL) (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) CreateUnit added in v0.7.0

func (c *HTTPClient) CreateUnit(u *schema.Unit) error

func (*HTTPClient) DestroyUnit added in v0.7.0

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

func (*HTTPClient) Machines

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

func (*HTTPClient) SetUnitTargetState added in v0.7.0

func (c *HTTPClient) SetUnitTargetState(name, target string) error

func (*HTTPClient) Unit added in v0.7.0

func (c *HTTPClient) Unit(name string) (*schema.Unit, error)

func (*HTTPClient) UnitState added in v1.0.0

func (c *HTTPClient) UnitState(name string) (*schema.UnitState, error)

func (*HTTPClient) UnitStates added in v0.7.0

func (c *HTTPClient) UnitStates() ([]*schema.UnitState, error)

func (*HTTPClient) Units added in v0.7.0

func (c *HTTPClient) Units() ([]*schema.Unit, error)

type RegistryClient added in v0.7.0

type RegistryClient struct {
	registry.Registry
}

func (*RegistryClient) CreateUnit added in v0.7.0

func (rc *RegistryClient) CreateUnit(u *schema.Unit) error

func (*RegistryClient) SetUnitTargetState added in v0.7.0

func (rc *RegistryClient) SetUnitTargetState(name, target string) error

func (*RegistryClient) Unit added in v0.7.0

func (rc *RegistryClient) Unit(name string) (*schema.Unit, error)

func (*RegistryClient) UnitState added in v1.0.0

func (rc *RegistryClient) UnitState(name string) (*schema.UnitState, error)

func (*RegistryClient) UnitStates added in v0.7.0

func (rc *RegistryClient) UnitStates() ([]*schema.UnitState, error)

func (*RegistryClient) Units added in v0.7.0

func (rc *RegistryClient) Units() ([]*schema.Unit, error)

Jump to

Keyboard shortcuts

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