| 1 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 |
// versions: |
| 3 |
// protoc-gen-go v1.30.0 |
| 4 |
// protoc v5.29.1 |
| 5 |
// source: envoy/config/retry/previous_priorities/previous_priorities_config.proto |
| 6 |
|
| 7 |
package previous_priorities |
| 8 |
|
| 9 |
import ( |
| 10 |
_ "github.com/cncf/xds/go/udpa/annotations" |
| 11 |
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
| 12 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 13 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 14 |
reflect "reflect" |
| 15 |
sync "sync" |
| 16 |
) |
| 17 |
|
| 18 |
const ( |
| 19 |
// Verify that this generated code is sufficiently up-to-date. |
| 20 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 21 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 22 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 23 |
) |
| 24 |
|
| 25 |
// A retry host selector that attempts to spread retries between priorities, even if certain |
| 26 |
// priorities would not normally be attempted due to higher priorities being available. |
| 27 |
// |
| 28 |
// As priorities get excluded, load will be distributed amongst the remaining healthy priorities |
| 29 |
// based on the relative health of the priorities, matching how load is distributed during regular |
| 30 |
// host selection. For example, given priority healths of {100, 50, 50}, the original load will be |
| 31 |
// {100, 0, 0} (since P0 has capacity to handle 100% of the traffic). If P0 is excluded, the load |
| 32 |
// changes to {0, 50, 50}, because P1 is only able to handle 50% of the traffic, causing the |
| 33 |
// remaining to spill over to P2. |
| 34 |
// |
| 35 |
// Each priority attempted will be excluded until there are no healthy priorities left, at which |
| 36 |
// point the list of attempted priorities will be reset, essentially starting from the beginning. |
| 37 |
// For example, given three priorities P0, P1, P2 with healthy % of 100, 0 and 50 respectively, the |
| 38 |
// following sequence of priorities would be selected (assuming update_frequency = 1): |
| 39 |
// Attempt 1: P0 (P0 is 100% healthy) |
| 40 |
// Attempt 2: P2 (P0 already attempted, P2 only healthy priority) |
| 41 |
// Attempt 3: P0 (no healthy priorities, reset) |
| 42 |
// Attempt 4: P2 |
| 43 |
// |
| 44 |
// In the case of all upstream hosts being unhealthy, no adjustments will be made to the original |
| 45 |
// priority load, so behavior should be identical to not using this plugin. |
| 46 |
// |
| 47 |
// Using this PriorityFilter requires rebuilding the priority load, which runs in O(# of |
| 48 |
// priorities), which might incur significant overhead for clusters with many priorities. |
| 49 |
// [#extension: envoy.retry_priorities.previous_priorities] |
| 50 |
type PreviousPrioritiesConfig struct { |
| 51 |
state protoimpl.MessageState |
| 52 |
sizeCache protoimpl.SizeCache |
| 53 |
unknownFields protoimpl.UnknownFields |
| 54 |
|
| 55 |
// How often the priority load should be updated based on previously attempted priorities. Useful |
| 56 |
// to allow each priorities to receive more than one request before being excluded or to reduce |
| 57 |
// the number of times that the priority load has to be recomputed. |
| 58 |
// |
| 59 |
// For example, by setting this to 2, then the first two attempts (initial attempt and first |
| 60 |
// retry) will use the unmodified priority load. The third and fourth attempt will use priority |
| 61 |
// load which excludes the priorities routed to with the first two attempts, and the fifth and |
| 62 |
// sixth attempt will use the priority load excluding the priorities used for the first four |
| 63 |
// attempts. |
| 64 |
// |
| 65 |
// Must be greater than 0. |
| 66 |
UpdateFrequency int32 `protobuf:"varint,1,opt,name=update_frequency,json=updateFrequency,proto3" json:"update_frequency,omitempty"` |
| 67 |
} |
| 68 |
|
| 69 |
func (x *PreviousPrioritiesConfig) Reset() { |
| 70 |
*x = PreviousPrioritiesConfig{} |
| 71 |
if protoimpl.UnsafeEnabled { |
| 72 |
mi := &file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes[0] |
| 73 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 74 |
ms.StoreMessageInfo(mi) |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
func (x *PreviousPrioritiesConfig) String() string { |
| 79 |
return protoimpl.X.MessageStringOf(x) |
| 80 |
} |
| 81 |
|
| 82 |
func (*PreviousPrioritiesConfig) ProtoMessage() {} |
| 83 |
|
| 84 |
func (x *PreviousPrioritiesConfig) ProtoReflect() protoreflect.Message { |
| 85 |
mi := &file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes[0] |
| 86 |
if protoimpl.UnsafeEnabled && x != nil { |
| 87 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 88 |
if ms.LoadMessageInfo() == nil { |
| 89 |
ms.StoreMessageInfo(mi) |
| 90 |
} |
| 91 |
return ms |
| 92 |
} |
| 93 |
return mi.MessageOf(x) |
| 94 |
} |
| 95 |
|
| 96 |
// Deprecated: Use PreviousPrioritiesConfig.ProtoReflect.Descriptor instead. |
| 97 |
func (*PreviousPrioritiesConfig) Descriptor() ([]byte, []int) { |
| 98 |
return file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescGZIP(), []int{0} |
| 99 |
} |
| 100 |
|
| 101 |
func (x *PreviousPrioritiesConfig) GetUpdateFrequency() int32 { |
| 102 |
if x != nil { |
| 103 |
return x.UpdateFrequency |
| 104 |
} |
| 105 |
return 0 |
| 106 |
} |
| 107 |
|
| 108 |
var File_envoy_config_retry_previous_priorities_previous_priorities_config_proto protoreflect.FileDescriptor |
| 109 |
|
| 110 |
var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc = []byte{ |
| 111 |
0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, |
| 112 |
0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, |
| 113 |
0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, |
| 114 |
0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, |
| 115 |
0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, |
| 116 |
0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, |
| 117 |
0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, |
| 118 |
0x73, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, |
| 119 |
0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, |
| 120 |
0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, |
| 121 |
0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, |
| 122 |
0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, |
| 123 |
0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x18, 0x50, 0x72, 0x65, |
| 124 |
0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, |
| 125 |
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, |
| 126 |
0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, |
| 127 |
0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x20, 0x00, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, |
| 128 |
0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0xec, 0x01, 0xf2, 0x98, 0xfe, 0x8f, |
| 129 |
0x05, 0x38, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, |
| 130 |
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x69, 0x6f, 0x72, |
| 131 |
0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, |
| 132 |
0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, |
| 133 |
0x10, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, |
| 134 |
0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, |
| 135 |
0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, |
| 136 |
0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x1d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, |
| 137 |
0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, |
| 138 |
0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, |
| 139 |
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, |
| 140 |
0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, |
| 141 |
0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, |
| 142 |
0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, |
| 143 |
0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 144 |
} |
| 145 |
|
| 146 |
var ( |
| 147 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescOnce sync.Once |
| 148 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData = file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc |
| 149 |
) |
| 150 |
|
| 151 |
func file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescGZIP() []byte { |
| 152 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescOnce.Do(func() { |
| 153 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData) |
| 154 |
}) |
| 155 |
return file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData |
| 156 |
} |
| 157 |
|
| 158 |
var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 159 |
var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_goTypes = []interface{}{ |
| 160 |
(*PreviousPrioritiesConfig)(nil), // 0: envoy.config.retry.previous_priorities.PreviousPrioritiesConfig |
| 161 |
} |
| 162 |
var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_depIdxs = []int32{ |
| 163 |
0, // [0:0] is the sub-list for method output_type |
| 164 |
0, // [0:0] is the sub-list for method input_type |
| 165 |
0, // [0:0] is the sub-list for extension type_name |
| 166 |
0, // [0:0] is the sub-list for extension extendee |
| 167 |
0, // [0:0] is the sub-list for field type_name |
| 168 |
} |
| 169 |
|
| 170 |
func init() { file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_init() } |
| 171 |
func file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_init() { |
| 172 |
if File_envoy_config_retry_previous_priorities_previous_priorities_config_proto != nil { |
| 173 |
return |
| 174 |
} |
| 175 |
if !protoimpl.UnsafeEnabled { |
| 176 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 177 |
switch v := v.(*PreviousPrioritiesConfig); i { |
| 178 |
case 0: |
| 179 |
return &v.state |
| 180 |
case 1: |
| 181 |
return &v.sizeCache |
| 182 |
case 2: |
| 183 |
return &v.unknownFields |
| 184 |
default: |
| 185 |
return nil |
| 186 |
} |
| 187 |
} |
| 188 |
} |
| 189 |
type x struct{} |
| 190 |
out := protoimpl.TypeBuilder{ |
| 191 |
File: protoimpl.DescBuilder{ |
| 192 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 193 |
RawDescriptor: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc, |
| 194 |
NumEnums: 0, |
| 195 |
NumMessages: 1, |
| 196 |
NumExtensions: 0, |
| 197 |
NumServices: 0, |
| 198 |
}, |
| 199 |
GoTypes: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_goTypes, |
| 200 |
DependencyIndexes: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_depIdxs, |
| 201 |
MessageInfos: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes, |
| 202 |
}.Build() |
| 203 |
File_envoy_config_retry_previous_priorities_previous_priorities_config_proto = out.File |
| 204 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc = nil |
| 205 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_goTypes = nil |
| 206 |
file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_depIdxs = nil |
| 207 |
} |