Documentation
¶
Overview ¶
Package systemd contains the trusted target and transport implementation used by systemd-aware builtins.
Index ¶
- Constants
- type Client
- func (*Client) DisableSystemServices(context.Context, []string) error
- func (*Client) EnableSystemServices(context.Context, []string) error
- func (*Client) InspectSystemServices(context.Context, []string) ([]builtins.SystemServiceState, error)
- func (c *Client) JournalDiskUsage(context.Context) (builtins.JournalUsage, error)
- func (*Client) ListSystemServices(context.Context, builtins.SystemServiceListRequest) ([]builtins.SystemServiceState, error)
- func (c *Client) ReadJournal(ctx context.Context, query builtins.JournalQuery, ...) error
- func (c *Client) RotateJournal(context.Context) error
- func (*Client) RunSystemServiceJobs(context.Context, builtins.SystemServiceJobAction, []string) error
- func (c *Client) VacuumJournal(context.Context, builtins.JournalVacuumRequest) (builtins.JournalVacuumResult, error)
- type Target
Constants ¶
const MaxJournalDirs = 8
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the trusted systemd backends for one resolved target. Target paths are copied at construction so runner configuration remains immutable while commands execute.
func (*Client) DisableSystemServices ¶
func (*Client) EnableSystemServices ¶
func (*Client) InspectSystemServices ¶
func (*Client) JournalDiskUsage ¶
JournalDiskUsage requires Unix allocation metadata.
func (*Client) ListSystemServices ¶
func (*Client) ListSystemServices(context.Context, builtins.SystemServiceListRequest) ([]builtins.SystemServiceState, error)
func (*Client) ReadJournal ¶
func (c *Client) ReadJournal(ctx context.Context, query builtins.JournalQuery, yield func(builtins.JournalEntry) error) error
ReadJournal reads a bounded structured query from the configured journal files. Results are buffered until the file snapshot is stable, then yielded oldest first as required by builtins.JournalReader.
func (*Client) RotateJournal ¶
RotateJournal requires a Linux systemd-journald control endpoint.
func (*Client) RunSystemServiceJobs ¶
func (*Client) VacuumJournal ¶
func (c *Client) VacuumJournal(context.Context, builtins.JournalVacuumRequest) (builtins.JournalVacuumResult, error)
VacuumJournal requires rooted Unix filesystem operations.
type Target ¶
type Target struct {
JournalDirs []string
MachineIDPath string
JournalControlSocket string
ManagerBusSocket string
}
Target identifies one systemd host through journal paths supplied by the embedding application.
func LocalTarget ¶
func LocalTarget() Target
LocalTarget returns the standard paths for the local systemd host.
func ResolveTarget ¶
ResolveTarget validates and resolves a target. A zero target selects the local host. Once any explicit field is supplied, omitted fields remain empty and never fall back to local paths.
Source Files
¶
- client.go
- journal_data.go
- journal_entry.go
- journal_files.go
- journal_format.go
- journal_hash.go
- journal_index.go
- journal_merge.go
- journal_query.go
- journal_query_file.go
- journal_read.go
- journal_rotate_unsupported.go
- journal_snapshot.go
- journal_usage_unsupported.go
- journal_vacuum_unsupported.go
- journal_varlink.go
- journal_varlink_dial_unsupported.go
- manager_dbus_limit.go
- manager_incoming.go
- manager_protocol.go
- manager_signal.go
- manager_unsupported.go
- target.go
- target_path.go