service

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchUnitPatterns

func MatchUnitPatterns(patterns []string, units []dbus.UnitStatus) ([]dbus.UnitStatus, error)

MatchUnitPatterns returns a list of units that match the pattern list. This algo, including filepath.Match, is designed to (somewhat) emulate the behavior of ListUnitsByPatterns, which uses `fnmatch`.

Types

type UnitFetcher

type UnitFetcher func(conn *dbus.Conn, states, patterns []string) ([]dbus.UnitStatus, error)

func InstrospectForUnitMethods

func InstrospectForUnitMethods() (UnitFetcher, error)

InstrospectForUnitMethods determines what methods are available via dbus for listing systemd units. We have a number of functions, some better than others, for getting and filtering unit lists. This will attempt to find the most optimal method, and move down to methods that require more work.

Jump to

Keyboard shortcuts

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