github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/internal/xcontext/retry_call.go (about) 1 package xcontext 2 3 import "context" 4 5 type ( 6 markRetryCallKey struct{} 7 ) 8 9 func MarkRetryCall(ctx context.Context) context.Context { 10 return context.WithValue(ctx, markRetryCallKey{}, true) 11 } 12 13 func IsNestedCall(ctx context.Context) bool { 14 if _, has := ctx.Value(markRetryCallKey{}).(bool); has { 15 return true 16 } 17 18 return false 19 }