Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dbus/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/godbus/dbus/v5"
)

// Who specifies which process to send a signal to via the [KillUnitWithTarget].
// Who specifies which process to send a signal to via the [Conn.KillUnitWithTarget].
type Who string

const (
Expand Down Expand Up @@ -196,15 +196,15 @@ func (c *Conn) StartTransientUnitContext(ctx context.Context, name string, mode
return c.startJob(ctx, ch, "org.freedesktop.systemd1.Manager.StartTransientUnit", name, mode, properties, make([]PropertyCollection, 0))
}

// Deprecated: use [KillUnitWithTarget] instead.
// Deprecated: use [Conn.KillUnitWithTarget] instead.
func (c *Conn) KillUnit(name string, signal int32) {
c.KillUnitContext(context.Background(), name, signal)
}

// KillUnitContext takes the unit name and a UNIX signal number to send.
// All of the unit's processes are killed.
//
// Deprecated: use [KillUnitWithTarget] instead, with target argument set to [All].
// Deprecated: use [Conn.KillUnitWithTarget] instead, with target argument set to [All].
func (c *Conn) KillUnitContext(ctx context.Context, name string, signal int32) {
_ = c.KillUnitWithTarget(ctx, name, All, signal)
}
Expand Down Expand Up @@ -859,7 +859,7 @@ func (c *Conn) listJobsInternal(ctx context.Context) ([]JobStatus, error) {
}

// FreezeUnit freezes the cgroup associated with the unit.
// Note that FreezeUnit and [ThawUnit] are only supported on systems running with cgroup v2.
// Note that FreezeUnit and [Conn.ThawUnit] are only supported on systems running with cgroup v2.
func (c *Conn) FreezeUnit(ctx context.Context, unit string) error {
return c.sysobj.CallWithContext(ctx, "org.freedesktop.systemd1.Manager.FreezeUnit", 0, unit).Store()
}
Expand Down
2 changes: 1 addition & 1 deletion dbus/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (c *Conn) SubscribeUnitsCustom(interval time.Duration, buffer int, isChange
return c.SubscribeUnitsCustomContext(context.Background(), interval, buffer, isChanged, filterUnit)
}

// SubscribeUnitsCustomContext is like [SubscribeUnitsContext] but lets you specify the buffer
// SubscribeUnitsCustomContext is like [Conn.SubscribeUnitsContext] but lets you specify the buffer
// size of the channels, the comparison function for detecting changes and a filter
// function for cutting down on the noise that your channel receives.
func (c *Conn) SubscribeUnitsCustomContext(ctx context.Context, interval time.Duration, buffer int, isChanged func(*UnitStatus, *UnitStatus) bool, filterUnit func(string) bool) (<-chan map[string]*UnitStatus, <-chan error) {
Expand Down
6 changes: 3 additions & 3 deletions sdjournal/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
// systemd journal wrapped around the sd-journal C API.
//
// All public read methods map closely to the sd-journal API functions. See the
// sd-journal.h documentation[1] for information about each function.
// [sd-journal.h documentation] for information about each function.
//
// To write to the journal, see the pure-Go "journal" package
// To write to the journal, see the pure-Go "journal" package.
//
// [1] http://www.freedesktop.org/software/systemd/man/sd-journal.html
// [sd-journal.h documentation]: http://www.freedesktop.org/software/systemd/man/sd-journal.html
package sdjournal

// #include <systemd/sd-journal.h>
Expand Down
4 changes: 2 additions & 2 deletions unit/deserialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func DeserializeSections(f io.Reader) ([]*UnitSection, error) {
}

// Deserialize parses a systemd unit file into a list of UnitOptions.
// Note: this function is deprecated in favor of DeserializeOptions
// and will be removed at a future date.
//
// Deprecated: use [DeserializeOptions] instead.
func Deserialize(f io.Reader) (opts []*UnitOption, err error) {
return DeserializeOptions(f)
}
Expand Down