// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/extensions/load_balancing_policies/load_aware_locality/v3/load_aware_locality.proto

package load_aware_localityv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Configuration for the load_aware_locality LB policy which uses ORCA utilization data
// to route traffic between localities based on available headroom.
// [#next-free-field: 10]
type LoadAwareLocality struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The child LB policy to create for endpoint-picking within each locality.
	EndpointPickingPolicy *v3.LoadBalancingPolicy `protobuf:"bytes,1,opt,name=endpoint_picking_policy,json=endpointPickingPolicy,proto3" json:"endpoint_picking_policy,omitempty"`
	// How frequently ORCA weights and locality utilization are recomputed on the
	// main thread. Must be at least 100ms. Defaults to 1s.
	WeightUpdatePeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=weight_update_period,json=weightUpdatePeriod,proto3" json:"weight_update_period,omitempty"`
	// By default, endpoint utilization is computed based on the
	// :ref:`application_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.application_utilization>`
	// field reported by the endpoint. If that field is not set, then utilization
	// will instead be computed by taking the max of the values of the metrics
	// specified here. For map fields in the ORCA proto, the string will be of
	// the form “<map_field_name>.<map_key>“. For example, the string
	// “named_metrics.foo“ will mean to look for the key “foo“ in the ORCA
	// :ref:`named_metrics <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.named_metrics>`
	// field. If none of the specified metrics are present in the load report,
	// then :ref:`cpu_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.cpu_utilization>`
	// is used instead.
	MetricNamesForComputingUtilization []string `protobuf:"bytes,3,rep,name=metric_names_for_computing_utilization,json=metricNamesForComputingUtilization,proto3" json:"metric_names_for_computing_utilization,omitempty"`
	// When the local locality's utilization is at most this threshold above the
	// remote average, route 100% of traffic to the local locality. This avoids
	// unnecessary cross-zone routing when utilization is roughly balanced.
	// One-sided: if the local zone is less loaded than remote, all-local routing
	// always applies. Must be in [0, 1]. Defaults to 0.1.
	UtilizationVarianceThreshold *wrapperspb.DoubleValue `protobuf:"bytes,4,opt,name=utilization_variance_threshold,json=utilizationVarianceThreshold,proto3" json:"utilization_variance_threshold,omitempty"`
	// EWMA time constant for per-locality utilization smoothing. The per-tick
	// smoothing factor alpha is derived as “1 - exp(-weight_update_period /
	// smoothing_time_constant)“, so settling time is consistent regardless of
	// the configured tick rate. Larger values produce more stable weights;
	// smaller values react faster. Must be greater than 0s. Defaults to 5s
	// (~95% settling within ~15s).
	SmoothingTimeConstant *durationpb.Duration `protobuf:"bytes,5,opt,name=smoothing_time_constant,json=smoothingTimeConstant,proto3" json:"smoothing_time_constant,omitempty"`
	// Minimum fraction of traffic sent to non-local localities to keep ORCA
	// data fresh when the local-preference check would otherwise route 100% of
	// traffic to the local locality. The deficit is redistributed across remote
	// localities proportionally to their host count. Must be in [0, 1). Set to
	// 0 to disable (safe only when ORCA reports arrive out-of-band, or when
	// cross-zone traffic must be strictly avoided). Defaults to 0.03 (3%).
	//
	// Probe fraction is a global value split across all remote localities.
	// At very high remote-locality counts combined with low aggregate request
	// rates, per-host sample intervals can exceed “weight_expiration_period“.
	// See the architecture overview for the scaling matrix.
	RemoteProbeFraction *wrapperspb.DoubleValue `protobuf:"bytes,6,opt,name=remote_probe_fraction,json=remoteProbeFraction,proto3" json:"remote_probe_fraction,omitempty"`
	// Per-host ORCA sample validity window. Hosts that have not reported load
	// metrics within this duration are excluded from their locality's
	// utilization aggregation. The locality's EWMA state continues normally
	// over the remaining reporting hosts. If every host in a locality is
	// stale, the locality falls back to host-count-proportional weighting
	// (the same path used when all localities are overloaded). Set to 0s to
	// disable expiration. Defaults to 3 minutes.
	WeightExpirationPeriod *durationpb.Duration `protobuf:"bytes,7,opt,name=weight_expiration_period,json=weightExpirationPeriod,proto3" json:"weight_expiration_period,omitempty"`
	// Whether to enable out-of-band utilization reporting collection from
	// the endpoints. By default, per-request utilization reporting is used.
	EnableOobLoadReport *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=enable_oob_load_report,json=enableOobLoadReport,proto3" json:"enable_oob_load_report,omitempty"`
	// Load reporting interval to request from the server. Note that the
	// server may not provide reports as frequently as the client requests.
	// Used only when enable_oob_load_report is true. Default is 10 seconds.
	OobReportingPeriod *durationpb.Duration `protobuf:"bytes,9,opt,name=oob_reporting_period,json=oobReportingPeriod,proto3" json:"oob_reporting_period,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *LoadAwareLocality) Reset() {
	*x = LoadAwareLocality{}
	mi := &file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *LoadAwareLocality) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*LoadAwareLocality) ProtoMessage() {}

func (x *LoadAwareLocality) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use LoadAwareLocality.ProtoReflect.Descriptor instead.
func (*LoadAwareLocality) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDescGZIP(), []int{0}
}

func (x *LoadAwareLocality) GetEndpointPickingPolicy() *v3.LoadBalancingPolicy {
	if x != nil {
		return x.EndpointPickingPolicy
	}
	return nil
}

func (x *LoadAwareLocality) GetWeightUpdatePeriod() *durationpb.Duration {
	if x != nil {
		return x.WeightUpdatePeriod
	}
	return nil
}

func (x *LoadAwareLocality) GetMetricNamesForComputingUtilization() []string {
	if x != nil {
		return x.MetricNamesForComputingUtilization
	}
	return nil
}

func (x *LoadAwareLocality) GetUtilizationVarianceThreshold() *wrapperspb.DoubleValue {
	if x != nil {
		return x.UtilizationVarianceThreshold
	}
	return nil
}

func (x *LoadAwareLocality) GetSmoothingTimeConstant() *durationpb.Duration {
	if x != nil {
		return x.SmoothingTimeConstant
	}
	return nil
}

func (x *LoadAwareLocality) GetRemoteProbeFraction() *wrapperspb.DoubleValue {
	if x != nil {
		return x.RemoteProbeFraction
	}
	return nil
}

func (x *LoadAwareLocality) GetWeightExpirationPeriod() *durationpb.Duration {
	if x != nil {
		return x.WeightExpirationPeriod
	}
	return nil
}

func (x *LoadAwareLocality) GetEnableOobLoadReport() *wrapperspb.BoolValue {
	if x != nil {
		return x.EnableOobLoadReport
	}
	return nil
}

func (x *LoadAwareLocality) GetOobReportingPeriod() *durationpb.Duration {
	if x != nil {
		return x.OobReportingPeriod
	}
	return nil
}

var File_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto protoreflect.FileDescriptor

const file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDesc = "" +
	"\n" +
	"Yenvoy/extensions/load_balancing_policies/load_aware_locality/v3/load_aware_locality.proto\x12?envoy.extensions.load_balancing_policies.load_aware_locality.v3\x1a%envoy/config/cluster/v3/cluster.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xf5\x06\n" +
	"\x11LoadAwareLocality\x12n\n" +
	"\x17endpoint_picking_policy\x18\x01 \x01(\v2,.envoy.config.cluster.v3.LoadBalancingPolicyB\b\xfaB\x05\x8a\x01\x02\x10\x01R\x15endpointPickingPolicy\x12Z\n" +
	"\x14weight_update_period\x18\x02 \x01(\v2\x19.google.protobuf.DurationB\r\xfaB\n" +
	"\xaa\x01\a2\x05\x10\x80\xc2\xd7/R\x12weightUpdatePeriod\x12R\n" +
	"&metric_names_for_computing_utilization\x18\x03 \x03(\tR\"metricNamesForComputingUtilization\x12{\n" +
	"\x1eutilization_variance_threshold\x18\x04 \x01(\v2\x1c.google.protobuf.DoubleValueB\x17\xfaB\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00\xf0?)\x00\x00\x00\x00\x00\x00\x00\x00R\x1cutilizationVarianceThreshold\x12[\n" +
	"\x17smoothing_time_constant\x18\x05 \x01(\v2\x19.google.protobuf.DurationB\b\xfaB\x05\xaa\x01\x02*\x00R\x15smoothingTimeConstant\x12i\n" +
	"\x15remote_probe_fraction\x18\x06 \x01(\v2\x1c.google.protobuf.DoubleValueB\x17\xfaB\x14\x12\x12\x11\x00\x00\x00\x00\x00\x00\xf0?)\x00\x00\x00\x00\x00\x00\x00\x00R\x13remoteProbeFraction\x12]\n" +
	"\x18weight_expiration_period\x18\a \x01(\v2\x19.google.protobuf.DurationB\b\xfaB\x05\xaa\x01\x022\x00R\x16weightExpirationPeriod\x12O\n" +
	"\x16enable_oob_load_report\x18\b \x01(\v2\x1a.google.protobuf.BoolValueR\x13enableOobLoadReport\x12K\n" +
	"\x14oob_reporting_period\x18\t \x01(\v2\x19.google.protobuf.DurationR\x12oobReportingPeriodB\xef\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"Mio.envoyproxy.envoy.extensions.load_balancing_policies.load_aware_locality.v3B\x16LoadAwareLocalityProtoP\x01Z|github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/load_aware_locality/v3;load_aware_localityv3b\x06proto3"

var (
	file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDescOnce sync.Once
	file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDescData []byte
)

func file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDescGZIP() []byte {
	file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDesc), len(file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDesc)))
	})
	return file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDescData
}

var file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_goTypes = []any{
	(*LoadAwareLocality)(nil),      // 0: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality
	(*v3.LoadBalancingPolicy)(nil), // 1: envoy.config.cluster.v3.LoadBalancingPolicy
	(*durationpb.Duration)(nil),    // 2: google.protobuf.Duration
	(*wrapperspb.DoubleValue)(nil), // 3: google.protobuf.DoubleValue
	(*wrapperspb.BoolValue)(nil),   // 4: google.protobuf.BoolValue
}
var file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.endpoint_picking_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy
	2, // 1: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.weight_update_period:type_name -> google.protobuf.Duration
	3, // 2: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.utilization_variance_threshold:type_name -> google.protobuf.DoubleValue
	2, // 3: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.smoothing_time_constant:type_name -> google.protobuf.Duration
	3, // 4: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.remote_probe_fraction:type_name -> google.protobuf.DoubleValue
	2, // 5: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.weight_expiration_period:type_name -> google.protobuf.Duration
	4, // 6: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.enable_oob_load_report:type_name -> google.protobuf.BoolValue
	2, // 7: envoy.extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality.oob_reporting_period:type_name -> google.protobuf.Duration
	8, // [8:8] is the sub-list for method output_type
	8, // [8:8] is the sub-list for method input_type
	8, // [8:8] is the sub-list for extension type_name
	8, // [8:8] is the sub-list for extension extendee
	0, // [0:8] is the sub-list for field type_name
}

func init() {
	file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_init()
}
func file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_init() {
	if File_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDesc), len(file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_msgTypes,
	}.Build()
	File_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto = out.File
	file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_goTypes = nil
	file_envoy_extensions_load_balancing_policies_load_aware_locality_v3_load_aware_locality_proto_depIdxs = nil
}
