Merge branch '3.6.1-code-conventions' of https://github.com/FGadvancer/Open-IM-Server into 3.6.1-code-conventions

pull/2148/head
skiffer-git 2 years ago
commit 6b48cf8491

@ -338,14 +338,36 @@ linters-settings:
local-prefixes: github.com/openimsdk/open-im-server
gomnd:
settings:
mnd:
# the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
# checks:
# ignored-numbers: 1000
ignored-files: magic_.*.go, test_.*.go, .*_test.go
ignored-functions: math.*
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
checks:
- argument
- case
- condition
- operation
- return
- assign
# List of numbers to exclude from analysis.
# The numbers should be written as string.
# Values always ignored: "1", "1.0", "0" and "0.0"
# Default: []
ignored-numbers:
- '0666'
- '0755'
- '42'
# List of file patterns to exclude from analysis.
# Values always ignored: `.+_test.go`
# Default: []
ignored-files:
- 'magic1_.+\.go$'
# List of function patterns to exclude from analysis.
# Following functions are always ignored: `time.Date`,
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
# Default: []
ignored-functions:
- '^math\.'
- '^http\.StatusText$'
gomoddirectives:
# Allow local `replace` directives. Default is false.
replace-local: true
@ -421,9 +443,6 @@ linters-settings:
checks: [ "all" ]
govet:
# report about shadowed variables
check-shadowing: false
# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
@ -508,9 +527,6 @@ linters-settings:
line-length: 250
# tab width in spaces. Default to 1.
tab-width: 4
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
@ -751,6 +767,7 @@ linters:
- reassign
- tparallel
- unconvert
- fieldalignment
- dupl
- dupword
- errname

@ -0,0 +1,15 @@
kafka:
username: ''
password: ''
addr: [ 172.28.0.1:19094 ]
latestMsgToRedis:
topic: "latestMsgToRedis"
offlineMsgToMongo:
topic: "offlineMsgToMongoMysql"
msgToPush:
topic: "msgToPush"
consumerGroupID:
msgToRedis: redis
msgToMongo: mongo
msgToMySql: mysql
msgToPush: push

@ -0,0 +1,7 @@
mongo:
uri: ''
address: [ 172.28.0.1:37017 ]
database: openim_v3
username: openIM
password: openIM123
maxPoolSize: 100

@ -0,0 +1,40 @@
object:
enable: "minio"
apiURL: "http://240e:47e:3060:8cc:f664:1fee:9c86:9455:10002"
minio:
bucket: "openim"
endpoint: "http://172.28.0.1:10005"
accessKeyID: "root"
secretAccessKey: "openIM123"
sessionToken: ''
signEndpoint: "http://240e:47e:3060:8cc:f664:1fee:9c86:9455:10005"
publicRead: false
cos:
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
secretID: ''
secretKey: ''
sessionToken: ''
publicRead: false
oss:
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
bucket: "demo-9999999"
bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
accessKeyID: ''
accessKeySecret: ''
sessionToken: ''
publicRead: false
kodo:
endpoint: "http://s3.cn-east-1.qiniucs.com"
bucket: "demo-9999999"
bucketURL: "http://your.domain.com"
accessKeyID: ''
accessKeySecret: ''
sessionToken: ''
publicRead: false
aws:
endpoint: "''"
region: "us-east-1"
bucket: "demo-9999999"
accessKeyID: ''
accessKeySecret: ''
publicRead: false

@ -0,0 +1,3 @@
api:
openImApiPort: [ 10002 ]
listenIP: 0.0.0.0

@ -0,0 +1,3 @@
cmdUtils:
toolName:
configOption: value

@ -0,0 +1,3 @@
cronTasks:
chatRecordsClearTime: "0 2 * * 3"
msgDestructTime: "0 2 * * *"

