build

package
v0.0.0-...-ec4d356 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package build defines methods for building a v1.Image reference from a Go binary reference.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetBase

type GetBase func(string) (v1.Image, error)

type Interface

type Interface interface {
	// IsSupportedReference determines whether the given reference is to an importpath reference
	// that Ko supports building.
	// TODO(mattmoor): Verify that some base repo: foo.io/bar can be suffixed with this reference and parsed.
	IsSupportedReference(string) bool

	// Build turns the given importpath reference into a v1.Image containing the Go binary.
	Build(string) (v1.Image, error)
}

Interface abstracts different methods for turning a supported importpath reference into a v1.Image.

func NewGo

func NewGo(options ...Option) (Interface, error)

NewGo returns a build.Interface implementation that:

  1. builds go binaries named by importpath,
  2. containerizes the binary on a suitable base,

type Option

type Option func(*gobuildOpener) error

func WithBaseImages

func WithBaseImages(gb GetBase) Option

WithBaseImages is a functional option for overriding the base images that are used for different images.

func WithCreationTime

func WithCreationTime(t v1.Time) Option

WithCreationTime is a functional option for overriding the creation time given to images.

Jump to

Keyboard shortcuts

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