refactor: project code arch; feat: cancel operation anytime

This commit is contained in:
loveuer
2025-02-05 18:07:53 +08:00
parent b7b9c14e79
commit 4257cd3668
32 changed files with 1046 additions and 1628 deletions

View File

@ -8,7 +8,7 @@ type args struct {
Max int
Type string
Timeout int
Source string
Field string
Sort string
Query string
QueryFile string

View File

@ -1,5 +1,11 @@
package opt
import (
"crypto/tls"
"github.com/go-resty/resty/v2"
)
const (
ScrollDurationSeconds = 10 * 60
DefaultSize = 100
@ -11,4 +17,6 @@ var (
BuffSize = 5 * 1024 * 1024 // 5M
MaxBuffSize = 100 * 1024 * 1024 // 100M, default elastic_search doc max size
HttpClient = resty.New().SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
)