backend

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package backend selects a sandbox provider by name, so the executor and the BYOC worker construct Docker or Kubernetes "hands" from the same config point instead of hard-coding one. Both binaries are thin glue around this: they map their environment to a Config and call New.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (sandbox.Provider, error)

New builds the named sandbox provider, or an error naming the accepted set.

Types

type Config

type Config struct {
	Backend string // "docker" (default) or "k8s"

	// docker: empty Host falls back to DOCKER_HOST and then the well-known socket.
	DockerHost string

	// k8s: empty Kubeconfig and Context use in-cluster config (the executor
	// running as a Deployment), then the standard kubeconfig loading rules.
	K8sKubeconfig    string
	K8sContext       string
	K8sNamespace     string
	K8sNetSetupImage string
}

Config names the backend and carries each one's settings; only the selected backend's fields are read. An empty Backend defaults to docker — the v1 backend — so a deployment that predates this selection keeps working with no new configuration.

Jump to

Keyboard shortcuts

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