deployer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployer

type Deployer struct {
	// contains filtered or unexported fields
}

Deployer handles deploying new functions that a user submits by unpacking the function data from a users request and then using a ContainerDeployer to build and push a container image for later invocation

func NewDeployer

func NewDeployer(c containerDeployer, fs afero.Fs) Deployer

NewDeployer initializes a Deployer with a ContainerDeploy for building and pushing images

func (Deployer) Deploy

func (d Deployer) Deploy(data models.FnData) error

Deploy unpacks the function code and then builds and pushes a container image

type DockerDeployer

type DockerDeployer struct {
	// contains filtered or unexported fields
}

DockerDeployer uses the Docker SDK to build and push images to a remote registry

func NewDockerDeployer

func NewDockerDeployer(registryUsername string, registryPassword string) (*DockerDeployer, error)

NewDockerDeployer initializes a DockerDeployer with a Docker API version and credentials to access a Dockerhub registry

func (DockerDeployer) BuildImage

func (d DockerDeployer) BuildImage(dockerfileTarReader io.Reader, tag string) error

BuildImage converts a directory to a tar file and uses the Docker SDK to build a Docker image

func (DockerDeployer) PushImage

func (d DockerDeployer) PushImage(image string) error

PushImage takes a local Docker image and pushes it to a Dockerhub registry

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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