serverutils

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GracefulShutdownSystem

func GracefulShutdownSystem(
	ctx context.Context,
	appLogger logger.Logger,
	errCh <-chan error,
	timeout time.Duration,
	shutdownOps map[string]ShutdownOperation,
) <-chan struct{}

GracefulShutdownSystem waits for OS signal or error then runs shutdown hooks

Types

type ShutdownOperation

type ShutdownOperation func(ctx context.Context) error

ShutdownOperation defines a function type for shutdown operations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL