MCPcopy Create free account
hub / github.com/pace/bricks / ExternalDependencyContextFromContext

Function ExternalDependencyContextFromContext

http/middleware/external_dependency.go:76–81  ·  view source on GitHub ↗

ExternalDependencyContextFromContext returns the external dependencies context or nil

(ctx context.Context)

Source from the content-addressed store, hash-verified

74
75// ExternalDependencyContextFromContext returns the external dependencies context or nil
76func ExternalDependencyContextFromContext(ctx context.Context) *ExternalDependencyContext {
77 if v := ctx.Value((*ExternalDependencyContext)(nil)); v != nil {
78 return v.(*ExternalDependencyContext)
79 }
80 return nil
81}
82
83// ExternalDependencyContext contains all dependencies that were seen
84// during the request livecycle

Calls 1

ValueMethod · 0.80

Used in the wild real call sites across dependent graphs

searching dependent graphs…