Search in sources :

Example 1 with CommonQuotaRequest

use of com.tencent.polaris.ratelimit.client.pojo.CommonQuotaRequest in project polaris-java by polarismesh.

the class DefaultLimitAPI method getQuota.

@Override
public QuotaResponse getQuota(QuotaRequest request) throws PolarisException {
    checkAvailable("LimitAPI");
    LimitValidator.validateQuotaRequest(request);
    CommonQuotaRequest commonQuotaRequest = new CommonQuotaRequest(request, sdkContext.getConfig());
    QuotaResponse response = quotaFlow.getQuota(commonQuotaRequest);
    reportRateLimit(request, response);
    return response;
}
Also used : CommonQuotaRequest(com.tencent.polaris.ratelimit.client.pojo.CommonQuotaRequest) QuotaResponse(com.tencent.polaris.ratelimit.api.rpc.QuotaResponse)

Aggregations

QuotaResponse (com.tencent.polaris.ratelimit.api.rpc.QuotaResponse)1 CommonQuotaRequest (com.tencent.polaris.ratelimit.client.pojo.CommonQuotaRequest)1