Documentation
¶
Index ¶
- func GetServiceName(name string) string
- func IsEnabled(ctx context.Context, service string) (state string, err error)
- func ListDependencies(ctx context.Context, service string, reverse ...bool) (result string, err error)
- func ReadCmdOutput(cmd *exec.Cmd, callback func(rd io.Reader) error) error
- func ServiceLog(ctx context.Context, service string, callback func(rd io.Reader) error, ...) error
- func ServiceLogClear(ctx context.Context) error
- func ServiceLogWithRows(ctx context.Context, service string, lines uint, ...) error
- type Client
- func (c *Client) Close() error
- func (c *Client) Disable(ctx context.Context, name string) error
- func (c *Client) Enable(ctx context.Context, name string) error
- func (c *Client) List(ctx context.Context, states []string, patterns []string) ([]*Service, error)
- func (c *Client) ListFiles(ctx context.Context, names []string) ([]dbus.UnitFile, error)
- func (c *Client) Reload(ctx context.Context) error
- func (c *Client) ReloadOrRestart(ctx context.Context, name string) error
- func (c *Client) ReloadUnit(ctx context.Context, name string) error
- func (c *Client) Restart(ctx context.Context, name string) error
- func (c *Client) SetRuntime(runtime bool)
- func (c *Client) Start(ctx context.Context, name string) error
- func (c *Client) Stop(ctx context.Context, name string) error
- type Service
- type ServiceConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceName ¶ added in v1.8.20
func ListDependencies ¶ added in v1.8.20
func ServiceLog ¶
func ServiceLogClear ¶ added in v1.8.20
Types ¶
type Client ¶ added in v1.8.20
type Client struct {
// contains filtered or unexported fields
}
Client represents systemd D-Bus API client.
func (*Client) Reload ¶ added in v1.8.20
Reload instructs systemd to scan for and reload unit files. This is equivalent to a 'systemctl daemon-reload'.
func (*Client) ReloadOrRestart ¶ added in v1.8.20
func (*Client) ReloadUnit ¶ added in v1.8.20
func (*Client) SetRuntime ¶ added in v1.8.20
type Service ¶
type ServiceConf ¶ added in v1.8.20
func ServiceConfFileWithContent ¶ added in v1.8.20
func ServiceConfFileWithContent(items []dbus.UnitFile) []ServiceConf
Click to show internal directories.
Click to hide internal directories.