xcontext

package
v0.0.0-...-016edcc Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(ctx context.Context)

func IsDone

func IsDone(ctx context.Context) bool

Types

type CancelFunc

type CancelFunc = context.CancelCauseFunc

func BootstrapSoftCancel

func BootstrapSoftCancel() (context.Context, CancelFunc)

func NewSoftCancel

func NewSoftCancel(parent context.Context) (context.Context, context.Context, CancelFunc)

NewSoftCancel See softCancel.New

func WithCancelCause

func WithCancelCause(parent context.Context) (context.Context, CancelFunc)

type CancellableContext

type CancellableContext struct {
	// Parent is used for Value()
	Parent context.Context
	// Cancel is used to inherit cancellation
	Cancel context.Context
}

func (CancellableContext) Deadline

func (c CancellableContext) Deadline() (time.Time, bool)

func (CancellableContext) Done

func (c CancellableContext) Done() <-chan struct{}

func (CancellableContext) Err

func (c CancellableContext) Err() error

func (CancellableContext) Value

func (c CancellableContext) Value(key interface{}) interface{}

type SignalCause

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

func (SignalCause) Error

func (s SignalCause) Error() string

Jump to

Keyboard shortcuts

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