This commit is contained in:
wangchuxiao
2023-06-20 22:12:01 +08:00
parent 5e634ac91f
commit ee8ee48418
31 changed files with 401 additions and 565 deletions
+7 -5
View File
@@ -31,8 +31,8 @@ type Pusher struct {
offlinePusher offlinepush.OfflinePusher
groupLocalCache *localcache.GroupLocalCache
conversationLocalCache *localcache.ConversationLocalCache
msgClient *rpcclient.MsgClient
conversationClient *rpcclient.ConversationClient
msgClient *rpcclient.MessageRpcClient
conversationClient *rpcclient.ConversationRpcClient
successCount int
}
@@ -40,15 +40,17 @@ var errNoOfflinePusher = errors.New("no offlinePusher is configured")
func NewPusher(client discoveryregistry.SvcDiscoveryRegistry, offlinePusher offlinepush.OfflinePusher, database controller.PushDatabase,
groupLocalCache *localcache.GroupLocalCache, conversationLocalCache *localcache.ConversationLocalCache) *Pusher {
rpcclient.NewGroupClient(client)
msgClient := rpcclient.NewMessageRpcClient(client)
conversationClient := rpcclient.NewConversationRpcClient(client)
return &Pusher{
database: database,
client: client,
offlinePusher: offlinePusher,
groupLocalCache: groupLocalCache,
conversationLocalCache: conversationLocalCache,
msgClient: rpcclient.NewMsgClient(client),
conversationClient: rpcclient.NewConversationClient(client),
msgClient: &msgClient,
conversationClient: &conversationClient,
}
}