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()
Click to show internal directories.
Click to hide internal directories.