conf

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntryPoint added in v1.8.11

func EntryPoint()

EntryPoint .

Types

type Configuration

type Configuration struct {
	App   freedom.Configuration
	DB    DBConf                 `toml:"db" yaml:"db"`
	Other map[string]interface{} `toml:"other" yaml:"other"`
	Redis RedisConf              `toml:"redis" yaml:"redis"`
}

Configuration .

func Get

func Get() *Configuration

Get .

type DBConf

type DBConf struct {
	Addr            string `toml:"addr" yaml:"addr"`
	MaxOpenConns    int    `toml:"max_open_conns" yaml:"max_open_conns"`
	MaxIdleConns    int    `toml:"max_idle_conns" yaml:"max_idle_conns"`
	ConnMaxLifeTime int    `toml:"conn_max_life_time" yaml:"conn_max_life_time"`
}

DBConf .

type RedisConf

type RedisConf struct {
	Addr               string `toml:"addr" yaml:"addr"`
	Password           string `toml:"password" yaml:"password"`
	DB                 int    `toml:"db" yaml:"db"`
	MaxRetries         int    `toml:"max_retries" yaml:"max_retries"`
	PoolSize           int    `toml:"pool_size" yaml:"pool_size"`
	ReadTimeout        int    `toml:"read_timeout" yaml:"read_timeout"`
	WriteTimeout       int    `toml:"write_timeout" yaml:"write_timeout"`
	IdleTimeout        int    `toml:"idle_timeout" yaml:"idle_timeout"`
	IdleCheckFrequency int    `toml:"idle_check_frequency" yaml:"idle_check_frequency"`
	MaxConnAge         int    `toml:"max_conn_age" yaml:"max_conn_age"`
	PoolTimeout        int    `toml:"pool_timeout" yaml:"pool_timeout"`
}

RedisConf .

Jump to

Keyboard shortcuts

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