Skip to content

Commit

Permalink
Merge pull request #1888 from authzed/expose-bulk-export-service-logic
Browse files Browse the repository at this point in the history
expose BulkExportRelationships service controller logic
  • Loading branch information
vroldanbet authored May 3, 2024
2 parents e075df4 + 8e24bb0 commit 664af24
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/services/v1/services.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package v1

import (
"context"

v1 "github.com/authzed/authzed-go/proto/authzed/api/v1"

servicesv1 "github.com/authzed/spicedb/internal/services/v1"
"github.com/authzed/spicedb/pkg/datastore"
)

// BulkExport implements the BulkExportRelationships API functionality. Given a datastore.Datastore, it will
// export stream via the sender all relationships matched by the incoming request.
// If no cursor is provided, it will fallback to the provided revision.
func BulkExport(ctx context.Context, ds datastore.Datastore, batchSize uint64, req *v1.BulkExportRelationshipsRequest, fallbackRevision datastore.Revision, sender func(response *v1.BulkExportRelationshipsResponse) error) error {
return servicesv1.BulkExport(ctx, ds, batchSize, req, fallbackRevision, sender)
}

0 comments on commit 664af24

Please sign in to comment.