Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string
// Debug 开关
Debug bool `toml:"debug" json:"debug"`
// 指标采集开关
EnableMetric bool `toml:"enableMetric" json:"enableMetric"`
// 连接端点
EndPoint string `toml:"endPoint" json:"endPoint"`
// 实例
Instance string `toml:"instance" json:"instance"`
// accessKeyId
AccessKeyId string `toml:"accessKeyId" json:"accessKeyId"`
// accessKeySecret
AccessKeySecret string `toml:"accessKeySecret" json:"accessKeySecret"`
// 安全密钥
SecurityToken string `toml:"securityToken" json:"securityToken"`
// 重试次数
RetryTimes uint `toml:"retryTimes" json:"retryTimes"`
// 慢日志阈值
SlowThreshold time.Duration `toml:"slowThreshold" json:"slowThreshold"`
// 最大重试时间
MaxRetryTime time.Duration `toml:"maxRetryTime" json:"maxRetryTime"`
// 连接超时时间
ConnectionTimeout time.Duration `toml:"connectionTimeout" json:"connectionTimeout"`
// 请求超时时间
RequestTimeout time.Duration `toml:"requestTimeout" json:"requestTimeout"`
// 最大空闲连接数
MaxIdleConnections int `toml:"maxIdleConnections" json:"maxIdleConnections"`
// 访问日志开关
EnableAccessLog bool `toml:"enableAccessLog" json:"enableAccessLog"`
}
Config ...
func (*Config) MustBuild ¶
func (config *Config) MustBuild() *tablestore.TableStoreClient
func (*Config) MustSingleton ¶
func (config *Config) MustSingleton() *tablestore.TableStoreClient
Click to show internal directories.
Click to hide internal directories.