app

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2017 License: Apache-2.0 Imports: 16 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.APIProject, c *cli.Context) error

ProjectBuild builds or rebuilds services.

func ProjectConfig added in v0.4.0

func ProjectConfig(p project.APIProject, c *cli.Context) error

ProjectConfig validates and print the compose file.

func ProjectCreate

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

ProjectCreate creates all services but do not start them.

func ProjectDelete

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

ProjectDelete deletes services.

func ProjectDown

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

ProjectDown brings all services down (stops and clean containers).

func ProjectEvents added in v0.3.0

func ProjectEvents(p project.APIProject, c *cli.Context) error

ProjectEvents listen for real-time events of containers.

func ProjectKill

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

ProjectKill forces stop service containers.

func ProjectLog

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

ProjectLog gets services logs.

func ProjectPause

func ProjectPause(p project.APIProject, c *cli.Context) error

ProjectPause pauses service containers.

func ProjectPort

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

ProjectPort prints the public port for a port binding.

func ProjectPs

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

ProjectPs lists the containers.

func ProjectPull

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

ProjectPull pulls images for services.

func ProjectRestart

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

ProjectRestart restarts services.

func ProjectRun added in v0.2.0

func ProjectRun(p project.APIProject, c *cli.Context) error

ProjectRun runs a given command within a service's container.

func ProjectScale

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

ProjectScale scales services.

func ProjectStart

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

ProjectStart starts services.

func ProjectStop added in v0.2.0

func ProjectStop(p project.APIProject, c *cli.Context) error

ProjectStop stops all services.

func ProjectUnpause

func ProjectUnpause(p project.APIProject, c *cli.Context) error

ProjectUnpause unpauses service containers.

func ProjectUp

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

ProjectUp brings all services up.

func Version added in v0.3.0

func Version(c *cli.Context) error

Version prints the libcompose version number and additionnal informations.

func WithProject

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

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

Types

type ProjectAction

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

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 (urfave cli context).
	Create(c *cli.Context) (project.APIProject, 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