From f3849727ca8e83d88bbd6a521601359d41c62357 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Sun, 30 Jun 2019 11:35:20 +0200 Subject: Add CLI flag for the concurrency level of libvips --- cmd/gopherproxy/main.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cmd') 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 ( var ( // TODO: Allow config file and environment vars // (opt -> env -> config -> default) - bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") - robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") - robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") - uri = flag.String("uri", "floodgap.com", ":[port] to proxy to") + bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") + robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") + robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") + uri = flag.String("uri", "floodgap.com", ":[port] to proxy to") + vipsconcurrency = flag.Int("vips-concurrency", 1, "Concurrency level of libvips") ) func main() { flag.Parse() // Use a config struct - log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *uri)) + log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *vipsconcurrency, *uri)) } -- cgit v1.2.3-70-g09d2