-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expose BulkExportRelationships service controller logic
so that it can be used without the grpc server
- Loading branch information
1 parent
f391921
commit 764cf9c
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package v1 | ||
Check failure on line 1 in pkg/services/v1/services.go GitHub Actions / Lint Go
Check failure on line 1 in pkg/services/v1/services.go GitHub Actions / Lint Go
|
||
|
||
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) | ||
} |