cd userserver/protos
protoc --proto_path=. --micro_out=. --go_out=. user.proto
启动user rpc服务
cd /userserver/cmd/rpc
go run user_rpc.go -f ../config/config_rpc.json
启动user api
cd /userserver/cmd/api
go run user_api.go -f ../config/config_api.json
IM通信服务-imservice
生成pb
cd imserver/protos
protoc --proto_path=. --micro_out=. --go_out=. im.proto
启动kafka消息推送rpc服务 供网关gateway调用
cd imserver/cmd/
go run rpcproducer/im_rpc.go
启动kafka消息订阅消费者服务(进程) 订阅kafka消息推送到websocket
cd imserver/cmd/
go run imconsumer/im_server.go -f ./config/config_im_1.json
go run imconsumer/im_server.go -f ./config/config_im_2.json
网关API-gateway 需token认证并调用userservice和imservice
调用rpc发送消息到kafka(/send)
cd /userserver/cmd/rpc
go run user_rpc.go -f ../config/config_rpc.json
cd imserver/cmd/
go run rpcproducer/im_rpc.go
cd gateway/cmd
go run api/gateway_api.go
获取并绑定用户与IM服务地址(/address)
cd /userserver/cmd/rpc
go run user_rpc.go -f ../config/config_rpc.json
cd gateway/cmd
go run api/gateway_api.go