Documentation ¶
Index ¶
- Variables
- type ElasticSearch
- type Mongo
- type MySQL
- type MysqlLogger
- func (l *MysqlLogger) Error(_ context.Context, msg string, data ...interface{})
- func (l *MysqlLogger) Info(_ context.Context, msg string, data ...interface{})
- func (l *MysqlLogger) LogMode(level logger.LogLevel) logger.Interface
- func (l *MysqlLogger) SetLogger(log glogger.Interface)
- func (l *MysqlLogger) Trace(_ context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *MysqlLogger) Warn(_ context.Context, msg string, data ...interface{})
- type Redis
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // common PrintfDSN = true // mysql MysqlSlowThreshold = 300 // reids RedisIdleCheckTime, RedisMaxReadTime, RedisMaxWriteTime, RedisMaxRequestTime, RedisSlowThreshold int // mongo MongoMinPoolSize, MongoMaxPoolSize, MongoReqMaxTime, MongoSelectionTime, MongoMaxIdleTime, MongoSlowThreshold int // es EsSlowThreshold, EsMaxConnTime, EsMaxIdleTime, EsMaxRepTime, EsKeepAliveTime int )
Functions ¶
This section is empty.
Types ¶
type ElasticSearch ¶
func (*ElasticSearch) CliFlags ¶
func (c *ElasticSearch) CliFlags() []cli.Flag
func (*ElasticSearch) Close ¶
func (c *ElasticSearch) Close() error
func (*ElasticSearch) Init ¶
func (c *ElasticSearch) Init(l logger.Interface, cfg *gsf.AppConfig, ctx *cli.Context) error
func (*ElasticSearch) Run ¶
func (c *ElasticSearch) Run() (err error)
type Mongo ¶
type Mongo struct { Name string Cfg *config.EntityMongo DB *mongo.Database }
type MySQL ¶
type MySQL struct { Name string DB *gorm.DB Log MysqlLogger Cfg *config.EntityMysql }
func (*MySQL) SetLogLevel ¶
type MysqlLogger ¶
type MysqlLogger struct {
// contains filtered or unexported fields
}
func (*MysqlLogger) Error ¶
func (l *MysqlLogger) Error(_ context.Context, msg string, data ...interface{})
func (*MysqlLogger) Info ¶
func (l *MysqlLogger) Info(_ context.Context, msg string, data ...interface{})
func (*MysqlLogger) SetLogger ¶
func (l *MysqlLogger) SetLogger(log glogger.Interface)
Click to show internal directories.
Click to hide internal directories.