Skip to content

io.systemd.service

An interface to control basic properties of systemd services.

Property Value
Go package github.com/rossedman/sdvarlink/systemd/latest/service
Available since systemd v257
Methods · types · errors 4 · 0 · 1

Methods

Ping

Checks if the service is running.

func (c *Client) Ping(ctx context.Context) error

Reload

Reloads configuration files.

func (c *Client) Reload(ctx context.Context, in ReloadIn) error

Parameters

Field Type Description
allowInteractiveAuthentication ?bool Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false.

SetLogLevel

Sets the maximum log level.

func (c *Client) SetLogLevel(ctx context.Context, in SetLogLevelIn) error

Parameters

Field Type Description
level ?int The maximum log level, using BSD syslog log level integers.

GetEnvironment

since v258

Get current environment block.

func (c *Client) GetEnvironment(ctx context.Context) (*GetEnvironmentOut, error)

Reply

Field Type Description
environment ?[]string Returns the current environment block, i.e. the contents of environ[].

Errors

Error Go type Description
InconsistentEnvironment InconsistentEnvironmentError Returned if the environment block is currently not in a valid state.