docker

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

Client specifies the Docker client API interface required by docker driver

type Driver

type Driver struct {
	// ExternalHost is a ip/hostname that function containers will be exposed with, and that is reachable to Dispatch.
	ExternalHost string
	// RetryTimeout specifies the maximum amount of time we should spend retrying calls to docker.
	RetryTimeout time.Duration
	// contains filtered or unexported fields
}

Driver implements a FaaSDriver using Docker daemon. It's a simple driver without scaling or fault tolerance and is not recommended for production usage. It's goal is to provide a simple driver for demos, PoCs, and development use cases.

func New

func New(dockerClient Client) *Driver

New creates a new Docker driver

func (*Driver) Create

func (d *Driver) Create(ctx context.Context, f *functions.Function) error

Create creates new Docker container for a particular function. Currently, there is 1:1 mapping for a function.

func (*Driver) Delete

func (d *Driver) Delete(ctx context.Context, f *functions.Function) error

Delete deletes the function container.

func (*Driver) GetRunnable

GetRunnable creates runnable representation of the function

Jump to

Keyboard shortcuts

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