posixsignal

package
v0.0.0-...-ec76f1a Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "PosixSignalManager"

Name defines shutdown manager name.

Variables

This section is empty.

Functions

This section is empty.

Types

type PosixSignalManager

type PosixSignalManager struct {
	// contains filtered or unexported fields
}

PosixSignalManager implements ShutdownManager interface that is added to GracefulShutdown. Initialize with NewPosixSignalManager.

func NewPosixSignalManager

func NewPosixSignalManager(sig ...os.Signal) *PosixSignalManager

NewPosixSignalManager initializes the PosixSignalManager. As arguments you can provide os.Signal-s to listen to, if none are given, it will default to SIGINT and SIGTERM.

func (*PosixSignalManager) GetName

func (posixSignalManager *PosixSignalManager) GetName() string

GetName returns name of this ShutdownManager.

func (*PosixSignalManager) ShutdownFinish

func (posixSignalManager *PosixSignalManager) ShutdownFinish() error

ShutdownFinish exits the app with os.Exit(0).

func (*PosixSignalManager) ShutdownStart

func (posixSignalManager *PosixSignalManager) ShutdownStart() error

ShutdownStart does nothing.

func (*PosixSignalManager) Start

func (posixSignalManager *PosixSignalManager) Start(gs shutdown.GSInterface) error

Start starts listening for posix signals.

Jump to

Keyboard shortcuts

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