Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SequenceUsage defines the usage message for the sequence flag. SequenceUsage = "Space separated list of hop predicates" // SequenceHelp defines the help message for a hop predicate sequence. SequenceHelp = `` /* 1661-byte string literal not displayed */ )
View Source
const LogLevelUsage = "Console logging level verbosity (debug|info|error)"
LogLevelUsage defines the usage text for the log.level flag.
Variables ¶
This section is empty.
Functions ¶
func ExitCode ¶
ExitCode extracts the exit code from an error. If the error is nil, the exit code is zero. If the error does not wrap a CodeError, the exit code is -1.
func SIGHUPChannel ¶ added in v0.7.0
SIGHUPChannel returns a channel that is triggered whenever a SIGHUP signal is sent to the process. The context is used for clean up, it deregisters the SIGHUP channel and terminates the backgroun go routine on cancellation.
func WithExitCode ¶
WithExitCode returns an error with the exit code set.
Types ¶
type Cleanup ¶ added in v0.7.0
type Cleanup []func() error
Cleanup defines a list of cleanup hooks. This can be helpful when creating an app and then adding multiple cleanup hooks and to make sure that the all execute without error.
Directories ¶
Path | Synopsis |
---|---|
Package env contains host-wide SCION settings.
|
Package env contains host-wide SCION settings. |
Package feature provides a simple mechanism for command line tools to take and parse feature flags.
|
Package feature provides a simple mechanism for command line tools to take and parse feature flags. |
Package launcher includes the shared application execution boilerplate of all SCION servers.
|
Package launcher includes the shared application execution boilerplate of all SCION servers. |
Click to show internal directories.
Click to hide internal directories.