diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gopherproxy/main.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/gopherproxy/main.go b/cmd/gopherproxy/main.go index e9dea18..e699d14 100644 --- a/cmd/gopherproxy/main.go +++ b/cmd/gopherproxy/main.go | |||
@@ -10,15 +10,16 @@ import ( | |||
10 | var ( | 10 | var ( |
11 | // TODO: Allow config file and environment vars | 11 | // TODO: Allow config file and environment vars |
12 | // (opt -> env -> config -> default) | 12 | // (opt -> env -> config -> default) |
13 | bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") | 13 | bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") |
14 | robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") | 14 | robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") |
15 | robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") | 15 | robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") |
16 | uri = flag.String("uri", "floodgap.com", "<host>:[port] to proxy to") | 16 | uri = flag.String("uri", "floodgap.com", "<host>:[port] to proxy to") |
17 | vipsconcurrency = flag.Int("vips-concurrency", 1, "Concurrency level of libvips") | ||
17 | ) | 18 | ) |
18 | 19 | ||
19 | func main() { | 20 | func main() { |
20 | flag.Parse() | 21 | flag.Parse() |
21 | 22 | ||
22 | // Use a config struct | 23 | // Use a config struct |
23 | log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *uri)) | 24 | log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *vipsconcurrency, *uri)) |
24 | } | 25 | } |