syntax = "proto3";

package envoy.extensions.resource_monitors.downstream_connections.v3;

import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.downstream_connections.v3";
option java_outer_classname = "DownstreamConnectionsProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/downstream_connections/v3;downstream_connectionsv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Downstream connections]
// [#extension: envoy.resource_monitors.global_downstream_max_connections]

// The downstream connections resource monitor tracks the global number of open downstream connections.
message DownstreamConnectionsConfig {
  // Maximum threshold for global open downstream connections, defaults to 0.
  // If monitor is enabled in Overload manager api, this field should be explicitly configured with value greater than 0.
  int64 max_active_downstream_connections = 1 [(validate.rules).int64 = {gt: 0}];
}
