services

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Restart

func Restart(name string) error

Restart will try to restart a systemd service

func Start

func Start(name string) error

Start a systemd service

func Stop

func Stop(name string) error

Stop a systemd service

Types

type UnitStatus

type UnitStatus struct {
	Name        string // The primary unit name as string
	Description string // The human readable description string
	ActiveState string // The active state (i.e. whether the unit is currently started or not)
	LoadState   string // The load state (i.e. whether the unit file has been loaded successfully)
	SubState    string // The sub state (a more fine-grained version of the active state that is specific to the unit type, which the active state is not)
}

func Status

func Status(name ...string) ([]UnitStatus, error)

func (UnitStatus) String

func (us UnitStatus) String() string

Jump to

Keyboard shortcuts

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