service

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForShutdown added in v0.4.0

func WaitForShutdown(sc <-chan os.Signal, shutdown func(sig os.Signal))

WaitForShutdown blocks until a signal arrives on sc, then runs shutdown and returns only once shutdown has finished. Callers return from main after this, so the process cannot exit while shutdown is still draining or flushing.

Types

type Component

type Component interface {
	Open(ctx context.Context) error
	Close() error
}

Jump to

Keyboard shortcuts

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