syncthing/lib
Jakob Borg c71116ee94
Implement database abstraction, error checking (ref #5907) (#6107)
This PR does two things, because one lead to the other:

- Move the leveldb specific stuff into a small "backend" package that
defines a backend interface and the leveldb implementation. This allows,
potentially, in the future, switching the db implementation so another
KV store should we wish to do so.

- Add proper error handling all along the way. The db and backend
packages are now errcheck clean. However, I drew the line at modifying
the FileSet API in order to keep this manageable and not continue
refactoring all of the rest of Syncthing. As such, the FileSet methods
still panic on database errors, except for the "database is closed"
error which is instead handled by silently returning as quickly as
possible, with the assumption that we're anyway "on the way out".
2019-11-29 09:11:52 +01:00
..
api lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
auto build: Let "go generate" create assets 2018-06-26 10:29:36 +02:00
beacon lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
build cmd/*, lib/build: Set correct LongVersion (fixes #5993) (#5997) 2019-10-07 13:30:25 +02:00
config Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
connections lib/config, lib/connections: Remove ListenAddresses hack (#6188) 2019-11-26 17:07:25 +01:00
db Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
dialer all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
discover all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
events lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
fs Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
ignore lib/ignore: Keep skipping ignored dirs for rooted patterns (#6151) 2019-11-26 07:37:41 +00:00
locations all: Remove potentially problematic errors from panics (fixes #5839) (#5912) 2019-07-31 10:53:35 +02:00
logger all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
model Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
nat all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
osutil all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
pmp all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
protocol lib/model, lib/protocol: Add contexts sending indexes and download-progress (#6176) 2019-11-25 11:07:36 +01:00
rand lib/connections: Add QUIC protocol support (fixes #5377) (#5737) 2019-05-29 09:56:40 +02:00
rc all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
relay all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
scanner lib/ignore: Keep skipping ignored dirs for rooted patterns (#6151) 2019-11-26 07:37:41 +00:00
sha256 all: Remove dead code, fix lost msgLen checks (#6129) 2019-11-06 07:09:58 +01:00
signature all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
stats all, lib/logger: Refactor SetDebug calls (#6054) 2019-10-04 13:03:34 +02:00
stun lib/config, lib/connections: Remove ListenAddresses hack (#6188) 2019-11-26 17:07:25 +01:00
sync lib/sync: Cleanly fail instead of panic in tests (#6088) 2019-10-16 10:11:11 +02:00
syncthing Implement database abstraction, error checking (ref #5907) (#6107) 2019-11-29 09:11:52 +01:00
testutils lib/model, lib/testutils: Test closing a connection on folder restart (#5707) 2019-05-18 08:53:59 +02:00
tlsutil lib: Wrap errors with errors.Wrap instead of fmt.Errorf (#6181) 2019-11-23 15:20:54 +00:00
upgrade all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
upnp lib/upnp: Use simple continue in loop (#6192) 2019-11-26 22:55:34 +00:00
ur lib/config, lib/connections: Remove ListenAddresses hack (#6188) 2019-11-26 17:07:25 +01:00
util all: Use context in lib/dialer (#6177) 2019-11-26 07:39:51 +00:00
versioner lib/versioner: Reduce surface area (#6186) 2019-11-26 07:39:31 +00:00
watchaggregator lib: Replace done channel with contexts in and add names to util services (#6166) 2019-11-21 08:41:15 +01:00
weakhash lib/scanner: Use standard adler32 when we don't need rolling (#5556) 2019-02-25 13:29:31 +04:00