From cb3c56f4f8d93a120f648b383f00e490a44787ba Mon Sep 17 00:00:00 2001 From: mstmdev Date: Fri, 28 Apr 2023 00:02:15 +0800 Subject: [PATCH] Update README docs, add the rate limit section (#156) --- README-CN.md | 10 ++++++++++ README.md | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/README-CN.md b/README-CN.md index 1dbccaa2..76ce3be7 100644 --- a/README-CN.md +++ b/README-CN.md @@ -292,6 +292,16 @@ Web文件服务器默认使用HTTPS协议,使用`tls_cert_file`和`tls_key_fil $ gofs -source=./source -dest=./dest -server -tls_cert_file=cert.pem -tls_key_file=key.pem -rand_user_count=3 ``` +### 速率限制 + +使用`max_tran_rate`命令行参数来限制服务器端和客户端的最大传输速率,这是一个期望值,而不是绝对值 + +例如,限制最大传输速率为1048576字节,即1MB + +```bash +$ gofs -source=./source -dest=./dest -max_tran_rate=1048576 +``` + ### 远程磁盘服务端 启动一个远程磁盘服务端作为一个远程文件数据源 diff --git a/README.md b/README.md index 53930047..d1d99ca6 100644 --- a/README.md +++ b/README.md @@ -303,6 +303,17 @@ If you want to use the redis as the session store, here is an example for redis $ gofs -source=./source -dest=./dest -server -tls_cert_file=cert.pem -tls_key_file=key.pem -rand_user_count=3 ``` +### Rate Limit + +Use the `max_tran_rate` flag to limit the max transmission rate in the server and client sides, +and this is an expected value, not an absolute one. + +For example, limit the max transmission rate to 1048576 bytes, means 1MB. + +```bash +$ gofs -source=./source -dest=./dest -max_tran_rate=1048576 +``` + ### Remote Disk Server Start a remote disk server as a remote file source.