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

Method ServiceList

cli/command/stack/client_test.go:50–63  ·  view source on GitHub ↗
(_ context.Context, options client.ServiceListOptions)

Source from the content-addressed store, hash-verified

48}
49
50func (cli *fakeClient) ServiceList(_ context.Context, options client.ServiceListOptions) (client.ServiceListResult, error) {
51 if cli.serviceListFunc != nil {
52 return cli.serviceListFunc(options)
53 }
54
55 namespace := namespaceFromFilters(options.Filters)
56 servicesList := client.ServiceListResult{}
57 for _, name := range cli.services {
58 if belongToNamespace(name, namespace) {
59 servicesList.Items = append(servicesList.Items, serviceFromName(name))
60 }
61 }
62 return servicesList, nil
63}
64
65func (cli *fakeClient) NetworkList(_ context.Context, options client.NetworkListOptions) (client.NetworkListResult, error) {
66 if cli.networkListFunc != nil {

Callers 4

getStackServicesFunction · 0.45
runServicesFunction · 0.45
getStacksFunction · 0.45
serviceNamesFunction · 0.45

Calls 3

namespaceFromFiltersFunction · 0.85
belongToNamespaceFunction · 0.85
serviceFromNameFunction · 0.85

Tested by

no test coverage detected