perkeep/doc/environment-vars.txt

108 lines
3.9 KiB
Plaintext
Raw Normal View History

Document environment variables usage. Running 'go run dev/envvardoc/envvardoc.go' now shows: 'All environment variables are documented' I also took the liberty of cleaning-up our mishmash of logic for handling boolean environment variables, and cleaned up a couple other spots that didn't seem right. This change adds docmentation for all variables starting with (CAM|DEV|AWS). This leaves some variables still undocumented. If there are variables worth documenting in the following list, maybe we should rename them to have a CAM{LI} prefix for consistency's sake: APPDATA pkg/osutil/paths.go:86 APPDATA pkg/osutil/paths.go:102 DISPLAY pkg/misc/gpgagent/gpgagent.go:126 GOPATH pkg/fileembed/genfileembed/genfileembed.go:321 GOPATH pkg/osutil/paths.go:168 GOPATH pkg/test/world.go:54 GOPATH server/appengine/build_test.go:77 GPGKEY cmd/camput/init.go:77 GPG_AGENT_INFO cmd/camput/init.go:153 GPG_AGENT_INFO pkg/misc/gpgagent/gpgagent.go:50 HOME pkg/jsonsign/keys.go:79 HOME pkg/jsonsign/signhandler/sig.go:64 HOME pkg/osutil/paths.go:36 HOMEPATH pkg/osutil/paths.go:34 PKG_CONFIG_PATH pkg/index/sqlite/dbschema.go:59 RUN_BROKEN_TESTS pkg/fs/fs_test.go:67 SKIP_DEP_TESTS pkg/test/testdep.go:29 TERM pkg/misc/gpgagent/gpgagent.go:133 TERM pkg/misc/pinentry/pinentry.go:99 TESTING_PORT_WRITE_FD pkg/webserver/webserver.go:135 TEST_GPGAGENT_LIB pkg/misc/gpgagent/gpgagent_test.go:27 USER pkg/netutil/ident.go:135 USER pkg/osutil/paths.go:45 USERNAME pkg/jsonconfig/eval.go:228 USERNAME pkg/osutil/paths.go:43 VERBOSE_FUSE pkg/fs/fs_test.go:133 VERBOSE_FUSE_STDERR pkg/fs/fs_test.go:137 XDG_CONFIG_HOME pkg/osutil/paths.go:104 Change-Id: Ief28710d3deefd1e65247cb5d3b1d8dde73e1f2d
2013-09-06 04:07:15 +00:00
The standard library's strconv.ParseBool() is used to parse boolean environment
variables. It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false,
False. Any other value is an implicit false.
For integer values, strconv.Atoi() is used which means only base 10 numbers are
valid.
AWS_ACCESS_KEY_ID (string):
AWS_ACCESS_KEY_SECRET (string):
See http://docs.aws.amazon.com/fws/1.1/GettingStartedGuide/index.html?AWSCredentials.html
Used in s3 tests. If not set some tests are skip. If set, queries will be
sent to Amazon's S3 service.
CAMLI_AUTH (string):
See http://camlistore.org/docs/server-config
Used as a fallback in pkg/client.Client (except on android) when
configuration files lack and 'auth' entry. If a client is using the -server
commandline to specify the camlistore instance to talk to, this env var
takes precedence over that specified in the configuration files.
CAMLI_BASEURL (string):
URL set in devcam to act as a baseURL in the devcam launched camlistored.
CAMLI_CACHE_DIR (string):
Path used by pkg/osutil to override operating system specific cache
directory.
CAMLI_CONFIG_DIR (string):
Path used by pkg/osutil to override operating system specific configuration
directory.
CAMLI_DBNAME (string):
Backend specific data source name (DSN).
Set in devcam to pass database configuration for the indexer to the devcam
launched camlistored.
CAMLI_DEBUG (bool):
Used by camlistored and camput to enable additional commandline options.
Used in pkg/schema to enable additional logging.
CAMLI_DEBUG_CONFIG (bool):
Causes pkg/serverconfig to dump low-level configuration derived from
high-level configuation on load.
CAMLI_DEBUG_UPLOADS (bool):
Used by pkg/client to enable additional logging.
CAMLI_DEV_CAMLI_ROOT (string):
If set, the base directory of Camlistore when in dev mode.
Used by pkg/server for finding static assests (js, css, html).
Used as a signal by pkg/index/* and pkg/server to output more helpful error
message when run under devcam.
CAMLI_DEV_CLOSURE_DIR (string):
Path override for pkg/server. If specified, this path will be used to serve
the closure handler.
CAMLI_DEV_KEYBLOBS (string):
Path to keyblobs directory.
Used by pkg/client to override 'selfPubKeyDir' value in configuration files.
CAMLI_HTTP_DEBUG (bool):
Enable per-request logging in pkg/webserver.
CAMLI_HTTP_PPROF (bool):
Enable standard library's pprof handler at /debug/pprof/
CAMLI_IGNORED_FILES (string):
Override client configuration option 'ignoredFiles'.
Comma-seperated list of files to be ignored by pkg/client when uploading
with -filenodes.
CAMLI_INCLUDE_PATH (string):
Path to search for files.
Referenced in pkg/osutil and used indirectly by pkg/jsonconfig.ConfigParser
to search for files mentioned in configurations. This is used as a last
resort after first checking the current directory and the camlistore config
directory. It should be in the OS path form, i.e. unix-like systems would be
/path/1:/path/two:/some/other/path, and Windows would be C:\path\one;D:\path\2
CAMLI_MONGO_WIPE (bool):
Wipe out mongo based index on startup.
CAMLI_NO_FILE_DUP_SEARCH (bool):
This will cause the search-for-exists-before-upload step to be skipped when
camput is uploading files.
CAMLI_QUIET (bool):
Used by devcam to enable -verbose flag for camput/camget.
CAMLI_TRACK_FS_STATS (bool):
Enable operation counts for fuse filesystem.
CAMLI_TRUSTED_CERT (string):
Override client configuration option 'trustedCerts'.
Comma-seperated list of paths to trusted certificate fingerprints.
CAMPUT_ANDROID_OUTPUT (bool):
Enable pkg/client status messages to print to stdout. Used in android client.
CAM_DEBUG_IMAGES (bool):
Enable extra debugging in pkg/images when decoding images. Used by indexers.
DEV_THROTTLE_KBPS (integer):
DEV_THROTTLE_LATENCY_MS (integer):
Rate limit and/or inject latency in pkg/webserver responses. A value of 0
disables traffic-shaping.