langruntime

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

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 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 string, env []v1.EnvVar, installVolume v1.VolumeMount) (v1.Container, error)

GetBuildContainer returns a Container definition based on a runtime

func (*Langruntimes) GetFunctionImage added in v0.4.0

func (l *Langruntimes) GetFunctionImage(runtime, ftype 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) 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, depsPath, runtime string)

UpdateDeployment object in case of custom runtime

type RuntimeInfo

type RuntimeInfo struct {
	ID             string           `yaml:"ID"`
	Versions       []RuntimeVersion `yaml:"versions"`
	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"`
	HTTPImage        string        `yaml:"httpImage"`
	PubSubImage      string        `yaml:"pubsubImage"`
	InitImage        string        `yaml:"initImage"`
	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