feat: backend service

This commit is contained in:
Ilia Denisov
2026-05-06 10:14:55 +03:00
committed by GitHub
parent 3e2622757e
commit f446c6a2ac
1486 changed files with 49720 additions and 266401 deletions
+36
View File
@@ -0,0 +1,36 @@
package dockerclient
import "errors"
// Sentinel errors returned by the production adapter and consumed by
// `internal/runtime`. Tests substitute their own implementations of
// Client and may return these sentinels verbatim or wrap them with
// extra context via fmt.Errorf("...: %w", ...).
var (
// ErrNetworkMissing is returned by EnsureNetwork when the configured
// user-defined Docker network does not exist on the daemon.
// `internal/runtime` treats this as a fatal startup error — Galaxy
// never creates Docker networks itself.
ErrNetworkMissing = errors.New("dockerclient: network missing")
// ErrImageNotFound is returned by InspectImage / PullImage(never)
// when the image is absent locally and the active pull policy
// forbids fetching it.
ErrImageNotFound = errors.New("dockerclient: image not found")
// ErrContainerNotFound is returned by InspectContainer / Stop /
// Remove when no container with the supplied id or name exists.
// `internal/runtime` treats this as an idempotent miss for Stop and
// Remove and as a removed-container signal for InspectContainer.
ErrContainerNotFound = errors.New("dockerclient: container not found")
// ErrInvalidPullPolicy is returned by Run / PullImage when the
// supplied PullPolicy is not part of the closed vocabulary.
ErrInvalidPullPolicy = errors.New("dockerclient: invalid pull policy")
// ErrImagePullFailed wraps every PullImage failure path returned to
// the caller so `internal/runtime` can attribute the failure to the
// pull stage rather than to container creation. The unwrap chain
// preserves the underlying daemon error for logs and metrics.
ErrImagePullFailed = errors.New("dockerclient: image pull failed")
)