cmd

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRunCmdOpts = RunCmdOpts{
	SetupSignalHandler: core.SetupSignalHandler,
}

Functions

func UsageOptions

func UsageOptions(desc string, options ...interface{}) string

Types

type RunCmdOpts

type RunCmdOpts struct {
	// Stop signals are SIGINT and SIGTERM
	// We can start graceful shutdown when first context is closed and forcefully stop when the second one is closed.
	// Note that the handler closes usr2Received as soon as SIGTERM has been
	// received, exactly one SIGUSR2 is buffered and notifications are
	// non-blocking, so the guarantee is that at least one SIGUSR2 is delivered.
	SetupSignalHandler func() (firstStopSignalReceived context.Context, secondStopSignalReceived context.Context, usr2Received <-chan struct{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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