syncthing/cmd/stdiscosrv
Jakob Borg d328e0fb75 cmd/syncthing: Add selectable sha256 package (fixes #3613, fixes #3614)
This adds autodetection of the fastest hashing library on startup, thus
handling the performance regression. It also adds an environment
variable to control the selection, STHASHING=standard (Go standard
library version, avoids SIGILL crash when the minio library has bugs on
odd CPUs), STHASHING=minio (to force using the minio version) or unset
for the default autodetection.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3617
2016-09-23 19:33:54 +00:00
..
clean.go build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 2016-07-04 10:51:22 +00:00
db.go build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 2016-07-04 10:51:22 +00:00
LICENSE build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 2016-07-04 10:51:22 +00:00
main.go cmd/stdiscosrv: Generate keys if missing on startup (fixes #3511) 2016-08-23 08:41:49 +02:00
psql.go cmd/stdiscosrv: Fix index creation checks on startup 2016-08-12 11:39:10 +02:00
ql.go build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 2016-07-04 10:51:22 +00:00
querysrv.go cmd/stdiscosrv: Use UTC in database timestamps (fixes #3509) 2016-08-23 08:41:15 +02:00
README.md build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 2016-07-04 10:51:22 +00:00
stats.go build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 2016-07-04 10:51:22 +00:00
stdiscosrv cmd/syncthing: Add selectable sha256 package (fixes #3613, fixes #3614) 2016-09-23 19:33:54 +00:00

stdiscosrv

Latest Build

This is the global discovery server for the syncthing project.

To get it, run go get github.com/syncthing/stdiscosrv or download the latest build from the build server.

Usage

The discovery server supports ql and postgres backends. Specify the backend via -db-backend and the database DSN via -db-dsn.

By default it will use in-memory ql backend. If you wish to persist the information on disk between restarts in ql, specify a file DSN:

$ stdiscosrv -db-dsn="file:///var/run/stdiscosrv.db"

For postgres, you will need to create a database and a user with permissions to create tables in it, then start the stdiscosrv as follows:

$ export STDISCOSRV_DB_DSN="postgres://user:password@localhost/databasename"
$ stdiscosrv -db-backend="postgres"

You can pass the DSN as command line option, but the value what you pass in will be visible in most process managers, potentially exposing the database password to other users.

In all cases, the appropriate tables and indexes will be created at first startup. If it doesn't exit with an error, you're fine.

See stdiscosrv -help for other options.