-26
cmd/backfiller/backend.go
-26
cmd/backfiller/backend.go
···
+15
cmd/backfiller/backfill.go
+15
cmd/backfiller/backfill.go
···+return backfill.NewBackfiller("backfiller", store, h.HandleCreate, h.HandleUpdate, h.HandleDelete, opts)
+71
cmd/backfiller/census.go
+71
cmd/backfiller/census.go
···+func NewCensusService(cursorSvc *CursorService, backfillSvc *backfill.Backfiller) *CensusService {
+74
-31
cmd/backfiller/cursors.go
+74
-31
cmd/backfiller/cursors.go
···-if err := b.state.Model(&cursorRecord{}).Where("key = ?", "firehose").Update("val", b.firehoseSeq).Error; err != nil {+if err := cs.store.Model(&cursorRecord{}).Where("key = ?", key).Update("val", value).Error; err != nil {+return fmt.Errorf("error updating cursor record: %+v: %w", cursorRecord{Key: key, Val: value}, err)-if err := b.state.Model(&cursorRecord{}).Where("key = ?", "repos").Update("val", b.reposSeq).Error; err != nil {
-27
cmd/backfiller/database.go
-27
cmd/backfiller/database.go
······
+25
cmd/backfiller/firehose.go
+25
cmd/backfiller/firehose.go
···+func NewFirehoseConnection(ctx context.Context, cursorSvc *CursorService) (*websocket.Conn, error) {
+19
-38
cmd/backfiller/handlers.go
+19
-38
cmd/backfiller/handlers.go
···-type handleOpCreateUpdate func(context.Context, string, string, string, *[]byte, *cid.Cid) error-func (b *Backend) HandleCreateOp(ctx context.Context, repo, rev, path string, rec *[]byte, cid *cid.Cid) error {+func (hs *HandlerService) HandleCreate(ctx context.Context, repo string, rev string, path string, rec *[]byte, cid *cid.Cid) error {-func (b *Backend) HandleUpdateOp(ctx context.Context, repo, rev, path string, rec *[]byte, cid *cid.Cid) error {+func (hs *HandlerService) HandleUpdate(ctx context.Context, repo string, rev string, path string, rec *[]byte, cid *cid.Cid) error {+func (hs *HandlerService) HandleDelete(ctx context.Context, repo string, rev string, path string) error {
+75
-107
cmd/backfiller/main.go
+75
-107
cmd/backfiller/main.go
······-bf := NewBackfiller(stateDb, backend.HandleCreateOp, backend.HandleUpdateOp, backend.HandleDeleteOp)
+10
-9
cmd/backfiller/models.go
+10
-9
cmd/backfiller/models.go
···
-69
cmd/backfiller/pump.go
-69
cmd/backfiller/pump.go
···