summaryrefslogtreecommitdiff
path: root/notify/notify_windows.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2022-09-02 09:23:51 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2022-09-02 09:24:05 -0600
commit59286d2c7ede928cc24916abdf6c0fb9ee12b826 (patch)
tree39df5e8d9e09f3d2699d97087816920a5cd452ca /notify/notify_windows.go
parent66959d9f18768beb9531d51241978731bff8a305 (diff)
notify: Don't send ready after error (fix #5003)
Also simplify the notify package quite a bit. Also move stop notification into better place. Add ability to send status or error.
Diffstat (limited to 'notify/notify_windows.go')
-rw-r--r--notify/notify_windows.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/notify/notify_windows.go b/notify/notify_windows.go
index a551fc7..5666a4c 100644
--- a/notify/notify_windows.go
+++ b/notify/notify_windows.go
@@ -24,7 +24,7 @@ func SetGlobalStatus(status chan<- svc.Status) {
globalStatus = status
}
-func notifyReadiness() error {
+func Ready() error {
if globalStatus != nil {
globalStatus <- svc.Status{
State: svc.Running,
@@ -34,16 +34,22 @@ func notifyReadiness() error {
return nil
}
-func notifyReloading() error {
+func Reloading() error {
if globalStatus != nil {
globalStatus <- svc.Status{State: svc.StartPending}
}
return nil
}
-func notifyStopping() error {
+func Stopping() error {
if globalStatus != nil {
globalStatus <- svc.Status{State: svc.StopPending}
}
return nil
}
+
+// TODO: not implemented
+func Status(_ string) error { return nil }
+
+// TODO: not implemented
+func Error(_ error, _ int) error { return nil }