go_lazy_quiter

package module
v0.0.0-...-9477d49 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 3 Imported by: 0

README

go-lazy-quiter

Capture Ctrl+C to quit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LazyQuiter

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

func NewLazyQuiter

func NewLazyQuiter(sig ...os.Signal) *LazyQuiter

func (*LazyQuiter) Wait

func (q *LazyQuiter) Wait() os.Signal

func (*LazyQuiter) WaitQuit

func (q *LazyQuiter) WaitQuit(return_num int)

type RunGroupQuiter

type RunGroupQuiter struct {
	SignalNotifyFunc func(sig os.Signal)
	// contains filtered or unexported fields
}

func NewRunGroupQuiter

func NewRunGroupQuiter(sig ...os.Signal) *RunGroupQuiter

func (*RunGroupQuiter) Run

func (q *RunGroupQuiter) Run() error

func (*RunGroupQuiter) Stop

func (q *RunGroupQuiter) Stop(err error)

Jump to

Keyboard shortcuts

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