Documentation
¶
Index ¶
Constants ¶
View Source
const ( PathPrefix = "/daytona" ToolboxPrefix = PathPrefix + "/toolbox" )
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
RegisterRoutes mounts the supported Daytona compatibility surface.
Types ¶
type BuildConfig ¶
BuildConfig surfaces the operator-configured image-build knobs through to the facade. Mirrors the corresponding fields on internal/config.Config — kept narrow so the package doesn't take a dep on internal/config.
type Deps ¶
type Deps struct {
Service *service.Service
Logger *slog.Logger
Auth func(http.Handler) http.Handler
// Builder is optional. When nil, multi-line Dockerfile builds are
// rejected at the handler with a 400 — the legacy single-line `FROM`
// fast-path still works (it doesn't need a builder).
Builder ImageBuilder
Build BuildConfig
// ContainerEngine selects BuildKit-absent clear errors on containerd hosts.
ContainerEngine string
}
Deps are the shared dependencies the Daytona facade needs from the top-level API package.
type ImageBuilder ¶
type ImageBuilder interface {
BuildImage(ctx context.Context, req docker.BuildImageRequest) error
ImageExists(ctx context.Context, imageRef string) (bool, error)
RemoveImage(ctx context.Context, imageRef string) error
// RefreshTag bumps Docker's Metadata.LastTagTime so the built-image
// janitor doesn't GC a tag we just handed back from the cache. Called
// on the ImageExists==true short-circuit in resolveBuildInfo.
RefreshTag(ctx context.Context, fullRef string) error
}
ImageBuilder is the slice of pkg/docker.Client the facade needs to turn a Dockerfile into a runnable image. Declared as an interface so the test harness can stub it without standing up a real Docker daemon.
Click to show internal directories.
Click to hide internal directories.