[#19] Client: Use specific classes for search
Signed-off-by: Pavel Gross <p.gross@yando.com>
This commit is contained in:
parent
3206abc33e
commit
35fe791406
27 changed files with 320 additions and 123 deletions
24
src/FrostFS.SDK.ModelsV2/Client/Context.cs
Normal file
24
src/FrostFS.SDK.ModelsV2/Client/Context.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using FrostFS.SDK.ModelsV2;
|
||||
using Grpc.Core.Interceptors;
|
||||
|
||||
namespace FrostFS.SDK.ClientV2;
|
||||
|
||||
public class Context()
|
||||
{
|
||||
private List<Interceptor>? interceptors;
|
||||
|
||||
public CancellationToken CancellationToken { get; set; } = default;
|
||||
public TimeSpan Timeout { get; set; } = default;
|
||||
public DateTime? Deadline => Timeout.Ticks > 0 ? DateTime.UtcNow.Add(Timeout) : null;
|
||||
|
||||
public Action<CallStatistics>? Callback { get; set; }
|
||||
|
||||
public List<Interceptor> Interceptors
|
||||
{
|
||||
get { return this.interceptors ??= []; }
|
||||
set { this.interceptors = value; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue