lib/syncthing: Expose backend instead of lowlevel (#6224)

This commit is contained in:
Simon Frei
2019-12-12 16:50:09 +01:00
committed by Jakob Borg
parent 82ed8e702c
commit 8140350094
4 changed files with 9 additions and 12 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/connections"
"github.com/syncthing/syncthing/lib/db"
"github.com/syncthing/syncthing/lib/db/backend"
"github.com/syncthing/syncthing/lib/discover"
"github.com/syncthing/syncthing/lib/events"
"github.com/syncthing/syncthing/lib/locations"
@@ -84,10 +85,10 @@ type App struct {
stopped chan struct{}
}
func New(cfg config.Wrapper, ll *db.Lowlevel, evLogger events.Logger, cert tls.Certificate, opts Options) *App {
func New(cfg config.Wrapper, dbBackend backend.Backend, evLogger events.Logger, cert tls.Certificate, opts Options) *App {
a := &App{
cfg: cfg,
ll: ll,
ll: db.NewLowlevel(dbBackend),
evLogger: evLogger,
opts: opts,
cert: cert,