xcontext

package
v3.42.11 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractLocalDC added in v3.42.6

func ExtractLocalDC(ctx context.Context) string

func IsIdempotent added in v3.42.0

func IsIdempotent(ctx context.Context) bool

func WithIdempotent added in v3.42.0

func WithIdempotent(ctx context.Context, idempotent bool) context.Context

func WithLocalDC added in v3.42.6

func WithLocalDC(ctx context.Context, dc string) context.Context

func WithoutDeadline added in v3.31.0

func WithoutDeadline(ctx context.Context) context.Context

WithoutDeadline helps to clear derived deadline from deadline

Types

type CancelErrFunc

type CancelErrFunc func(err error)

CancelErrFunc use for cancel with wrap with specific error if err == nil CancelErrFunc will panic for prevent call cancel, then ctx.Err() == nil

func WithErrCancel

func WithErrCancel(ctx context.Context) (resCtx context.Context, cancel CancelErrFunc)

Jump to

Keyboard shortcuts

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