config

package
v1.9.12 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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"`
	ConnMaxIdleTime int    `toml:"conn_max_idle_time" yaml:"conn_max_idle_time"`
	ConnMaxLifeTime int    `toml:"conn_max_life_time" yaml:"conn_max_life_time"`
	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