Skip to content

Commit 3dc58c8

Browse files
committed
avoiding bumping go-systemd dependency
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
1 parent f714035 commit 3dc58c8

File tree

3 files changed

+26
-38
lines changed

3 files changed

+26
-38
lines changed

cmd/containerd/command/notify_linux.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,29 @@ import (
2222
"context"
2323
"os"
2424

25-
sd "github.com/coreos/go-systemd/v22/daemon"
25+
sd "github.com/coreos/go-systemd/daemon"
2626

2727
"github.com/containerd/containerd/log"
2828
)
2929

30+
const (
31+
// SdNotifyReady tells the service manager that service startup is finished
32+
// or the service finished loading its configuration.
33+
SdNotifyReady = "READY=1"
34+
35+
// SdNotifyStopping tells the service manager that the service is beginning
36+
// its shutdown.
37+
SdNotifyStopping = "STOPPING=1"
38+
)
39+
3040
// notifyReady notifies systemd that the daemon is ready to serve requests
3141
func notifyReady(ctx context.Context) error {
32-
return sdNotify(ctx, sd.SdNotifyReady)
42+
return sdNotify(ctx, SdNotifyReady)
3343
}
3444

3545
// notifyStopping notifies systemd that the daemon is about to be stopped
3646
func notifyStopping(ctx context.Context) error {
37-
return sdNotify(ctx, sd.SdNotifyStopping)
47+
return sdNotify(ctx, SdNotifyStopping)
3848
}
3949

4050
func sdNotify(ctx context.Context, state string) error {

vendor/github.com/coreos/go-systemd/daemon/sdnotify.go

Lines changed: 9 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/coreos/go-systemd/daemon/watchdog.go

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)