30 lines
587 B
Go
30 lines
587 B
Go
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)
|
|
|
|
}
|