langruntime

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PhaseInstallation - Installation phase name
	PhaseInstallation = "installation"
	// PhaseCompilation - Compilation phase name
	PhaseCompilation = "compilation"
	// PhaseRuntime - Runtime phase name
	PhaseRuntime = "runtime"
)

Variables

This section is empty.

Functions

func AddFakeConfig added in v0.4.0

func AddFakeConfig(clientset *fake.Clientset)

AddFakeConfig initializes configmap for unit tests with fake configuration.

Types

type Image added in v1.0.0

type Image struct {
	Phase   string            `yaml:"phase"`
	Image   string            `yaml:"image"`
	Command string            `yaml:"command,omitempty"`
	Env     map[string]string `yaml:"env,omitempty"`
}

Image represents the information about a runtime phase

type ImageSecret added in v0.4.0

type ImageSecret struct {
	ImageSecret string `yaml:"imageSecret,omitempty"`
}

ImageSecret for pulling the image

type Langruntimes added in v0.4.0

type Langruntimes struct {
	AvailableRuntimes []RuntimeInfo
	// contains filtered or unexported fields
}

Langruntimes struct for getting configmap

func New added in v0.4.0

func New(config *v1.ConfigMap) *Langruntimes

New initializes a langruntime object

func SetupLangRuntime added in v0.4.0

func SetupLangRuntime(clientset *fake.Clientset) *Langruntimes

SetupLangRuntime Sets up Langruntime struct

func (*Langruntimes) GetBuildContainer added in v0.4.0

func (l *Langruntimes) GetBuildContainer(runtime, depsChecksum string, env []v1.EnvVar, installVolume v1.VolumeMount) (v1.Container, error)

GetBuildContainer returns a Container definition based on a runtime

func (*Langruntimes) GetCompilationContainer added in v0.6.0

func (l *Langruntimes) GetCompilationContainer(runtime, funcName string, installVolume v1.VolumeMount) (*v1.Container, error)

GetCompilationContainer returns a Container definition based on a runtime

func (*Langruntimes) GetFunctionImage added in v0.4.0

func (l *Langruntimes) GetFunctionImage(runtime string) (string, error)

GetFunctionImage returns the image ID depending on the runtime, its version and function type

func (*Langruntimes) GetImageSecrets added in v0.4.0

func (l *Langruntimes) GetImageSecrets(runtime string) ([]v1.LocalObjectReference, error)

GetImageSecrets gets the secrets to pull the runtime image

func (*Langruntimes) GetLivenessProbeInfo added in v1.0.0

func (l *Langruntimes) GetLivenessProbeInfo(runtime string, port int) *v1.Probe

GetLivenessProbeInfo returs the liveness probe info regarding a runtime

func (*Langruntimes) GetRuntimeInfo added in v0.4.0

func (l *Langruntimes) GetRuntimeInfo(runtime string) (RuntimeInfo, error)

GetRuntimeInfo returns all the info regarding a runtime

func (*Langruntimes) GetRuntimes added in v0.4.0

func (l *Langruntimes) GetRuntimes() []string

GetRuntimes returns the list of available runtimes as strings

func (*Langruntimes) IsValidRuntime added in v0.4.0

func (l *Langruntimes) IsValidRuntime(runtime string) bool

IsValidRuntime returns true if passed runtime name is valid runtime

func (*Langruntimes) ReadConfigMap added in v0.4.0

func (l *Langruntimes) ReadConfigMap()

ReadConfigMap reads the configmap

func (*Langruntimes) UpdateDeployment added in v0.4.0

func (l *Langruntimes) UpdateDeployment(dpm *v1beta1.Deployment, volPath, runtime string)

UpdateDeployment object in case of custom runtime

type RuntimeInfo

type RuntimeInfo struct {
	ID                string           `yaml:"ID"`
	Versions          []RuntimeVersion `yaml:"versions"`
	LivenessProbeInfo *v1.Probe        `yaml:"livenessProbeInfo,omitempty"`
	DepName           string           `yaml:"depName"`
	FileNameSuffix    string           `yaml:"fileNameSuffix"`
}

RuntimeInfo describe the runtime specifics (typical file suffix and dependency file name) and the supported versions

type RuntimeVersion added in v0.4.0

type RuntimeVersion struct {
	Name             string        `yaml:"name"`
	Version          string        `yaml:"version"`
	Images           []Image       `yaml:"runtimeImage"`
	ImagePullSecrets []ImageSecret `yaml:"imagePullSecrets,omitempty"`
}

RuntimeVersion is a struct with all the info about the images and secrets

Jump to

Keyboard shortcuts

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