feat: import services and standardize Go 1.26.5
This commit is contained in:
25
apps/base/fts/internal/impl/impl.go
Normal file
25
apps/base/fts/internal/impl/impl.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package impl
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-apps/fts/internal/config"
|
||||
"git.apinb.com/bsm-sdk/core/cache/redis"
|
||||
"git.apinb.com/bsm-sdk/core/with"
|
||||
cache "github.com/patrickmn/go-cache"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var (
|
||||
RedisService *redis.RedisClient
|
||||
EtcdService *clientv3.Client
|
||||
DBService *gorm.DB
|
||||
MemorySerice *cache.Cache
|
||||
)
|
||||
|
||||
func NewImpl() {
|
||||
// with activating
|
||||
MemorySerice = with.Memory(nil)
|
||||
RedisService = with.RedisCache(config.Spec.Cache) // redis cache
|
||||
DBService = with.Databases(config.Spec.Databases, nil) // model
|
||||
EtcdService = with.Etcd(config.Spec.Etcd) // etcd
|
||||
}
|
||||
Reference in New Issue
Block a user