MCPcopy
hub / github.com/google/gvisor / GoferClientFromContext

Function GoferClientFromContext

pkg/devutil/context.go:31–36  ·  view source on GitHub ↗

GoferClientFromContext returns the device gofer client used by ctx.

(ctx context.Context)

Source from the content-addressed store, hash-verified

29
30// GoferClientFromContext returns the device gofer client used by ctx.
31func GoferClientFromContext(ctx context.Context) *GoferClient {
32 if v := ctx.Value(CtxDevGoferClient); v != nil {
33 return v.(*GoferClient)
34 }
35 return nil
36}
37
38// GoferClientProviderFromContext returns the GoferClientProvider used by ctx.
39func GoferClientProviderFromContext(ctx context.Context) GoferClientProvider {

Callers 4

OpenMethod · 0.92
openHostFDFunction · 0.92
openHostDevFileFunction · 0.92
createDeviceFilesFunction · 0.92

Calls 1

ValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…