Documentation ¶
Index ¶
- Constants
- Variables
- func BuildEnv(builderConfig BuilderConfig) ([]string, error)
- func BuildEnvMap(builderConfig BuilderConfig) (map[string]string, error)
- func BuildK8sEnv(builderConfig BuilderConfig) ([]corev1.EnvVar, error)
- func GenContainerID(builderID, runnerID int64) string
- func Initialize(config configs.Configuration) error
- func ParseContainerID(containerName string) (int64, int64, error)
- type Builder
- type BuilderConfig
- type Factory
Constants ¶
View Source
const (
// ContainerPrefix ...
ContainerPrefix = "sigma-builder-"
)
Variables ¶
View Source
var DriverFactories = make(map[string]Factory)
DriverFactories ...
Functions ¶
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
GenContainerID ...
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.
Click to show internal directories.
Click to hide internal directories.