build

package
v0.0.0-...-330a6f9 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend provides build functionality to the API router

func NewBackend

func NewBackend(components ImageComponent, builder Builder, buildkit *buildkit.Builder, es *daemonevents.Events) (*Backend, error)

NewBackend creates a new build backend from components

func (*Backend) Build

func (b *Backend) Build(ctx context.Context, config backend.BuildConfig) (string, error)

Build builds an image from a Source

func (*Backend) Cancel

func (b *Backend) Cancel(ctx context.Context, id string) error

Cancel cancels the build by ID

func (*Backend) PruneCache

PruneCache removes all cached build sources

func (*Backend) RegisterGRPC

func (b *Backend) RegisterGRPC(s *grpc.Server)

RegisterGRPC registers buildkit controller to the grpc server.

type Builder

type Builder interface {
	Build(context.Context, backend.BuildConfig) (*builder.Result, error)
}

Builder defines interface for running a build

type ImageComponent

type ImageComponent interface {
	SquashImage(from string, to string) (string, error)
	TagImage(context.Context, image.ID, reference.Named) error
}

ImageComponent provides an interface for working with images

Jump to

Keyboard shortcuts

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