github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go (about)

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