Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wait ¶
func Wait(ctx context.Context, cancel context.CancelFunc, termFn TerminationFn) error
Wait allows the service to wait for a termination signal, start the cancellation process by calling the context.CancelFunc in order to perform a graceful service shutdown executing the TerminationFn in input.
func WaitWithLogger ¶ added in v0.1.0
func WaitWithLogger(ctx context.Context, cancel context.CancelFunc, termFn TerminationFn, logger logger.Logger) error
WaitWithLogger is similar to Wait but it logs on status updates.
Types ¶
type TerminationFn ¶
TerminationFn is a callback invoked on context cancellation.
Click to show internal directories.
Click to hide internal directories.