cockroach: Index | Files

package sdnotify

import ""

Package sdnotify implements both sides of the systemd readiness protocol. Servers can use sdnotify.Ready() to signal that they are ready to receive traffic, and process managers can use sdnotify.Exec() to run processes that implement this protocol.


Package Files

sdnotify.go sdnotify_unix.go

func Exec Uses

func Exec(cmd *exec.Cmd) error

Exec the given command in the background using the systemd notification protocol. This function returns once the command has either exited or signaled that it is ready. If the command exits with a non-zero status before signaling readiness, returns an exec.ExitError.

func Ready Uses

func Ready() error

Ready sends a readiness signal using the systemd notification protocol. It should be called (once) by a server after it has completed its initialization (including but not necessarily limited to binding ports) and is ready to receive traffic.

Package sdnotify imports 7 packages (graph) and is imported by 76 packages. Updated 2020-05-10. Refresh now. Tools for package owners.