Documentation ¶
Overview ¶
Package ioc 依赖反转
Index ¶
- func InitDB(l logger.LoggerV1) *gorm.DB
- func InitJobs(l logger.LoggerV1, rankingJob *job.RankingJob) *cron.Cron
- func InitKafka() sarama.Client
- func InitLocalFuncExecutor(svc service.RankingService) *job.LocalFuncExecutor
- func InitLogger() logger.LoggerV1
- func InitMiddlewares(redisClient redis.Cmdable, l logger2.LoggerV1, jwtHdl ijwt.Handler) []gin.HandlerFunc
- func InitOTEL() func(ctx context.Context)
- func InitRLockClient(cmd redis.Cmdable) *rlock.Client
- func InitRankingJob(svc service.RankingService, rlockClient *rlock.Client, l logger.LoggerV1) *job.RankingJob
- func InitRedis() redis.Cmdable
- func InitSMSService(cmd redis.Cmdable) sms.Service
- func InitScheduler(l logger.LoggerV1, local *job.LocalFuncExecutor, svc service.JobService) *job.Scheduler
- func InitUserCache(client *redis.ClusterClient) cache.UserCache
- func InitWebServer(mdls []gin.HandlerFunc, userHdl *web.UserHandler, ...) *gin.Engine
- func InitWechatService(l logger2.LoggerV1) wechat.Service
- func NewConsumers(c1 *article.InteractiveReadEventBatchConsumer) []events.Consumer
- func NewSyncProducer(client sarama.Client) sarama.SyncProducer
- type Callbacks
- type Configer
- type DoSomething
- type DoSomethingFunc
- type MyTracer
- type MyTracerProvider
- type ViperConfigerAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLocalFuncExecutor ¶
func InitLocalFuncExecutor(svc service.RankingService) *job.LocalFuncExecutor
func InitLogger ¶
func InitMiddlewares ¶
func InitRLockClient ¶
func InitRankingJob ¶
func InitRankingJob(svc service.RankingService, rlockClient *rlock.Client, l logger.LoggerV1) *job.RankingJob
func InitSMSService ¶
func InitScheduler ¶
func InitScheduler(l logger.LoggerV1, local *job.LocalFuncExecutor, svc service.JobService) *job.Scheduler
func InitUserCache ¶
InitUserCache 配合 PrometheusHook 使用
func InitWebServer ¶
func InitWebServer(mdls []gin.HandlerFunc, userHdl *web.UserHandler, oauth2WechatHdl *web.OAuth2WechatHandler, articleHdl *web.ArticleHandler) *gin.Engine
func NewConsumers ¶
func NewConsumers(c1 *article.InteractiveReadEventBatchConsumer) []events.Consumer
NewConsumers 面临的问题依旧是所有的 Consumer 在这里注册一下
func NewSyncProducer ¶
func NewSyncProducer(client sarama.Client) sarama.SyncProducer
Types ¶
type DoSomething ¶
type DoSomething interface {
DoABC() string
}
type DoSomethingFunc ¶
type DoSomethingFunc func() string
func (DoSomethingFunc) DoABC ¶
func (d DoSomethingFunc) DoABC() string
type MyTracerProvider ¶
type MyTracerProvider struct { // 改原子操作 Enable bool // contains filtered or unexported fields }
func (*MyTracerProvider) Tracer ¶
func (m *MyTracerProvider) Tracer(name string, options ...trace2.TracerOption) trace2.Tracer
func (*MyTracerProvider) TracerV1 ¶
func (m *MyTracerProvider) TracerV1(name string, options ...trace2.TracerOption) trace2.Tracer
type ViperConfigerAdapter ¶
type ViperConfigerAdapter struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.