Tauhid Anjum 5d294b26d3
NET-5824 Exported services api (#20015)
* Exported services api implemented

* Tests added, refactored code

* Adding server tests

* changelog added

* Proto gen added

* Adding codegen changes

* changing url, response object

* Fixing lint error by having namespace and partition directly

* Tests changes

* refactoring tests

* Simplified uniqueness logic for exported services, sorted the response in order of service name

* Fix lint errors, refactored code
2024-01-23 10:06:59 +05:30

44 lines
1.1 KiB
Protocol Buffer

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
syntax = "proto3";
package hashicorp.consul.internal.ratelimit;
import "google/protobuf/descriptor.proto";
// OperationType determines the kind of rate limit that will be applied to this
// RPC (i.e. read or write).
enum OperationType {
OPERATION_TYPE_UNSPECIFIED = 0;
OPERATION_TYPE_EXEMPT = 1;
OPERATION_TYPE_READ = 2;
OPERATION_TYPE_WRITE = 3;
}
enum OperationCategory {
OPERATION_CATEGORY_UNSPECIFIED = 0;
OPERATION_CATEGORY_ACL = 1;
OPERATION_CATEGORY_PEER_STREAM = 2;
OPERATION_CATEGORY_CONNECT_CA = 3;
OPERATION_CATEGORY_PARTITION = 4;
OPERATION_CATEGORY_PEERING = 5;
OPERATION_CATEGORY_SERVER_DISCOVERY = 6;
OPERATION_CATEGORY_DATAPLANE = 7;
OPERATION_CATEGORY_DNS = 8;
OPERATION_CATEGORY_SUBSCRIBE = 9;
OPERATION_CATEGORY_OPERATOR = 10;
OPERATION_CATEGORY_RESOURCE = 11;
OPERATION_CATEGORY_CONFIGENTRY = 12;
}
// Spec describes the kind of rate limit that will be applied to this RPC.
message Spec {
OperationType operation_type = 1;
OperationCategory operation_category = 2;
}
extend google.protobuf.MethodOptions {
Spec spec = 8300;
}