builder

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContainerPrefix ...
	ContainerPrefix = "sigma-builder-"
)

Variables

View Source
var DriverFactories = make(map[string]Factory)

DriverFactories ...

Functions

func BuildEnv

func BuildEnv(builderConfig BuilderConfig) ([]string, error)

BuildEnv ...

func BuildEnvMap added in v1.2.0

func BuildEnvMap(builderConfig BuilderConfig) (map[string]string, error)

BuildEnvMap ...

func BuildK8sEnv

func BuildK8sEnv(builderConfig BuilderConfig) ([]corev1.EnvVar, error)

BuildK8sEnv ...

func GenContainerID added in v1.2.0

func GenContainerID(builderID, runnerID int64) string

GenContainerID ...

func Initialize

func Initialize(config configs.Configuration) error

Initialize ...

func ParseContainerID added in v1.2.0

func ParseContainerID(containerName string) (int64, int64, error)

ParseContainerID ...

Types

type Builder

type Builder interface {
	// Start start a container to build oci image and push to registry
	Start(ctx context.Context, builderConfig BuilderConfig) error
	// Stop stop the container
	Stop(ctx context.Context, builderID, runnerID int64) error
	// Restart wrap stop and start
	Restart(ctx context.Context, builderConfig BuilderConfig) error
	// LogStream get the real time log stream
	LogStream(ctx context.Context, builderID, runnerID int64, writer io.Writer) error
}

Builder ...

var Driver Builder

Driver is the builder driver, maybe implement by docker, podman, k8s, etc.

type BuilderConfig

type BuilderConfig struct {
	types.Builder
}

BuilderConfig ...

type Factory

type Factory interface {
	New(config configs.Configuration) (Builder, error)
}

Factory is the interface for the builder driver factory

Directories

Path Synopsis
obs

Jump to

Keyboard shortcuts

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