@ -0,0 +1,16 @@
push:
enable: getui
geTui:
pushUrl: "https://restapi.getui.com/v2/$appId"
masterSecret: ''
appKey: ''
intent: ''
channelID: ''
channelName: ''
fcm:
serviceAccount: "x.json"
jpns:
appKey: ''
masterSecret: ''
pushUrl: ''
pushIntent: ''

@ -0,0 +1,7 @@
rpc:
registerIP: ''
listenIP: 0.0.0.0
rpcPort:
openImAuthPort: [ 10160 ]
rpcRegisterName:
openImAuthName: Auth

@ -0,0 +1,7 @@
rpc:
registerIP: ''
listenIP: 0.0.0.0
rpcPort:
openImConversationPort: [ 10180 ]
rpcRegisterName:
openImConversationName: Conversation

@ -0,0 +1,7 @@
rpc:
registerIP: ''
listenIP: 0.0.0.0
rpcPort:
openImFriendPort: [ 10120 ]
rpcRegisterName:
openImFriendName: Friend

@ -0,0 +1,7 @@
rpc:
registerIP: ''
listenIP: 0.0.0.0
rpcPort:
openImGroupPort: [ 10150 ]
rpcRegisterName:
openImGroupName: Group

@ -0,0 +1,7 @@
rpc:
registerIP: ''
listenIP: 0.0.0.0
rpcPort:
openImMessagePort: [ 10130 ]
rpcRegisterName:
openImMsgName: Msg

@ -0,0 +1,7 @@
rpc:
registerIP: ''
listenIP: 0.0.0.0
rpcPort:
openImThirdPort: [ 10190 ]
rpcRegisterName:
openImThirdName: Third

@ -0,0 +1,7 @@
rpc:
registerIP: ''
listenIP: 0.0.0.0
rpcPort:
openImUserPort: [ 10110 ]
rpcRegisterName:
openImUserName: User

@ -0,0 +1,4 @@
redis:
address: [ 172.28.0.1:16379 ]
username: ''
password: openIM123

@ -1,24 +1,3 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -----------------------------------------------------------------
# TODO: This config file is the template file
# --| source: deployments/templates/config.yaml
# --| env: scripts/install/environment
# --| target: config/config.yaml
# -----------------------------------------------------------------
envs:
discovery: zookeeper
@ -122,14 +101,14 @@ api:
# minio.signEndpoint is minio public network address
object:
enable: "minio"
apiURL: "http://172.28.0.1:10002"
apiURL: "http://240e:47e:3060:8cc:f664:1fee:9c86:9455:10002"
minio:
bucket: "openim"
endpoint: "http://172.28.0.1:10005"
accessKeyID: "root"
secretAccessKey: "openIM123"
sessionToken: ''
signEndpoint: "http://172.28.0.1:10005"
signEndpoint: "http://240e:47e:3060:8cc:f664:1fee:9c86:9455:10005"
publicRead: false
cos:
bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com
@ -154,8 +133,8 @@ object:
sessionToken: ''
publicRead: false
aws:
endpoint: ""
region: ""
endpoint: "''" # This might not be necessary unless you're using a custom endpoint
region: "us-east-1"
bucket: "demo-9999999"
accessKeyID: ''
accessKeySecret: ''
@ -200,7 +179,7 @@ rpcRegisterName:
# Whether to output in json format
# Whether to include stack trace in logs
log:
storageLocation: /workspaces/open-im-server/logs/
storageLocation: /data/workspaces/open-im-server/_output/logs/
rotationTime: 24
remainRotationCount: 2
remainLogLevel: 6
@ -250,9 +229,10 @@ push:
#
# Built-in app manager user IDs
# Built-in app manager nicknames
# Attention, this configure is discarded. If you have used him before, configure your own
manager:
userID: [ "openIM123456", "openIM654321", "openIMAdmin" ]
nickname: [ "system1", "system2", "system3" ]
userID:
nickname:
# chatAdmin, use for send notification
#
@ -336,7 +316,7 @@ callback:
timeout: 5
failedContinue: true
afterSendSingleMsg:
enable: true
enable: false
timeout: 5
failedContinue: true
beforeSendGroupMsg:
@ -521,7 +501,7 @@ callback:
# The number of ports needs to be consistent with msg_transfer_service_num in script/path_info.sh
prometheus:
enable: true
grafanaUrl: http://172.28.0.1:13000/
grafanaUrl: http://240e:47e:3060:8cc:f664:1fee:9c86:9455:13000/
apiPrometheusPort: [20100]
userPrometheusPort: [ 20110 ]
friendPrometheusPort: [ 20120 ]
@ -534,3 +514,39 @@ prometheus:
rtcPrometheusPort: [ 21300 ]
thirdPrometheusPort: [ 21301 ]
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] # List of ports
###################### LocalCache configuration information ######################
# topic: redis subscriber channel
# slotNum: number of slots, multiple slots can prevent too many keys from competing for a lock
# slotSize: number of slots, the number of cached keys per slot, the overall cache quantity is slotNum * slotSize
# successExpire: successful cache time seconds
# failedExpire: failed cache time seconds
# disable local caching and annotate topic, slotNum, and slotSize
localCache:
user:
topic: DELETE_CACHE_USER
slotNum: 100
slotSize: 2000
successExpire: 300
failedExpire: 5
group:
topic: DELETE_CACHE_GROUP
slotNum: 100
slotSize: 2000
successExpire: 300
failedExpire: 5
friend:
topic: DELETE_CACHE_FRIEND
slotNum: 100
slotSize: 2000
successExpire: 300
failedExpire: 5
conversation:
topic: DELETE_CACHE_CONVERSATION
slotNum: 100
slotSize: 2000
successExpire: 300
failedExpire: 5

