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

Interface APIClientProvider

cli/command/completion/functions.go:19–21  ·  view source on GitHub ↗

APIClientProvider provides a method to get a [client.APIClient], initializing it if needed. It's a smaller interface than [command.Cli], and used in situations where an APIClient is needed, but we want to postpone initializing the client until it's used.

Source from the content-addressed store, hash-verified

17// APIClient is needed, but we want to postpone initializing the client until
18// it's used.
19type APIClientProvider interface {
20 Client() client.APIClient
21}
22
23// ImageNames offers completion for images present within the local store
24func ImageNames(dockerCLI APIClientProvider, limit int) cobra.CompletionFunc {

Callers 8

ImageNamesFunction · 0.65
ImageNamesWithBaseFunction · 0.65
ContainerNamesFunction · 0.65
VolumeNamesFunction · 0.65
NetworkNamesFunction · 0.65
runLogsFunction · 0.65
copyFromContainerFunction · 0.65
copyToContainerFunction · 0.65

Implementers 4

DockerClicli/command/cli.go
fakeCLIcli/command/completion/functions_test.
FakeCliinternal/test/cli.go
FakeClicmd/docker-trust/internal/test/cli.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…