builder

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToInitializeDockerClient        = errors.New("failed to initialize docker client")
	ErrFailedToDownloadRuntimes              = errors.New("unable to download runtimes repository")
	ErrInvalidRuntime                        = errors.New("runtime is invalid")
	ErrFailedToSaveArchiveToWorkingDirectory = errors.New("failed to save archive file to the current working directory")
	ErrInjectingCodeIntoRuntime              = errors.New("the function code can't be injected into the given runtime")
	ErrCreatingTemporaryBuildDirectory       = errors.New("failed to create a temporary build directory")
	ErrCreateBuildContainer                  = errors.New("failed to create the build container")
	ErrStartBuildContainer                   = errors.New("failed to start the build container")
	ErrInjectAlphaScript                     = errors.New("failed to inject the custom /sbin/init script")
)

Functions

This section is empty.

Types

type BuildOptions

type BuildOptions struct {
	// The identifier for the current build
	Id string
	// The runtime to use to build the function
	Runtime string
	Archive io.Reader
}

Builder is used to encapsulate logic used to build functions.

type Builder

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

Builder is used to encapsulate logic used to build functions.

func NewBuilder

func NewBuilder() (*Builder, error)

func (*Builder) ImageBuild

func (b *Builder) ImageBuild(ctx context.Context, opts *BuildOptions) (string, error)

ImageBuild package an entire function image, and return the path to the image on disk.

Jump to

Keyboard shortcuts

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