app

package
v0.4.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeApp

func BeforeApp(c *cli.Context) error

BeforeApp is an action that is executed before any cli command.

func ProjectBuild

func ProjectBuild(p *project.Project, c *cli.Context)

ProjectBuild builds or rebuilds services.

func ProjectCreate

func ProjectCreate(p *project.Project, c *cli.Context)

ProjectCreate creates all services but do not start them.

func ProjectDelete

func ProjectDelete(p *project.Project, c *cli.Context)

ProjectDelete delete services.

func ProjectDown

func ProjectDown(p *project.Project, c *cli.Context)

ProjectDown brings all services down.

func ProjectKill

func ProjectKill(p *project.Project, c *cli.Context)

ProjectKill forces stop service containers.

func ProjectLog

func ProjectLog(p *project.Project, c *cli.Context)

ProjectLog gets services logs.

func ProjectPort

func ProjectPort(p *project.Project, c *cli.Context)

ProjectPort prints the public port for a port binding.

func ProjectPs

func ProjectPs(p *project.Project, c *cli.Context)

ProjectPs lists the containers.

func ProjectPull

func ProjectPull(p *project.Project, c *cli.Context)

ProjectPull pulls images for services.

func ProjectRestart

func ProjectRestart(p *project.Project, c *cli.Context)

ProjectRestart restarts services.

func ProjectScale

func ProjectScale(p *project.Project, c *cli.Context)

ProjectScale scales services.

func ProjectStart

func ProjectStart(p *project.Project, c *cli.Context)

ProjectStart starts services.

func ProjectUp

func ProjectUp(p *project.Project, c *cli.Context)

ProjectUp brings all services up.

func WithProject

func WithProject(factory ProjectFactory, action ProjectAction) func(context *cli.Context)

WithProject is an helper function to create a cli.Command action with a ProjectFactory.

Types

type ProjectAction

type ProjectAction func(project *project.Project, c *cli.Context)

ProjectAction is an adapter to allow the use of ordinary functions as libcompose actions. Any function that has the appropriate signature can be register as an action on a codegansta/cli command.

cli.Command{
		Name:   "ps",
		Usage:  "List containers",
		Action: app.WithProject(factory, app.ProjectPs),
	}

type ProjectFactory

type ProjectFactory interface {
	// Create creates a libcompose project from the command line options (codegangsta cli context).
	Create(c *cli.Context) (*project.Project, error)
}

ProjectFactory is an interface that helps creating libcompose project.

Jump to

Keyboard shortcuts

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