12345678910111213141516171819 |
- package svc
- import (
- "app.yhyue.com/moapp/MessageCenter/api/internal/config"
- "app.yhyue.com/moapp/MessageCenter/rpc/messageclient"
- "github.com/tal-tech/go-zero/zrpc"
- )
- type ServiceContext struct {
- Config config.Config
- MessageCenter messageclient.Message
- }
- func NewServiceContext(c config.Config) *ServiceContext {
- return &ServiceContext{
- Config: c,
- MessageCenter: messageclient.NewMessage(zrpc.MustNewClient(c.MessageCenter)),
- }
- }
|