containerizer

package
v0.2.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComesBefore added in v0.2.0

func ComesBefore(x, y plantypes.ContainerBuildTypeValue) bool

ComesBefore returns true if x < y i.e. x comes before y

func GetAllContainerBuildStrategies added in v0.2.0

func GetAllContainerBuildStrategies() []string

GetAllContainerBuildStrategies returns all translator types

func GetContainer added in v0.2.0

func GetContainer(plan plantypes.Plan, service plantypes.Service) (irtypes.Container, error)

GetContainer get the container for a service

func InitContainerizers added in v0.2.0

func InitContainerizers(path string, containerizerTypes []string)

InitContainerizers initializes the containerizers

Types

type CNBContainerizer

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

CNBContainerizer implements Containerizer interface

func (*CNBContainerizer) GetAllBuildpacks

func (d *CNBContainerizer) GetAllBuildpacks() (buildpacks map[string][]string)

GetAllBuildpacks returns all supported buildpacks

func (*CNBContainerizer) GetContainer

func (d *CNBContainerizer) GetContainer(plan plantypes.Plan, service plantypes.Service) (irtypes.Container, error)

GetContainer returns the container for the service

func (*CNBContainerizer) GetContainerBuildStrategy

func (d *CNBContainerizer) GetContainerBuildStrategy() plantypes.ContainerBuildTypeValue

GetContainerBuildStrategy returns the containerization build strategy for the containerizer

func (*CNBContainerizer) GetTargetOptions

func (d *CNBContainerizer) GetTargetOptions(plan plantypes.Plan, path string) []string

GetTargetOptions gets all possible target options for a path

func (*CNBContainerizer) Init

func (d *CNBContainerizer) Init(path string)

Init initializes the containerizer

type ContainerizationOption

type ContainerizationOption struct {
	ContainerizationType plantypes.ContainerBuildTypeValue
	TargetOptions        []string
}

ContainerizationOption defines the containerization option for a path

func GetContainerizationOptions added in v0.2.0

func GetContainerizationOptions(plan plantypes.Plan, sourcepath string) []ContainerizationOption

GetContainerizationOptions returns ContainerizerOptions for given sourcepath

type Containerizer

type Containerizer interface {
	Init(path string)
	GetTargetOptions(plan plantypes.Plan, path string) []string
	GetContainerBuildStrategy() plantypes.ContainerBuildTypeValue
	GetContainer(plan plantypes.Plan, service plantypes.Service) (irtypes.Container, error)
}

Containerizer can be used to containerize applications given path to the source code

type DockerfileContainerizer

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

DockerfileContainerizer implements Containerizer interface

func (*DockerfileContainerizer) GetContainer

func (d *DockerfileContainerizer) GetContainer(plan plantypes.Plan, service plantypes.Service) (irtypes.Container, error)

GetContainer returns the container for a service

func (*DockerfileContainerizer) GetContainerBuildStrategy

func (*DockerfileContainerizer) GetContainerBuildStrategy() plantypes.ContainerBuildTypeValue

GetContainerBuildStrategy returns the ContaierBuildStrategy

func (*DockerfileContainerizer) GetTargetOptions

func (d *DockerfileContainerizer) GetTargetOptions(_ plantypes.Plan, path string) []string

GetTargetOptions returns the target options for a path

func (*DockerfileContainerizer) Init

func (d *DockerfileContainerizer) Init(path string)

Init initializes docker file containerizer

type ManualContainerizer

type ManualContainerizer struct {
}

ManualContainerizer implements Containerizer interface

func (ManualContainerizer) GetContainer

func (d ManualContainerizer) GetContainer(plan plantypes.Plan, service plantypes.Service) (irtypes.Container, error)

GetContainer returns the container for a service

func (ManualContainerizer) GetContainerBuildStrategy

func (d ManualContainerizer) GetContainerBuildStrategy() plantypes.ContainerBuildTypeValue

GetContainerBuildStrategy returns the containerbuildstrategy

func (ManualContainerizer) GetTargetOptions

func (d ManualContainerizer) GetTargetOptions(plan plantypes.Plan, path string) []string

GetTargetOptions returns empty for Manual

func (*ManualContainerizer) Init

func (d *ManualContainerizer) Init(path string)

Init initializes the containerizer

type ReuseContainerizer

type ReuseContainerizer struct {
}

ReuseContainerizer implements Containerizer interface

func (ReuseContainerizer) GetContainer

func (d ReuseContainerizer) GetContainer(plan plantypes.Plan, service plantypes.Service) (irtypes.Container, error)

GetContainer returns the container for a service

func (ReuseContainerizer) GetContainerBuildStrategy

func (d ReuseContainerizer) GetContainerBuildStrategy() plantypes.ContainerBuildTypeValue

GetContainerBuildStrategy returns the containerbuildstrategy that is supported

func (ReuseContainerizer) GetTargetOptions

func (d ReuseContainerizer) GetTargetOptions(plan plantypes.Plan, path string) []string

GetTargetOptions does nothing for reuse containerizer

func (*ReuseContainerizer) Init

func (d *ReuseContainerizer) Init(path string)

Init initializes the containerizer

type ReuseDockerfileContainerizer

type ReuseDockerfileContainerizer struct {
}

ReuseDockerfileContainerizer uses its own containerization interface

func (*ReuseDockerfileContainerizer) GetContainer

GetContainer returns the container for the service

func (*ReuseDockerfileContainerizer) GetContainerBuildStrategy

func (d *ReuseDockerfileContainerizer) GetContainerBuildStrategy() plantypes.ContainerBuildTypeValue

GetContainerBuildStrategy returns the containerization build strategy

type S2IContainerizer

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

S2IContainerizer implements Containerizer interface

func (*S2IContainerizer) GetContainer

func (d *S2IContainerizer) GetContainer(plan plantypes.Plan, service plantypes.Service) (irtypes.Container, error)

GetContainer returns the container for a service

func (*S2IContainerizer) GetContainerBuildStrategy

func (d *S2IContainerizer) GetContainerBuildStrategy() plantypes.ContainerBuildTypeValue

GetContainerBuildStrategy returns the containerization build strategy

func (*S2IContainerizer) GetTargetOptions

func (d *S2IContainerizer) GetTargetOptions(_ plantypes.Plan, path string) []string

GetTargetOptions returns the target options for a path

func (*S2IContainerizer) Init

func (d *S2IContainerizer) Init(path string)

Init initializes the containerizer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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