aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-06-30 11:35:20 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2019-06-30 11:35:20 +0200
commitf3849727ca8e83d88bbd6a521601359d41c62357 (patch)
treee3e0a768d87850e03e7c8afbf31282d179f46149 /cmd
parentUpgrade to packr v2 (diff)
downloadgopherproxy-f3849727ca8e83d88bbd6a521601359d41c62357.tar.gz
gopherproxy-f3849727ca8e83d88bbd6a521601359d41c62357.tar.bz2
gopherproxy-f3849727ca8e83d88bbd6a521601359d41c62357.zip
Add CLI flag for the concurrency level of libvips
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gopherproxy/main.go11
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 (
10var ( 10var (
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
19func main() { 20func 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}