context

package
v0.0.0-...-33cbb82 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package context self context base context.CancelContext

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MContext

type MContext interface {
	WithTimeout(timeout time.Duration) (MContext, context.CancelFunc)
	WithCancel() (MContext, context.CancelFunc)

	// goroutine
	Go(exec func())
	WaitGoroutine()

	// basic
	Done() <-chan struct{}
	Deadline() (time.Time, bool)
	Value(key interface{}) interface{}
	Err() error
}

MContext .

func WithValue

func WithValue(parent context.Context, key, value interface{}) MContext

WithValue .

func WithWaitGroup

func WithWaitGroup(ctx context.Context) MContext

WithWaitGroup .

Jump to

Keyboard shortcuts

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