add rpc conversation

pull/455/head
Gordon 3 years ago committed by Xinwei Xiong(cubxxw-openim)
parent f16b7d694b
commit 5572f90319

@ -0,0 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_conversation
BIN_DIR=../../../bin/
all: gotool build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
run:
@go run ./
gotool:
go fmt ./
go vet ./
install:
make build
mv ${BINARY_NAME} ${BIN_DIR}
clean:
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi

@ -0,0 +1,16 @@
package main
import (
rpcConversation "Open_IM/internal/rpc/conversation"
"flag"
"fmt"
)
func main() {
rpcPort := flag.Int("port", 11300, "RpcConversation default listen port 11300")
flag.Parse()
fmt.Println("start conversation rpc server, port: ", *rpcPort)
rpcServer := rpcConversation.NewRpcConversationServer(*rpcPort)
rpcServer.Run()
}

@ -123,6 +123,7 @@ rpcport: #rpc服务端口 默认即可
openImAdminCmsPort: [ 11000 ] openImAdminCmsPort: [ 11000 ]
openImOfficePort: [ 11100 ] openImOfficePort: [ 11100 ]
openImOrganizationPort: [ 11200 ] openImOrganizationPort: [ 11200 ]
openImConversatinPort: [ 11300 ]
c2c: c2c:
callbackBeforeSendMsg: callbackBeforeSendMsg:
switch: false switch: false
@ -146,6 +147,7 @@ rpcregistername: #rpc注册服务名默认即可
openImAdminCMSName: AdminCMS openImAdminCMSName: AdminCMS
openImOfficeName: Office openImOfficeName: Office
openImOrganizationName: Organization openImOrganizationName: Organization
openImConversationName: Conversation
log: log:
storageLocation: ../logs/ storageLocation: ../logs/

@ -0,0 +1,72 @@
package conversation
import (
"Open_IM/pkg/common/constant"
_ "Open_IM/pkg/common/db"
_ "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
_ "Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbConversation "Open_IM/pkg/proto/conversation"
"Open_IM/pkg/utils"
"context"
"net"
"strconv"
"strings"
"Open_IM/pkg/common/config"
"google.golang.org/grpc"
)
type rpcConversation struct {
rpcPort int
rpcRegisterName string
etcdSchema string
etcdAddr []string
}
func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbConversation.ModifyConversationFieldReq) (*pbConversation.ModifyConversationFieldResp, error) {
panic("implement me")
}
func NewRpcConversationServer(port int) *rpcConversation {
log.NewPrivateLog(constant.LogFileName)
return &rpcConversation{
rpcPort: port,
rpcRegisterName: config.Config.RpcRegisterName.OpenImConversationName,
etcdSchema: config.Config.Etcd.EtcdSchema,
etcdAddr: config.Config.Etcd.EtcdAddr,
}
}
func (rpc *rpcConversation) Run() {
log.NewInfo("0", "rpc conversation start...")
address := utils.ServerIP + ":" + strconv.Itoa(rpc.rpcPort)
listener, err := net.Listen("tcp", address)
if err != nil {
log.NewError("0", "listen network failed ", err.Error(), address)
return
}
log.NewInfo("0", "listen network success, ", address, listener)
//grpc server
srv := grpc.NewServer()
defer srv.GracefulStop()
//service registers with etcd
pbConversation.RegisterConversationServer(srv, rpc)
err = getcdv3.RegisterEtcd(rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName, 10)
if err != nil {
log.NewError("0", "RegisterEtcd failed ", err.Error(),
rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName)
return
}
log.NewInfo("0", "RegisterConversationServer ok ", rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName)
err = srv.Serve(listener)
if err != nil {
log.NewError("0", "Serve failed ", err.Error())
return
}
log.NewInfo("0", "rpc conversation ok")
}

