config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	File string
)

Functions

func SerializeConfig

func SerializeConfig(cfg *Config) ([]byte, error)

Types

type Config

type Config struct {
	File             string             `yaml:",omitempty"`
	WorkingDirectory string             `yaml:"workdir,omitempty"`
	Excludes         []string           `yaml:"excludes"`
	Pipeline         []string           `yaml:"pipeline"`
	Growl            bool               `yaml:"growl,omitempty"`
	Server           string             `yaml:"server,omitempty"`
	Sidecars         map[string]Sidecar `yaml:"sidecars,omitempty"`
}

Config is the root cfg object

func Load added in v0.1.1

func Load() *Config

Load bootstraps the cfg object with the cfg file.

func ParseConfig

func ParseConfig(cfgFile string) (*Config, error)

ParseConfig reads and parses a cfg file.

func (*Config) GetConfigFile added in v0.1.1

func (c *Config) GetConfigFile() string

Returns the loaded cfg file name.

func (*Config) Reload added in v0.1.1

func (c *Config) Reload()

Reloads this configuration. It will panic if an error occurs.

type Sidecar added in v0.1.2

type Sidecar struct {
	Image       string            `yaml:"image"`
	Environment map[string]string `yaml:"env,omitempty"`
	Script      string            `yaml:"script,omitempty"`
	Volumes     map[string]string `yaml:"volumes,omitempty"`
}

Sidecar defines a background ("sidecar") service that is kept running

Jump to

Keyboard shortcuts

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