forked from JointCloud/pcm-octopus
20 lines
446 B
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)),
|
|
}
|
|
}
|