interrupt

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelFunc

type CancelFunc func()

CancelFunc, if called, will disable the associated cleaner. This allow to create temporary cleaner. Be mindful though to not create too much of them as they are just disabled, not removed from memory.

func RegisterCleaner

func RegisterCleaner(cleaner CleanerFunc) CancelFunc

RegisterCleaner is responsible for registering a cleaner function. When a function is registered, the Signal watcher is started in a goroutine.

type CleanerFunc

type CleanerFunc func() error

CleanerFunc is a function to be executed when an interrupt trigger

Jump to

Keyboard shortcuts

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