interrupt_handler

package
v2.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ABORT_POLLING_INTERVAL = 500 * time.Millisecond

Functions

func SwallowSigQuit

func SwallowSigQuit()

Types

type InterruptCause

type InterruptCause uint
const (
	InterruptCauseInvalid InterruptCause = iota
	InterruptCauseSignal
	InterruptCauseAbortByOtherProcess
)

func (InterruptCause) String

func (ic InterruptCause) String() string

type InterruptHandler

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

func NewInterruptHandler

func NewInterruptHandler(client parallel_support.Client, signals ...os.Signal) *InterruptHandler

func (*InterruptHandler) Status

func (handler *InterruptHandler) Status() InterruptStatus

func (*InterruptHandler) Stop

func (handler *InterruptHandler) Stop()

type InterruptHandlerInterface

type InterruptHandlerInterface interface {
	Status() InterruptStatus
}

type InterruptLevel added in v2.3.0

type InterruptLevel uint
const (
	InterruptLevelUninterrupted InterruptLevel = iota
	InterruptLevelCleanupAndReport
	InterruptLevelReportOnly
	InterruptLevelBailOut
)

type InterruptStatus

type InterruptStatus struct {
	Channel chan interface{}
	Level   InterruptLevel
	Cause   InterruptCause
}

func (InterruptStatus) Interrupted

func (s InterruptStatus) Interrupted() bool

func (InterruptStatus) Message added in v2.3.0

func (s InterruptStatus) Message() string

func (InterruptStatus) ShouldIncludeProgressReport added in v2.3.0

func (s InterruptStatus) ShouldIncludeProgressReport() bool

Jump to

Keyboard shortcuts

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