-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.go
29 lines (26 loc) · 859 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package mediawiki
import (
"context"
"github.com/hashicorp/go-retryablehttp"
"gitlab.com/tozd/go/x"
)
// ProcessDumpConfig is a configuration for high-level Process*Dump functions.
//
// URL or Path are required.
// If URL is provided and Path does not already exist, Client is required, too.
//
// Client should set User-Agent header with contact information, e.g.:
//
// client := retryablehttp.NewClient()
// client.RequestLogHook = func(logger retryablehttp.Logger, req *http.Request, retry int) {
// req.Header.Set("User-Agent", "My bot ([email protected])")
// }
type ProcessDumpConfig struct {
URL string
Path string
Client *retryablehttp.Client
DecompressionThreads int
DecodingThreads int
ItemsProcessingThreads int
Progress func(context.Context, x.Progress)
}