Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(storage): implement Notification methods #6138

Merged
merged 13 commits into from
Jun 14, 2022
13 changes: 4 additions & 9 deletions storage/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,17 +855,12 @@ func (c *grpcStorageClient) ListNotifications(ctx context.Context, bucket string
Parent: bucketResourceName(globalProjectAlias, bucket),
}
var notifications []*storagepb.Notification
var next string
err = run(ctx, func() error {
gitr := c.raw.ListNotifications(ctx, req, s.gax...)
for {
n, err := gitr.Next()
if err == iterator.Done {
break
}
if err != nil {
return err
}
notifications = append(notifications, n)
notifications, next, err = gitr.InternalFetch(20, "")
cojenco marked this conversation as resolved.
Show resolved Hide resolved
if next == "" {
return nil
}
return err
}, s.retry, s.idempotent, setRetryHeaderGRPC(ctx))
Expand Down