pack

package
v0.0.0-...-83c1a15 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultName = builders.Pack

DefaultName when no WithName option is provided to NewBuilder

Variables

View Source
var (
	DefaultBaseBuilder = "ghcr.io/knative/builder-jammy-base:latest"
	DefaultTinyBuilder = "ghcr.io/knative/builder-jammy-tiny:latest"
)
View Source
var (
	DefaultBuilderImages = map[string]string{
		"go":   DefaultTinyBuilder,
		"java": DefaultBaseBuilder,
	}
)
View Source
var DefaultLifecycleImage = "quay.io/boson/lifecycle@sha256:f53fea9ec9188b92cab0b8a298ff852d76a6c2aaf56f968a08637e13de0e0c59"

Functions

func BuilderImage

func BuilderImage(f *dubbo.Dubbo, builderName string) (string, error)

BuilderImage Image chooses the correct builder image or defaults.

func TrustBuilder

func TrustBuilder(b string) bool

TrustBuilder determines whether the builder image should be trusted based on a set of trusted builder image registry prefixes.

Types

type Builder

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

Builder will build Function using Pack.

func NewBuilder

func NewBuilder(options ...Option) *Builder

NewBuilder instantiates a Buildpack-based Builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, f *dubbo.Dubbo) (err error)

Build the Function at path.

type ErrRuntimeNotSupported

type ErrRuntimeNotSupported struct {
	Runtime string
}

func (ErrRuntimeNotSupported) Error

func (e ErrRuntimeNotSupported) Error() string

type ErrRuntimeRequired

type ErrRuntimeRequired struct{}

func (ErrRuntimeRequired) Error

func (e ErrRuntimeRequired) Error() string

type Impl

type Impl interface {
	Build(context.Context, pack.BuildOptions) error
}

Impl allows for the underlying implementation to be mocked for tests.

type Option

type Option func(*Builder)

func WithImpl

func WithImpl(i Impl) Option

func WithName

func WithName(n string) Option

Jump to

Keyboard shortcuts

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