config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrintfDSN = true
)

Functions

This section is empty.

Types

type ComponentCron added in v0.1.3

type ComponentCron struct {
	ResizeEnable         int `json:"resize_enable"          yaml:"resize_enable"`
	ChannelBuffer        int `json:"channel_buffer"         yaml:"channel_buffer"`
	ResizeDuration       int `json:"resize_duration"        yaml:"resize_duration"`
	ResizeThresholdRatio int `json:"resize_threshold_ratio" yaml:"resize_threshold_ratio"`
	ResizeThresholdLimit int `json:"resize_threshold_limit" yaml:"resize_threshold_limit"`
	ResizeThresholdTimes int `json:"resize_threshold_times" yaml:"resize_threshold_times"`
}

type ComponentEs added in v0.1.3

type ComponentEs struct {
	SlowThreshold,
	MaxConnTime,
	MaxIdleTime,
	MaxRepTime,
	KeepAliveTime int
}

type ComponentMongo added in v0.1.3

type ComponentMongo struct {
	MinPoolSize,
	MaxPoolSize,
	ReqMaxTime,
	SelectionTime,
	MaxIdleTime,
	SlowThreshold int
}

type ComponentMysql added in v0.1.3

type ComponentMysql struct {
	SlowThreshold int
}

type ComponentRedis added in v0.1.3

type ComponentRedis struct {
	IdleCheckTime,
	MaxReadTime,
	MaxWriteTime,
	MaxRequestTime,
	SlowThreshold int
}

type ConnectMysql added in v0.1.3

type ConnectMysql struct {
	Addr     string `yaml:"addr"`
	UserName string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"db"`
	Charset  string `yaml:"charset"`
}

func (*ConnectMysql) GetConnectDSN added in v0.1.3

func (c *ConnectMysql) GetConnectDSN() string

func (*ConnectMysql) GetPrintDSN added in v0.1.3

func (c *ConnectMysql) GetPrintDSN() string

func (*ConnectMysql) ParserDSN added in v0.1.3

func (c *ConnectMysql) ParserDSN(val string) error

type ConnectRedis added in v0.1.3

type ConnectRedis struct {
	Addr string `yaml:"addr"`
	Pwd  string `yaml:"password"`
	DB   int    `yaml:"db"`
}

type EntityEs

type EntityEs struct {
	Addr       string `yaml:"addr"`
	User       string `yaml:"user"`
	Password   string `yaml:"password"`
	MaxIdleCnt int    `yaml:"max_idle"`
}

type EntityMongo

type EntityMongo struct {
	Addr     string `yaml:"addr"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	DSN      string `yaml:"dsn"`
}

type EntityMysql

type EntityMysql struct {
	MaxOpen int            `yaml:"max_open"`
	MaxIdle int            `yaml:"max_idle"`
	Master  ConnectMysql   `yaml:",inline"`
	Slave   []ConnectMysql `yaml:"slave"`
}

type EntityRedis

type EntityRedis struct {
	ConnectRedis `yaml:",inline"`
	PoolSize     int `yaml:"poolsize"`
}

Jump to

Keyboard shortcuts

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