72 lines
2 KiB
C#
72 lines
2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
using Frostfs.V2.Ape;
|
|
|
|
namespace FrostFS.SDK.Client.Interfaces;
|
|
|
|
public interface IFrostFSClient : IDisposable
|
|
{
|
|
#region Network
|
|
Task<FrostFsNetmapSnapshot> GetNetmapSnapshotAsync(PrmNetmapSnapshot? args = null);
|
|
|
|
Task<FrostFsNodeInfo> GetNodeInfoAsync(PrmNodeInfo? args = null);
|
|
|
|
Task<NetworkSettings> GetNetworkSettingsAsync(PrmNetworkSettings? args = null);
|
|
#endregion
|
|
|
|
#region Session
|
|
Task<FrostFsSessionToken> CreateSessionAsync(PrmSessionCreate args);
|
|
#endregion
|
|
|
|
#region ApeManager
|
|
Task<ReadOnlyMemory<byte>> AddChainAsync(PrmApeChainAdd args);
|
|
|
|
Task RemoveChainAsync(PrmApeChainRemove args);
|
|
|
|
Task<Chain[]> ListChainAsync(PrmApeChainList args);
|
|
#endregion
|
|
|
|
#region Container
|
|
Task<FrostFsContainerInfo> GetContainerAsync(PrmContainerGet args);
|
|
|
|
IAsyncEnumerable<FrostFsContainerId> ListContainersAsync(PrmContainerGetAll? args = null);
|
|
|
|
Task<FrostFsContainerId> CreateContainerAsync(PrmContainerCreate args);
|
|
|
|
Task DeleteContainerAsync(PrmContainerDelete args);
|
|
#endregion
|
|
|
|
#region Object
|
|
Task<FrostFsObjectHeader> GetObjectHeadAsync(PrmObjectHeadGet args);
|
|
|
|
Task<FrostFsObject> GetObjectAsync(PrmObjectGet args);
|
|
|
|
Task<RangeReader> GetRangeAsync(PrmRangeGet args);
|
|
|
|
Task<ReadOnlyMemory<byte>[]> GetRangeHashAsync(PrmRangeHashGet args);
|
|
|
|
Task<FrostFsObjectId> PutObjectAsync(PrmObjectPut args);
|
|
|
|
Task<FrostFsObjectId> PutSingleObjectAsync(PrmSingleObjectPut args);
|
|
|
|
Task<FrostFsObjectId> PatchObjectAsync(PrmObjectPatch args);
|
|
|
|
Task DeleteObjectAsync(PrmObjectDelete args);
|
|
|
|
IAsyncEnumerable<FrostFsObjectId> SearchObjectsAsync(PrmObjectSearch args);
|
|
#endregion
|
|
|
|
#region Account
|
|
Task<Accounting.Decimal> GetBalanceAsync(PrmBalance? args = null);
|
|
#endregion
|
|
|
|
#region Tools
|
|
FrostFsObjectId CalculateObjectId(FrostFsObjectHeader header);
|
|
#endregion
|
|
|
|
public Task<string?> Dial(CallContext ctx);
|
|
|
|
public void Close();
|
|
}
|