signals

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package signals provides a signal handler which is usable as a cmdutil.Server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(logger logrus.FieldLogger, signals ...os.Signal) cmdutil.Server

NewServer returns a cmdutil.Server that returns from Run when any of the provided signals are received. Run always returns a nil error.

func WithNotifyCancel

func WithNotifyCancel(ctx context.Context, signals ...os.Signal) context.Context

WithNotifyCancel creates a sub-context from the given context which gets canceled upon receiving any of the configured signals.

Types

This section is empty.

Jump to

Keyboard shortcuts

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