package driver

import "github.com/docker/buildx/driver"

Index

Functions

func Boot

func Boot(ctx, clientContext context.Context, d *DriverHandle, pw progress.Writer) (*client.Client, error)

func BuilderName

func BuilderName(name string) string

func ParseBuilderName

func ParseBuilderName(name string) (string, error)

func Register

func Register(f Factory)

Types

type Auth

type Auth interface {
	GetAuthConfig(registryHostname string) (clitypes.AuthConfig, error)
}

type BuildkitConfig

type BuildkitConfig struct {
}

type Driver

type Driver interface {
	Factory() Factory
	Bootstrap(context.Context, progress.Logger) error
	Info(context.Context) (*Info, error)
	Version(context.Context) (string, error)
	Stop(ctx context.Context, force bool) error
	Rm(ctx context.Context, force, rmVolume, rmDaemon bool) error
	Dial(ctx context.Context) (net.Conn, error)
	Client(ctx context.Context, opts ...client.ClientOpt) (*client.Client, error)
	Features(ctx context.Context) map[Feature]bool
	HostGatewayIP(ctx context.Context) (net.IP, error)
	IsMobyDriver() bool
	Config() InitConfig
}

type DriverHandle

type DriverHandle struct {
	Driver
	// contains filtered or unexported fields
}

func GetDriver

func GetDriver(ctx context.Context, f Factory, cfg InitConfig) (*DriverHandle, error)

func (*DriverHandle) Client

func (d *DriverHandle) Client(ctx context.Context, opt ...client.ClientOpt) (*client.Client, error)

func (*DriverHandle) HistoryAPISupported

func (d *DriverHandle) HistoryAPISupported(ctx context.Context) bool

type ErrNotConnecting

type ErrNotConnecting struct{}

func (ErrNotConnecting) Error

func (ErrNotConnecting) Error() string

type ErrNotRunning

type ErrNotRunning struct{}

func (ErrNotRunning) Error

func (ErrNotRunning) Error() string

type Factory

type Factory interface {
	Name() string
	Usage() string
	Priority(ctx context.Context, endpoint string, api dockerclient.APIClient, dialMeta map[string][]string) int
	New(ctx context.Context, cfg InitConfig) (Driver, error)
	AllowsInstances() bool
}

func GetDefaultFactory

func GetDefaultFactory(ctx context.Context, ep string, c dockerclient.APIClient, instanceRequired bool, dialMeta map[string][]string) (Factory, error)

func GetFactories

func GetFactories(instanceRequired bool) []Factory

func GetFactory

func GetFactory(name string, instanceRequired bool) (Factory, error)

type Feature

type Feature string
const CacheExport Feature = "Cache export"
const DefaultLoad Feature = "Automatically load images to the Docker Engine image store"
const DirectPush Feature = "Direct push"
const DockerExporter Feature = "Docker exporter"
const MultiPlatform Feature = "Multi-platform build"
const OCIExporter Feature = "OCI exporter"

type Info

type Info struct {
	Status Status
	// DynamicNodes must be empty if the actual nodes are statically listed in the store
	DynamicNodes []store.Node
}

type InitConfig

type InitConfig struct {
	Name            string
	EndpointAddr    string
	DockerAPI       dockerclient.APIClient
	ContextStore    store.Reader
	BuildkitdFlags  []string
	Files           map[string][]byte
	DriverOpts      map[string]string
	Auth            Auth
	Platforms       []specs.Platform
	ContextPathHash string
	DialMeta        map[string][]string
}

type Status

type Status int
const (
	Inactive Status = iota
	Starting
	Running
	Stopping
	Stopped
)

func (Status) String

func (s Status) String() string

Source Files

driver.go features.go manager.go

Directories

PathSynopsis
driver/bkimage
driver/docker
driver/docker-container
driver/kubernetes
driver/kubernetes/context
driver/kubernetes/execconn
driver/kubernetes/manifest
driver/kubernetes/podchooser
driver/kubernetes/util
driver/remote
driver/remote/util
Version
v0.22.0 (latest)
Published
Mar 17, 2025
Platform
linux/amd64
Imports
16 packages
Last checked
3 weeks ago

Tools for package owners.