add paging support to GetAll (#1601)

* add paging support to GetAll

* fix import
This commit is contained in:
Caleb Doxsey 2020-11-18 17:02:57 -07:00 committed by GitHub
parent 8ada0c51dd
commit a41c37f9e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 322 additions and 103 deletions

View file

@ -91,7 +91,7 @@ func (a *Authorize) runDataTypeSyncer(ctx context.Context, typeURL string) error
ctx, span := trace.StartSpan(ctx, "authorize.dataBrokerClient.GetAll")
backoff := backoff.NewExponentialBackOff()
for {
res, err := a.state.Load().dataBrokerClient.GetAll(ctx, &databroker.GetAllRequest{
res, err := databroker.GetAllPages(ctx, a.state.Load().dataBrokerClient, &databroker.GetAllRequest{
Type: typeURL,
})
if err != nil {