Help us shape the future of Go! Take the 2026 Go Developer Survey

cleanup

package
v1.0.67 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GracefulShutdown

func GracefulShutdown(ctx context.Context, timeout time.Duration, ops map[string]CleanupOperation) <-chan struct{}

gracefulShutdown waits for termination syscalls and doing clean up operations after received it

Types

type CleanupOperation

type CleanupOperation func(ctx context.Context) error

operation is a clean up function on shutting down

Jump to

Keyboard shortcuts

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