8784: Fix test for latest firefox.
[arvados.git] / services / keepproxy / usage.go
1 package main
2
3 import (
4         "encoding/json"
5         "flag"
6         "fmt"
7         "os"
8 )
9
10 func usage() {
11         c := DefaultConfig()
12         c.Client.APIHost = "zzzzz.arvadosapi.com:443"
13         exampleConfigFile, err := json.MarshalIndent(c, "    ", "  ")
14         if err != nil {
15                 panic(err)
16         }
17         fmt.Fprintf(os.Stderr, `
18
19 Keepproxy forwards GET and PUT requests to keepstore servers.  See
20 http://doc.arvados.org/install/install-keepproxy.html
21
22 Usage: keepproxy [-config path/to/keepproxy.yml]
23
24 Options:
25 `)
26         flag.PrintDefaults()
27         fmt.Fprintf(os.Stderr, `
28 Example config file:
29     %s
30
31 Client.APIHost:
32
33     Address (or address:port) of the Arvados API endpoint.
34
35 Client.AuthToken:
36
37     Anonymous API token.
38
39 Client.Insecure:
40
41     True if your Arvados API endpoint uses an unverifiable SSL/TLS
42     certificate.
43
44 Listen:
45
46     Local port to listen on. Can be "address:port" or ":port", where
47     "address" is a host IP address or name and "port" is a port number
48     or name.
49
50 DisableGet:
51
52     Respond 404 to GET and HEAD requests.
53
54 DisablePut:
55
56     Respond 404 to PUT, POST, and OPTIONS requests.
57
58 DefaultReplicas:
59
60     Default number of replicas to write if not specified by the
61     client. If this is zero or omitted, the site-wide
62     defaultCollectionReplication configuration will be used.
63
64 Timeout:
65
66     Timeout for requests to keep services, with units (e.g., "120s",
67     "2m").
68
69 PIDFile:
70
71     Path to PID file. During startup this file will be created if
72     needed, and locked using flock() until keepproxy exits. If it is
73     already locked, or any error is encountered while writing to it,
74     keepproxy will exit immediately. If omitted or empty, no PID file
75     will be used.
76
77 Debug:
78
79     Enable debug logging.
80
81 `, exampleConfigFile)
82 }