Documentation ¶
Index ¶
- func InitConfiguration(configName string, configPaths []string, config interface{}) error
- type CreeperConfiguration
- type ESConfiguration
- type InfluxConfiguration
- type KafkaConfiguration
- type LevelMode
- type LoggerConfig
- type MinIOConfiguration
- type MongoDBConfiguration
- type MySQLConfiguration
- type MySQLLogMode
- type PostgresConfiguration
- type RedisConfiguration
- type RemoteServiceConfiguration
- type ServiceConfiguration
- type WarehouseConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfiguration ¶
InitConfiguration ...
Types ¶
type CreeperConfiguration ¶ added in v0.0.2
CreeperConfiguration ...
type ESConfiguration ¶
type ESConfiguration struct { Host string User string Password string ResponseHeaderTimeoutSeconds int }
ESConfiguration configuration for elasticsearch connection
type InfluxConfiguration ¶
type KafkaConfiguration ¶
KafkaConfiguration ...
type LevelMode ¶
type LevelMode string
LevelMode ...
type LoggerConfig ¶
type LoggerConfig struct { // log filename, **if it's not set, the log will be written to os.Stdout** Filename string // maximun size of single file, unit: MB MaxSize int // maximun number of days to retain the log file, unit: day MaxAge int // maximum number of log files to retain MaxBackups int // whether compress log file Compress bool // 枚举字符串 "warn" > "info" > "debug" > "trace" Level LevelMode }
LoggerConfig configuration for logger
type MinIOConfiguration ¶
type MinIOConfiguration struct { Endpoint string AccessKey string SecretKey string Token string SSL bool Region string }
MinIOConfiguration ...
type MongoDBConfiguration ¶
MongoDBConfiguration configuration for redis connection
type MySQLConfiguration ¶
type MySQLConfiguration struct { Host string Port string User string Password string DBName string LogMode MySQLLogMode Charset string }
MySQLConfiguration configuration for MySQL database connection
type MySQLLogMode ¶
type MySQLLogMode string
MySQLLogMode ...
const ( Console MySQLLogMode = "console" SlowQuery MySQLLogMode = "slow_query" None MySQLLogMode = "none" )
Console 使用 gorm 的 logger,打印漂亮的sql到控制台 SlowQuery 使用自定义 logger.Logger,记录慢查询sql到日志 None 关闭 log 功能
type PostgresConfiguration ¶
type PostgresConfiguration struct { Host string Port string User string Password string DBName string LogMode MySQLLogMode }
PostgresConfiguration configuration for Postgres database connection
type RedisConfiguration ¶
RedisConfiguration ...
type RemoteServiceConfiguration ¶
type RemoteServiceConfiguration struct { // eg: "180.96.8.140:9998" RemoteHost string // eg: "/gateway/twirp/rime.adam.rpc_gateway.RPCGateway/" RemotePathPrefix string }
RemoteServiceConfiguration ...
type ServiceConfiguration ¶
type ServiceConfiguration struct {
Port string
}
ServiceConfiguration configuration for service
Click to show internal directories.
Click to hide internal directories.