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: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegistrySingleton = Registry{
	Registry: *registry.NewRegistry("runtime"),
}

global singleton

Functions

This section is empty.

Types

type AbstractRuntime

type AbstractRuntime struct {
	Logger         nuclio.Logger
	FunctionLogger nuclio.Logger
	Context        *nuclio.Context
	Statistics     Statistics
}

func NewAbstractRuntime

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

func (*AbstractRuntime) GetFunctionLogger

func (ar *AbstractRuntime) GetFunctionLogger() nuclio.Logger

func (*AbstractRuntime) GetStatistics

func (ar *AbstractRuntime) GetStatistics() *Statistics

type Configuration

type Configuration struct {
	Name           string
	Version        string
	Description    string
	DataBindings   map[string]*DataBinding
	FunctionLogger nuclio.Logger
}

func NewConfiguration

func NewConfiguration(configuration *viper.Viper) (*Configuration, error)

type Creator

type Creator interface {
	Create(logger nuclio.Logger, configuration *viper.Viper) (Runtime, error)
}

type DataBinding

type DataBinding struct {
	Name    string            `json:"name"`
	Class   string            `json:"class"`
	URL     string            `json:"url"`
	Path    string            `json:"path,omitempty"`
	Query   string            `json:"query,omitempty"`
	Secret  string            `json:"secret,omitempty"`
	Options map[string]string `json:"options,omitempty"`
}

Copied from functioncr to prevent dependencies on functioncr

type Registry

type Registry struct {
	registry.Registry
}

func (*Registry) NewRuntime

func (r *Registry) NewRuntime(logger nuclio.Logger,
	kind string,
	configuration *viper.Viper) (Runtime, error)

type Runtime

type Runtime interface {
	ProcessEvent(event nuclio.Event, functionLogger nuclio.Logger) (interface{}, error)

	GetFunctionLogger() nuclio.Logger

	GetStatistics() *Statistics
}

type Statistics

type Statistics struct {
	DurationMilliSecondsSum   uint64
	DurationMilliSecondsCount uint64
}

func (*Statistics) DiffFrom

func (s *Statistics) DiffFrom(prev *Statistics) Statistics

Directories

Path Synopsis
Package python implmenets Python runtime
Package python implmenets Python runtime

Jump to

Keyboard shortcuts

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