package xcontext
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/xcontext"
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 ValueOnly(ctx context.Context) context.Context
- func WithCancel(ctx context.Context) (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
Functions ¶
func ExtractLocalDC ¶
func IsIdempotent ¶
func IsNestedCall ¶
func MarkRetryCall ¶
func ValueOnly ¶
ValueOnly helps to clear parent context from deadlines/cancels
func WithCancel ¶
func WithIdempotent ¶
func WithLocalDC ¶
func WithTimeout ¶
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) Forget ¶
func (g *CancelsGuard) Forget(cancel *context.CancelFunc)
func (*CancelsGuard) Remember ¶
func (g *CancelsGuard) Remember(cancel *context.CancelFunc)
Source Files ¶
cancels_quard.go context_error.go context_with_cancel.go context_with_timeout.go idempotent.go local_dc.go retry_call.go without_deadline.go
- Version
- v3.65.3
- Published
- Apr 18, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 4 minutes ago –
Tools for package owners.