config

package
v0.0.0-...-ca7bf4a Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) interface{}

func GetBool

func GetBool(key string) bool

func GetCredentials

func GetCredentials() common.Credentials

func GetHealthCheckConfig

func GetHealthCheckConfig() common.HealthCheckConfig

func GetInt

func GetInt(key string) int

func GetNodes

func GetNodes() map[string]common.Node

func GetPoolCapacity

func GetPoolCapacity() int

func GetString

func GetString(key string) string

func GetStringMap

func GetStringMap(key string) map[string]interface{}

func GetStringMapString

func GetStringMapString(key string) map[string]string

func GetStringSlice

func GetStringSlice(key string) []string

func IsSet

func IsSet(key string) bool

func ReadConfig

func ReadConfig()

func Set

func Set(key string, value interface{})

func SetConfigPath

func SetConfigPath(path string)

Types

type Adapter

type Adapter struct {
	AdapterType string                 `mapstructure:"adaptertype"`
	Metadata    map[string]interface{} `mapstructure:"metadata"`
}

type AdminConfig

type AdminConfig struct {
	HostPort string `mapstructure:"hostport"`
}

func GetAdminConfig

func GetAdminConfig() AdminConfig

type Config

type Config struct {
	//Nodes       map[string]common.Node `mapstructure:"nodes"`
	Server      ServerConfig             `mapstructure:"server"`
	Pool        PoolConfig               `mapstructure:"pool"`
	Nodes       map[string]common.Node   `mapstructure:"nodes"`
	Credentials common.Credentials       `mapstructure:"credentials"`
	HealthCheck common.HealthCheckConfig `mapstructure:"healthcheck"`
}

func GetConfig

func GetConfig() Config

type PoolConfig

type PoolConfig struct {
	Capacity int `mapstructure:"capacity"`
}

type ProxyConfig

type ProxyConfig struct {
	HostPort string `mapstructure:"hostport"`
}

func GetProxyConfig

func GetProxyConfig() ProxyConfig

type ServerConfig

type ServerConfig struct {
	Admin AdminConfig `mapstructure:"admin"`
	Proxy ProxyConfig `mapstructure:"proxy"`
}

Jump to

Keyboard shortcuts

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