git-bug: github.com/MichaelMure/git-bug/util/interrupt Index | Files

package interrupt

import "github.com/MichaelMure/git-bug/util/interrupt"

Index

Package Files

cleaner.go

type CancelFunc Uses

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 Uses

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 Uses

type CleanerFunc func() error

CleanerFunc is a function to be executed when an interrupt trigger

Package interrupt imports 5 packages (graph) and is imported by 2 packages. Updated 2019-09-14. Refresh now. Tools for package owners.