Documentation
¶
Index ¶
- func ExtractLocalDC(ctx context.Context) string
- func IsIdempotent(ctx context.Context) bool
- func IsNestedCall(ctx context.Context) bool
- func MarkRetryCall(ctx context.Context) context.Context
- func MergeContexts(deadline context.Context, additionalValues context.Context) context.Context
- func ValueOnly(ctx context.Context) context.Context
- func WithCancel(ctx context.Context) (context.Context, context.CancelFunc)
- func WithDone(parent context.Context, done <-chan struct{}) (context.Context, context.CancelFunc)
- func WithIdempotent(ctx context.Context, idempotent bool) context.Context
- func WithLocalDC(ctx context.Context, dc string) context.Context
- func WithTimeout(ctx context.Context, t time.Duration) (context.Context, context.CancelFunc)
- type CancelsGuard
- type MergedContexts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractLocalDC ¶ added in v3.42.6
func IsIdempotent ¶ added in v3.42.0
func IsNestedCall ¶ added in v3.54.2
func MergeContexts ¶ added in v3.108.4
MergeContexts returns a context with the deadline from the deadline context and values from both contexts
func WithCancel ¶ added in v3.46.1
func WithIdempotent ¶ added in v3.42.0
func WithLocalDC ¶ added in v3.42.6
func WithTimeout ¶ added in v3.46.1
Types ¶
type CancelsGuard ¶ added in v3.64.0
type CancelsGuard struct {
// contains filtered or unexported fields
}
func NewCancelsGuard ¶ added in v3.64.0
func NewCancelsGuard() *CancelsGuard
func (*CancelsGuard) Cancel ¶ added in v3.64.0
func (g *CancelsGuard) Cancel()
func (*CancelsGuard) WithCancel ¶ added in v3.66.2
func (g *CancelsGuard) WithCancel(ctx context.Context) (context.Context, context.CancelFunc)
type MergedContexts ¶ added in v3.108.4
type MergedContexts struct {
// contains filtered or unexported fields
}
func (*MergedContexts) Deadline ¶ added in v3.108.4
func (ctx *MergedContexts) Deadline() (deadline time.Time, ok bool)
func (*MergedContexts) Done ¶ added in v3.108.4
func (ctx *MergedContexts) Done() <-chan struct{}
func (*MergedContexts) Err ¶ added in v3.108.4
func (ctx *MergedContexts) Err() error
func (*MergedContexts) Value ¶ added in v3.108.4
func (ctx *MergedContexts) Value(key interface{}) interface{}
Click to show internal directories.
Click to hide internal directories.