runtime

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRuntimeAlreadyExist = errors.New("runtime: A runtime with the same name already registered")
)

well known errors

Functions

func GetXenvPoolDeployment

func GetXenvPoolDeployment(lister listerappsv1.DeploymentLister, xenv *rfv1beta3.Xenv) (*appsv1.Deployment, error)

GetXenvPoolDeployment returns runner template deployment for given refunc

func Register

func Register(r Interface) error

Register adds a new versioned runner to registry

Types

type Interface

type Interface interface {
	Name() string

	// IsPodReady checks if the given pod is runnable
	IsPodReady(pod *corev1.Pod) bool

	// GetDeploymentTemplate returns a deployment of the runner
	GetDeploymentTemplate(tpl *rfv1beta3.Xenv) *appsv1.Deployment

	// InitPod initialize given pod
	// Note: one should not assume that the workDir still persist after InitPod being called
	InitPod(pod *corev1.Pod, funcinst *rfv1beta3.Funcinst, refunc *rfv1beta3.Funcdef, tpl *rfv1beta3.Xenv, workDir string) error
}

A Interface interface

func ForXenv

func ForXenv(xenv *rfv1beta3.Xenv) Interface

ForXenv returns runtime object for given xenv

Directories

Path Synopsis
lambda

Jump to

Keyboard shortcuts

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