consul/proto-public/annotations/ratelimit/ratelimit.proto

44 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
2023-01-04 16:07:02 +00:00
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;
}
2023-01-04 16:07:02 +00:00
// Spec describes the kind of rate limit that will be applied to this RPC.
message Spec {
OperationType operation_type = 1;
OperationCategory operation_category = 2;
2023-01-04 16:07:02 +00:00
}
extend google.protobuf.MethodOptions {
Spec spec = 8300;
}