Add flags:
* --cigocached-host to support alternative host resolution in other
environments, like the corp repo.
* --stats to reduce the amount of bash script we need.
* --version to support a caching tool/cigocacher script that will
download from GitHub releases.
Updates tailscale/corp#10808
Change-Id: Ib2447bc5f79058669a70f2c49cef6aedd7afc049
Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
version=flag.Bool("version",false,"print version and exit")
auth=flag.Bool("auth",false,"auth with cigocached and exit, printing the access token as output")
stats=flag.Bool("stats",false,"fetch and print cigocached stats and exit")
token=flag.String("token","","the cigocached access token to use, as created using --auth")
cigocachedURL=flag.String("cigocached-url","","optional cigocached URL (scheme, host, and port). empty means to not use one.")
srvURL=flag.String("cigocached-url","","optional cigocached URL (scheme, host, and port). Empty means to not use one.")
srvHostDial=flag.String("cigocached-host","","optional cigocached host to dial instead of the host in the provided --cigocached-url. Useful for public TLS certs on private addresses.")
dir=flag.String("cache-dir","","cache directory; empty means automatic")