aboutsummaryrefslogtreecommitdiff
path: root/collect.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-03-17 14:35:13 +0100
committerRasmus Dahlberg <rasmus@rgdd.se>2023-03-17 14:35:13 +0100
commit14a8a232e78599caf8c037e85e2549b10951c1af (patch)
treea6c02a33078d89dcba7a1b43958e02d7cd222958 /collect.go
parentfe4f2c413996fbcbfecce1e138cffa8a612dfceb (diff)
Make a few constants into flags
Diffstat (limited to 'collect.go')
-rw-r--r--collect.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/collect.go b/collect.go
index 1e469b3..53b7607 100644
--- a/collect.go
+++ b/collect.go
@@ -87,7 +87,7 @@ func collect(opts options) error {
}
cli, err := client.New(string(log.URL),
&http.Client{Transport: &http.Transport{IdleConnTimeout: 120 * time.Second}},
- jsonclient.Options{UserAgent: opts.httpAgent},
+ jsonclient.Options{UserAgent: opts.HTTPAgent},
)
if err != nil {
fmt.Fprintf(os.Stderr, "ERROR: %s: %v\n", *log.Description, err)
@@ -95,10 +95,10 @@ func collect(opts options) error {
return
}
fetcher := scanner.NewFetcher(cli, &scanner.FetcherOptions{
- BatchSize: int(opts.batchSize),
+ BatchSize: int(opts.BatchSize),
StartIndex: th.TreeSize,
EndIndex: int64(sth.TreeSize),
- ParallelFetch: int(opts.workersPerLog),
+ ParallelFetch: int(opts.WorkersPerLog),
})
//
@@ -150,7 +150,7 @@ func collect(opts options) error {
}
c = h.TPop()
- putBack, err := persistChunk(cli, opts, id[:], int64(opts.persistSize), c)
+ putBack, err := persistChunk(cli, opts, id[:], int64(opts.PersistSize), c)
if err != nil {
cancel()
fmt.Fprintf(os.Stderr, "ERROR: %s: %v\n", *log.Description, err)