ws update

This commit is contained in:
Gordon
2023-03-23 15:56:47 +08:00
parent a5380a971b
commit 393dfa5902
4 changed files with 24 additions and 5 deletions
+9
View File
@@ -81,6 +81,15 @@ func GetOpUserPlatform(ctx context.Context) string {
}
return ""
}
func GetRemoteAddr(ctx context.Context) string {
if ctx.Value(constant.RemoteAddr) != "" {
s, ok := ctx.Value(constant.RemoteAddr).(string)
if ok {
return s
}
}
return ""
}
func GetMustCtxInfo(ctx context.Context) (operationID, opUserID, platform, connID string, err error) {
operationID, ok := ctx.Value(constant.OperationID).(string)