增加saastool功能

This commit is contained in:
2025-04-01 20:06:06 +08:00
parent 1793e2c3d9
commit 942efe107d
32 changed files with 5609 additions and 236 deletions

24
cmd/saastool/params.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"flag"
)
func paramConfig(fs *flag.FlagSet) *string {
return fs.String("config", "cfg.toml", "Config file.")
}
func paramTargets(fs *flag.FlagSet) *string {
return fs.String("targets", "", "target setting")
}
func paramFromPath(fs *flag.FlagSet) *string {
return fs.String("from", "", "Data path source for write command. (*required*)")
}
func paramBatchSize(fs *flag.FlagSet) *uint {
return fs.Uint("batchsize", 10000, "Batch size to sync")
}
func paramAsync(fs *flag.FlagSet) *bool {
return fs.Bool("async", false, "Async mode")
}