fix: reset branch. (#1277)

* fix: to start im or chat, ZooKeeper must be started first.

* fix: msg gateway start output err info

Signed-off-by: Gordon <1432970085@qq.com>

* fix: msg gateway start output err info

Signed-off-by: Gordon <1432970085@qq.com>

* chore: package path changes

Signed-off-by: withchao <993506633@qq.com>

* fix: go mod update

Signed-off-by: Gordon <1432970085@qq.com>

* fix: token update

Signed-off-by: Gordon <1432970085@qq.com>

* chore: package path changes

Signed-off-by: withchao <993506633@qq.com>

* chore: package path changes

Signed-off-by: withchao <993506633@qq.com>

* fix: token update

Signed-off-by: Gordon <1432970085@qq.com>

* fix: token update

Signed-off-by: Gordon <1432970085@qq.com>

* fix: token update

Signed-off-by: Gordon <1432970085@qq.com>

* fix: token update

Signed-off-by: Gordon <1432970085@qq.com>

* fix: token update

Signed-off-by: Gordon <1432970085@qq.com>

* fix: token update

Signed-off-by: Gordon <1432970085@qq.com>

* fix: get all userID

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: msggateway add online status call

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* refactor: log change

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* refactor: log change

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* chore: network mode change

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: add api of get server time

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* feat: remove go work sum

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: pull message add isRead field

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: check msg-transfer script

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix:  script update

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: start don't kill old process

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: check component

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: pull message set isRead only message come from single.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: add ex field to update group info.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

* cicd: robot automated Change

* refactor: change project module name.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* refactor: change project module name.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* refactor: change project module name.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

* test: for pressure test.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* test: for pressure test.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* test: for pressure test.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* test: message log.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

* fxi: component check output valid info.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fxi: component check output valid info.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* test: send message test log.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* cicd: robot automated Change

* cicd: robot automated Change

* test: remove info log.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* feat: api of send message add sendTime field.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>

* fix: add callback for update user's info.

* cicd: robot automated Change

* fix: change callback command name.

* cicd: robot automated Change

* fix: single chat unread status change.

* fix: single chat unread status change.

* fix: single chat unread status change.

* fix: user status change.

* cicd: robot automated Change

* fix: user status change.

* fix: user status change.

* fix: user status change.

* cicd: robot automated Change

* fix: ws close when user logout.

* fix: remove repeat platform on online status.

* cicd: robot automated Change

* fix: api send messages for notification conversation .

* fix: api send messages for notification conversation .

* fix: api send messages for notification conversation .

* fix: api send messages for notification conversation .

* fix: api send messages for notification conversation .

* fix: api send messages for notification conversation.

* fix: api send messages for notification conversation.

* fix: api send messages for notification conversation.

* fix: api send messages for notification conversation.

* fix: api send messages for notification conversation.

* fix: api send messages for notification conversation.

* re: remove router of unsubscribeStatus.

* re: remove router of unsubscribeStatus.

* re: remove router of unsubscribeStatus.

* re: remove router of unsubscribeStatus.

* fix: reset branch

* fix: not support redis cluster. CROSSSLOT Keys in request don't hash to the same slot

* fix: update user.FaceURL do not trigger GroupMemberInfoSetNotification

* cicd: robot automated Change

* fix: api send messages for notification conversation.

* fix: api send messages for notification conversation.

---------

Signed-off-by: Gordon <1432970085@qq.com>
Signed-off-by: withchao <993506633@qq.com>
Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: withchao <993506633@qq.com>
Co-authored-by: Xinwei Xiong <3293172751NSS@gmail.com>
Co-authored-by: FGadvancer <FGadvancer@users.noreply.github.com>
Co-authored-by: withchao <withchao@users.noreply.github.com>
This commit is contained in:
Gordon
2023-10-24 20:28:22 +08:00
committed by GitHub
parent 8a13017665
commit cb0394392b
91 changed files with 781 additions and 1444 deletions
-35
View File
@@ -79,7 +79,6 @@ var (
ConversationCreateFailedCounter prometheus.Counter
)
//nolint:promlinter //no idea to fix it
func NewUserLoginCounter() {
if UserLoginCounter != nil {
return
@@ -90,7 +89,6 @@ func NewUserLoginCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewUserRegisterCounter() {
if UserRegisterCounter != nil {
return
@@ -101,7 +99,6 @@ func NewUserRegisterCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewSeqGetSuccessCounter() {
if SeqGetSuccessCounter != nil {
return
@@ -112,7 +109,6 @@ func NewSeqGetSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewSeqGetFailedCounter() {
if SeqGetFailedCounter != nil {
return
@@ -123,7 +119,6 @@ func NewSeqGetFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewSeqSetSuccessCounter() {
if SeqSetSuccessCounter != nil {
return
@@ -134,7 +129,6 @@ func NewSeqSetSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewSeqSetFailedCounter() {
if SeqSetFailedCounter != nil {
return
@@ -145,7 +139,6 @@ func NewSeqSetFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewApiRequestCounter() {
if ApiRequestCounter != nil {
return
@@ -156,7 +149,6 @@ func NewApiRequestCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewApiRequestSuccessCounter() {
if ApiRequestSuccessCounter != nil {
return
@@ -167,7 +159,6 @@ func NewApiRequestSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewApiRequestFailedCounter() {
if ApiRequestFailedCounter != nil {
return
@@ -178,7 +169,6 @@ func NewApiRequestFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewGrpcRequestCounter() {
if GrpcRequestCounter != nil {
return
@@ -189,7 +179,6 @@ func NewGrpcRequestCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewGrpcRequestSuccessCounter() {
if GrpcRequestSuccessCounter != nil {
return
@@ -200,7 +189,6 @@ func NewGrpcRequestSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewGrpcRequestFailedCounter() {
if GrpcRequestFailedCounter != nil {
return
@@ -211,7 +199,6 @@ func NewGrpcRequestFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewSendMsgCount() {
if SendMsgCounter != nil {
return
@@ -222,7 +209,6 @@ func NewSendMsgCount() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgInsertRedisSuccessCounter() {
if MsgInsertRedisSuccessCounter != nil {
return
@@ -233,7 +219,6 @@ func NewMsgInsertRedisSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix its
func NewMsgInsertRedisFailedCounter() {
if MsgInsertRedisFailedCounter != nil {
return
@@ -244,7 +229,6 @@ func NewMsgInsertRedisFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgInsertMongoSuccessCounter() {
if MsgInsertMongoSuccessCounter != nil {
return
@@ -255,7 +239,6 @@ func NewMsgInsertMongoSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgInsertMongoFailedCounter() {
if MsgInsertMongoFailedCounter != nil {
return
@@ -266,7 +249,6 @@ func NewMsgInsertMongoFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgPullFromRedisSuccessCounter() {
if MsgPullFromRedisSuccessCounter != nil {
return
@@ -277,7 +259,6 @@ func NewMsgPullFromRedisSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgPullFromRedisFailedCounter() {
if MsgPullFromRedisFailedCounter != nil {
return
@@ -288,7 +269,6 @@ func NewMsgPullFromRedisFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgPullFromMongoSuccessCounter() {
if MsgPullFromMongoSuccessCounter != nil {
return
@@ -299,7 +279,6 @@ func NewMsgPullFromMongoSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgPullFromMongoFailedCounter() {
if MsgPullFromMongoFailedCounter != nil {
return
@@ -340,7 +319,6 @@ func NewPullMsgBySeqListTotalCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewSingleChatMsgRecvSuccessCounter() {
if SingleChatMsgRecvSuccessCounter != nil {
return
@@ -351,7 +329,6 @@ func NewSingleChatMsgRecvSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewGroupChatMsgRecvSuccessCounter() {
if GroupChatMsgRecvSuccessCounter != nil {
return
@@ -362,7 +339,6 @@ func NewGroupChatMsgRecvSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewWorkSuperGroupChatMsgRecvSuccessCounter() {
if WorkSuperGroupChatMsgRecvSuccessCounter != nil {
return
@@ -383,7 +359,6 @@ func NewOnlineUserGauges() {
})
}
//nolint:promlinter //no idea to fix it
func NewSingleChatMsgProcessSuccessCounter() {
if SingleChatMsgProcessSuccessCounter != nil {
return
@@ -394,7 +369,6 @@ func NewSingleChatMsgProcessSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewSingleChatMsgProcessFailedCounter() {
if SingleChatMsgProcessFailedCounter != nil {
return
@@ -405,7 +379,6 @@ func NewSingleChatMsgProcessFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewGroupChatMsgProcessSuccessCounter() {
if GroupChatMsgProcessSuccessCounter != nil {
return
@@ -416,7 +389,6 @@ func NewGroupChatMsgProcessSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewGroupChatMsgProcessFailedCounter() {
if GroupChatMsgProcessFailedCounter != nil {
return
@@ -427,7 +399,6 @@ func NewGroupChatMsgProcessFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewWorkSuperGroupChatMsgProcessSuccessCounter() {
if WorkSuperGroupChatMsgProcessSuccessCounter != nil {
return
@@ -438,7 +409,6 @@ func NewWorkSuperGroupChatMsgProcessSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewWorkSuperGroupChatMsgProcessFailedCounter() {
if WorkSuperGroupChatMsgProcessFailedCounter != nil {
return
@@ -449,7 +419,6 @@ func NewWorkSuperGroupChatMsgProcessFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgOnlinePushSuccessCounter() {
if MsgOnlinePushSuccessCounter != nil {
return
@@ -460,7 +429,6 @@ func NewMsgOnlinePushSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgOfflinePushSuccessCounter() {
if MsgOfflinePushSuccessCounter != nil {
return
@@ -471,7 +439,6 @@ func NewMsgOfflinePushSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewMsgOfflinePushFailedCounter() {
if MsgOfflinePushFailedCounter != nil {
return
@@ -482,7 +449,6 @@ func NewMsgOfflinePushFailedCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewConversationCreateSuccessCounter() {
if ConversationCreateSuccessCounter != nil {
return
@@ -493,7 +459,6 @@ func NewConversationCreateSuccessCounter() {
})
}
//nolint:promlinter //no idea to fix it
func NewConversationCreateFailedCounter() {
if ConversationCreateFailedCounter != nil {
return
-4
View File
@@ -30,16 +30,13 @@ func StartPrometheusSrv(prometheusPort int) error {
if config.Config.Prometheus.Enable {
http.Handle("/metrics", promhttp.Handler())
err := http.ListenAndServe(":"+strconv.Itoa(prometheusPort), nil)
return err
}
return nil
}
func PrometheusHandler() gin.HandlerFunc {
h := promhttp.Handler()
return func(c *gin.Context) {
h.ServeHTTP(c.Writer, c.Request)
}
@@ -52,7 +49,6 @@ type responseBodyWriter struct {
func (r responseBodyWriter) Write(b []byte) (int, error) {
r.body.Write(b)
return r.ResponseWriter.Write(b)
}