config

package
v0.0.0-...-5e277a7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(configPath string, vars ...string)

GetConfig initialized the configuration

func ValidatePath

func ValidatePath(path string) (*string, error)

ValidatePath validates the input path

Types

type Configuration

type Configuration struct {
	Server struct {
		Host string `yaml:"host"`
		Port string `yaml:"port"`
	}
	Memcache struct {
		Host string `yaml:"host"`
		Port string `yaml:"port"`
	}
	Backends    []string `yaml:"backends"`
	MaxAttempts int      `yaml:"max_attempts"`
	MaxRetries  int      `yaml:"max_retries"`
	Metrics     bool     `yaml:"metrics"`
}

Configuration config struct

var Config *Configuration = &Configuration{}

Config is the global configuration object

Jump to

Keyboard shortcuts

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