devstep

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogLevel string

Functions

func SetLogLevel

func SetLogLevel(level string) error

Types

type ConfigLoader

type ConfigLoader interface {
	Load() (*ProjectConfig, error)
}

func NewConfigLoader

func NewConfigLoader(client DockerClient, homeDirectory, projectRoot string) ConfigLoader

type DockerClient

type DockerClient interface {
	Execute(*DockerExecOpts) error
	Run(*DockerRunOpts) (*DockerRunResult, error)
	RemoveContainer(string) error
	ContainerChanged(string) (bool, error)
	ContainerHasExecInstancesRunning(string) bool
	Commit(*DockerCommitOpts) error
	RemoveImage(string) error
	ListTags(string) ([]string, error)
	ListContainers(string) ([]string, error)
	LookupContainerID(string) (string, error)
}

func NewClient

func NewClient() DockerClient

type DockerCommitOpts

type DockerCommitOpts struct {
	ContainerID    string
	RepositoryName string
	Tag            string
}

type DockerExecOpts added in v0.3.0

type DockerExecOpts struct {
	ContainerID string
	User        string
	Cmd         []string
}

type DockerRunOpts

type DockerRunOpts struct {
	Name       string
	Detach     bool
	AutoRemove bool
	Pty        bool
	Workdir    string
	Hostname   string
	Privileged *bool
	Env        map[string]string
	Volumes    []string
	Links      []string
	Image      string
	Cmd        []string
	Publish    []string
}

func (DockerRunOpts) Merge

func (this DockerRunOpts) Merge(others ...*DockerRunOpts) *DockerRunOpts

type DockerRunResult

type DockerRunResult struct {
	ContainerID string
	ExitCode    int
}

type PluginRuntime

type PluginRuntime interface {
	Trigger(eventName string) error
	Load(pluginPath string) error
}

func NewPluginRuntime

func NewPluginRuntime(projectCfg *ProjectConfig) PluginRuntime

type Project

The project interface provides access to the configuration, state and lifecycle of a Project.

func NewProject

func NewProject(config *ProjectConfig) (Project, error)

This creates a new project

type ProjectConfig

type ProjectConfig struct {
	SourceImage    string         // image used when starting environments from scratch
	BaseImage      string         // starting point for the project
	RepositoryName string         // name of the docker repository this project should be commited
	HostDir        string         // root directory of the project on the host machine
	GuestDir       string         // directory where the project sources will be mounted on the container
	CacheDir       string         // a directory on the host machine were we can place downloaded packages
	Defaults       *DockerRunOpts // default options passed on to docker for all commands
	HackOpts       *DockerRunOpts // `devstep hack` specific options passed to the container
}

Project specific configuration, usually parsed from an yaml file

Jump to

Keyboard shortcuts

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