[#24] Client: Implement pool part1
first iteration - base classes and methods Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
d1271df207
commit
c9a75ea025
72 changed files with 2786 additions and 468 deletions
28
src/FrostFS.SDK.ClientV2/Poll/IClientStatus.cs
Normal file
28
src/FrostFS.SDK.ClientV2/Poll/IClientStatus.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
namespace FrostFS.SDK.ClientV2;
|
||||
|
||||
public interface IClientStatus
|
||||
{
|
||||
// isHealthy checks if the connection can handle requests.
|
||||
bool IsHealthy();
|
||||
|
||||
// isDialed checks if the connection was created.
|
||||
bool IsDialed();
|
||||
|
||||
// setUnhealthy marks client as unhealthy.
|
||||
void SetUnhealthy();
|
||||
|
||||
// address return address of endpoint.
|
||||
string Address { get; }
|
||||
|
||||
// currentErrorRate returns current errors rate.
|
||||
// After specific threshold connection is considered as unhealthy.
|
||||
// Pool.startRebalance routine can make this connection healthy again.
|
||||
uint GetCurrentErrorRate();
|
||||
|
||||
// overallErrorRate returns the number of all happened errors.
|
||||
ulong GetOverallErrorRate();
|
||||
|
||||
// methodsStatus returns statistic for all used methods.
|
||||
StatusSnapshot[] MethodsStatus();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue