Documentation ¶
Index ¶
- Constants
- func NewDiscovery(conf *conf.Registry) registry.Discovery
- func NewGORM(conf *conf.Bootstrap) *gorm.DB
- func NewGRPCServer(c *conf.Server, logger log.Logger, ms ...middleware.Middleware) *grpc.Server
- func NewLogger(psm, id, version string, config *conf.Bootstrap) log.Logger
- func NewLogrusHook(psm string) logrus.Hook
- func NewLogrusLogger(psm string, config *conf.Bootstrap) log.Logger
- func NewMetric() *metrics.Metrics
- func NewRedisClient(conf *conf.Bootstrap) *redis.Client
- func NewRegistrar(conf *conf.Registry) registry.Registrar
- func NewSQLClient(conf *conf.Bootstrap) (*sql.DB, func(), error)
- func NewTrace(bc *conf.Bootstrap) *tracing.Tracer
- type LogrusHook
Constants ¶
View Source
const ( Chatset = "utf8mb4" DefaultDialTimeout = 1000 DefaultReadTimeout = 3000 DefaultWriteTimeout = 3000 DefaultMaxIdleConns = 50 DefaultMaxOpenConns = 100 DefaultMaxLifeTime = 3600000 )
Variables ¶
This section is empty.
Functions ¶
func NewGRPCServer ¶
func NewGRPCServer(c *conf.Server, logger log.Logger, ms ...middleware.Middleware) *grpc.Server
NewGRPCServer new a gRPC server.
func NewLogrusHook ¶
func NewRedisClient ¶
Types ¶
type LogrusHook ¶
func (LogrusHook) Levels ¶
func (l LogrusHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.