runtime

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package runtime handle the defenitions of the different runtimes.

Currently only python2.7 is supproted, but addition of more should affect this package while the rest of the code should not be aware of the differences

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(dir, ip string)

Init the runtime with the location of the runtime scripts

Types

type Container added in v0.0.5

type Container interface {
	lambda.Invoker
	// Closes (stop) the container
	Close() error
	// A channel that is closed when the container exit
	Done() <-chan struct{}
	// Err is valid only after the container exit (the Done channel is closed)
	// And contain the exit error of the container
	Err() error
}

Container is a specific runtime container

func New added in v0.0.5

func New(fn formation.Function, settings lambda.StartupRequest, name string, logger Logger) (Container, error)

New create a new runner

type Logger added in v0.0.6

type Logger interface {
	// StdErr log lines sent on the container runtime, which inlcude logging
	// of the function (and its framework processing)
	StdErr(line string)
	// ContainerEvent is used to log things related to the container management
	ContainerEvent(event string, err error)
	// FunctionResult log the result of invocation
	FunctionResult(res *lambda.InvokeReply)
}

Logger is the type used to log function invocation

Jump to

Keyboard shortcuts

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