notification

This commit is contained in:
wangchuxiao
2023-04-21 20:29:08 +08:00
parent 9ec692585d
commit 2a7e305992
9 changed files with 857 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
package rpcclient
import (
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
"google.golang.org/grpc"
)
type MetaClient struct {
// contains filtered or unexported fields
client discoveryregistry.SvcDiscoveryRegistry
rpcRegisterName string
}
type NotificationMsg struct {
SendID string
RecvID string
Content []byte // sdkws.TipsComm
MsgFrom int32
ContentType int32
SessionType int32
SenderNickname string
SenderFaceURL string
}
func NewMetaClient(client discoveryregistry.SvcDiscoveryRegistry, rpcRegisterName string) *MetaClient {
return &MetaClient{
client: client,
rpcRegisterName: rpcRegisterName,
}
}
func (m *MetaClient) getConn() (*grpc.ClientConn, error) {
return m.client.GetConn(m.rpcRegisterName)
}
func (m *MetaClient) getRpcRegisterName() string {
return m.rpcRegisterName
}