diff --git a/README-zh_CN.md b/README-zh_CN.md index 951112ae4..3d9eea319 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -116,7 +116,7 @@ Open-IM-Server 不仅仅是一个即时消息服务器;它是将实时网络 1. 克隆项目 ``` -bashCopy code# 选择您需要的 +# 选择您需要的 BRANCH=release-v3.1 git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build ``` @@ -126,7 +126,7 @@ git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && expor 1. 修改 `.env` ``` -bashCopy codeUSER=root #无需修改 +USER=root #无需修改 PASSWORD=openIM123 #8位或更多数字和字母的组合,此密码适用于redis、mysql、mongo,以及config/config.yaml中的accessSecret ENDPOINT=http://127.0.0.1:10005 #minio的外部服务IP和端口,或使用域名storage.xx.xx,应用程序必须能够访问此IP和端口或域名, API_URL=http://127.0.0.1:10002/object/ #应用程序必须能够访问此IP和端口或域名, @@ -138,14 +138,14 @@ DATA_DIR=./ #指定大磁盘目录 > **注意** 此命令只能执行一次。它会基于 `.env` 中的 `PASSWORD` 变量修改 docker-compose 中的组件密码,并修改 `config/config.yaml` 中的组件密码。如果 `.env` 中的密码发生变化,您需要首先执行 `docker-compose down`;`rm components -rf` 然后执行此命令。 ``` -bashCopy code + make install ``` 1. 检查服务 ``` -bashCopy code + make check ``` @@ -158,7 +158,7 @@ make check 版本详情:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md ``` -bashCopy code# 选择您需要的 +# 选择您需要的 BRANCH=release-v3.1 git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build ``` @@ -180,7 +180,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。 - 用于 RPC 服务发现和注册,支持集群。 ``` - bashCopy codezookeeper: + zookeeper: schema: openim #不建议修改 address: [ 127.0.0.1:2181 ] #地址 username: #用户名 @@ -192,7 +192,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。 - 用于存储用户、关系和群组,支持主从数据库。 ``` - bashCopy codemysql: + mysql: address: [ 127.0.0.1:13306 ] #地址 username: root #用户名 password: openIM123 #密码 @@ -209,7 +209,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。 - 用于存储离线消息,支持 mongo 分片集群。 ``` - bashCopy codemongo: + mongo: uri: #如果不为空,则直接使用此值 address: [ 127.0.0.1:37017 ] #地址 database: openIM #默认 mongo 数据库 @@ -223,7 +223,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。 - 用于存储消息序列号、最新消息、用户令牌和 mysql 缓存,支持集群部署。 ``` - bashCopy coderedis: + redis: address: [ 127.0.0.1:16379 ] #地址 username: #用户名 password: openIM123 #密码 @@ -234,7 +234,7 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。 - 用于消息队列,用于消息解耦,支持集群部署。 ``` - bashCopy codekafka: + kafka: username: #用户名 password: #密码 addr: [ 127.0.0.1:9092 ] #地址 @@ -259,21 +259,21 @@ config/config.yaml 文件为存储组件提供了详细的配置说明。 启动服务 ``` -bashCopy code + ./scripts/start-all.sh; ``` 检查服务 ``` -bashCopy code + ./scripts/check-all.sh ``` 停止服务 ``` -bashCopy code + ./scripts/stop-all.sh ``` diff --git a/README.md b/README.md index da496c23a..8e02b1a5d 100644 --- a/README.md +++ b/README.md @@ -128,14 +128,13 @@ $ make demo ```bash -git clone -b feat/test https://github.com/openim-sigs/openim-docker openim/openim-docker && export openim=$(pwd)/openim && cd $openim/openim-docker && ./scripts/init-config.sh && docker-compose up -d +git clone -b main https://github.com/openim-sigs/openim-docker openim/openim-docker && export openim=$(pwd)/openim && cd $openim/openim-docker && ./scripts/init-config.sh && docker-compose up -d ``` > **Note** > If you don't know OpenIM's versioning policy, 📚Read our release policy: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md - **2. Configure the config file** If you tried to get started quickly with `make demo`, then you know that our config file is generated by automation. @@ -161,10 +160,15 @@ export SERVER_BRANCH="main" # MONGO_PASSWORD: Set the MongoDB password # MONGO_DATABASE: Sets the MongoDB database name # MINIO_ENDPOINT: set the MinIO service address +# DOCKER_BRIDGE_SUBNET: set the docker bridge network address +export DOCKER_BRIDGE_SUBNET="172.28.0.0/16" # API_URL: under network environment, set OpenIM Server API address export API_URL="http://127.0.0.1:10002" ``` +If you wish to use more custom features, read our [config documentation](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/contrib/environment.md). + + Next, update the configuration using make init: ```bash @@ -187,11 +191,26 @@ go version && make --version || echo "Error: One of the commands failed." Version Details: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md +You can get the version number from the command below or from [github releases](https://github.com/OpenIMSDK/Open-IM-Server/tags). + +```bash +$ curl --silent "https://api.github.com/repos/OpenIMSDK/Open-IM-Server/releases" | jq -r '.[].tag_name' +``` + +We have our own version management policy, if you are interested in our version management, I recommend reading [📚 OpenIM Version](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md), We recommend using stable versions such as `v3.3.0` and `v3.2.0` whenever possible. `v3.1.1-alpha.3` as well as `v3.3.0-beta.0` and `v3.2.0-rc.0` are pre-release or beta versions and are not recommended. + +Set `OPENIM_VERSION` environment variables for the latest `OPENIM_VERSION` number, or replace the `OPENIM_VERSION` for you to install the OpenIM-Server `OPENIM_VERSION`: + +```bash +$ OPENIM_VERSION=`curl -s https://api.github.com/repos/OpenIMSDK/Open-IM-Server/releases/latest | grep -oE '"tag_name": "[^"]+"' | head -n1 | cut -d'"' -f4` +# OPENIM_VERSION=v3.3.0 +``` + +Deploy basic components at the click of a command: + ```bash -# choose what you need -$ BRANCH=release-v3.2 # install openim dependency -$ git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim/openim-server && export openim=$(pwd)/openim/openim-server && cd $openim/openim-server +$ git clone https://github.com/OpenIMSDK/Open-IM-Server openim/openim-server && export openim=$(pwd)/openim/openim-server && cd $openim/openim-server && git checkout $OPENIM_VERSION $ curl https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml -o basic-openim-server-dependency.yml && make init && docker compose -f basic-openim-server-dependency.yml up -d && make start ``` @@ -208,96 +227,16 @@ You can use the `make help-all` see OpenIM in action.
Component Configuration Instructions -The `config/config.yaml` file has detailed configuration instructions for the storage components. - - -The config file is available via [environment.sh](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/scripts/install/environment.sh) configuration [openim.yaml](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/templates/openim.yaml) template, and then through the `make init` to automatically generate a new configuration. - -- Zookeeper - - - Used for RPC service discovery and registration, cluster support. - - ```bash - zookeeper: - schema: openim #Not recommended to modify - address: [ 127.0.0.1:2181 ] #address - username: #username - password: #password - ``` - -- MySQL - - - Used for storing users, relationships, and groups, supports master-slave database. - - ```bash - mysql: - address: [ 127.0.0.1:13306 ] #address - username: root #username - password: openIM123 #password - database: openIM_v2 #Not recommended to modify - maxOpenConn: 1000 #maximum connection - maxIdleConn: 100 #maximum idle connection - maxLifeTime: 60 #maximum time a connection can be reused (seconds) - logLevel: 4 #log level 1=slient 2=error 3=warn 4=info - slowThreshold: 500 #slow statement threshold (milliseconds) - ``` - -- Mongo - - - Used for storing offline messages, supports mongo sharded clusters. - - ```bash - mongo: - uri: #Use this value directly if not empty - address: [ 127.0.0.1:37017 ] #address - database: openIM #default mongo db - username: root #username - password: openIM123 #password - maxPoolSize: 100 #maximum connections - ``` - -- Redis - - - Used for storing message sequence numbers, latest messages, user tokens, and mysql cache, supports cluster deployment. - - ```bash - redis: - address: [ 127.0.0.1:16379 ] #address - username: #username - password: openIM123 #password - ``` - -- Kafka - - - Used for message queues, for message decoupling, supports cluster deployment. - - ```bash - kafka: - username: #username - password: #password - addr: [ 127.0.0.1:9092 ] #address - latestMsgToRedis: - topic: "latestMsgToRedis" - offlineMsgToMongo: - topic: "offlineMsgToMongoMysql" - msgToPush: - topic: "msqToPush" - msgToModify: - topic: "msgToModify" - consumerGroupID: - msgToRedis: redis - msgToMongo: mongo - msgToMySql: mysql - msgToPush: push - msgToModify: modify - ``` + +Read: Configuration center document:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/contrib/environment.md
+
Deployed with kubernetes -read: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/README.md +Read: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/README.md
diff --git a/deployments/README.md b/deployments/README.md index fe2c650d0..7e3d47854 100644 --- a/deployments/README.md +++ b/deployments/README.md @@ -46,10 +46,56 @@ $ make init 如果你已经有了一个 `kubernetes` 集群,或者是你希望自己从头开始搭建一个 `kubernetes` 那么你可以直接跳过这一步。 -为了快速开始,我使用 [sealos](https://github.com/labring/sealos) 来快速搭建集群: +为了快速开始,我使用 [sealos](https://github.com/labring/sealos) 来快速搭建集群,sealos 底层也是对 kubeadm 的封装: ```bash +$ SEALOS_VERSION=`curl -s https://api.github.com/repos/labring/sealos/releases/latest | grep -oE '"tag_name": "[^"]+"' | head -n1 | cut -d'"' -f4` && \ + curl -sfL https://raw.githubusercontent.com/labring/sealos/${SEALOS_VERSION}/scripts/install.sh | + sh -s ${SEALOS_VERSION} labring/sealos +``` + +**支持的版本:** + ++ docker: `labring/kubernetes-docker`:(v1.24.0~v1.27.0) ++ containerd: `labring/kubernetes`:(v1.24.0~v1.27.0) + + +#### 安装集群: + +集群的信息如下: + +| 机器名 | IP地址 | 系统信息 | +|---------|-----------------|------------------------------------------------------------------------------------------------------------| +| master01| 10.0.0.9 | Linux VM-0-9-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux | +| node01 | 10.0.0.4 | Linux VM-0-9-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux | +| node02 | 10.0.0.10 | Linux VM-0-9-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux | + +```bash +$ export CLUSTER_USERNAME=ubuntu +$ export CLUSTER_PASSWORD=123456 +$ sealos run labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.1 \ + --masters 10.0.0.9 \ + --nodes 10.0.0.4,10.0.0.10 \ + -u "$CLUSTER_USERNAME" \ + -p "$CLUSTER_PASSWORD" +``` +### 安装 helm + +helm通过打包的方式,支持发布的版本管理和控制,很大程度上简化了Kubernetes应用的部署和管理。 + + +**使用脚本:** + +```bash +$ curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash +``` + +**添加仓库:** + +```bash +$ helm repo add brigade https://openimsdk.github.io/openim-charts +``` ### 容器化安装 diff --git a/docker-compose.yml b/docker-compose.yml index 4e9aa02b9..b08c12097 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -164,40 +164,40 @@ services: server: ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS} - openim-server: - # image: ghcr.io/openimsdk/openim-server:main - image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main - # image: openim/openim-server:main -# build: . - container_name: openim-server - ports: - - ${OPENIM_WS_PORT}:10001 - - ${API_OPENIM_PORT}:10002 - healthcheck: - test: ["CMD", "/openim/openim-server/scripts/check-all.sh"] - interval: 300s - timeout: 10s - retries: 5 - volumes: - - ./logs:/openim/openim-server/logs - - ./_output:/openim/openim-server/_output - - ./config:/openim/openim-server/config - - ./scripts:/openim/openim-server/scripts - restart: always - depends_on: - - kafka - - mysql - - mongodb - - redis - - minio - logging: - driver: json-file - options: - max-size: "1g" - max-file: "2" - networks: - server: - ipv4_address: ${OPENIM_SERVER_NETWORK_ADDRESS} +# openim-server: +# # image: ghcr.io/openimsdk/openim-server:main +# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main +# # image: openim/openim-server:main +# # build: . +# container_name: openim-server +# ports: +# - ${OPENIM_WS_PORT}:10001 +# - ${API_OPENIM_PORT}:10002 +# healthcheck: +# test: ["CMD", "/openim/openim-server/scripts/check-all.sh"] +# interval: 300s +# timeout: 10s +# retries: 5 +# volumes: +# - ./logs:/openim/openim-server/logs +# - ./_output:/openim/openim-server/_output +# - ./config:/openim/openim-server/config +# - ./scripts:/openim/openim-server/scripts +# restart: always +# depends_on: +# - kafka +# - mysql +# - mongodb +# - redis +# - minio +# logging: +# driver: json-file +# options: +# max-size: "1g" +# max-file: "2" +# networks: +# server: +# ipv4_address: ${OPENIM_SERVER_NETWORK_ADDRESS} # openim-chat: # # image: ghcr.io/openimsdk/openim-chat:main diff --git a/docs/contrib/environment.md b/docs/contrib/environment.md new file mode 100644 index 000000000..51baa5ae0 --- /dev/null +++ b/docs/contrib/environment.md @@ -0,0 +1,138 @@ +# OpenIM enviroment + + +## How to change the configuration + + +**Modify the configuration files:** + +Three ways to modify the configuration: + +#### **1. Recommended using environment variables:** + +```bash +export PASSWORD="openIM123" # Set password +export USER="root" # Set username +# Choose chat version and server version https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md, eg: main, release-v*.* +export CHAT_BRANCH="main" +export SERVER_BRANCH="main" +#... Other environment variables +# MONGO_USERNAME: This sets the MongoDB username +# MONGO_PASSWORD: Set the MongoDB password +# MONGO_DATABASE: Sets the MongoDB database name +# MINIO_ENDPOINT: set the MinIO service address +# API_URL: under network environment, set OpenIM Server API address +export API_URL="http://127.0.0.1:10002" +``` + +Next, update the configuration using `make init`: + +```bash +make init +``` + +#### **2. Modify the automation script:** + +```bash +scripts/install/environment.sh +``` + +Next, update the configuration using `make init`: + +```bash +make init +``` + +#### 3. Modify `config.yaml` and `.env` files (but will be overwritten when using `make init` again). + +The `config/config.yaml` file has detailed configuration instructions for the storage components. + + +The config file is available via [environment.sh](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/scripts/install/environment.sh) configuration [openim.yaml](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/deployments/templates/openim.yaml) template, and then through the `make init` to automatically generate a new configuration. + + + + +## Configuration Details + +###### Zookeeper + +- **Purpose**: Used for RPC service discovery and registration, cluster support. + + ```bash + zookeeper: + schema: openim # Not recommended to modify + address: [ 127.0.0.1:2181 ] # Address + username: # Username + password: # Password + ``` + +###### MySQL + +- **Purpose**: Used for storing users, relationships, and groups. Supports master-slave database. + + ```bash + mysql: + address: [ 127.0.0.1:13306 ] # Address + username: root # Username + password: openIM123 # Password + database: openIM_v2 # Not recommended to modify + maxOpenConn: 1000 # Maximum connection + maxIdleConn: 100 # Maximum idle connection + maxLifeTime: 60 # Max time a connection can be reused (seconds) + logLevel: 4 # Log level (1=silent, 2=error, 3=warn, 4=info) + slowThreshold: 500 # Slow statement threshold (milliseconds) + ``` + +###### Mongo + +- **Purpose**: Used for storing offline messages. Supports mongo sharded clusters. + + ```bash + mongo: + uri: # Use this value directly if not empty + address: [ 127.0.0.1:37017 ] # Address + database: openIM # Default mongo db + username: root # Username + password: openIM123 # Password + maxPoolSize: 100 # Maximum connections + ``` + +###### Redis + +- **Purpose**: Used for storing message sequence numbers, latest messages, user tokens, and MySQL cache. Supports cluster deployment. + + ```bash + redis: + address: [ 127.0.0.1:16379 ] # Address + username: # Username + password: openIM123 # Password + ``` + +###### Kafka + +- **Purpose**: Used for message queues for decoupling. Supports cluster deployment. + + ```bash + kafka: + username: # Username + password: # Password + addr: [ 127.0.0.1:9092 ] # Address + topics: + latestMsgToRedis: "latestMsgToRedis" + offlineMsgToMongo: "offlineMsgToMongoMysql" + msgToPush: "msgToPush" + msgToModify: "msgToModify" + consumerGroupID: + msgToRedis: redis + msgToMongo: mongo + msgToMySql: mysql + msgToPush: push + msgToModify: modify + ``` + + + +## Config options + +... \ No newline at end of file diff --git a/docs/contrib/linux_development.md b/docs/contrib/linux_development.md index e5569a069..4a0cb9f18 100644 --- a/docs/contrib/linux_development.md +++ b/docs/contrib/linux_development.md @@ -19,7 +19,7 @@ You can use tools like PuTTY or other SSH clients to log in to your Ubuntu serve Generally, a project will involve multiple developers. Instead of provisioning a server for every developer, many organizations share a single development machine among developers. To simulate this real-world scenario, we'll use a standard user for development. To create the `openim` user: ``` -bashCopy code# adduser openim # Create the openim user, which developers will use for login and development. +# adduser openim # Create the openim user, which developers will use for login and development. # passwd openim # Set the login password for openim. ``` @@ -30,7 +30,7 @@ Working with a non-root user ensures the system's safety and is a good practice. Often, even standard users need root privileges. Instead of frequently asking the system administrator for the root password, you can add the standard user to the sudoers. This allows them to temporarily gain root access using the sudo command. To add the `openim` user to sudoers: ``` -bashCopy code + # sed -i '/^root.*ALL=(ALL:ALL).*ALL/a\openim\tALL=(ALL) \tALL' /etc/sudoers ``` @@ -45,7 +45,7 @@ Assuming we're using the **openim** user, log in using PuTTY or other SSH client The first step after logging into a new server is to configure the `$HOME/.bashrc` file. It makes the Linux shell more user-friendly by setting environment variables like `LANG` and `PS1`. Here's how the configuration would look: ``` -bashCopy code# .bashrc +# .bashrc # User specific aliases and functions @@ -82,7 +82,7 @@ The OpenIM project on Ubuntu may have various dependencies. Some are direct, and You can use the `apt` command to install the required tools on Ubuntu: ``` -bashCopy code$ sudo apt-get update +$ sudo apt-get update $ sudo apt-get install build-essential autoconf automake cmake perl libcurl4-gnutls-dev libtool gcc g++ glibc-doc-reference zlib1g-dev git-lfs telnet lrzsz jq libexpat1-dev libssl-dev $ sudo apt install libcurl4-openssl-dev ``` @@ -92,7 +92,7 @@ $ sudo apt install libcurl4-openssl-dev A higher version of Git ensures compatibility with certain commands like `git fetch --unshallow`. To install a recent version: ``` -bashCopy code$ cd /tmp +$ cd /tmp $ wget --no-check-certificate https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.36.1.tar.gz $ tar -xvzf git-2.36.1.tar.gz $ cd git-2.36.1/ @@ -105,7 +105,7 @@ $ git --version Then, add Git's binary directory to the `PATH`: ``` -bashCopy code + $ echo 'export PATH=/usr/local/libexec/git-core:$PATH' >> $HOME/.bashrc ``` @@ -114,7 +114,7 @@ $ echo 'export PATH=/usr/local/libexec/git-core:$PATH' >> $HOME/.bashrc To set up Git: ``` -bashCopy code$ git config --global user.name "Your Name" +$ git config --global user.name "Your Name" $ git config --global user.email "your_email@example.com" $ git config --global credential.helper store $ git config --global core.longpaths true @@ -123,14 +123,14 @@ $ git config --global core.longpaths true Other Git configurations include: ``` -bashCopy code + $ git config --global core.quotepath off ``` And for handling larger files: ``` -bashCopy code + $ git lfs install --skip-repo ``` diff --git a/docs/contrib/protoc_tools.md b/docs/contrib/protoc_tools.md index 66f2e9dec..b164728d3 100644 --- a/docs/contrib/protoc_tools.md +++ b/docs/contrib/protoc_tools.md @@ -44,7 +44,7 @@ For Linux: The OpenIM Protoc tool provides a multitude of options for parsing `.proto` files and generating output: ``` -bashCopy code + ./protoc [OPTION] PROTO_FILES ``` diff --git a/docs/conversions/version.md b/docs/conversions/version.md index 490c8e4a7..0e6a26988 100644 --- a/docs/conversions/version.md +++ b/docs/conversions/version.md @@ -82,7 +82,7 @@ We reinforce our approach to branch management and versioning with stringent tes The workflow to address a bug fix might follow these steps: ```bash -bashCopy codebashCopy code# Checkout the branch for the version that needs the bug fix +# Checkout the branch for the version that needs the bug fix git checkout release-v3.1 # Create a new branch for the bug fix @@ -121,4 +121,3 @@ Throughout this process, active communication within the team is pivotal to main ## Docker Images Version Management For more details on managing Docker image versions, visit [OpenIM Docker Images Administration](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md). - diff --git a/go.mod b/go.mod index 21dbce086..8e146b7cc 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.18 require ( firebase.google.com/go v3.13.0+incompatible - github.com/Shopify/sarama v1.29.0 github.com/bwmarrin/snowflake v0.3.0 // indirect github.com/dtm-labs/rockscache v0.1.1 github.com/gin-gonic/gin v1.9.1 @@ -37,6 +36,7 @@ require ( require github.com/google/uuid v1.3.1 require ( + github.com/IBM/sarama v1.41.1 github.com/OpenIMSDK/protocol v0.0.18 github.com/OpenIMSDK/tools v0.0.14 github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible @@ -62,8 +62,8 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/eapache/go-resiliency v1.2.0 // indirect - github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect + github.com/eapache/go-resiliency v1.4.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect @@ -76,12 +76,14 @@ require ( github.com/google/s2a-go v0.1.5 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect - github.com/jcmturner/gofork v1.0.0 // indirect - github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect @@ -100,7 +102,7 @@ require ( github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/gomega v1.18.1 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/pierrec/lz4 v2.6.0+incompatible // indirect + github.com/pierrec/lz4/v4 v4.1.18 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect diff --git a/go.sum b/go.sum index 45165e608..e94b507ae 100644 --- a/go.sum +++ b/go.sum @@ -17,15 +17,13 @@ cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7Biccwk firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/IBM/sarama v1.41.1 h1:B4/TdHce/8Ipza+qrLIeNJ9D1AOxZVp/3uDv6H/dp2M= +github.com/IBM/sarama v1.41.1/go.mod h1:JFCPURVskaipJdKRFkiE/OZqQHw7jqliaJmRwXCmSSw= github.com/OpenIMSDK/protocol v0.0.18 h1:hXukFiDMLZx7s+hDCQePIK9ABiHyNlobNL4MppvOuMY= github.com/OpenIMSDK/protocol v0.0.18/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= github.com/OpenIMSDK/tools v0.0.14 h1:WLof/+WxyPyRST+QkoTKubYCiV73uCLiL8pgnpH/yKQ= github.com/OpenIMSDK/tools v0.0.14/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= -github.com/Shopify/sarama v1.29.0 h1:ARid8o8oieau9XrHI55f/L3EoRAhm9px6sonbD7yuUE= -github.com/Shopify/sarama v1.29.0/go.mod h1:2QpgD79wpdAESqNQMxNc0KYMkycd4slxGdV3TWSVqrU= -github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible h1:Sg/2xHwDrioHpxTN6WMiwbXTpUEinBpHsN7mG21Rc2k= github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -59,7 +57,6 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -69,10 +66,10 @@ github.com/dtm-labs/rockscache v0.1.1 h1:6S1vgaHvGqrLd8Ka4hRTKeKPV7v+tT0MSkTIX81 github.com/dtm-labs/rockscache v0.1.1/go.mod h1:c76WX0kyIibmQ2ACxUXvDvaLykoPakivMqIxt+UzE7A= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= -github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= +github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= +github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -82,9 +79,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -139,7 +133,6 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -149,7 +142,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -176,8 +168,13 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -186,12 +183,12 @@ github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFK github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= -github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8= -github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= -github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJzodkA= -github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8= @@ -205,7 +202,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= @@ -213,12 +209,8 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= @@ -270,8 +262,8 @@ github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pierrec/lz4 v2.6.0+incompatible h1:Ix9yFKn1nSPBLFl/yZknTp8TU5G4Ps0JDmguYK6iH1A= -github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -308,7 +300,6 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -331,8 +322,6 @@ github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/xdg/scram v1.0.3/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -356,11 +345,10 @@ golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -389,11 +377,11 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210427231257-85d9c07bbe3a/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -504,7 +492,6 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -517,7 +504,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw= diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go index efaf28cc3..1fc7ca9a1 100644 --- a/internal/msgtransfer/online_history_msg_handler.go +++ b/internal/msgtransfer/online_history_msg_handler.go @@ -25,7 +25,7 @@ import ( "github.com/OpenIMSDK/tools/errs" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "github.com/go-redis/redis" "google.golang.org/protobuf/proto" diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go index 90c54d917..ac7dc6662 100644 --- a/internal/msgtransfer/online_msg_to_mongo_handler.go +++ b/internal/msgtransfer/online_msg_to_mongo_handler.go @@ -17,7 +17,7 @@ package msgtransfer import ( "context" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "google.golang.org/protobuf/proto" pbmsg "github.com/OpenIMSDK/protocol/msg" diff --git a/internal/msgtransfer/persistent_msg_handler.go b/internal/msgtransfer/persistent_msg_handler.go index 02cd49767..088960e5c 100644 --- a/internal/msgtransfer/persistent_msg_handler.go +++ b/internal/msgtransfer/persistent_msg_handler.go @@ -26,7 +26,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" kfk "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "google.golang.org/protobuf/proto" ) diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index 736bfc7f9..2ddb17800 100644 --- a/internal/push/push_handler.go +++ b/internal/push/push_handler.go @@ -17,7 +17,7 @@ package push import ( "context" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "google.golang.org/protobuf/proto" "github.com/OpenIMSDK/protocol/constant" diff --git a/pkg/common/kafka/consumer.go b/pkg/common/kafka/consumer.go index e253ec5e0..5aca865e7 100644 --- a/pkg/common/kafka/consumer.go +++ b/pkg/common/kafka/consumer.go @@ -19,7 +19,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" ) type Consumer struct { diff --git a/pkg/common/kafka/consumer_group.go b/pkg/common/kafka/consumer_group.go index da62fbe65..2b669fe85 100644 --- a/pkg/common/kafka/consumer_group.go +++ b/pkg/common/kafka/consumer_group.go @@ -21,7 +21,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" ) type MConsumerGroup struct { diff --git a/pkg/common/kafka/producer.go b/pkg/common/kafka/producer.go index b7ec32714..44b88e602 100644 --- a/pkg/common/kafka/producer.go +++ b/pkg/common/kafka/producer.go @@ -26,7 +26,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "google.golang.org/protobuf/proto" prome "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" diff --git a/pkg/common/kafka/util.go b/pkg/common/kafka/util.go index cc3dc64c6..4495f983a 100644 --- a/pkg/common/kafka/util.go +++ b/pkg/common/kafka/util.go @@ -15,7 +15,7 @@ package kafka import ( - "github.com/Shopify/sarama" + "github.com/IBM/sarama" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tls" diff --git a/scripts/install/environment.sh b/scripts/install/environment.sh index 2967d825c..57a8d0400 100755 --- a/scripts/install/environment.sh +++ b/scripts/install/environment.sh @@ -17,6 +17,7 @@ # You need to supplement the script according to the specification. # Read: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/contrib/init_config.md # 格式化 bash 注释:https://tool.lu/shell/ +# 配置中心文档:https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/contrib/environment.md OPENIM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)" diff --git a/test/data-conversion/kafka-conversation.go b/test/data-conversion/kafka-conversation.go index a3fd0dc87..cb6976d67 100644 --- a/test/data-conversion/kafka-conversation.go +++ b/test/data-conversion/kafka-conversation.go @@ -17,7 +17,7 @@ package data_conversion import ( "fmt" - "github.com/Shopify/sarama" + "github.com/IBM/sarama" ) var ( @@ -31,7 +31,7 @@ var ( ) func init() { - //Producer + // Producer config := sarama.NewConfig() // Instantiate a sarama Config config.Producer.Return.Successes = true // Whether to enable the successes channel to be notified after the message is sent successfully config.Producer.Return.Errors = true diff --git a/tools/component/component.go b/tools/component/component.go index be454f900..1cd611c73 100644 --- a/tools/component/component.go +++ b/tools/component/component.go @@ -25,9 +25,9 @@ import ( "strings" "time" + "github.com/IBM/sarama" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/utils" - "github.com/Shopify/sarama" "github.com/go-zookeeper/zk" "github.com/minio/minio-go/v7" "github.com/redis/go-redis/v9"