driver

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 17 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotConnecting = errors.Errorf("driver not connecting")
View Source
var ErrNotRunning = errors.Errorf("driver not running")

Functions

func Boot

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

func BuilderName added in v0.13.1

func BuilderName(name string) string

func ParseBuilderName added in v0.13.1

func ParseBuilderName(name string) (string, error)

func Register

func Register(f Factory)

Types

type Auth added in v0.5.0

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 added in v0.11.0

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

func GetDriver

func GetDriver(ctx context.Context, name string, f Factory, endpointAddr string, api dockerclient.APIClient, auth Auth, kcc KubeClientConfig, buildkitdFlags []string, files map[string][]byte, do map[string]string, platforms []specs.Platform, contextPathHash string, dialMeta map[string][]string) (*DriverHandle, error)

func (*DriverHandle) Client added in v0.11.0

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

func (*DriverHandle) HistoryAPISupported added in v0.11.0

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

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 added in v0.3.0

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 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 {
	// This object needs updates to be generic for different drivers
	Name             string
	EndpointAddr     string
	DockerAPI        dockerclient.APIClient
	KubeClientConfig KubeClientConfig
	BuildkitdFlags   []string
	Files            map[string][]byte
	DriverOpts       map[string]string
	Auth             Auth
	Platforms        []specs.Platform
	ContextPathHash  string // can be used for determining pods in the driver instance
	DialMeta         map[string][]string
}

type KubeClientConfig added in v0.5.0

type KubeClientConfig interface {
	ClientConfig() (*rest.Config, error)
	Namespace() (string, bool, error)
}

type KubeClientConfigInCluster added in v0.5.0

type KubeClientConfigInCluster struct{}

func (KubeClientConfigInCluster) ClientConfig added in v0.5.0

func (k KubeClientConfigInCluster) ClientConfig() (*rest.Config, error)

func (KubeClientConfigInCluster) Namespace added in v0.5.0

func (k KubeClientConfigInCluster) Namespace() (string, bool, error)

type Status

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

func (Status) String

func (s Status) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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