]> 127.0.0.1 Git - front/.git/commitdiff
1 v0.1.20241029114309
authorqydysky <qydysky@foxmail.com>
Tue, 29 Oct 2024 11:41:27 +0000 (19:41 +0800)
committerqydysky <qydysky@foxmail.com>
Tue, 29 Oct 2024 11:41:27 +0000 (19:41 +0800)
README.md
config.go

index 69b761dc52c2fac23738dc3c2f797ecbcd1d0707..e40fa272a08c06c50074f755c4ac5cc1517690c5 100755 (executable)
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ config:
 - *copyBlocks*: int 转发的块数量,默认`1000`
 - *retryBlocks*: {} 重试
     - *sizeB*: int 重试的块大小,默认`1000000`
-    - *num*: int 重试的块数量,默认`1000`,为`-1`时停用重试
+    - *num*: int 重试的块数量,默认`0`,为`0`时停用重试
 - *tls*: {} 启用tls, 默认空
     - *pub*: string 公钥pem路径
     - *key*: string 私钥pem路径
@@ -62,7 +62,7 @@ setting: json配置不需要setting
 
 - filiter:
     - reqUri: 请求后端前,请求路径过滤器
-        - accessRule: 布尔表达式,为true时才通过
+        - accessRule: 布尔表达式,为true时才通过,例`{id}|(!{id2}&{id3})`
         - items: map[string]string
             - id: matchExp
     - reqHeader: 请求后端前,请求头处理器
index f59519c75a64f07b411256038ae41a9939b436a1..b6546cd7b6b244b955c0b81e9fb8caf8a85d95e8 100755 (executable)
--- a/config.go
+++ b/config.go
@@ -74,9 +74,6 @@ func (t *Config) Run(ctx context.Context, logger Logger) {
        if t.RetryBlocks.SizeB == 0 {
                t.RetryBlocks.SizeB = humanize.MByte
        }
-       if t.RetryBlocks.Num == 0 {
-               t.RetryBlocks.Num = 1000
-       }
        if t.RetryBlocks.SizeB > 0 && t.RetryBlocks.Num > 0 {
                t.RetryBlocksI = pslice.NewBlocks[byte](t.RetryBlocks.SizeB, t.RetryBlocks.Num)
        }