reveldocker

package module
v0.0.0-...-5739a4c Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2016 License: MIT Imports: 2 Imported by: 0

README

revel-docker

Docker integration for Revel

Usage

Add the docker.endpoint configuration option to app.conf. For example, the docker socket on the local machine:

docker.endpoint = unix:///var/run/docker.sock

Then, ask revel to init the docker client on app start:

revel.OnAppStart(reveldocker.Init)

Embed into your controller:

type App struct {
	*revel.Controller
	reveldocker.DockerController
}

And add the intercept:

revel.InterceptMethod((*reveldocker.DockerController).Before, revel.BEFORE)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init initializes the docker client.

Types

type DockerController

type DockerController struct {
	*revel.Controller
	DockerClient *docker.Client
}

DockerController allows embedding a docker client into a revel controller.

func (*DockerController) Before

func (c *DockerController) Before() revel.Result

Before adds the docker client to the controller.

Jump to

Keyboard shortcuts

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