signal

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAbort            = errors.New("aborted")
	ErrImmediateAbort   = errors.New("immediate abort")
	TypeAbortController = reflect.TypeOf((*abortController)(nil))
	TypeAbortSignal     = reflect.TypeOf((*abortSignal)(nil))
)

Functions

func Abort

func Abort(value sobek.Value, err error)

Abort a signal

func Context

func Context(rt *sobek.Runtime, value sobek.Value) context.Context

Context return signal context

func New

func New(rt *sobek.Runtime, ctx context.Context) sobek.Value

New creates a new AbortSignal

Types

type AbortController

type AbortController struct{}

AbortController interface represents a controller object that allows you to abort one or more Web requests as and when desired. https://developer.mozilla.org/en-US/docs/Web/API/AbortController.

func (*AbortController) Instantiate

func (a *AbortController) Instantiate(rt *sobek.Runtime) (sobek.Value, error)

type AbortSignal

type AbortSignal struct{}

AbortSignal represents a signal object that allows you to communicate with http request and abort it. https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal

func (*AbortSignal) Instantiate

func (a *AbortSignal) Instantiate(rt *sobek.Runtime) (sobek.Value, error)

Jump to

Keyboard shortcuts

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