feat: Replace GRPC with Dubbo-go in notification c

pull/1227/head
sweep-ai[bot] 2 years ago committed by GitHub
parent 51bea8f1f7
commit 74c114d030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,26 @@
package notification
import (
"context"
"github.com/apache/dubbo-go"
pbconv "github.com/OpenIMSDK/protocol/conversation"
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
)
type Conversation struct {
Client pbconv.ConversationClient
conn dubbo-go.ClientConnInterface
discov discoveryregistry.SvcDiscoveryRegistry
}
func (c *Conversation) SendMessage(ctx context.Context, req *pbconv.SendMessageReq) (*pbconv.SendMessageResp, error) {
return c.Client.SendMessage(ctx, req)
}
func (c *Conversation) GetConversation(ctx context.Context, req *pbconv.GetConversationReq) (*pbconv.GetConversationResp, error) {
return c.Client.GetConversation(ctx, req)
}
func (c *Conversation) DeleteConversation(ctx context.Context, req *pbconv.DeleteConversationReq) (*pbconv.DeleteConversationResp, error) {
return c.Client.DeleteConversation(ctx, req)
}
Loading…
Cancel
Save