systemd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reboot

func Reboot() error

Types

type ExecError

type ExecError struct {
	Options ExecOptions
	Result  ExecResult
}

func (ExecError) Error

func (err ExecError) Error() string

type ExecOptions

type ExecOptions struct {
	Unit string // set to <name>.service
	Cmd  []string
	Env  []string
}

type ExecResult

type ExecResult struct {
	Status   string // job status
	LogLines []string
}

func Exec

func Exec(name string, options ExecOptions) (ExecResult, error)

func (ExecResult) LogString

func (result ExecResult) LogString() string

type HostInfo

type HostInfo struct {
	KernelName                string
	Hostname                  string
	OperatingSystemPrettyName string
	KernelVersion             string
	KernelRelease             string
}

func GetHostInfo

func GetHostInfo() (HostInfo, error)

type JournalOptions

type JournalOptions struct {
	Unit           string
	StartTimestamp uint64
}

type JournalReader

type JournalReader interface {
	Read() ([]string, error)
	Close() error
}

func OpenJournal

func OpenJournal(options JournalOptions) (JournalReader, error)

open journal for reading, if available

Jump to

Keyboard shortcuts

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