Documentation
¶
Overview ¶
Package systemd provides utilities for interacting with systemd units.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.30.0
type Client interface {
Start(ctx context.Context, units ...string) error
Stop(ctx context.Context, units ...string) error
Restart(ctx context.Context, units ...string) error
Reload(ctx context.Context, units ...string) error
DaemonReload(ctx context.Context) error
Enable(ctx context.Context, units ...string) error
Disable(ctx context.Context, units ...string) error
Close() error
}
Client provides operations for managing systemd units via D-Bus.
type Unit ¶
Unit represents a systemd unit file.
func BuildContainer ¶ added in v0.30.0
func BuildContainer(projectName, serviceName string, svc *types.ServiceConfig, projectNetworks types.Networks, projectVolumes types.Volumes) Unit
BuildContainer converts a compose service into a container unit file. projectNetworks provides the project-level network configs so that external networks can be referenced by name rather than as Quadlet unit files.
func BuildNetwork ¶ added in v0.30.0
func BuildNetwork(projectName, netName string, net *types.NetworkConfig) Unit
BuildNetwork converts a compose network into a network unit file.
func BuildVolume ¶ added in v0.30.0
func BuildVolume(projectName, volName string, vol *types.VolumeConfig) Unit
BuildVolume converts a compose volume into a volume unit file.
Click to show internal directories.
Click to hide internal directories.