MCPcopy Create free account
hub / github.com/docker/compose / Close

Method Close

pkg/compose/compose.go:226–232  ·  view source on GitHub ↗

Close releases any connections/resources held by the underlying clients. In practice, this service has the same lifetime as the process, so everything will get cleaned up at about the same time regardless even if not invoked.

()

Source from the content-addressed store, hash-verified

224// In practice, this service has the same lifetime as the process, so everything
225// will get cleaned up at about the same time regardless even if not invoked.
226func (s *composeService) Close() error {
227 var errs []error
228 if s.dockerCli != nil {
229 errs = append(errs, s.apiClient().Close())
230 }
231 return errors.Join(errs...)
232}
233
234func (s *composeService) apiClient() client.APIClient {
235 return s.dockerCli.Client()

Callers

nothing calls this directly

Calls 2

apiClientMethod · 0.95
CloseMethod · 0.65

Tested by

no test coverage detected