lambda

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 18 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNoFiles = errors.New("No files to add to image")

Functions

func CreateImage

func CreateImage(opts CreateImageOptions, files ...FileLike) error

Creates a docker image called `name`, using `base` as the base image. `handler` is the runtime-specific name to use for a lambda invocation (i.e. <module>.<function> for nodejs). `files` should be a list of files+dirs *relative to the current directory* that are to be included in the image.

func ImageExists

func ImageExists(imageName string) (bool, error)

func PushImage

func PushImage(in PushImageOptions) error

func RegisterWithIron

func RegisterWithIron(imageNameVersion string) error

Registers public docker image named `imageNameVersion` as a IronWorker called `imageName`. For example,

RegisterWithIron("foo/myimage:1", credentials.NewEnvCredentials()) will register a worker called "foo/myimage" that will use Docker Image "foo/myimage:1".

func RunImageWithPayload

func RunImageWithPayload(imageName string, payload string) error

Types

type CreateImageOptions

type CreateImageOptions struct {
	Name          string
	Base          string
	Package       string // Used for Java, empty string for others.
	Handler       string
	OutputStream  io.Writer
	RawJSONStream bool
}

type FileLike

type FileLike interface {
	io.Reader
	Stat() (os.FileInfo, error)
}

type PushImageOptions

type PushImageOptions struct {
	NameVersion   string
	OutputStream  io.Writer
	RawJSONStream bool
}

Jump to

Keyboard shortcuts

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