s2i

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultName = builders.S2I

DefaultName when no WithName option is provided to NewBuilder

Variables

View Source
var DefaultBuilderImages = map[string]string{
	"node":       "registry.access.redhat.com/ubi8/nodejs-16",
	"typescript": "registry.access.redhat.com/ubi8/nodejs-16",
	"quarkus":    "registry.access.redhat.com/ubi8/openjdk-17",
}

DefaultBuilderImages for s2i builders indexed by Runtime Language

Functions

func BuilderImage

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

Builder Image chooses the correct builder image or defaults.

Types

type Builder

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

Builder of functions using the s2i subsystem.

func NewBuilder

func NewBuilder(options ...Option) *Builder

NewBuilder creates a new instance of a Builder with static defaults.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, f fn.Function) (err error)

type DockerClient

type DockerClient interface {
	ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
	ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)
}

DockerClient is subset of dockerClient.CommonAPIClient required by this package

type Option

type Option func(*Builder)

func WithDockerClient

func WithDockerClient(cli DockerClient) Option

func WithImpl

func WithImpl(s build.Builder) Option

WithImpl sets an optional S2I Builder implementation override to use in place of what will be generated by the S2I build "strategy" system based on the config. Used for mocking the implementation during tests.

func WithName

func WithName(n string) Option

func WithPlatform

func WithPlatform(platform string) Option

func WithVerbose

func WithVerbose(v bool) Option

WithVerbose toggles verbose logging.

Jump to

Keyboard shortcuts

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