config

package
v0.0.0-...-d75abfd Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO: change me
	ServiceName = "domain-based-scaffold"

	WorkerAPIServer uwe.WorkerName = "api-server"
	WorkerFooBar    uwe.WorkerName = "foobar"
)

Variables

This section is empty.

Functions

func Init

func Init(path string)

Types

type Configuration

type Configuration struct {
	Api     api.Config   `json:"api" yaml:"api"`
	Log     log.Config   `json:"log" yaml:"log"`
	DB      db.Config    `json:"db" yaml:"db"` // DB is a database connection parameters.
	NATS    natsx.Config `json:"nats" yaml:"nats"`
	CouchDB string       `json:"couchdb" yaml:"couchdb"` // CouchDB is a couchdb url connection string.

	ModulesInitTimeout int `json:"modules_init_timeout" yaml:"modules_init_timeout"`

	// Workers is a list of workers
	// that must be started, start all if empty.
	Workers []string `json:"workers" yaml:"workers"`
}

Configuration main structure of the app configuration.

func Config

func Config() *Configuration

Config returns the config obj.

func (Configuration) Validate

func (cfg Configuration) Validate() error

func (Configuration) WorkersList

func (cfg Configuration) WorkersList() []uwe.WorkerName

Jump to

Keyboard shortcuts

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