~whereswaldon/sprout-go

2b088ac3b5ac08f7bd8c744f53529d18c8f3a8b3 — Chris Waldon 2 months ago 0b59703
feat: use new store package for archive
3 files changed, 5 insertions(+), 3 deletions(-)

M go.mod
M go.sum
M worker.go
M go.mod => go.mod +1 -1
@@ 3,7 3,7 @@ module git.sr.ht/~whereswaldon/sprout-go
go 1.13

require (
	git.sr.ht/~whereswaldon/forest-go v0.0.0-20200207033954-0859340e8253
	git.sr.ht/~whereswaldon/forest-go v0.0.0-20200517001044-4c1deda29dc2
	github.com/fsnotify/fsnotify v1.4.7
	golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756 // indirect
)

M go.sum => go.sum +2 -0
@@ 1,5 1,7 @@
git.sr.ht/~whereswaldon/forest-go v0.0.0-20200207033954-0859340e8253 h1:/2kO5f1X7Ge4efmRwPF5MHiZMmKonBsypTiPnZeQwys=
git.sr.ht/~whereswaldon/forest-go v0.0.0-20200207033954-0859340e8253/go.mod h1:LV1LNV6Mg4ajBo2fOTk16RIaC9Oh8pB+SpgXev6kAoU=
git.sr.ht/~whereswaldon/forest-go v0.0.0-20200517001044-4c1deda29dc2 h1:KZBkGYW4CUkiVrYPEVBaxYvrDMIDL56PpEyqTKhBA6M=
git.sr.ht/~whereswaldon/forest-go v0.0.0-20200517001044-4c1deda29dc2/go.mod h1:LV1LNV6Mg4ajBo2fOTk16RIaC9Oh8pB+SpgXev6kAoU=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=

M worker.go => worker.go +2 -2
@@ 9,8 9,8 @@ import (
	"time"

	"git.sr.ht/~whereswaldon/forest-go"
	"git.sr.ht/~whereswaldon/forest-go/archive"
	"git.sr.ht/~whereswaldon/forest-go/fields"
	"git.sr.ht/~whereswaldon/forest-go/store"
)

type SubscribableStore interface {


@@ 385,7 385,7 @@ func (c *Worker) synchronizeFullTree(root forest.Node, maxNodes int, perRequestT
		return fmt.Errorf("couldn't fetch leaves of node %s: %w", root.ID(), err)
	}
	c.Printf("Fetched leaves of %s", root.ID())
	archive := archive.New(c.SubscribableStore)
	archive := store.NewArchive(c.SubscribableStore)
	localLeaves, err := archive.LeavesOf(root.ID())
	if err != nil {
		return fmt.Errorf("couldn't list local leaves of node %s: %w", root.ID(), err)