Documentation ¶
Overview ¶
Integration with the systemd machined API. See http://www.freedesktop.org/wiki/Software/systemd/machined/
Index ¶
- type Conn
- func (c *Conn) DescribeMachine(name string) (machineProps map[string]interface{}, err error)
- func (c *Conn) GetImage(name string) (dbus.ObjectPath, error)
- func (c *Conn) GetMachine(name string) (dbus.ObjectPath, error)
- func (c *Conn) GetMachineAddresses(name string) (dbus.ObjectPath, error)
- func (c *Conn) GetMachineByPID(pid uint) (dbus.ObjectPath, error)
- func (c *Conn) KillMachine(name, who string, sig syscall.Signal) error
- func (c *Conn) ListImages() ([]ImageStatus, error)
- func (c *Conn) ListMachines() ([]MachineStatus, error)
- func (c *Conn) RegisterMachine(name string, id []byte, service string, class string, pid int, ...) error
- func (c *Conn) TerminateMachine(name string) error
- type ImageStatus
- type MachineStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection to systemds dbus endpoint.
func (*Conn) DescribeMachine ¶
DescribeMachine gets the properties of a machine
func (*Conn) GetImage ¶
func (c *Conn) GetImage(name string) (dbus.ObjectPath, error)
GetImage gets a specific image with systemd-machined
func (*Conn) GetMachine ¶
func (c *Conn) GetMachine(name string) (dbus.ObjectPath, error)
GetMachine gets a specific container with systemd-machined
func (*Conn) GetMachineAddresses ¶
func (c *Conn) GetMachineAddresses(name string) (dbus.ObjectPath, error)
GetMachineAddresses gets a list of IP addresses
func (*Conn) GetMachineByPID ¶
func (c *Conn) GetMachineByPID(pid uint) (dbus.ObjectPath, error)
GetMachineByPID gets a machine specified by a PID from systemd-machined
func (*Conn) KillMachine ¶
KillMachine sends a signal to a machine
func (*Conn) ListImages ¶
func (c *Conn) ListImages() ([]ImageStatus, error)
ListImages returns an array of all currently available images.
func (*Conn) ListMachines ¶
func (c *Conn) ListMachines() ([]MachineStatus, error)
ListMachines returns an array of all currently running machines.
func (*Conn) RegisterMachine ¶
func (c *Conn) RegisterMachine(name string, id []byte, service string, class string, pid int, root_directory string) error
RegisterMachine registers the container with the systemd-machined
func (*Conn) TerminateMachine ¶
TerminateMachine causes systemd-machined to terminate a machine, killing its processes
type ImageStatus ¶
type ImageStatus struct { Name string // The primary image name as string ImageType string // The image type as string Readonly bool // whether it's readonly or not CreateTime uint64 // time when it's created ModifyTime uint64 // time when it's modified DiskUsage uint64 // used disk space JobPath dbus.ObjectPath // The job object path }
ImageStatus is a set of necessary info for each machine image
type MachineStatus ¶
type MachineStatus struct { Name string // The primary machine name as string Class string // The machine class as string Service string // The machine service as string JobPath dbus.ObjectPath // The job object path }
MachineStatus is a set of necessary info for each machine