Help us shape the future of Go! Take the 2026 Go Developer Survey

imageloader

package
v0.87.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerDesktopLoader

type DockerDesktopLoader struct{}

DockerDesktopLoader handles image loading for Docker Desktop's built-in Kubernetes. Docker Desktop shares its Docker daemon with Kubernetes, so locally built images are already available to the cluster — no loading step required.

func NewDockerDesktop

func NewDockerDesktop() *DockerDesktopLoader

NewDockerDesktop creates a new DockerDesktopLoader.

func (*DockerDesktopLoader) Load

func (d *DockerDesktopLoader) Load(cfg *LoadConfig) error

func (*DockerDesktopLoader) Type

func (d *DockerDesktopLoader) Type() Runtime

func (*DockerDesktopLoader) Validate

func (d *DockerDesktopLoader) Validate() error

type ImageLoader

type ImageLoader interface {
	Type() Runtime
	Validate() error
	Load(cfg *LoadConfig) error
}

ImageLoader loads a Docker image into a specific Kubernetes runtime.

type K3dLoader

type K3dLoader struct{}

K3dLoader loads images into a k3d cluster.

func NewK3d

func NewK3d() *K3dLoader

NewK3d creates a new K3dLoader.

func (*K3dLoader) Load

func (k *K3dLoader) Load(cfg *LoadConfig) error

func (*K3dLoader) Type

func (k *K3dLoader) Type() Runtime

func (*K3dLoader) Validate

func (k *K3dLoader) Validate() error

type KindLoader

type KindLoader struct{}

KindLoader loads images into a kind cluster.

func NewKind

func NewKind() *KindLoader

NewKind creates a new KindLoader.

func (*KindLoader) Load

func (k *KindLoader) Load(cfg *LoadConfig) error

func (*KindLoader) Type

func (k *KindLoader) Type() Runtime

func (*KindLoader) Validate

func (k *KindLoader) Validate() error

type LoadConfig

type LoadConfig struct {
	Image         string  // full image:tag reference
	Runtime       Runtime // target runtime
	Registry      string  // only used for RuntimeRemote (e.g. "ghcr.io/org")
	Cluster       string  // cluster name extracted from context
	ResolvedImage string  // set by RemoteLoader after push (registry-qualified name)
}

LoadConfig holds configuration for loading an image into a cluster.

type MinikubeLoader

type MinikubeLoader struct{}

MinikubeLoader loads images into a minikube cluster.

func NewMinikube

func NewMinikube() *MinikubeLoader

NewMinikube creates a new MinikubeLoader.

func (*MinikubeLoader) Load

func (m *MinikubeLoader) Load(cfg *LoadConfig) error

func (*MinikubeLoader) Type

func (m *MinikubeLoader) Type() Runtime

func (*MinikubeLoader) Validate

func (m *MinikubeLoader) Validate() error

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry holds registered image loaders keyed by runtime.

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates an empty image loader registry.

func (*Registry) Load

func (r *Registry) Load(cfg *LoadConfig) error

Load dispatches to the appropriate loader based on cfg.Runtime.

func (*Registry) Register

func (r *Registry) Register(l ImageLoader)

Register adds an image loader to the registry.

type RemoteLoader

type RemoteLoader struct{}

RemoteLoader pushes images to a container registry for remote clusters.

func NewRemote

func NewRemote() *RemoteLoader

NewRemote creates a new RemoteLoader.

func (*RemoteLoader) Load

func (r *RemoteLoader) Load(cfg *LoadConfig) error

func (*RemoteLoader) Type

func (r *RemoteLoader) Type() Runtime

func (*RemoteLoader) Validate

func (r *RemoteLoader) Validate() error

type Runtime

type Runtime string

Runtime identifies a Kubernetes cluster runtime.

const (
	RuntimeMinikube      Runtime = "minikube"
	RuntimeKind          Runtime = "kind"
	RuntimeDockerDesktop Runtime = "docker-desktop"
	RuntimeK3d           Runtime = "k3d"
	RuntimeRemote        Runtime = "remote"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL