systemd

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_TIMEOUT = (10 * time.Second)

DEFAULT_TIMEOUT Default DBUS query timeout

Variables

View Source
var ServiceBasicProperties = []string{
	"BusName",
	"ExecCondition",
	"ExecMainPID",
	"FileDescriptorStoreMax",
	"GuessMainPID",
	"MemoryCurrent",
	"NonBlocking",
	"NotifyAccess",
	"OOMPolicy",
	"PIDFile",
	"RemainAfterExit",
	"Restart",
	"RestartSec",
	"RootDirectoryStartOnly",
	"RuntimeMaxSec",
	"Sockets",
	"TimeoutAbortSec",
	"TimeoutSec",
	"TimeoutStartFailureMode",
	"TimeoutStartSec",
	"TimeoutStopSec",
	"Type",
	"USBFunctionDescriptors",
	"USBFunctionStrings",
	"WatchdogSec",
}

ServiceBasicProperties The list of properties to include if they are non-zero. The "basic" properties have simple values types that can be compared easily to their zero values

View Source
var ServiceExecProperties = []string{
	"ExecCondition",
	"ExecReload",
	"ExecStart",
	"ExecStartPre",
	"ExecStop",
	"ExecStopPost",
}

ServiceExecProperties A list of properties that contain commands to execute. These are stored as [][]interface{} and need special logic to extract

View Source
var ServiceStatusProperties = []string{
	"RestartForceExitStatus",
	"RestartPreventExitStatus",
	"SuccessExitStatus",
}

ServiceStatusProperties Properties that list exit statuses which need special logic

Functions

This section is empty.

Types

type ServiceSource

type ServiceSource struct {
	Timeout time.Duration
}

ServiceSource struct on which all methods are registered

func (*ServiceSource) Contexts

func (s *ServiceSource) Contexts() []string

List of contexts that this source is capable of find items for

func (*ServiceSource) Find

func (bc *ServiceSource) Find(ctx context.Context, itemContext string) ([]*sdp.Item, error)

Find Gets information about all item that the source can possibly find. If nothing is found then just return an empty list (Required)

func (*ServiceSource) Get

func (bc *ServiceSource) Get(ctx context.Context, itemContext string, query string) (*sdp.Item, error)

Get takes the UniqueAttribute value as a parameter (also referred to as the "name" of the item) and returns a full item will all details. This function must return an item whose UniqueAttribute value exactly matches the supplied parameter. If the item cannot be found it should return an ItemNotFoundError (Required)

func (*ServiceSource) Name

func (bc *ServiceSource) Name() string

Name Returns the name of the backend package. This is used for debugging and logging (Required)

func (*ServiceSource) Search

func (bc *ServiceSource) Search(ctx context.Context, itemContext string, query string) ([]*sdp.Item, error)

Search searches by a glob pattern, but also appends the following default glob patterns:

  • {input}.*

If the query is an integer, it will be converted to the name of the units which owns a process with that PID

func (*ServiceSource) Supported

func (bc *ServiceSource) Supported() bool

Supported A function that can be executed to see if the backend is supported in the current environment, if it returns false the backend simply won't be loaded (Optional)

func (*ServiceSource) Type

func (bc *ServiceSource) Type() string

Type is the type of items that this returns (Required)

func (*ServiceSource) Weight

func (s *ServiceSource) Weight() int

Weighting of duplicate sources

Jump to

Keyboard shortcuts

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