context

package
v2.145.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 2 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDeadline

func WithDeadline(parent Context, d time.Time) (Context, CancelFunc)

WithDeadline is an alias for context.WithDeadline.

func WithTimeout

func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc)

WithTimeout is an alias for context.WithTimeout.

Types

type CancelFunc

type CancelFunc = context.CancelFunc

CancelFunc is an alias for context.CancelFunc.

type Context

type Context = context.Context

Context is an alias for context.Context.

func Background

func Background() Context

Background is an alias for context.WithValue.

func WithValue

func WithValue(parent Context, key, val any) Context

WithValue is an alias for context.WithValue.

type Key

type Key string

Key is used to store items in context.

Jump to

Keyboard shortcuts

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