builders

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	// Build will build the given working directory as per builder configuration and returns Output
	Build(...ci.ContainerOption) (Output, error)
	// Close cleans up the builder
	Close() error
	// Config returns the builder configuration
	Config() *builders.Config
	// Wd returns the builder working directory
	Wd() builders.Dir
	// Tarball returns the tarball of the image used to build, if any
	Tarball() []byte
}

type CompressionMethod

type CompressionMethod uint32

CompressionMethod defines the method used to compress build Output of a Builder

const (
	WASM CompressionMethod = iota
	Website
)

type Logs

type Logs interface {
	io.ReadCloser
	CopyTo(dst io.Writer) (int64, error)
	CopyFrom(src io.Reader) (int64, error)
	FormatErr(format string, args ...any) error
}

type Output

type Output interface {
	// Compress takes a supported CompressionMethod, compress the files built by the Builder, and returns the ReadSeekCloser of the compressed file
	Compress(CompressionMethod) (io.ReadSeekCloser, error)
	// Logs returns the ReadCloser of the build logs
	Logs() Logs
	// OutDir returns the output directory of the built files, pre zip or compress
	OutDir() string
	// Closes logs
	Close() error
}

Jump to

Keyboard shortcuts

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