using CryptoExchange.Net.Objects;
using System.Net.Http;
using System.Security;
namespace CryptoExchange.Net.RateLimiting.Interfaces
{
///
/// Rate limit guard
///
public interface IRateLimitGuard
{
///
/// Name
///
string Name { get; }
///
/// Description
///
string Description { get; }
///
/// Check whether a request can pass this rate limit guard
///
/// The rate limit item type
/// The request definition
/// The host address
/// The API key
/// The request weight
///
LimitCheck Check(RateLimitItemType type, RequestDefinition definition, string host, SecureString? apiKey, int requestWeight);
///
/// Apply the request to this guard with the specified weight
///
/// The rate limit item type
/// The request definition
/// The host address
/// The API key
/// The request weight
///
RateLimitState ApplyWeight(RateLimitItemType type, RequestDefinition definition, string host, SecureString? apiKey, int requestWeight);
}
}