[#14] Add interceptors

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-07-01 11:56:47 +03:00 committed by p.gross
parent 605463ec24
commit ae67b12313
28 changed files with 943 additions and 554 deletions

View file

@ -4,12 +4,24 @@ using System.Threading.Tasks;
using FrostFS.SDK.ModelsV2;
using FrostFS.SDK.ModelsV2.Netmap;
using Grpc.Net.Client;
namespace FrostFS.SDK.ClientV2.Interfaces;
public interface IFrostFSClient : IDisposable
{
#region Network
Task<NetmapSnapshot> GetNetmapSnapshotAsync(Context? context = default);
Task<NodeInfo> GetNodeInfoAsync(Context? context = default);
Task<NetworkSettings> GetNetworkSettingsAsync(Context? context = default);
#endregion
#region Session
Task<SessionToken> CreateSessionAsync(ulong expiration, Context? context = default);
#endregion
#region Container
Task<ModelsV2.Container> GetContainerAsync(ContainerId containerId, Context? context = default);
IAsyncEnumerable<ContainerId> ListContainersAsync(Context? context = default);
@ -17,7 +29,9 @@ public interface IFrostFSClient : IDisposable
Task<ContainerId> CreateContainerAsync(ModelsV2.Container container, Context? context = default);
Task DeleteContainerAsync(ContainerId containerId, Context? context = default);
#endregion
#region Object
Task<ObjectHeader> GetObjectHeadAsync(ContainerId containerId, ObjectId objectId, Context? context = default);
Task<ModelsV2.Object> GetObjectAsync(ContainerId containerId, ObjectId objectId, Context? context = default);
@ -29,13 +43,10 @@ public interface IFrostFSClient : IDisposable
Task DeleteObjectAsync(ContainerId containerId, ObjectId objectId, Context? context = default);
IAsyncEnumerable<ObjectId> SearchObjectsAsync(ContainerId cid, IEnumerable<ObjectFilter> filters, Context? context = default);
Task<NetmapSnapshot> GetNetmapSnapshotAsync(Context? context = default);
Task<NodeInfo> GetNodeInfoAsync(Context? context = default);
#endregion
#region Tools
ObjectId CalculateObjectId(ObjectHeader header);
GrpcChannel Channel { get; }
#endregion
}