[#26] All: Remove V2 from naming
Rename project, namespaces and class names Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
c406df1a78
commit
766f61a5f7
219 changed files with 219 additions and 974 deletions
|
@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.5.002.0
|
VisualStudioVersion = 17.5.002.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.ClientV2", "src\FrostFS.SDK.ClientV2\FrostFS.SDK.ClientV2.csproj", "{50D8F61F-C302-4AC9-8D8A-AB0B8C0988C3}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Client", "src\FrostFS.SDK.Client\FrostFS.SDK.Client.csproj", "{50D8F61F-C302-4AC9-8D8A-AB0B8C0988C3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Cryptography", "src\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj", "{3D804F4A-B0B2-47A5-B006-BE447BE64B50}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Cryptography", "src\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj", "{3D804F4A-B0B2-47A5-B006-BE447BE64B50}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.ProtosV2", "src\FrostFS.SDK.ProtosV2\FrostFS.SDK.ProtosV2.csproj", "{5012EF96-9C9E-4E77-BC78-B4111EE54107}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Protos", "src\FrostFS.SDK.Protos\FrostFS.SDK.Protos.csproj", "{5012EF96-9C9E-4E77-BC78-B4111EE54107}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Tests", "src\FrostFS.SDK.Tests\FrostFS.SDK.Tests.csproj", "{8FDA7E0D-9C75-4874-988E-6592CD28F76C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Tests", "src\FrostFS.SDK.Tests\FrostFS.SDK.Tests.csproj", "{8FDA7E0D-9C75-4874-988E-6592CD28F76C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
internal static class Caches
|
internal static class Caches
|
||||||
{
|
{
|
|
@ -4,7 +4,7 @@ using FrostFS.SDK.Cryptography;
|
||||||
|
|
||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class ClientKey(ECDsa key)
|
public class ClientKey(ECDsa key)
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class FrostFsException : Exception
|
public class FrostFsException : Exception
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class FrostFsInvalidObjectException : FrostFsException
|
public class FrostFsInvalidObjectException : FrostFsException
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class FrostFsResponseException : FrostFsException
|
public class FrostFsResponseException : FrostFsException
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class FrostFsStreamException : FrostFsException
|
public class FrostFsStreamException : FrostFsException
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class SessionExpiredException : FrostFsException
|
public class SessionExpiredException : FrostFsException
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class SessionNotFoundException : FrostFsException
|
public class SessionNotFoundException : FrostFsException
|
||||||
{
|
{
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj" />
|
<ProjectReference Include="..\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj" />
|
||||||
<ProjectReference Include="..\FrostFS.SDK.ProtosV2\FrostFS.SDK.ProtosV2.csproj" />
|
<ProjectReference Include="..\FrostFS.SDK.Protos\FrostFS.SDK.Protos.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -10,8 +10,8 @@ using FrostFS.Accounting;
|
||||||
using FrostFS.Container;
|
using FrostFS.Container;
|
||||||
using FrostFS.Netmap;
|
using FrostFS.Netmap;
|
||||||
using FrostFS.Object;
|
using FrostFS.Object;
|
||||||
using FrostFS.SDK.ClientV2.Interfaces;
|
using FrostFS.SDK.Client.Interfaces;
|
||||||
using FrostFS.SDK.ClientV2.Services;
|
using FrostFS.SDK.Client.Services;
|
||||||
using FrostFS.SDK.Cryptography;
|
using FrostFS.SDK.Cryptography;
|
||||||
using FrostFS.Session;
|
using FrostFS.Session;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ using Grpc.Net.Client;
|
||||||
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class FrostFSClient : IFrostFSClient
|
public class FrostFSClient : IFrostFSClient
|
||||||
{
|
{
|
|
@ -5,4 +5,4 @@
|
||||||
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
[assembly: SuppressMessage("Security", "CA5394:Do not use insecure randomness", Justification = "<Pending>", Scope = "member", Target = "~M:FrostFS.SDK.ClientV2.Sampler.Next~System.Int32")]
|
[assembly: SuppressMessage("Security", "CA5394:Do not use insecure randomness", Justification = "<Pending>", Scope = "member", Target = "~M:FrostFS.SDK.Client.Sampler.Next~System.Int32")]
|
|
@ -4,7 +4,7 @@ using System.Threading.Tasks;
|
||||||
using Grpc.Core;
|
using Grpc.Core;
|
||||||
using Grpc.Core.Interceptors;
|
using Grpc.Core.Interceptors;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods",
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods",
|
||||||
Justification = "parameters are provided by GRPC infrastructure")]
|
Justification = "parameters are provided by GRPC infrastructure")]
|
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||||
using Grpc.Core;
|
using Grpc.Core;
|
||||||
using Grpc.Core.Interceptors;
|
using Grpc.Core.Interceptors;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods",
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods",
|
||||||
Justification = "parameters are provided by GRPC infrastructure")]
|
Justification = "parameters are provided by GRPC infrastructure")]
|
|
@ -3,7 +3,8 @@ using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using Frostfs.V2.Ape;
|
using Frostfs.V2.Ape;
|
||||||
namespace FrostFS.SDK.ClientV2.Interfaces;
|
|
||||||
|
namespace FrostFS.SDK.Client.Interfaces;
|
||||||
|
|
||||||
public interface IFrostFSClient : IDisposable
|
public interface IFrostFSClient : IDisposable
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
internal static partial class FrostFsMessages
|
internal static partial class FrostFsMessages
|
||||||
{
|
{
|
|
@ -3,7 +3,7 @@ using System.Linq;
|
||||||
|
|
||||||
using FrostFS.SDK.Cryptography;
|
using FrostFS.SDK.Cryptography;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class ContainerMapper
|
public static class ContainerMapper
|
||||||
{
|
{
|
|
@ -7,7 +7,7 @@ using Google.Protobuf;
|
||||||
|
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class ContainerIdMapper
|
public static class ContainerIdMapper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
|
|
||||||
using FrostFS.Session;
|
using FrostFS.Session;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class MetaHeaderMapper
|
public static class MetaHeaderMapper
|
||||||
{
|
{
|
|
@ -3,7 +3,7 @@ using System.Linq;
|
||||||
|
|
||||||
using FrostFS.Netmap;
|
using FrostFS.Netmap;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public static class NetmapMapper
|
public static class NetmapMapper
|
||||||
{
|
{
|
|
@ -2,9 +2,9 @@ using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using FrostFS.Netmap;
|
using FrostFS.Netmap;
|
||||||
using FrostFS.SDK.ClientV2.Mappers.GRPC;
|
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public static class NodeInfoMapper
|
public static class NodeInfoMapper
|
||||||
{
|
{
|
|
@ -3,7 +3,7 @@ using System.Linq;
|
||||||
|
|
||||||
using FrostFS.Netmap;
|
using FrostFS.Netmap;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public static class PlacementPolicyMapper
|
public static class PlacementPolicyMapper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
|
|
||||||
using FrostFS.Netmap;
|
using FrostFS.Netmap;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public static class ReplicaMapper
|
public static class ReplicaMapper
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
internal static class ObjectMapper
|
internal static class ObjectMapper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
|
|
||||||
using FrostFS.Object;
|
using FrostFS.Object;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class ObjectAttributeMapper
|
public static class ObjectAttributeMapper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
|
|
||||||
using FrostFS.Object;
|
using FrostFS.Object;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class ObjectFilterMapper
|
public static class ObjectFilterMapper
|
||||||
{
|
{
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||||
using FrostFS.Object;
|
using FrostFS.Object;
|
||||||
using FrostFS.SDK.Cryptography;
|
using FrostFS.SDK.Cryptography;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class ObjectHeaderMapper
|
public static class ObjectHeaderMapper
|
||||||
{
|
{
|
|
@ -4,7 +4,7 @@ using FrostFS.Refs;
|
||||||
|
|
||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class ObjectIdMapper
|
public static class ObjectIdMapper
|
||||||
{
|
{
|
|
@ -7,7 +7,7 @@ using Google.Protobuf;
|
||||||
|
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class OwnerIdMapper
|
public static class OwnerIdMapper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
|
|
||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public static class SessionMapper
|
public static class SessionMapper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
|
|
||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class SignatureMapper
|
public static class SignatureMapper
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class StatusMapper
|
public static class StatusMapper
|
||||||
{
|
{
|
|
@ -3,7 +3,7 @@ using System.Threading;
|
||||||
|
|
||||||
using FrostFS.Refs;
|
using FrostFS.Refs;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
namespace FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
public static class VersionMapper
|
public static class VersionMapper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
using Frostfs.V2.Ape;
|
using Frostfs.V2.Ape;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public struct FrostFsChainTarget(FrostFsTargetType type, string name) : IEquatable<FrostFsChainTarget>
|
public struct FrostFsChainTarget(FrostFsTargetType type, string name) : IEquatable<FrostFsChainTarget>
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public struct FrostFsChain(byte[] raw) : System.IEquatable<FrostFsChain>
|
public struct FrostFsChain(byte[] raw) : System.IEquatable<FrostFsChain>
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public enum FrostFsTargetType
|
public enum FrostFsTargetType
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using FrostFS.Refs;
|
using FrostFS.Refs;
|
||||||
using FrostFS.SDK.ClientV2;
|
using FrostFS.SDK.Client;
|
||||||
using FrostFS.SDK.ClientV2.Mappers.GRPC;
|
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
using FrostFS.SDK.Cryptography;
|
using FrostFS.SDK.Cryptography;
|
||||||
|
|
||||||
namespace FrostFS.SDK;
|
namespace FrostFS.SDK;
|
|
@ -2,8 +2,8 @@ using System;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using FrostFS.SDK.ClientV2;
|
using FrostFS.SDK.Client;
|
||||||
using FrostFS.SDK.ClientV2.Mappers.GRPC;
|
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
using FrostFS.SDK.Cryptography;
|
using FrostFS.SDK.Cryptography;
|
||||||
|
|
||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
|
@ -3,7 +3,7 @@ using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using FrostFS.Netmap;
|
using FrostFS.Netmap;
|
||||||
using FrostFS.SDK.ClientV2;
|
using FrostFS.SDK.Client;
|
||||||
|
|
||||||
namespace FrostFS.SDK;
|
namespace FrostFS.SDK;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using FrostFS.Refs;
|
using FrostFS.Refs;
|
||||||
using FrostFS.SDK.ClientV2.Mappers.GRPC;
|
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
namespace FrostFS.SDK;
|
namespace FrostFS.SDK;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using FrostFS.Refs;
|
using FrostFS.Refs;
|
||||||
using FrostFS.SDK.ClientV2.Mappers.GRPC;
|
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
namespace FrostFS.SDK;
|
namespace FrostFS.SDK;
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
|
|
||||||
using FrostFS.Object;
|
using FrostFS.Object;
|
||||||
|
|
||||||
using FrostFS.SDK.ClientV2.Mappers.GRPC;
|
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
|
|
||||||
namespace FrostFS.SDK;
|
namespace FrostFS.SDK;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
using FrostFS.Refs;
|
using FrostFS.Refs;
|
||||||
using FrostFS.SDK.ClientV2.Mappers.GRPC;
|
using FrostFS.SDK.Client.Mappers.GRPC;
|
||||||
using FrostFS.SDK.Cryptography;
|
using FrostFS.SDK.Cryptography;
|
||||||
|
|
||||||
namespace FrostFS.SDK;
|
namespace FrostFS.SDK;
|
|
@ -9,7 +9,7 @@ using Google.Protobuf;
|
||||||
|
|
||||||
using Grpc.Core.Interceptors;
|
using Grpc.Core.Interceptors;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class CallContext()
|
public class CallContext()
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class Credentials(ECDsa key, FrostFsOwner ownerId)
|
public class Credentials(ECDsa key, FrostFsOwner ownerId)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public interface IContext
|
public interface IContext
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public interface ISessionToken
|
public interface ISessionToken
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmApeChainList(FrostFsChainTarget target, CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmApeChainList(FrostFsChainTarget target, CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmApeChainRemove(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmApeChainRemove(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmApeChainAdd(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmApeChainAdd(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmBalance(CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmBalance(CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class PrmBase(CallContext? ctx, NameValueCollection? xheaders = null) : IContext
|
public class PrmBase(CallContext? ctx, NameValueCollection? xheaders = null) : IContext
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmContainerCreate(FrostFsContainerInfo container, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmContainerCreate(FrostFsContainerInfo container, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmContainerDelete(FrostFsContainerId containerId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmContainerDelete(FrostFsContainerId containerId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmContainerGet(FrostFsContainerId container, CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmContainerGet(FrostFsContainerId container, CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmContainerGetAll(CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmContainerGetAll(CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmNetmapSnapshot(CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmNetmapSnapshot(CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmNetworkSettings(CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmNetworkSettings(CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmNodeInfo(CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmNodeInfo(CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmObjectDelete(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmObjectDelete(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmObjectGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmObjectGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmObjectHeadGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmObjectHeadGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmObjectPatch(FrostFsAddress address, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmObjectPatch(FrostFsAddress address, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmObjectPut(CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmObjectPut(CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmObjectSearch(FrostFsContainerId containerId, CallContext? ctx = null, params IObjectFilter[] filters) : PrmBase(ctx), ISessionToken
|
public sealed class PrmObjectSearch(FrostFsContainerId containerId, CallContext? ctx = null, params IObjectFilter[] filters) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmRangeGet(
|
public sealed class PrmRangeGet(
|
||||||
FrostFsContainerId containerId,
|
FrostFsContainerId containerId,
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmRangeHashGet(
|
public sealed class PrmRangeHashGet(
|
||||||
FrostFsContainerId containerId,
|
FrostFsContainerId containerId,
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmSessionCreate(ulong expiration, CallContext? ctx = null) : PrmBase(ctx)
|
public sealed class PrmSessionCreate(ulong expiration, CallContext? ctx = null) : PrmBase(ctx)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public sealed class PrmSingleObjectPut(FrostFsObject frostFsObject, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
public sealed class PrmSingleObjectPut(FrostFsObject frostFsObject, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public class PrmWait(TimeSpan timeout, TimeSpan pollInterval)
|
public class PrmWait(TimeSpan timeout, TimeSpan pollInterval)
|
||||||
{
|
{
|
|
@ -3,7 +3,7 @@ using System.Threading;
|
||||||
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
// clientStatusMonitor count error rate and other statistics for connection.
|
// clientStatusMonitor count error rate and other statistics for connection.
|
||||||
public class ClientStatusMonitor : IClientStatus
|
public class ClientStatusMonitor : IClientStatus
|
|
@ -3,7 +3,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
using Grpc.Core;
|
using Grpc.Core;
|
||||||
|
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
// clientWrapper is used by default, alternative implementations are intended for testing purposes only.
|
// clientWrapper is used by default, alternative implementations are intended for testing purposes only.
|
||||||
public class ClientWrapper : ClientStatusMonitor
|
public class ClientWrapper : ClientStatusMonitor
|
||||||
|
@ -101,11 +101,18 @@ public class ClientWrapper : ClientStatusMonitor
|
||||||
await ScheduleGracefulClose().ConfigureAwait(false);
|
await ScheduleGracefulClose().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#pragma warning disable CA2000 // Dispose objects before losing scope: will be disposed manually
|
FrostFSClient? client = null;
|
||||||
FrostFSClient client = new(WrapperPrm, sessionCache);
|
|
||||||
//#pragma warning restore CA2000
|
try
|
||||||
|
{
|
||||||
|
client = new(WrapperPrm, sessionCache);
|
||||||
|
|
||||||
|
var dialCtx = new CallContext
|
||||||
|
{
|
||||||
|
Timeout = TimeSpan.FromTicks((long)WrapperPrm.DialTimeout),
|
||||||
|
CancellationToken = ctx.CancellationToken
|
||||||
|
};
|
||||||
|
|
||||||
//TODO: set additioanl params
|
|
||||||
var error = await client.Dial(ctx).ConfigureAwait(false);
|
var error = await client.Dial(ctx).ConfigureAwait(false);
|
||||||
if (!string.IsNullOrEmpty(error))
|
if (!string.IsNullOrEmpty(error))
|
||||||
{
|
{
|
||||||
|
@ -118,10 +125,17 @@ public class ClientWrapper : ClientStatusMonitor
|
||||||
Client = client;
|
Client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client = null;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
client?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var prmNodeInfo = new PrmNodeInfo(ctx);
|
var prmNodeInfo = new PrmNodeInfo(ctx);
|
||||||
var res = await client.GetNodeInfoAsync(prmNodeInfo).ConfigureAwait(false);
|
var res = await Client.GetNodeInfoAsync(prmNodeInfo).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (FrostFsException)
|
catch (FrostFsException)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
// values for healthy status of clientStatusMonitor.
|
// values for healthy status of clientStatusMonitor.
|
||||||
public enum HealthyStatus
|
public enum HealthyStatus
|
|
@ -1,4 +1,4 @@
|
||||||
namespace FrostFS.SDK.ClientV2;
|
namespace FrostFS.SDK.Client;
|
||||||
|
|
||||||
public interface IClientStatus
|
public interface IClientStatus
|
||||||
{
|
{
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue