Back to

Package interrupt

Latest Go to latest

The latest major version is .

Published: Jul 24, 2020 | License: Apache-2.0 | Module:


func NewSignalChannel

func NewSignalChannel() (<-chan os.Signal, func())

NewSignalChannel returns a new channel for interrupt signals.

Call the returned function to cancel sending to this channel.

func WithCancel

func WithCancel(ctx context.Context) (context.Context, context.CancelFunc)

WithCancel returns a context that is cancelled if interrupt signals are sent.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier