Documentation ¶
Index ¶
- Variables
- func NewDataUnit(component string, machineID string) (uf *unit.UnitFile, err error)
- func NewUnit(component string) (uf *unit.UnitFile, err error)
- type FleetClient
- func (c *FleetClient) Create(targets []string) error
- func (c *FleetClient) Destroy(targets []string) error
- func (c *FleetClient) GetLocaljobs() sort.StringSlice
- func (c *FleetClient) Journal(target string) (err error)
- func (c *FleetClient) ListUnitFiles() (err error)
- func (c *FleetClient) ListUnits() (err error)
- func (c *FleetClient) Scale(component string, requested int) error
- func (c *FleetClient) Start(targets []string) error
- func (c *FleetClient) Status(target string) (err error)
- func (c *FleetClient) Stop(targets []string) error
- func (c *FleetClient) Units(target string) (units []string, err error)
Constants ¶
This section is empty.
Variables ¶
var Flags = struct { Debug bool Version bool Endpoint string EtcdKeyPrefix string EtcdKeyFile string EtcdCertFile string EtcdCAFile string UseAPI bool KnownHostsFile string StrictHostKeyChecking bool Tunnel string RequestTimeout float64 }{}
Flags used for Fleet API connectivity
Functions ¶
func NewDataUnit ¶
NewDataUnit takes a component type and returns a Fleet unit that is hard-scheduled to a machine ID
Types ¶
type FleetClient ¶
FleetClient used to wrap Fleet API calls
func NewClient ¶
func NewClient() (*FleetClient, error)
NewClient returns a client used to communicate with Fleet using the Registry API
func (*FleetClient) Create ¶
func (c *FleetClient) Create(targets []string) error
Create schedules a new unit for the given component and blocks until the unit is loaded
func (*FleetClient) Destroy ¶
func (c *FleetClient) Destroy(targets []string) error
Destroy units for a given target
func (*FleetClient) GetLocaljobs ¶
func (c *FleetClient) GetLocaljobs() sort.StringSlice
func (*FleetClient) Journal ¶
func (c *FleetClient) Journal(target string) (err error)
Journal prints the systemd journal of target unit(s)
func (*FleetClient) ListUnitFiles ¶
func (c *FleetClient) ListUnitFiles() (err error)
ListUnitFiles prints all Deis-related unit files to Stdout
func (*FleetClient) ListUnits ¶
func (c *FleetClient) ListUnits() (err error)
ListUnits prints all Deis-related units to Stdout
func (*FleetClient) Scale ¶
func (c *FleetClient) Scale(component string, requested int) error
Scale creates or destroys units to match the desired number
func (*FleetClient) Start ¶
func (c *FleetClient) Start(targets []string) error
Start launches target units and blocks until active
func (*FleetClient) Status ¶
func (c *FleetClient) Status(target string) (err error)
Status prints the systemd status of target unit(s)
func (*FleetClient) Stop ¶
func (c *FleetClient) Stop(targets []string) error
Stop sets target units to inactive and blocks until complete