config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.3.0

type Config struct {
	Server struct {
		Address string
	}

	Client struct {
		Address string
	}

	Log struct {
		Format string
		Level  string
	}

	Core struct {
		Image string
		Name  string
		Path  string

		Database struct {
			ServiceRelativePath   string
			ExecutionRelativePath string
		}
	}

	SystemServices struct {
		RelativePath string
	}

	Docker struct {
		Socket string
		Core   struct {
			Path string
		}
	}
}

Config contains all the configuration needed.

func Global added in v0.3.0

func Global() (*Config, error)

Global returns a singleton of a Config after loaded ENV and validate the values.

func New added in v0.3.0

func New() (*Config, error)

New creates a new config with default values.

func (*Config) DaemonEnv added in v0.3.0

func (c *Config) DaemonEnv() map[string]string

DaemonEnv returns the needed environmental variable for the Daemon.

func (*Config) Load added in v0.3.0

func (c *Config) Load() error

Load reads config from environmental variables.

func (*Config) Prepare added in v0.3.0

func (c *Config) Prepare() error

Prepare setups local directories or any other required thing based on config

func (*Config) Validate added in v0.3.0

func (c *Config) Validate() error

Validate checks values and return an error if any validation failed.

Jump to

Keyboard shortcuts

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