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

Function withBackend

cmd/compose/backend.go:29–35  ·  cmd/compose/backend.go::withBackend

withBackend creates a compose backend and passes it to fn.

(dockerCli command.Cli, opts *BackendOptions, fn func(api.Compose) error)

Source from the content-addressed store, hash-verified

27
28// withBackend creates a compose backend and passes it to fn.
29func withBackend(dockerCli command.Cli, opts *BackendOptions, fn func(api.Compose) error) error {
30 backend, err := compose.NewComposeService(dockerCli, opts.Options...)
31 if err != nil {
32 return err
33 }
34 return fn(backend)
35}
36
37// optionalTimeout converts an integer timeout (in seconds) into a *time.Duration.
38// If changed is false, nil is returned (no timeout was explicitly set).

Callers 6

runStopFunction · 0.85
runStartFunction · 0.85
runRestartFunction · 0.85
runKillFunction · 0.85
runPauseFunction · 0.85
runUnPauseFunction · 0.85

Calls 1

NewComposeServiceFunction · 0.92

Tested by

no test coverage detected