Documentation ¶
Index ¶
- Variables
- type Scheduler
- func (s *Scheduler) StartCoinHistoricalPriceProcessQueue()
- func (s *Scheduler) StartCoinsProcessQueue()
- func (s *Scheduler) StartProcessDeleteOldData()
- func (s *Scheduler) StartProcessRequestLogs()
- func (s *Scheduler) StartProcessSlackNotifications()
- func (s *Scheduler) StartProcessTopNotifications()
- func (s *Scheduler) StartSyncCoins()
- func (s *Scheduler) StartSyncCoinsCache()
Constants ¶
This section is empty.
Variables ¶
View Source
var NewSchedulerModule = fx.Options( fx.Provide(NewScheduler), )
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler struct { CoinHistoricalPriceRepo repository.CoinHistoricalPriceRepository CoinRepo repository.CoinRepository CoinGeckoService service.CoinGeckoService SlackNotificationRepository repository.SlackNotificationRepository RequestLogRepository repository.RequestLogRepository Logger zerolog.Logger // contains filtered or unexported fields }
Scheduler struct to hold repositories and logger
func NewScheduler ¶
func NewScheduler(coinHistoricalPriceRepo repository.CoinHistoricalPriceRepository, coinRepo repository.CoinRepository, slackNotificationRepository repository.SlackNotificationRepository, requestLogsRepository repository.RequestLogRepository, redisClient *shared.RedisClient, logger zerolog.Logger, coinGeckoService service.CoinGeckoService) *Scheduler
NewScheduler creates a new Scheduler
func (*Scheduler) StartCoinHistoricalPriceProcessQueue ¶
func (s *Scheduler) StartCoinHistoricalPriceProcessQueue()
func (*Scheduler) StartCoinsProcessQueue ¶
func (s *Scheduler) StartCoinsProcessQueue()
StartProcessQueue 定时处理队列数据
func (*Scheduler) StartProcessDeleteOldData ¶
func (s *Scheduler) StartProcessDeleteOldData()
func (*Scheduler) StartProcessRequestLogs ¶
func (s *Scheduler) StartProcessRequestLogs()
func (*Scheduler) StartProcessSlackNotifications ¶
func (s *Scheduler) StartProcessSlackNotifications()
func (*Scheduler) StartProcessTopNotifications ¶
func (s *Scheduler) StartProcessTopNotifications()
每分钟释放top10的token
func (*Scheduler) StartSyncCoins ¶
func (s *Scheduler) StartSyncCoins()
func (*Scheduler) StartSyncCoinsCache ¶
func (s *Scheduler) StartSyncCoinsCache()
Click to show internal directories.
Click to hide internal directories.