system

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package system implements some OS related helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureExit

func ConfigureExit(newFunc func(code int))

ConfigureExit allows to overwrite the used os.Exit function. Used in tests.

func CriticalError

func CriticalError(err error)

CriticalError handles a critical error, prints a message and exists the application with a error code.

func Error

func Error(err error)

Error handles an error, prints a message and sends syscall.SIGTERM signal to teardown the application.

func GetSignalChannel

func GetSignalChannel() chan os.Signal

GetSignalChannel returns the signal channel registered for notifications about syscall.SIGINT and syscall.SIGTERM.

func GetStartTime added in v0.7.8

func GetStartTime() time.Time

GetStartTime provides the start time of the application.

Types

This section is empty.

Jump to

Keyboard shortcuts

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