Documentation ¶
Index ¶
- func AddFakeConfig(clientset *fake.Clientset)
- type ImageSecret
- type Langruntimes
- func (l *Langruntimes) GetBuildContainer(runtime, depsChecksum string, env []v1.EnvVar, installVolume v1.VolumeMount) (v1.Container, error)
- func (l *Langruntimes) GetCompilationContainer(runtime, funcName string, installVolume v1.VolumeMount) (v1.Container, error)
- func (l *Langruntimes) GetFunctionImage(runtime string) (string, error)
- func (l *Langruntimes) GetImageSecrets(runtime string) ([]v1.LocalObjectReference, error)
- func (l *Langruntimes) GetRuntimeInfo(runtime string) (RuntimeInfo, error)
- func (l *Langruntimes) GetRuntimes() []string
- func (l *Langruntimes) IsValidRuntime(runtime string) bool
- func (l *Langruntimes) ReadConfigMap()
- func (l *Langruntimes) RequiresCompilation(runtime string) bool
- func (l *Langruntimes) UpdateDeployment(dpm *v1beta1.Deployment, depsPath, runtime string)
- type RuntimeInfo
- type RuntimeVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFakeConfig ¶ added in v0.4.0
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, 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) 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) RequiresCompilation ¶ added in v0.6.0
func (l *Langruntimes) RequiresCompilation(runtime string) bool
RequiresCompilation returns if the given runtime requires compilation
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"` Compiled bool `yaml:"compiled"` 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"` RuntimeImage string `yaml:"runtimeImage"` InitImage string `yaml:"initImage"` ImagePullSecrets []ImageSecret `yaml:"imagePullSecrets,omitempty"` }
RuntimeVersion is a struct with all the info about the images and secrets