ctxutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: Apache-2.0, MIT Imports: 6 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cancel

func Cancel(ctx context.Context)

func CancelAfterInactivity

func CancelAfterInactivity(ctx context.Context, key string, d time.Duration)

func CancelContext

func CancelContext(ctx context.Context) context.Context

func SyncContext

func SyncContext(ctx context.Context) context.Context

func SyncPointAdd

func SyncPointAdd(ctx context.Context)

func SyncPointDone

func SyncPointDone(ctx context.Context)

func SyncPointRun

func SyncPointRun(ctx context.Context, f func())

func SyncPointRunAndCancelOnExit

func SyncPointRunAndCancelOnExit(ctx context.Context, f func())

func SyncPointRunUntilCancelled

func SyncPointRunUntilCancelled(ctx context.Context, f func())

func SyncPointWait

func SyncPointWait(ctx context.Context, duration time.Duration)

func Tick

func Tick(ctx context.Context, key string)

func TickContext

func TickContext(ctx context.Context, key string) context.Context

func WaitForInactivity

func WaitForInactivity(ctx context.Context, key string, d time.Duration)

Types

type Ticker

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

func (*Ticker) CancelAfterInactivity

func (this *Ticker) CancelAfterInactivity(ctx context.Context, d time.Duration)

func (*Ticker) WaitForInactivity

func (this *Ticker) WaitForInactivity(ctx context.Context, d time.Duration)

Jump to

Keyboard shortcuts

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