startstop

package
v0.0.0-...-56d8f82 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartBlocking

func StartBlocking(ctx context.Context, starter Starter, sg ...os.Signal) error

StartBlocking starts the given Starter and blocks the goroutine until SIGTERM signal is received.

An optional signal can be provided to override the default SIGTERM signal.

Types

type Starter

type Starter interface {
	// Start typically launches a cancellable blocking operation.
	Start(context.Context) error
	Stop(context.Context) error
}

Jump to

Keyboard shortcuts

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