interruptor

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateTestInterruptManager

func ActivateTestInterruptManager()

Types

type DelayingInterruptManager

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

DelayingInterruptManager is an InterruptManager which delays the goroutine until the interrupt occurs - used in testing

func (*DelayingInterruptManager) ActivateDelay

func (d *DelayingInterruptManager) ActivateDelay(interruptName string)

func (*DelayingInterruptManager) DeactivateDelay

func (d *DelayingInterruptManager) DeactivateDelay(interruptName string)

func (*DelayingInterruptManager) MaybeInterrupt

func (d *DelayingInterruptManager) MaybeInterrupt(interruptName string, interruptor *Interruptor) bool

type InterruptManager

type InterruptManager interface {
	MaybeInterrupt(interruptName string, interruptor *Interruptor) bool
}

func GetInterruptManager

func GetInterruptManager() InterruptManager

type Interruptor

type Interruptor struct {
	Interrupted common.AtomicBool
}

func (*Interruptor) Interrupt

func (i *Interruptor) Interrupt()

Jump to

Keyboard shortcuts

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