Documentation
¶
Index ¶
- Variables
- type AbstractRuntime
- func (ar *AbstractRuntime) DetectFunctionHandlers(functionPath string) ([]string, error)
- func (ar *AbstractRuntime) GetFunctionDir() string
- func (ar *AbstractRuntime) GetHandlerDirObjectPaths() []string
- func (ar *AbstractRuntime) GetProcessorImageObjectPaths() map[string]string
- func (ar *AbstractRuntime) GetRuntimeNameAndVersion() (string, string)
- func (ar *AbstractRuntime) OnAfterStagingDirCreated(stagingDir string) error
- type Factory
- type ProcessorDockerfileInfo
- type Runtime
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 logger.Logger
StagingDir string
FunctionConfig *functionconfig.Config
DockerClient dockerclient.Client
CmdRunner cmdrunner.CmdRunner
}
func NewAbstractRuntime ¶
func NewAbstractRuntime(logger logger.Logger, stagingDir string, functionConfig *functionconfig.Config) (*AbstractRuntime, error)
func (*AbstractRuntime) DetectFunctionHandlers ¶
func (ar *AbstractRuntime) DetectFunctionHandlers(functionPath string) ([]string, error)
DetectFunctionHandlers returns a list of all the handlers in that directory given a path holding a function (or functions)
func (*AbstractRuntime) GetFunctionDir ¶
func (ar *AbstractRuntime) GetFunctionDir() string
func (*AbstractRuntime) GetHandlerDirObjectPaths ¶
func (ar *AbstractRuntime) GetHandlerDirObjectPaths() []string
GetProcessorImageObjectPaths returns the paths of all objects that should reside in the handler directory
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) GetRuntimeNameAndVersion ¶
func (ar *AbstractRuntime) GetRuntimeNameAndVersion() (string, string)
GetRuntimeNameAndVersion returns name and version of runtime from runtime. e.g. go:1.8 -> go, 1.8
func (*AbstractRuntime) OnAfterStagingDirCreated ¶
func (ar *AbstractRuntime) OnAfterStagingDirCreated(stagingDir string) error
type ProcessorDockerfileInfo ¶
type Runtime ¶
type Runtime interface {
// DetectFunctionHandlers returns a list of all the handlers
// in that directory given a path holding a function (or functions)
DetectFunctionHandlers(functionPath string) ([]string, error)
// OnAfterStagingDirCreated prepares anything it may need in that directory
// towards building a functioning processor,
OnAfterStagingDirCreated(stagingDir string) error
// GetProcessorDockerfileInfo returns information required to build the processor Dockerfile
GetProcessorDockerfileInfo(versionInfo *version.Info) (*ProcessorDockerfileInfo, error)
// GetName returns the name of the runtime, including version if applicable
GetName() string
// GetProcessorImageObjectPaths returns the paths of all objects that should reside in the handler
// directory
GetHandlerDirObjectPaths() []string
}
Click to show internal directories.
Click to hide internal directories.