package svc import ( "app.yhyue.com/moapp/jyInfo/api/internal/config" "app.yhyue.com/moapp/jyInfo/rpc/common/commonclient" "app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerclient" "app.yhyue.com/moapp/jyInfo/rpc/manager/managerclient" "github.com/zeromicro/go-zero/zrpc" ) type ServiceContext struct { Config config.Config Common commonclient.CommonClient Manager managerclient.ManagerClient Consumer consumerclient.ConsumerClient } func NewServiceContext(c config.Config) *ServiceContext { return &ServiceContext{ Config: c, Common: commonclient.NewCommonClient(zrpc.MustNewClient(c.Common)), Manager: managerclient.NewManagerClient(zrpc.MustNewClient(c.Manager)), Consumer: consumerclient.NewConsumerClient(zrpc.MustNewClient(c.Consumer)), } }