feat: import services and standardize Go 1.26.5
This commit is contained in:
29
apps/ec/delivery/internal/impl/impl.go
Normal file
29
apps/ec/delivery/internal/impl/impl.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package impl
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-service-ec/delivery/internal/config"
|
||||
|
||||
"git.apinb.com/bsm-sdk/engine/service"
|
||||
)
|
||||
|
||||
var (
|
||||
Configure config.Config
|
||||
)
|
||||
|
||||
func NewService(srvKey string) {
|
||||
// register service
|
||||
service.Register(srvKey, &Configure)
|
||||
service.RegisterAnonymous(&Configure.RpcServerConf, &Configure.Anonymous)
|
||||
|
||||
service.Start(Configure.ListenOn)
|
||||
|
||||
// with activating
|
||||
withModel() // model
|
||||
withMemCache() // mem cache
|
||||
withRedisCache() // redis cache
|
||||
withPulsar() // mq - pulsar
|
||||
|
||||
// service done.
|
||||
service.Done(&Configure.Prometheus, &Configure.Telemetry)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user