config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: MIT Imports: 13 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 {
	Name      string
	Size      int
	Image     string
	Port      int
	Container *Container
	Params    params.Config
	Lifecycle lifecycle.Manager
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(name string) *Config

func Parse

func Parse(log logrus.FieldLogger, uie ui.Emitter, name string, buf []byte) (*Config, error)

func ParseAll

func ParseAll(log logrus.FieldLogger, uie ui.Emitter, buf []byte) ([]*Config, error)

func Read

func Read(log logrus.FieldLogger, uie ui.Emitter, r io.Reader) ([]*Config, error)

func ReadFile

func ReadFile(log logrus.FieldLogger, uie ui.Emitter, fpath string) ([]*Config, error)

func ReadYAML added in v0.7.0

func ReadYAML(log logrus.FieldLogger, uie ui.Emitter, r io.Reader) ([]*Config, error)

func (Config) Emitter

func (c Config) Emitter() ui.PoolEmitter

func (Config) Log

func (c Config) Log() logrus.FieldLogger

func (*Config) WithEnv

func (c *Config) WithEnv(name, value string) *Config

func (*Config) WithImage

func (c *Config) WithImage(image string) *Config

func (*Config) WithLabel

func (c *Config) WithLabel(k, v string) *Config

type Container

type Container struct {
	// docker/docker/api/types/container/config.go
	Labels map[string]string

	// unused
	Env        []string
	Cmd        strslice.StrSlice
	Volumes    map[string]struct{}
	Entrypoint strslice.StrSlice // Entrypoint to run when starting the container
	User       string

	// docker/docker/api/types/container/host_config.go
	CapAdd  strslice.StrSlice
	CapDrop strslice.StrSlice
}

func NewContainer

func NewContainer() *Container

Jump to

Keyboard shortcuts

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