[#11] Add Network Snapshot
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
b69d22966f
commit
c988ff3c76
84 changed files with 2238 additions and 933 deletions
|
@ -7,6 +7,7 @@ using Grpc.Core;
|
|||
|
||||
using FrostFS.Object;
|
||||
using FrostFS.Refs;
|
||||
using System.Threading;
|
||||
|
||||
namespace FrostFS.SDK.ClientV2;
|
||||
|
||||
|
@ -14,14 +15,13 @@ internal class SearchReader(AsyncServerStreamingCall<SearchResponse> call) : IDi
|
|||
{
|
||||
public AsyncServerStreamingCall<SearchResponse> Call { get; private set; } = call;
|
||||
|
||||
public async Task<List<ObjectID>?> Read()
|
||||
public async Task<List<ObjectID>?> Read(CancellationToken cancellationToken)
|
||||
{
|
||||
if (!await Call.ResponseStream.MoveNext())
|
||||
{
|
||||
if (!await Call.ResponseStream.MoveNext(cancellationToken))
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
var response = Call.ResponseStream.Current;
|
||||
|
||||
Verifier.CheckResponse(response);
|
||||
|
||||
return response.Body?.IdList.ToList();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue