GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Why Go
  • Case Studies
  • Use Cases
  • Security
  • Learn
  • Effective Go
  • Go User Manual
  • Standard library
  • Release Notes
  • API
  • Packages
  • Recorded Talks
  • Meetups
  • Conferences

This view

  • Original page
  • New address

GeezerVison is showing pkg.go.dev — buildpacks package - knative.dev/func/pkg/buildpacks - Go Packages

Details

  • checked Valid go.mod file

    The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.

  • checked Redistributable license

    Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.

  • checked Tagged version

    Modules with tagged versions give importers more predictable builds.

  • unchecked Stable version

    When a project reaches major version v1 it is considered stable.

  • Learn more about best practices

Repository

github.com/knative/func

Links

  • Open Source Insights Logo Open Source Insights

Documentation ¶

Index ¶

  • Constants
  • Variables
  • func BuilderImage(f fn.Function, builderName string) (string, error)
  • func PythonScaffoldingProcfile() string
  • func TrustBuilder(b string) bool
  • type Builder
    • func NewBuilder(options ...Option) *Builder
    • func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platform) (err error)
  • type ErrRuntimeNotSupported
    • func (e ErrRuntimeNotSupported) Error() string
  • type ErrRuntimeRequired
    • func (e ErrRuntimeRequired) Error() string
  • type Impl
  • type Option
    • func WithImpl(i Impl) Option
    • func WithName(n string) Option
    • func WithTimestamp(v bool) Option
    • func WithVerbose(v bool) Option
  • type Scaffolder
    • func NewScaffolder(verbose bool) *Scaffolder
    • func (s Scaffolder) Scaffold(ctx context.Context, f fn.Function, path string) error

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:v2"
View Source
var (
	DefaultBuilderImages = map[string]string{
		"node":       DefaultBaseBuilder,
		"nodejs":     DefaultBaseBuilder,
		"typescript": DefaultBaseBuilder,
		"go":         DefaultTinyBuilder,
		"python":     DefaultBaseBuilder,
		"quarkus":    DefaultTinyBuilder,
		"rust":       DefaultBaseBuilder,
		"springboot": DefaultBaseBuilder,
	}
)
View Source
var DefaultLifecycleImage = "docker.io/buildpacksio/lifecycle:553c041"
View Source
var DefaultTinyBuilder = "ghcr.io/knative/builder-jammy-tiny:v2"

Functions ¶

func BuilderImage ¶

func BuilderImage(f fn.Function, builderName string) (string, error)

Builder Image chooses the correct builder image or defaults.

func PythonScaffoldingProcfile ¶ added in v0.49.0

func PythonScaffoldingProcfile() string

PythonScaffoldingProcfile returns the Procfile content that tells the buildpack how to start the service.

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 fn.Function, platforms []fn.Platform) (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

func WithTimestamp ¶

func WithTimestamp(v bool) Option

func WithVerbose ¶

func WithVerbose(v bool) Option

type Scaffolder ¶

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

Scaffolder for buildpacks builder

func NewScaffolder ¶

func NewScaffolder(verbose bool) *Scaffolder

func (Scaffolder) Scaffold ¶

func (s Scaffolder) Scaffold(ctx context.Context, f fn.Function, path string) error

Scaffold writes scaffolding for the function's runtime to the target path using embedded templates. Pass "" for path to use the default (.func/build/). Runtime-specific processing is applied after scaffolding is written.

Source Files ¶

View all Source files
  • builder.go
  • legacy_parliament.go
  • scaffolder.go
Click to show internal directories.
Click to hide internal directories.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.