pickett

package
v0.0.0-...-5dfd0d2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2014 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NEVER stopPolicy = iota
	FRESH
	ALWAYS

	DONT startPolicy = iota
	RESTART
	CONTINUE
)
View Source
const (
	CONTAINERS = "containers"
	IPS        = "ips"
	PORTS      = "ports"
)
View Source
const TIME_FORMAT = "01/02/06-03:04PM"

Variables

This section is empty.

Functions

func CmdBuild

func CmdBuild(targets []string, config *Config) error

CmdBuild builds all the targets you supplied, or all the final results if you don't supply anything. This is the analogue of CmdRun.

func CmdDestroy

func CmdDestroy(config *Config) error

CmdDestroy stops and removes all containers, and removes all images

func CmdDrop

func CmdDrop(targets []string, config *Config) error

CmdDrop stops and removes the targets containers

func CmdEtcdGet

func CmdEtcdGet(key string, config *Config) error

CmdEtcdGet is used to retrieve a value from Etcd, given it's full key path

func CmdEtcdPut

func CmdEtcdPut(key string, val string, config *Config) error

CmdEtcdPut is used to store a value in Etcd at the given it's full key path

func CmdInject

func CmdInject(target string, cmds []string, config *Config) error

func CmdPs

func CmdPs(targets []string, config *Config) error

func CmdRun

func CmdRun(target string, runVol string, config *Config) (int, error)

CmdRun is the 'run' entry point of the program with the targets filled in and a working helper.

func CmdStatus

func CmdStatus(targets []string, config *Config) error

CmdStatus shows the status of all known targets or the set you supply

func CmdStop

func CmdStop(targets []string, config *Config) error

CmdStop stops the targets containers

func CmdWipe

func CmdWipe(targets []string, config *Config) error

CmdWipe stops the targets containers

func NewSourceDirChecker

func NewSourceDirChecker(t time.Time) *sourceDirChecker

Types

type Artifact

type Artifact struct {
	BuiltPath      string
	DestinationDir string
}

type BuildOpts

type BuildOpts struct {
	DontUseCache    bool
	RemoveContainer bool
}

type CodeVolume

type CodeVolume struct {
	Directory string
	MountedAt string
}

type Config

type Config struct {
	DockerBuildOptions BuildOpts
	CodeVolumes        []*CodeVolume
	Containers         []*Container
	GoBuilds           []*GoBuild
	Extractions        []*Extraction
	GenericBuilds      []*GenericBuild
	Topologies         map[string][]*TopologyEntry
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(reader io.Reader, helper pickett_io.Helper, cli pickett_io.DockerCli, etcd pickett_io.EtcdClient) (*Config, error)

NewCofingFile creates a new instance of configuration, including all the parsing of the config file and validation checking on the items therein.

func (*Config) Build

func (c *Config) Build(name string) error

Build is called by the "main()" of the pickett program to build a "target".

func (*Config) EntryPoints

func (c *Config) EntryPoints() ([]string, []string)

EntryPoints returns two lists, the list of buildable targets and the list of runnable topologies.

func (*Config) Execute

func (c *Config) Execute(name string, vol *runVolumeSpec) (int, error)

Execute is called by the "main()" of the pickett program to run a "target".

type Container

type Container struct {
	Repository string
	Tag        string
	Directory  string
	DependsOn  []string
}

type Extraction

type Extraction struct {
	Repository string
	RunIn      string
	MergeWith  string
	Tag        string
	Artifacts  []*Artifact
}

type GenericBuild

type GenericBuild struct {
	RunIn string
	Tag   string
	Run   []string
}

type GoBuild

type GoBuild struct {
	Command    string
	RunIn      string
	Repository string
	Tag        string
	Packages   []string
	TestFile   string
	Probe      string
}

type TopologyEntry

type TopologyEntry struct {
	Name       string
	RunIn      string
	EntryPoint []string
	Consumes   []string
	Policy     string
	Expose     map[string]int
	Instances  int
	Devices    map[string]string
	Privileged bool
	WaitFor    bool
}

Jump to

Keyboard shortcuts

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