Documentation ¶
Index ¶
- Constants
- func IsRunning() (bool, error)
- func ListCommand() string
- func ListServices() ([]string, error)
- func UnitSerialize(opts []*unit.UnitOption) io.Reader
- type Cmdline
- type Service
- func (s Service) Conf() common.Conf
- func (s *Service) Exists() (bool, error)
- func (s *Service) Install() error
- func (s *Service) InstallCommands() ([]string, error)
- func (s *Service) Installed() (bool, error)
- func (s Service) Name() string
- func (s *Service) Remove() error
- func (s *Service) Running() (bool, error)
- func (s *Service) Start() error
- func (s *Service) StartCommands() ([]string, error)
- func (s *Service) Stop() error
Constants ¶
const CleanShutdownService = `` /* 236-byte string literal not displayed */
CleanShutdownService is added to machines to ensure DHCP-assigned IP addresses are released on shutdown, reboot, or halt. See bug http://pad.lv/1348663 for more info.
const CleanShutdownServicePath = "/etc/systemd/system/juju-clean-shutdown.service"
CleanShutdownServicePath is the full file path where CleanShutdownService is created.
Variables ¶
This section is empty.
Functions ¶
func ListCommand ¶
func ListCommand() string
ListCommand returns a command that will list the services on a host.
func ListServices ¶
ListServices returns the list of installed service names.
func UnitSerialize ¶
func UnitSerialize(opts []*unit.UnitOption) io.Reader
UnitSerialize encodes all of the given UnitOption objects into a unit file. Renamed from Serialize from github.com/coreos/go-systemd/unit so as to not confict with the exported internal function in export_test.go.
Types ¶
type Cmdline ¶
type Cmdline struct {
// contains filtered or unexported fields
}
Cmdline exposes the core operations of interacting with systemd units.
type Service ¶
Service provides visibility into and control over a systemd service.
func NewService ¶
NewService returns a new value that implements Service for systemd.
func (*Service) InstallCommands ¶
InstallCommands implements Service.
func (*Service) StartCommands ¶
StartCommands implements Service.