Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: network mode change to start server normally #847

Merged
merged 27 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a99b6a1
fix: to start im or chat, ZooKeeper must be started first.
FGadvancer Jul 20, 2023
5cc7483
fix: msg gateway start output err info
FGadvancer Jul 20, 2023
78daeec
Merge remote-tracking branch 'upstream/main'
FGadvancer Jul 26, 2023
f0227ef
fix: msg gateway start output err info
FGadvancer Jul 26, 2023
eaeb342
chore: package path changes
withchao Jul 26, 2023
be0abdd
Merge remote-tracking branch 'origin/main'
withchao Jul 26, 2023
6b1e201
fix: go mod update
FGadvancer Jul 26, 2023
4fc70a7
Merge remote-tracking branch 'origin/main'
withchao Jul 26, 2023
ce81f6b
fix: token update
FGadvancer Jul 26, 2023
0ed8022
chore: package path changes
withchao Jul 26, 2023
f4c31ea
Merge remote-tracking branch 'origin/main'
withchao Jul 26, 2023
ac14dd0
chore: package path changes
withchao Jul 26, 2023
49220cc
fix: token update
FGadvancer Jul 26, 2023
d4d88d5
fix: token update
FGadvancer Jul 26, 2023
82e5319
fix: token update
FGadvancer Jul 26, 2023
445c34d
fix: token update
FGadvancer Jul 26, 2023
177a163
fix: token update
FGadvancer Jul 26, 2023
bc70c5b
fix: token update
FGadvancer Jul 27, 2023
0c1bbd0
fix: token update
FGadvancer Jul 27, 2023
ba6013d
fix: get all userID
FGadvancer Jul 28, 2023
7eeb3d6
fix: get all userID
FGadvancer Jul 28, 2023
a99e54d
fix: msggateway add online status call
FGadvancer Jul 28, 2023
a6fd0f9
Merge remote-tracking branch 'upstream/main'
FGadvancer Jul 31, 2023
82d7255
refactor: log change
FGadvancer Aug 7, 2023
3b74ad3
refactor: log change
FGadvancer Aug 9, 2023
3ffbb90
chore: network mode change
FGadvancer Aug 10, 2023
bbb9f85
Merge branch 'main' into main
cubxxw Aug 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ services:
environment:
TZ: Asia/Shanghai
restart: always
network_mode: "host"

kafka:
image: wurstmeister/kafka
Expand All @@ -72,14 +73,15 @@ services:
environment:
TZ: Asia/Shanghai
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ZOOKEEPER_CONNECT: 127.0.0.1:2181
KAFKA_CREATE_TOPICS: "latestMsgToRedis:8:1,msgToPush:8:1,offlineMsgToMongoMysql:8:1"
KAFKA_ADVERTISED_LISTENERS: INSIDE://127.0.0.1:9092,OUTSIDE://103.116.45.174:9092
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
depends_on:
- zookeeper
network_mode: "host"

minio:
image: minio/minio
Expand Down
16 changes: 14 additions & 2 deletions internal/msggateway/message_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ type Req struct {
}

func (r *Req) String() string {
return utils.StructToJsonString(r)
var tReq Req
tReq.ReqIdentifier = r.ReqIdentifier
tReq.Token = r.Token
tReq.SendID = r.SendID
tReq.OperationID = r.OperationID
tReq.MsgIncr = r.MsgIncr
return utils.StructToJsonString(tReq)
}

type Resp struct {
Expand All @@ -53,7 +59,13 @@ type Resp struct {
}

func (r *Resp) String() string {
return utils.StructToJsonString(r)
var tResp Resp
tResp.ReqIdentifier = r.ReqIdentifier
tResp.MsgIncr = r.MsgIncr
tResp.OperationID = r.OperationID
tResp.ErrCode = r.ErrCode
tResp.ErrMsg = r.ErrMsg
return utils.StructToJsonString(tResp)
}

type MessageHandler interface {
Expand Down
Loading