MCPcopy Create free account
hub / github.com/docker/docker-agent / externalDepthFromContext

Function externalDepthFromContext

pkg/teamloader/teamloader.go:983–988  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

981var externalDepthKey contextKey
982
983func externalDepthFromContext(ctx context.Context) int {
984 if v, ok := ctx.Value(externalDepthKey).(int); ok {
985 return v
986 }
987 return 0
988}
989
990func contextWithExternalDepth(ctx context.Context, depth int) context.Context {
991 return context.WithValue(ctx, externalDepthKey, depth)

Callers 2

loadExternalAgentFunction · 0.85
TestExternalDepthContextFunction · 0.85

Calls 1

ValueMethod · 0.65

Tested by 1

TestExternalDepthContextFunction · 0.68