package
1.20240719.1
Repository: https://github.com/blend/go-sdk.git
Documentation: pkg.go.dev

# Functions

Background yields a context that will signal `<-ctx.Done()` when a signal is sent to the process (as specified in `DefaultShutdownSignals`).
MaybeDebugf calls the logger debugf method if the logger is set.
MaybeErrorf calls the logger errorf method if the logger is set.
MaybeInfof calls the logger infof method if the logger is set.
Notify returns a channel that listens for a given set of os signals.
NotifyWithCapacity returns a channel with a given capacity that listens for a given set of os signals.
OptBackgroundLog sets the logger.
OptBackgroundSignals sets the signals.
OptBackgroundSkipStopOnSignal sets if we should stop the signal channel on stop.
OptDefaultShutdownSignal returns an option that sets the shutdown signal to the defaults.
OptShutdownSignal sets the shutdown signal.
Shutdown racefully stops a set hosted processes based on SIGINT or SIGTERM received from the os.
ShutdownByContext gracefully stops a set hosted processes based on context cancellation.
ShutdownBySignal gracefully stops a set hosted processes based on a set of variadic options.

# Variables

DefaultShutdownSignals are the default os signals to capture to shut down.

# Structs

BackgroundOptions are options for the background context.
ShutdownOptions are the options for graceful shutdown.

# Interfaces

Graceful is a server that can start and stop.
Logger is a type that can be used as a graceful process logger.

# Type aliases

BackgroundOption mutates background options.
ShutdownOption is a mutator for shutdown options.