controller

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImage

func BuildImage(tarfile *os.File, name string) (types.ImageBuildResponse, error)

BuildImage builds an image from a tar stream

func ContainerLogs

func ContainerLogs(name string) (io.ReadCloser, error)

ContainerLogs returns log of a container

func CreateApplication

func CreateApplication(c echo.Context) error

CreateApplication creates a new application

func CreateContainer

func CreateContainer(
	containerConfig container.Config,
	hostConfig container.HostConfig,
	networkConfig network.NetworkingConfig,
	containerName string,
) (container.ContainerCreateCreatedBody, error)

CreateContainer creates a container

func DeleteApplication

func DeleteApplication(c echo.Context) error

DeleteApplication deletes the application

func DeployApplication

func DeployApplication(c echo.Context) error

DeployApplication deploys an application

func GetApplication

func GetApplication(c echo.Context) error

GetApplication returns a current application

func GetApplications

func GetApplications(c echo.Context) error

GetApplications returns a list of all applications

func GetLogs

func GetLogs(c echo.Context) error

GetLogs streams the log of a container

func InitDocker

func InitDocker()

InitDocker initializes the docker instance

func InspectContainer

func InspectContainer(name string) (types.ContainerJSON, error)

InspectContainer inspects a container

func ListContainers

func ListContainers() ([]types.Container, error)

ListContainers retrieves a list of all containers running on the system

func PullImage

func PullImage(name string) error

PullImage pulls an image from the docker registry

func RemoveContainer

func RemoveContainer(name string) error

RemoveContainer removes an container

func RemoveImage

func RemoveImage(name string) ([]types.ImageDeleteResponseItem, error)

RemoveImage removes an image

func StartApplication

func StartApplication(c echo.Context) error

StartApplication starts an application

func StartContainer

func StartContainer(id string) error

StartContainer starts the container with id

func StopApplication

func StopApplication(c echo.Context) error

StopApplication starts an application

func StopContainer

func StopContainer(id string) error

StopContainer stops the container with id

Types

type Application

type Application struct {
	Type     string     `json:"type"`
	Message  string     `json:"message"`
	Extended []KeyValue `json:"extended,omitempty"`
}

Application stores information about the application

type Docker

type Docker struct {
	Ctx context.Context
	Cli *client.Client
}

Docker holds the connection information for the docker instance

type KeyValue

type KeyValue struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

KeyValue holds extra information of a message

Jump to

Keyboard shortcuts

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