fleet

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2015 License: MIT Imports: 5 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 {
	URL string
}

func NewClient

func NewClient(url string) *Client

NewClient creates a basic client that is configured to be used with the given fleet HTTP API URL.

func (*Client) Destroy

func (c *Client) Destroy(name string) error

func (*Client) Load

func (c *Client) Load(name string) error

func (*Client) Machines

func (c *Client) Machines() ([]Machine, error)

func (*Client) Start

func (c *Client) Start(name string) error

func (*Client) Stop

func (c *Client) Stop(name string) error

func (*Client) Submit

func (c *Client) Submit(name string, opts []*UnitOption, targetState string) error

func (*Client) UnitStates

func (c *Client) UnitStates()

func (*Client) Units

func (c *Client) Units() ([]Unit, error)

func (*Client) Unload

func (c *Client) Unload(name string) error

type Error

type Error struct{}

TODO See for more information about the fleet API's error https://github.com/coreos/fleet/blob/master/Documentation/api-v1.md#error-communication

type Machine

type Machine struct {
	ID        string            `json:"id,omitempty"`
	PrimaryIP string            `json:"primaryIP,omitempty"`
	Metadata  map[string]string `json:"metadata,omitempty"`
}

type Unit

type Unit struct {
	Name         string        `json:"name,omitempty"`
	Options      []*UnitOption `json:"options,omitempty"`
	DesiredState string        `json:"desiredState,omitempty"`
	CurrentState string        `json:"currentState,omitempty"`
	MachineID    string        `json:"machineID,omitempty"`
}

type UnitOption

type UnitOption struct {
	Section string `json:"section,omitempty"`
	Name    string `json:"name,omitempty"`
	Value   string `json:"value,omitempty"`
}

type UnitState

type UnitState struct{}

Jump to

Keyboard shortcuts

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