@ -118,6 +118,7 @@ type config struct {
OpenImAdminCMSName string `yaml:"openImAdminCMSName"` OpenImAdminCMSName string `yaml:"openImAdminCMSName"`
OpenImOfficeName string `yaml:"openImOfficeName"` OpenImOfficeName string `yaml:"openImOfficeName"`
OpenImOrganizationName string `yaml:"openImOrganizationName"` OpenImOrganizationName string `yaml:"openImOrganizationName"`
OpenImConversationName string `yaml:"openImConversationName"`
} }
Etcd struct { Etcd struct {
EtcdSchema string `yaml:"etcdSchema"` EtcdSchema string `yaml:"etcdSchema"`

@ -0,0 +1,429 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: conversation/conversation.proto
package conversation // import "./conversation"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type CommonResp struct {
ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{0}
}
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
}
func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic)
}
func (dst *CommonResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommonResp.Merge(dst, src)
}
func (m *CommonResp) XXX_Size() int {
return xxx_messageInfo_CommonResp.Size(m)
}
func (m *CommonResp) XXX_DiscardUnknown() {
xxx_messageInfo_CommonResp.DiscardUnknown(m)
}
var xxx_messageInfo_CommonResp proto.InternalMessageInfo
func (m *CommonResp) GetErrCode() int32 {
if m != nil {
return m.ErrCode
}
return 0
}
func (m *CommonResp) GetErrMsg() string {
if m != nil {
return m.ErrMsg
}
return ""
}
type Conversation struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt" json:"recvMsgOpt,omitempty"`
ConversationType int32 `protobuf:"varint,4,opt,name=conversationType" json:"conversationType,omitempty"`
UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"`
GroupID string `protobuf:"bytes,6,opt,name=groupID" json:"groupID,omitempty"`
UnreadCount int32 `protobuf:"varint,7,opt,name=unreadCount" json:"unreadCount,omitempty"`
DraftTextTime int64 `protobuf:"varint,8,opt,name=draftTextTime" json:"draftTextTime,omitempty"`
IsPinned bool `protobuf:"varint,9,opt,name=isPinned" json:"isPinned,omitempty"`
AttachedInfo string `protobuf:"bytes,10,opt,name=attachedInfo" json:"attachedInfo,omitempty"`
IsPrivateChat bool `protobuf:"varint,11,opt,name=isPrivateChat" json:"isPrivateChat,omitempty"`
GroupAtType int32 `protobuf:"varint,12,opt,name=groupAtType" json:"groupAtType,omitempty"`
IsNotInGroup bool `protobuf:"varint,13,opt,name=isNotInGroup" json:"isNotInGroup,omitempty"`
Ex string `protobuf:"bytes,14,opt,name=ex" json:"ex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Conversation) Reset() { *m = Conversation{} }
func (m *Conversation) String() string { return proto.CompactTextString(m) }
func (*Conversation) ProtoMessage() {}
func (*Conversation) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{1}
}
func (m *Conversation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Conversation.Unmarshal(m, b)
}
func (m *Conversation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Conversation.Marshal(b, m, deterministic)
}
func (dst *Conversation) XXX_Merge(src proto.Message) {
xxx_messageInfo_Conversation.Merge(dst, src)
}
func (m *Conversation) XXX_Size() int {
return xxx_messageInfo_Conversation.Size(m)
}
func (m *Conversation) XXX_DiscardUnknown() {
xxx_messageInfo_Conversation.DiscardUnknown(m)
}
var xxx_messageInfo_Conversation proto.InternalMessageInfo
func (m *Conversation) GetOwnerUserID() string {
if m != nil {
return m.OwnerUserID
}
return ""
}
func (m *Conversation) GetConversationID() string {
if m != nil {
return m.ConversationID
}
return ""
}
func (m *Conversation) GetRecvMsgOpt() int32 {
if m != nil {
return m.RecvMsgOpt
}
return 0
}
func (m *Conversation) GetConversationType() int32 {
if m != nil {
return m.ConversationType
}
return 0
}
func (m *Conversation) GetUserID() string {
if m != nil {
return m.UserID
}
return ""
}
func (m *Conversation) GetGroupID() string {
if m != nil {
return m.GroupID
}
return ""
}
func (m *Conversation) GetUnreadCount() int32 {
if m != nil {
return m.UnreadCount
}
return 0
}
func (m *Conversation) GetDraftTextTime() int64 {
if m != nil {
return m.DraftTextTime
}
return 0
}
func (m *Conversation) GetIsPinned() bool {
if m != nil {
return m.IsPinned
}
return false
}
func (m *Conversation) GetAttachedInfo() string {
if m != nil {
return m.AttachedInfo
}
return ""
}
func (m *Conversation) GetIsPrivateChat() bool {
if m != nil {
return m.IsPrivateChat
}
return false
}
func (m *Conversation) GetGroupAtType() int32 {
if m != nil {
return m.GroupAtType
}
return 0
}
func (m *Conversation) GetIsNotInGroup() bool {
if m != nil {
return m.IsNotInGroup
}
return false
}
func (m *Conversation) GetEx() string {
if m != nil {
return m.Ex
}
return ""
}
type ModifyConversationFieldReq struct {
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"`
FieldType int32 `protobuf:"varint,2,opt,name=fieldType" json:"fieldType,omitempty"`
UserIDList []string `protobuf:"bytes,3,rep,name=userIDList" json:"userIDList,omitempty"`
OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ModifyConversationFieldReq) Reset() { *m = ModifyConversationFieldReq{} }
func (m *ModifyConversationFieldReq) String() string { return proto.CompactTextString(m) }
func (*ModifyConversationFieldReq) ProtoMessage() {}
func (*ModifyConversationFieldReq) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{2}
}
func (m *ModifyConversationFieldReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyConversationFieldReq.Unmarshal(m, b)
}
func (m *ModifyConversationFieldReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModifyConversationFieldReq.Marshal(b, m, deterministic)
}
func (dst *ModifyConversationFieldReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModifyConversationFieldReq.Merge(dst, src)
}
func (m *ModifyConversationFieldReq) XXX_Size() int {
return xxx_messageInfo_ModifyConversationFieldReq.Size(m)
}
func (m *ModifyConversationFieldReq) XXX_DiscardUnknown() {
xxx_messageInfo_ModifyConversationFieldReq.DiscardUnknown(m)
}
var xxx_messageInfo_ModifyConversationFieldReq proto.InternalMessageInfo
func (m *ModifyConversationFieldReq) GetConversation() *Conversation {
if m != nil {
return m.Conversation
}
return nil
}
func (m *ModifyConversationFieldReq) GetFieldType() int32 {
if m != nil {
return m.FieldType
}
return 0
}
func (m *ModifyConversationFieldReq) GetUserIDList() []string {
if m != nil {
return m.UserIDList
}
return nil
}
func (m *ModifyConversationFieldReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
type ModifyConversationFieldResp struct {
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ModifyConversationFieldResp) Reset() { *m = ModifyConversationFieldResp{} }
func (m *ModifyConversationFieldResp) String() string { return proto.CompactTextString(m) }
func (*ModifyConversationFieldResp) ProtoMessage() {}
func (*ModifyConversationFieldResp) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{3}
}
func (m *ModifyConversationFieldResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyConversationFieldResp.Unmarshal(m, b)
}
func (m *ModifyConversationFieldResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModifyConversationFieldResp.Marshal(b, m, deterministic)
}
func (dst *ModifyConversationFieldResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModifyConversationFieldResp.Merge(dst, src)
}
func (m *ModifyConversationFieldResp) XXX_Size() int {
return xxx_messageInfo_ModifyConversationFieldResp.Size(m)
}
func (m *ModifyConversationFieldResp) XXX_DiscardUnknown() {
xxx_messageInfo_ModifyConversationFieldResp.DiscardUnknown(m)
}
var xxx_messageInfo_ModifyConversationFieldResp proto.InternalMessageInfo
func (m *ModifyConversationFieldResp) GetCommonResp() *CommonResp {
if m != nil {
return m.CommonResp
}
return nil
}
func init() {
proto.RegisterType((*CommonResp)(nil), "conversation.CommonResp")
proto.RegisterType((*Conversation)(nil), "conversation.Conversation")
proto.RegisterType((*ModifyConversationFieldReq)(nil), "conversation.ModifyConversationFieldReq")
proto.RegisterType((*ModifyConversationFieldResp)(nil), "conversation.ModifyConversationFieldResp")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Conversation service
type ConversationClient interface {
ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error)
}
type conversationClient struct {
cc *grpc.ClientConn
}
func NewConversationClient(cc *grpc.ClientConn) ConversationClient {
return &conversationClient{cc}
}
func (c *conversationClient) ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error) {
out := new(ModifyConversationFieldResp)
err := grpc.Invoke(ctx, "/conversation.conversation/ModifyConversationField", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Conversation service
type ConversationServer interface {
ModifyConversationField(context.Context, *ModifyConversationFieldReq) (*ModifyConversationFieldResp, error)
}
func RegisterConversationServer(s *grpc.Server, srv ConversationServer) {
s.RegisterService(&_Conversation_serviceDesc, srv)
}
func _Conversation_ModifyConversationField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModifyConversationFieldReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConversationServer).ModifyConversationField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/conversation.conversation/ModifyConversationField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConversationServer).ModifyConversationField(ctx, req.(*ModifyConversationFieldReq))
}
return interceptor(ctx, in, info, handler)
}
var _Conversation_serviceDesc = grpc.ServiceDesc{
ServiceName: "conversation.conversation",
HandlerType: (*ConversationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ModifyConversationField",
Handler: _Conversation_ModifyConversationField_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "conversation/conversation.proto",
}
func init() {
proto.RegisterFile("conversation/conversation.proto", fileDescriptor_conversation_e6bf38f800b9bed2)
}
var fileDescriptor_conversation_e6bf38f800b9bed2 = []byte{
// 475 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xdf, 0x8a, 0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, 0xed, 0x2c, 0x66, 0x1e, 0x71, 0x8b, 0x56, 0xa3, 0xda, 0xed, 0xd0, 0xd1, 0x76, 0xd1,
0x6e, 0x51, 0xfa, 0x15, 0xce, 0x0e, 0xda, 0xeb, 0x9a, 0xbc, 0x06, 0x98, 0xdd, 0xac, 0xfe, 0x56,
0x9e, 0xee, 0xcb, 0xef, 0x9e, 0x33, 0xaf, 0xf7, 0xfc, 0x77, 0x78, 0x71, 0x22, 0xe0, 0xc1, 0x81,
0x83, 0x48, 0x16, 0x06, 0x1e, 0xfe, 0x9a, 0xc3, 0xe7, 0x77, 0xec, 0xd4, 0xf5, 0xbb, 0x47, 0xdf,
0xce, 0x46, 0xc1, 0xaf, 0xfd, 0xc6, 0x2f, 0xbe, 0x77, 0xdc, 0x8f, 0xfe, 0xea, 0x5f, 0x00, 0x00,
0x00, 0xff, 0xff, 0x8d, 0x8a, 0xf6, 0x60, 0x0b, 0x04, 0x00, 0x00,
}

@ -32,7 +32,7 @@ message ModifyConversationFieldReq{
message ModifyConversationFieldResp{ message ModifyConversationFieldResp{
CommonResp commonResp = 1; CommonResp commonResp = 1;
} }
service user { service conversation {
rpc ModifyConversationField(ModifyConversationFieldReq)returns(ModifyConversationFieldResp); rpc ModifyConversationField(ModifyConversationFieldReq)returns(ModifyConversationFieldResp);
} }

@ -21,6 +21,7 @@ service_port_name=(
openImStatisticsPort openImStatisticsPort
openImOfficePort openImOfficePort
openImOrganizationPort openImOrganizationPort
openImConversationPort
) )
switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}') switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}')
for i in ${service_port_name[*]}; do for i in ${service_port_name[*]}; do

