config

package
v0.0.0-...-9050134 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Containers map[string]*container.Container `json:"containers"`
	Requires   []string                        `json:"require"`
	Volumes    map[string]types.Volume         `json"volumes"`
}

Config holds the config in a file

func ProcessFile

func ProcessFile(fileName string, includeDirs []string) Config

ProcessFile will process config files for constellation, and return an array of Config objects required files are processed as well. Accepts a filepath and an array of directories to search for files that are included via the 'require' stanza (or the file provided)

func (*Config) DependencyOrder

func (config *Config) DependencyOrder() ([]string, error)

DependencyOrder build a sorted list of containers based on each containers dependencies. We use a topological sort for this. Circular dependencies result in an error

func (Config) Merge

func (config Config) Merge(newConfig Config) Config

Merge will merge two configs, but not overwrite existing data

func (*Config) UnmarshalJSON

func (config *Config) UnmarshalJSON(b []byte) error

UnmarshalJSON

Jump to

Keyboard shortcuts

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