configs

package
v0.0.0-...-974304f Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerConf   Service
	DBConf       Database
	ProxyMapping map[string]string
	RegistryConf RegistryConfig
)

Functions

func LoadConfig

func LoadConfig(confFilePath string) error

func NewEnvironment

func NewEnvironment() *environment

Types

type ClientInfo

type ClientInfo struct {
	// Host is the hostname or IP address of a service.
	Host string
	// Port defines the port on which to access a given service
	Port int
	// Protocol indicates the protocol to use when accessing a given service
	Protocol string
	// Proxy path prefix
	PathPrefix string
}

type ConfigurationStruct

type ConfigurationStruct struct {
	Server       Service               `toml:"Service"`
	DB           Database              `toml:"Database"`
	Clients      map[string]ClientInfo `toml:"Clients"`
	RegistryConf RegistryConfig        `toml:"Registry"`
}

type Database

type Database struct {
	Host     string
	Name     string
	Port     int64
	Username string
	Password string
	Timeout  int64
	Type     string
	Scheme   Scheme
}

type RegistryConfig

type RegistryConfig struct {
	Host               string
	Port               int
	Type               string
	ConfigRegistryStem string
	ServiceVersion     string
}

type Scheme

type Scheme struct {
	User string
}

type Service

type Service struct {
	Host                string
	Port                int64
	Labels              []string
	OpenMsg             string
	StaticResourcesPath string
}

Jump to

Keyboard shortcuts

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