pcm-octopus/internal/svc/servicecontext.go

20 lines
446 B
Go

package svc
import (
"github.com/zeromicro/go-zero/zrpc"
"gitlink.org.cn/JointCloud/pcm-coordinator/rpc/client/pcmcore"
"gitlink.org.cn/JointCloud/pcm-octopus/internal/config"
)
type ServiceContext struct {
Config config.Config
PcmCoreRpc pcmcore.PcmCore
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
PcmCoreRpc: pcmcore.NewPcmCore(zrpc.MustNewClient(c.PcmCoreRpcConf)),
}
}