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

Function runInspect

cli/command/system/inspect.go:88–98  ·  view source on GitHub ↗
(ctx context.Context, dockerCli command.Cli, opts inspectOptions)

Source from the content-addressed store, hash-verified

86}
87
88func runInspect(ctx context.Context, dockerCli command.Cli, opts inspectOptions) error {
89 var elementSearcher inspect.GetRefFunc
90 switch opts.objectType {
91 case "", typeConfig, typeContainer, typeImage, typeNetwork, typeNode,
92 typePlugin, typeSecret, typeService, typeTask, typeVolume:
93 elementSearcher = inspectAll(ctx, dockerCli, opts.size, opts.objectType)
94 default:
95 return fmt.Errorf(`unknown type: %q: must be one of "%s"`, opts.objectType, strings.Join(allTypes, `", "`))
96 }
97 return inspect.Inspect(dockerCli.Out(), opts.ids, opts.format, elementSearcher)
98}
99
100func inspectContainers(ctx context.Context, dockerCli command.Cli, getSize bool) inspect.GetRefFunc {
101 return func(ref string) (any, []byte, error) {

Callers 1

newInspectCommandFunction · 0.70

Calls 3

inspectAllFunction · 0.85
InspectMethod · 0.65
OutMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…