graceful

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeGRPC

func ServeGRPC(ctx context.Context, server *grpc.Server, port int) error

ServeGRPC serves a GRPC server and performs a graceful shutdown if/when ctx is cancelled.

func ServeHTTP

func ServeHTTP(ctx context.Context, server *http.Server, port int) error

ServeHTTP serves a HTTP server and performs a graceful shutdown if/when ctx is cancelled

func WithCancelOnTerminate

func WithCancelOnTerminate(ctx context.Context) context.Context

WithCancelOnTerminate derives a context that is cancelled on SIGINT and SIGTERM signals

Types

This section is empty.

Jump to

Keyboard shortcuts

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