pendingOperation

package
v0.0.0-...-1d800d4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOperationStillPending = errors.New("operation is still pending")

Functions

This section is empty.

Types

type PendingOperation

type PendingOperation interface {
	Done() <-chan struct{}
	Err() error
	Wait(ctx context.Context) error
}

func TrackOperation

func TrackOperation(fn func() error) PendingOperation

type WithCancel

type WithCancel interface {
	PendingOperation
	Cancel()
}

func TrackOperationWithCancel

func TrackOperationWithCancel(ctx context.Context, fn func(ctx context.Context) error) WithCancel

Jump to

Keyboard shortcuts

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