Documentation
¶
Index ¶
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func Init(dir string) error
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type ExternalNetwork
- type Files
- type InternalNetwork
- type Manifest
- func (m *Manifest) Build(app, dir string, cache bool) []error
- func (m *Manifest) MissingEnvironment(cache bool, app string) ([]string, error)
- func (m *Manifest) PortConflicts(shift int) ([]string, error)
- func (m *Manifest) PortsWanted(shift int) []string
- func (m *Manifest) Push(app, registry, tag string, flatten string) []error
- func (m *Manifest) Raw() ([]byte, error)
- func (m *Manifest) Run(app string, cache, sync bool, shift int) []error
- func (m *Manifest) Write(filename string) error
- type ManifestEntry
- func (me *ManifestEntry) EnvironmentArray() []string
- func (me ManifestEntry) Label(key string) string
- func (me ManifestEntry) Protocol(port string) string
- func (me *ManifestEntry) ResolvedEnvironment(m *Manifest, cache bool, app string) ([]string, error)
- func (me *ManifestEntry) ResolvedLinkVars(m *Manifest, cache bool, app string) (map[string]string, error)
- type ManifestV2
- type Network
- type Networks
- type Procfile
- type ProcfileEntry
- type Sync
Constants ¶
This section is empty.
Variables ¶
var ( Stdout = io.Writer(os.Stdout) Stderr = io.Writer(os.Stderr) Execer = exec.Command SignalWaiter = waitForSignal )
NOTE: these vars allow us to control other shell-outs during testing
var Colors = []color.Attribute{color.FgCyan, color.FgYellow, color.FgGreen, color.FgMagenta, color.FgBlue}
var RandomPort = func() int { return 10000 + rand.Intn(50000) }
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type ExternalNetwork ¶
type ExternalNetwork Network
type InternalNetwork ¶
type InternalNetwork map[string]ExternalNetwork
type Manifest ¶
type Manifest map[string]ManifestEntry
func (*Manifest) MissingEnvironment ¶
func (*Manifest) PortsWanted ¶
type ManifestEntry ¶
type ManifestEntry struct { Build string `yaml:"build,omitempty"` Dockerfile string `yaml:"dockerfile,omitempty"` Image string `yaml:"image,omitempty"` Command interface{} `yaml:"command,omitempty"` Entrypoint string `yaml:"entrypoint,omitempty"` Environment interface{} `yaml:"environment,omitempty"` Labels interface{} `yaml:"labels,omitempty"` Links []string `yaml:"links,omitempty"` Networks Networks `yaml:"networks,omitempty"` Ports interface{} `yaml:"ports,omitempty"` Privileged bool `yaml:"privileged,omitempty"` Volumes []string `yaml:"volumes,omitempty"` }
func (*ManifestEntry) EnvironmentArray ¶
func (me *ManifestEntry) EnvironmentArray() []string
func (ManifestEntry) Label ¶
func (me ManifestEntry) Label(key string) string
func (ManifestEntry) Protocol ¶
func (me ManifestEntry) Protocol(port string) string
func (*ManifestEntry) ResolvedEnvironment ¶
func (*ManifestEntry) ResolvedLinkVars ¶
func (me *ManifestEntry) ResolvedLinkVars(m *Manifest, cache bool, app string) (map[string]string, error)
NOTE: this is the simpler approach:
build up the ENV from the declared links assuming local dev is done on DOCKER_HOST
type ManifestV2 ¶
type Networks ¶
type Networks map[string]InternalNetwork
type Procfile ¶
type Procfile []ProcfileEntry