conf

package
v0.0.0-...-06ebf3e Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(filePath string) error

func MapToStruct

func MapToStruct(v interface{}, m map[string]interface{}) error

Types

type MysqlConfig

type MysqlConfig struct {
	Host         string `json:"host"`
	Port         int    `json:"port"`
	User         string `json:"user"`
	Pwd          string `json:"pwd"`
	ConnPoolSize int    `json:"conn_pool_size"`
	SetLog       bool   `json:"set_log"`
}

type RedisConfig

type RedisConfig struct {
	Dbs      []int  `json:"dbs"`
	Addr     string `json:"addr"`
	Password string `json:"password"`
}

type ServerConf

type ServerConf struct {
	Name            string                 `json:"name"`
	Host            string                 `json:"host"`     //ip
	Port            int                    `json:"port"`     //port
	MaxConn         int                    `json:"max_conn"` //最大连接数
	ConnWriteBuffer int                    `json:"conn_write_buffer"`
	ConnReadBuffer  int                    `json:"conn_read_buffer"`
	KV              map[string]interface{} `json:"kv"`
}
var (
	ServerConfig *ServerConf
)

Jump to

Keyboard shortcuts

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