fix: size 0 bug
fix: huge index can't sort _id, back use scroll_id refac: some files arch
This commit is contained in:
23
internal/opt/opt.go
Normal file
23
internal/opt/opt.go
Normal file
@ -0,0 +1,23 @@
|
||||
package opt
|
||||
|
||||
type args struct {
|
||||
Version bool
|
||||
Input string
|
||||
Output string
|
||||
Limit int
|
||||
Max int
|
||||
Type string
|
||||
Timeout int
|
||||
Source string
|
||||
Sort string
|
||||
Query string
|
||||
QueryFile string
|
||||
}
|
||||
|
||||
type config struct {
|
||||
Debug bool `json:"-"`
|
||||
Dev bool `json:"-"`
|
||||
Args args `json:"-"`
|
||||
}
|
||||
|
||||
var Cfg = &config{}
|
@ -2,10 +2,11 @@ package opt
|
||||
|
||||
const (
|
||||
ScrollDurationSeconds = 10 * 60
|
||||
DefaultSize = 100
|
||||
)
|
||||
|
||||
var (
|
||||
Debug bool
|
||||
Version = "vx.x.x"
|
||||
Timeout int
|
||||
|
||||
BuffSize = 5 * 1024 * 1024 // 5M
|
||||
|
@ -1,3 +0,0 @@
|
||||
package opt
|
||||
|
||||
const Version = "v0.2.1"
|
Reference in New Issue
Block a user