v2github.com/onsi/ginkgo/v2/internal/interrupt_handler Index | Files

package interrupt_handler

import "github.com/onsi/ginkgo/v2/internal/interrupt_handler"

Index

Constants

const ABORT_POLLING_INTERVAL = 500 * time.Millisecond
const ABORT_REPEAT_INTERRUPT_DURATION = 30 * time.Second
const TIMEOUT_REPEAT_INTERRUPT_FRACTION_OF_TIMEOUT = 10
const TIMEOUT_REPEAT_INTERRUPT_MAXIMUM_DURATION = 30 * time.Second

Types

type InterruptCause

type InterruptCause uint
const (
	InterruptCauseInvalid InterruptCause = iota

	InterruptCauseSignal
	InterruptCauseTimeout
	InterruptCauseAbortByOtherProcess
)

func (InterruptCause) String

func (ic InterruptCause) String() string

type InterruptHandler

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

func NewInterruptHandler

func NewInterruptHandler(timeout time.Duration, client parallel_support.Client) *InterruptHandler

func (*InterruptHandler) ClearInterruptPlaceholderMessage

func (handler *InterruptHandler) ClearInterruptPlaceholderMessage()

func (*InterruptHandler) InterruptMessage

func (handler *InterruptHandler) InterruptMessage() (string, bool)

func (*InterruptHandler) SetInterruptPlaceholderMessage

func (handler *InterruptHandler) SetInterruptPlaceholderMessage(message string)

func (*InterruptHandler) Status

func (handler *InterruptHandler) Status() InterruptStatus

func (*InterruptHandler) Stop

func (handler *InterruptHandler) Stop()

type InterruptHandlerInterface

type InterruptHandlerInterface interface {
	Status() InterruptStatus
	SetInterruptPlaceholderMessage(string)
	ClearInterruptPlaceholderMessage()
	InterruptMessage() (string, bool)
}

type InterruptStatus

type InterruptStatus struct {
	Interrupted bool
	Channel     chan interface{}
	Cause       InterruptCause
}

Source Files

interrupt_handler.go

Version
v2.2.0
Published
Sep 17, 2022
Platform
js/wasm
Imports
7 packages
Last checked
1 day ago

Tools for package owners.