runtime

package
v0.0.0-...-2f10389 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RuntimeRegistrySingleton = registry.NewRegistry("processor_build_runtime")

Functions

This section is empty.

Types

type AbstractRuntime

type AbstractRuntime struct {
	Logger        nuclio.Logger
	Configuration Configuration
	DockerClient  *dockerclient.Client
	CmdRunner     cmdrunner.CmdRunner
}

func NewAbstractRuntime

func NewAbstractRuntime(logger nuclio.Logger, configuration Configuration) (*AbstractRuntime, error)

func (*AbstractRuntime) GetProcessorConfigFileContents

func (ar *AbstractRuntime) GetProcessorConfigFileContents() string

func (*AbstractRuntime) GetProcessorImageObjectPaths

func (ar *AbstractRuntime) GetProcessorImageObjectPaths() map[string]string

return a map of objects the runtime needs to copy into the processor image the key can be a dir, a file or a url of a file the value is an absolute path into the docker image

func (*AbstractRuntime) OnAfterStagingDirCreated

func (ar *AbstractRuntime) OnAfterStagingDirCreated(stagingDir string) error

type Configuration

type Configuration interface {
	GetFunctionPath() string

	GetFunctionDir() string

	GetFunctionName() string

	GetFunctionHandler() string

	GetNuclioSourceDir() string

	GetNuclioSourceURL() string

	GetStagingDir() string

	GetNoBaseImagePull() bool
}

type Factory

type Factory interface {
	Create(logger nuclio.Logger,
		configuration Configuration) (Runtime, error)
}

type Runtime

type Runtime interface {

	// returns the image name of the default processor base image
	GetDefaultProcessorBaseImageName() string

	// given a path holding a function (or functions) returns a list of all the handlers
	// in that directory
	DetectFunctionHandlers(functionPath string) ([]string, error)

	// given a staging directory, prepares anything it may need in that directory
	// towards building a functioning processor
	OnAfterStagingDirCreated(stagingDir string) error

	// generate the contents of the processor configuration file
	GetProcessorConfigFileContents() string

	// return a map of objects the runtime needs to copy into the processor image
	// the key can be a dir, a file or a url of a file
	// the value is an absolute path into the docker image
	GetProcessorImageObjectPaths() map[string]string

	// the source extension of the runtime (e.g. .go)
	GetExtension() string

	// get the string that signifies a comment if appears at the beginning of the line
	GetCommentPattern() string
}

Jump to

Keyboard shortcuts

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