MCPcopy Index your code
hub / github.com/docker/cli / runInspect

Function runInspect

cli/command/context/inspect.go:47–64  ·  view source on GitHub ↗
(dockerCli command.Cli, opts inspectOptions)

Source from the content-addressed store, hash-verified

45}
46
47func runInspect(dockerCli command.Cli, opts inspectOptions) error {
48 getRefFunc := func(ref string) (any, []byte, error) {
49 c, err := dockerCli.ContextStore().GetMetadata(ref)
50 if err != nil {
51 return nil, nil, err
52 }
53 tlsListing, err := dockerCli.ContextStore().ListTLSFiles(ref)
54 if err != nil {
55 return nil, nil, err
56 }
57 return contextWithTLSListing{
58 Metadata: c,
59 TLSMaterial: tlsListing,
60 Storage: dockerCli.ContextStore().GetStorageInfo(ref),
61 }, nil, nil
62 }
63 return inspect.Inspect(dockerCli.Out(), opts.refs, opts.format, getRefFunc)
64}
65
66type contextWithTLSListing struct {
67 store.Metadata

Callers 2

TestInspectFunction · 0.70
newInspectCommandFunction · 0.70

Calls 6

GetMetadataMethod · 0.65
ContextStoreMethod · 0.65
ListTLSFilesMethod · 0.65
GetStorageInfoMethod · 0.65
InspectMethod · 0.65
OutMethod · 0.65

Tested by 1

TestInspectFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…