MCPcopy
hub / github.com/docker/compose / containerDetails

Function containerDetails

pkg/compose/ps_test.go:98–114  ·  view source on GitHub ↗
(service string, id string, status containerType.ContainerState, health containerType.HealthStatus, exitCode int)

Source from the content-addressed store, hash-verified

96}
97
98func containerDetails(service string, id string, status containerType.ContainerState, health containerType.HealthStatus, exitCode int) (containerType.Summary, containerType.InspectResponse) {
99 ctr := containerType.Summary{
100 ID: id,
101 Names: []string{"/" + id},
102 Image: "foo",
103 Labels: containerLabels(service, false),
104 State: status,
105 }
106 inspect := containerType.InspectResponse{
107 State: &containerType.State{
108 Status: status,
109 Health: &containerType.Health{Status: health},
110 ExitCode: exitCode,
111 },
112 }
113 return ctr, inspect
114}

Callers 1

TestPsFunction · 0.85

Calls 1

containerLabelsFunction · 0.85

Tested by

no test coverage detected