@ -50,6 +50,7 @@ service_source_root=(
../cmd/rpc/open_im_statistics/ ../cmd/rpc/open_im_statistics/
../cmd/rpc/open_im_office/ ../cmd/rpc/open_im_office/
../cmd/rpc/open_im_organization/ ../cmd/rpc/open_im_organization/
../cmd/rpc/open_im_conversation/
${msg_gateway_source_root} ${msg_gateway_source_root}
${msg_transfer_source_root} ${msg_transfer_source_root}
${msg_source_root} ${msg_source_root}
@ -72,6 +73,7 @@ service_names=(
open_im_statistics open_im_statistics
open_im_office open_im_office
open_im_organization open_im_organization
open_im_conversation
${msg_gateway_name} ${msg_gateway_name}
${msg_transfer_name} ${msg_transfer_name}
${msg_name} ${msg_name}

@ -20,6 +20,7 @@ service_filename=(
${msg_name} ${msg_name}
open_im_office open_im_office
open_im_organization open_im_organization
open_im_conversation
) )
#service config port name #service config port name
@ -38,6 +39,7 @@ service_port_name=(
openImOfflineMessagePort openImOfflineMessagePort
openImOfficePort openImOfficePort
openImOrganizationPort openImOrganizationPort
openImConversationPort
) )
for ((i = 0; i < ${#service_filename[*]}; i++)); do for ((i = 0; i < ${#service_filename[*]}; i++)); do

Loading…
Cancel
Save