package global

import (
	"sundynix-go/config"
	"sundynix-go/utils/timer"

	"github.com/bsm/redislock"
	"github.com/redis/go-redis/v9"
	"github.com/spf13/viper"
	"github.com/wechatpay-apiv3/wechatpay-go/core"
	"go.uber.org/zap"
	"golang.org/x/sync/singleflight"
	"gorm.io/gorm"
)

// 全局变量 加载在内存中
var (
	Viper              *viper.Viper
	Logger             *zap.Logger
	Config             *config.Config
	DB                 *gorm.DB
	Redis              redis.UniversalClient
	Locker             *redislock.Client // 分布式锁
	ConcurrencyControl                   = &singleflight.Group{}
	Timer              timer.Timer       = timer.NewTimerTask()
	WxPayClient        *core.Client
)
