Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultAgentLoggerConifg() log.LoggerConfig
- func DefaultClientLoggerConifg() log.LoggerConfig
- func DefaultDaemonLoggerConifg() log.LoggerConfig
- type AgentMode
- type GitInfo
- type LoggerConfig
- type ObDataSourceConfig
- func (config *ObDataSourceConfig) GetConnMaxLifetime() int
- func (config *ObDataSourceConfig) GetDBName() string
- func (config *ObDataSourceConfig) GetDSN() string
- func (config *ObDataSourceConfig) GetIp() string
- func (config *ObDataSourceConfig) GetMaxIdleConns() int
- func (config *ObDataSourceConfig) GetMaxOpenConns() int
- func (config *ObDataSourceConfig) GetPassword() string
- func (config *ObDataSourceConfig) GetPort() int
- func (config *ObDataSourceConfig) GetSkipPwdCheck() bool
- func (config *ObDataSourceConfig) GetTryTimes() int
- func (config *ObDataSourceConfig) GetUsername() string
- func (config *ObDataSourceConfig) SetCharset(charset string) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetConnMaxLifetime(connMaxLifetime int) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetDBName(dBName string) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetInterpolateParams(interpolateParams bool) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetIp(ip string) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetLocation(location string) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetMaxIdleConns(maxIdleConns int) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetMaxOpenConns(maxOpenConns int) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetParseTime(parseTime bool) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetPassword(password string) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetPort(port int) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetSkipPwdCheck(skip bool) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetTimeout(timeout int) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetTryTimes(tryTimes int) *ObDataSourceConfig
- func (config *ObDataSourceConfig) SetUsername(username string) *ObDataSourceConfig
- type ServerConfig
- type SqliteDataSourceConfig
Constants ¶
View Source
const ( LEVEL = "info" MAX_SIZE = 100 MAX_AGE = 30 MAX_BACKUPS = 10 )
View Source
const ( SQLITE_DSN_TEMPLATE = "%s?parseTime=true&cache=%s&_fk=%d" CACHE_SHARED = "shared" FK_1 = 1 )
Variables ¶
View Source
var ( BuildTime string BuildFlags string )
View Source
var ( GitBranch string GitCommitId string GitShortCommitId string GitCommitTime string )
View Source
var (
Mode = ReleaseMode
)
Functions ¶
func DefaultAgentLoggerConifg ¶
func DefaultAgentLoggerConifg() log.LoggerConfig
func DefaultClientLoggerConifg ¶
func DefaultClientLoggerConifg() log.LoggerConfig
func DefaultDaemonLoggerConifg ¶
func DefaultDaemonLoggerConifg() log.LoggerConfig
Types ¶
type GitInfo ¶
type GitInfo struct { GitBranch string `json:"branch"` GitCommitId string `json:"commitId"` GitShortCommitId string `json:"shortCommitId"` GitCommitTime string `json:"commitTime"` }
func GetGitInfo ¶
func GetGitInfo() GitInfo
type LoggerConfig ¶
type LoggerConfig struct {
// contains filtered or unexported fields
}
func (*LoggerConfig) GetLoggerLevel ¶
func (config *LoggerConfig) GetLoggerLevel() logger.LogLevel
func (*LoggerConfig) SetLoggerLevel ¶
func (config *LoggerConfig) SetLoggerLevel(loggerLevel logger.LogLevel) *LoggerConfig
type ObDataSourceConfig ¶
type ObDataSourceConfig struct { // logger config LoggerConfig // contains filtered or unexported fields }
func NewObDataSourceConfig ¶
func NewObDataSourceConfig() *ObDataSourceConfig
func (*ObDataSourceConfig) GetConnMaxLifetime ¶
func (config *ObDataSourceConfig) GetConnMaxLifetime() int
func (*ObDataSourceConfig) GetDBName ¶
func (config *ObDataSourceConfig) GetDBName() string
func (*ObDataSourceConfig) GetDSN ¶
func (config *ObDataSourceConfig) GetDSN() string
func (*ObDataSourceConfig) GetIp ¶
func (config *ObDataSourceConfig) GetIp() string
func (*ObDataSourceConfig) GetMaxIdleConns ¶
func (config *ObDataSourceConfig) GetMaxIdleConns() int
func (*ObDataSourceConfig) GetMaxOpenConns ¶
func (config *ObDataSourceConfig) GetMaxOpenConns() int
func (*ObDataSourceConfig) GetPassword ¶
func (config *ObDataSourceConfig) GetPassword() string
func (*ObDataSourceConfig) GetPort ¶
func (config *ObDataSourceConfig) GetPort() int
func (*ObDataSourceConfig) GetSkipPwdCheck ¶
func (config *ObDataSourceConfig) GetSkipPwdCheck() bool
func (*ObDataSourceConfig) GetTryTimes ¶
func (config *ObDataSourceConfig) GetTryTimes() int
func (*ObDataSourceConfig) GetUsername ¶
func (config *ObDataSourceConfig) GetUsername() string
func (*ObDataSourceConfig) SetCharset ¶
func (config *ObDataSourceConfig) SetCharset(charset string) *ObDataSourceConfig
func (*ObDataSourceConfig) SetConnMaxLifetime ¶
func (config *ObDataSourceConfig) SetConnMaxLifetime(connMaxLifetime int) *ObDataSourceConfig
func (*ObDataSourceConfig) SetDBName ¶
func (config *ObDataSourceConfig) SetDBName(dBName string) *ObDataSourceConfig
func (*ObDataSourceConfig) SetInterpolateParams ¶
func (config *ObDataSourceConfig) SetInterpolateParams(interpolateParams bool) *ObDataSourceConfig
func (*ObDataSourceConfig) SetIp ¶
func (config *ObDataSourceConfig) SetIp(ip string) *ObDataSourceConfig
func (*ObDataSourceConfig) SetLocation ¶
func (config *ObDataSourceConfig) SetLocation(location string) *ObDataSourceConfig
func (*ObDataSourceConfig) SetMaxIdleConns ¶
func (config *ObDataSourceConfig) SetMaxIdleConns(maxIdleConns int) *ObDataSourceConfig
func (*ObDataSourceConfig) SetMaxOpenConns ¶
func (config *ObDataSourceConfig) SetMaxOpenConns(maxOpenConns int) *ObDataSourceConfig
func (*ObDataSourceConfig) SetParseTime ¶
func (config *ObDataSourceConfig) SetParseTime(parseTime bool) *ObDataSourceConfig
func (*ObDataSourceConfig) SetPassword ¶
func (config *ObDataSourceConfig) SetPassword(password string) *ObDataSourceConfig
func (*ObDataSourceConfig) SetPort ¶
func (config *ObDataSourceConfig) SetPort(port int) *ObDataSourceConfig
func (*ObDataSourceConfig) SetSkipPwdCheck ¶
func (config *ObDataSourceConfig) SetSkipPwdCheck(skip bool) *ObDataSourceConfig
func (*ObDataSourceConfig) SetTimeout ¶
func (config *ObDataSourceConfig) SetTimeout(timeout int) *ObDataSourceConfig
func (*ObDataSourceConfig) SetTryTimes ¶
func (config *ObDataSourceConfig) SetTryTimes(tryTimes int) *ObDataSourceConfig
func (*ObDataSourceConfig) SetUsername ¶
func (config *ObDataSourceConfig) SetUsername(username string) *ObDataSourceConfig
type ServerConfig ¶
type SqliteDataSourceConfig ¶
type SqliteDataSourceConfig struct { DsnTemplate string DataDir string Cache string FK int MaxIdleConns int MaxOpenConns int ConnMaxLifetime int // logger config LoggerConfig }
func DefaultSqliteDataSourceConfig ¶
func DefaultSqliteDataSourceConfig() SqliteDataSourceConfig
Click to show internal directories.
Click to hide internal directories.