@ -25,7 +25,7 @@
# Data storage directory for persistent data.
# Example: DATA_DIR=/path/to/data
DATA_DIR=/workspaces/open-im-server
DATA_DIR=/data/workspaces/open-im-server
# Docker image registry. Uncomment the preferred one.
# Options: ghcr.io/openimsdk, openim, registry.cn-hangzhou.aliyuncs.com/openimsdk
@ -91,7 +91,7 @@ ALERT_MANAGER_NETWORK_ADDRESS=172.28.0.14
# ==============================================================================
# Local IP address of the service. Modify if necessary.
# Example: OPENIM_IP=172.28.0.1
OPENIM_IP=172.28.0.1
OPENIM_IP=240e:47e:3060:8cc:f664:1fee:9c86:9455
# ----- ZooKeeper Configuration -----
# Port for ZooKeeper service.
@ -100,7 +100,7 @@ ZOOKEEPER_PORT=12181
# MongoDB service port configuration.
# Default: MONGO_PORT=37017
# MONGO_PORT=37017
MONGO_PORT=37017
# Password for MongoDB admin user. Used for service authentication.
# Default: MONGO_PASSWORD=openIM123
@ -143,7 +143,7 @@ KAFKA_LATESTMSG_REDIS_TOPIC=latestMsgToRedis
# MINIO_PORT
# ----------
# MINIO_PORT sets the port for the MinIO object storage service.
# Upon changing this port, the MinIO endpoint URLs in the file must be updated
# Upon changing this port, the MinIO endpoint URLs in the config/config.yaml file must be updated
# to reflect this change. The endpoints include both the 'endpoint' and 'signEndpoint'
# under the MinIO configuration.
#

@ -0,0 +1,5 @@
zookeeper:
schema: openim
address: [ 172.28.0.1:12181 ]
username: ''
password: ''

@ -73,7 +73,6 @@ openim::log::status "Start the pre-start tools:"
# exit 1
# fi
openim::log::colorless "pre-start has been successfully completed!"
result=$("${OPENIM_ROOT}"/scripts/stop-all.sh)

Loading…
Cancel
Save