33 lines
693 B
Go
33 lines
693 B
Go
package global
|
|
|
|
import (
|
|
"ai4m/config"
|
|
"ai4m/utils/timer"
|
|
"github.com/go-resty/resty/v2"
|
|
"sync"
|
|
|
|
"github.com/songzhibin97/gkit/cache/local_cache"
|
|
|
|
"golang.org/x/sync/singleflight"
|
|
|
|
"go.uber.org/zap"
|
|
|
|
"github.com/redis/go-redis/v9"
|
|
"github.com/spf13/viper"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
var (
|
|
PCM_MYSQL *gorm.DB
|
|
PCM_REDIS redis.UniversalClient
|
|
PCM_CONFIG config.Server
|
|
PCM_VP *viper.Viper
|
|
PCM_LOG *zap.Logger
|
|
PCM_Timer timer.Timer = timer.NewTimerTask()
|
|
PCM_Concurrency_Control = &singleflight.Group{}
|
|
|
|
BlackCache local_cache.Cache
|
|
lock sync.RWMutex
|
|
HTTP_CLIENT *resty.Client
|
|
)
|