systemdtest

package
v0.0.0-...-2fb355d Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleMockAllUnitsActiveOutput

func HandleMockAllUnitsActiveOutput(cmd []string, states map[string]ServiceState) []byte

HandleMockAllUnitsActiveOutput returns the output for systemctl in the case where units have the state as described by states. If `cmd` is the command issued by systemd.Status(), this function returns the output to be produced by the command so that the queried services will appear having the ActiveState and UnitFileState according to the data passed in the `states` map.

Types

type ServiceState

type ServiceState struct {
	ActiveState   string
	UnitFileState string
}

Jump to

Keyboard shortcuts

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