config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(configPath string)

Types

type TAlgoConfig

type TAlgoConfig struct {
	Address string
}

type TConfig

type TConfig struct {
	ServiceConfig TServiceConfig `toml:"server"`
	AlgoConfig    TAlgoConfig    `toml:"algo"`
	DbConfig      TDbConfig      `toml:"database"`
}
var Config TConfig

type TDbConfig

type TDbConfig struct {
	URI           string `toml:"uri" opt:"-"`
	DB            string `toml:"db" opt:"-"`
	Connect       string `toml:"connect" opt:"connect"`
	ReplicaSet    string `toml:"replica_set" opt:"replicaSet"`
	MaxPoolSize   int    `toml:"max_pool_size" opt:"maxPoolSize"`
	MinPoolSize   int    `toml:"min_pool_size" opt:"minPoolSize"`
	MaxIdleTimeMS int    `toml:"max_idle_time" opt:"maxIdleTimeMS"` // ms
	SSL           bool   `toml:"ssl" opt:"ssl"`
	SQLAddress    string
	SQLName       string
	SQLPassword   string
	SQLDbName     string
	RedisAddress  string `toml:"RedisAddress"`
}

type TServiceConfig

type TServiceConfig struct {
	Address  string
	LogLevel string
}

Jump to

Keyboard shortcuts

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