runtime

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package runtime provides interfaces for defining Lambda runtimes and appropriate shims for arbitrary language support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect added in v0.4.0

func Detect(path string) (string, error)

Detect returns the name of runtime based on DefaultFile. Function iterates over all runtimes and checks if DefaultFile exists in specified directory.

func Register added in v0.2.0

func Register(name string, runtime Runtime)

Register runtime by `name`.

Types

type CompiledRuntime

type CompiledRuntime interface {
	// Build performs a build using language-specific conventions
	// such as "main.go" for the build target.
	Build(dir string) error

	// Clean removes the build artifacts after deployment.
	Clean(dir string) error
}

CompiledRuntime is a language runtime requiring compilation.

type Runtime

type Runtime interface {
	// Name returns the canonical runtime to be used, for example
	// since Go must be run as a shim, this is "nodejs", not "golang".
	Name() string

	// Handler returns the handler name for the runtime in the form "<file>.<func>".
	Handler() string

	// Shimmed returns true if the program should be shimmed.
	Shimmed() bool

	// DefaultFile returns default name for a file with handler
	DefaultFile() string
}

Runtime is a language runtime.

func ByName

func ByName(name string) (Runtime, error)

ByName returns the runtime by `name`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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