xcontext

package
v3.80.13 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractLocalDC

func ExtractLocalDC(ctx context.Context) string

func IsIdempotent

func IsIdempotent(ctx context.Context) bool

func IsNestedCall

func IsNestedCall(ctx context.Context) bool

func MarkRetryCall

func MarkRetryCall(ctx context.Context) context.Context

func ValueOnly

func ValueOnly(ctx context.Context) context.Context

ValueOnly helps to clear parent context from deadlines/cancels

func WithCancel

func WithCancel(ctx context.Context) (context.Context, context.CancelFunc)

func WithDone

func WithDone(parent context.Context, done <-chan struct{}) (context.Context, context.CancelFunc)

func WithIdempotent

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

func WithLocalDC

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

Types

type CancelsGuard

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

func NewCancelsGuard

func NewCancelsGuard() *CancelsGuard

func (*CancelsGuard) Cancel

func (g *CancelsGuard) Cancel()

func (*CancelsGuard) WithCancel

Jump to

Keyboard shortcuts

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