github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.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/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto 6 7 package envoy_extensions_matching_input_matchers_consistent_hashing_v3 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 // The consistent hashing matchers computes a consistent hash from the input and matches if the resulting hash 31 // is within the configured threshold. 32 // More specifically, this matcher evaluates to true if hash(input, seed) % modulo >= threshold. 33 // Note that the consistency of the match result relies on the internal hash function (xxhash) remaining 34 // unchanged. While this is unlikely to happen intentionally, this could cause inconsistent match results 35 // between deployments. 36 type ConsistentHashing struct { 37 state protoimpl.MessageState 38 sizeCache protoimpl.SizeCache 39 unknownFields protoimpl.UnknownFields 40 41 // The threshold the resulting hash must be over in order for this matcher to evaluate to true. 42 // This value must be below the configured modulo value. 43 // Setting this to 0 is equivalent to this matcher always matching. 44 Threshold uint32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"` 45 // The value to use for the modulus in the calculation. This effectively bounds the hash output, 46 // specifying the range of possible values. 47 // This value must be above the configured threshold. 48 Modulo uint32 `protobuf:"varint,2,opt,name=modulo,proto3" json:"modulo,omitempty"` 49 // Optional seed passed through the hash function. This allows using additional information when computing 50 // the hash value: by changing the seed value, a different partition of matching and non-matching inputs will 51 // be created that remains consistent for that seed value. 52 Seed uint64 `protobuf:"varint,3,opt,name=seed,proto3" json:"seed,omitempty"` 53 } 54 55 func (x *ConsistentHashing) Reset() { 56 *x = ConsistentHashing{} 57 if protoimpl.UnsafeEnabled { 58 mi := &file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0] 59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 60 ms.StoreMessageInfo(mi) 61 } 62 } 63 64 func (x *ConsistentHashing) String() string { 65 return protoimpl.X.MessageStringOf(x) 66 } 67 68 func (*ConsistentHashing) ProtoMessage() {} 69 70 func (x *ConsistentHashing) ProtoReflect() protoreflect.Message { 71 mi := &file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0] 72 if protoimpl.UnsafeEnabled && x != nil { 73 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 74 if ms.LoadMessageInfo() == nil { 75 ms.StoreMessageInfo(mi) 76 } 77 return ms 78 } 79 return mi.MessageOf(x) 80 } 81 82 // Deprecated: Use ConsistentHashing.ProtoReflect.Descriptor instead. 83 func (*ConsistentHashing) Descriptor() ([]byte, []int) { 84 return file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescGZIP(), []int{0} 85 } 86 87 func (x *ConsistentHashing) GetThreshold() uint32 { 88 if x != nil { 89 return x.Threshold 90 } 91 return 0 92 } 93 94 func (x *ConsistentHashing) GetModulo() uint32 { 95 if x != nil { 96 return x.Modulo 97 } 98 return 0 99 } 100 101 func (x *ConsistentHashing) GetSeed() uint64 { 102 if x != nil { 103 return x.Seed 104 } 105 return 0 106 } 107 108 var File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto protoreflect.FileDescriptor 109 110 var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc = []byte{ 111 0x0a, 0x57, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 112 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x70, 0x75, 113 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, 114 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 115 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 116 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 117 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 118 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 119 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 120 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 121 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 122 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 123 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 124 0x6f, 0x22, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 125 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 126 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 127 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x6f, 0x18, 0x02, 128 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x06, 0x6d, 129 0x6f, 0x64, 0x75, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 130 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x42, 0x70, 0x0a, 0x4c, 0x69, 0x6f, 0x2e, 131 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 132 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 133 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 134 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 135 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x43, 0x6f, 0x6e, 0x73, 0x69, 136 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 137 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 138 0x74, 0x6f, 0x33, 139 } 140 141 var ( 142 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescOnce sync.Once 143 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData = file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc 144 ) 145 146 func file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescGZIP() []byte { 147 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescOnce.Do(func() { 148 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData) 149 }) 150 return file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData 151 } 152 153 var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 154 var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes = []interface{}{ 155 (*ConsistentHashing)(nil), // 0: envoy.extensions.matching.input_matchers.consistent_hashing.v3.ConsistentHashing 156 } 157 var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs = []int32{ 158 0, // [0:0] is the sub-list for method output_type 159 0, // [0:0] is the sub-list for method input_type 160 0, // [0:0] is the sub-list for extension type_name 161 0, // [0:0] is the sub-list for extension extendee 162 0, // [0:0] is the sub-list for field type_name 163 } 164 165 func init() { 166 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_init() 167 } 168 func file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_init() { 169 if File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto != nil { 170 return 171 } 172 if !protoimpl.UnsafeEnabled { 173 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 174 switch v := v.(*ConsistentHashing); i { 175 case 0: 176 return &v.state 177 case 1: 178 return &v.sizeCache 179 case 2: 180 return &v.unknownFields 181 default: 182 return nil 183 } 184 } 185 } 186 type x struct{} 187 out := protoimpl.TypeBuilder{ 188 File: protoimpl.DescBuilder{ 189 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 190 RawDescriptor: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc, 191 NumEnums: 0, 192 NumMessages: 1, 193 NumExtensions: 0, 194 NumServices: 0, 195 }, 196 GoTypes: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes, 197 DependencyIndexes: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs, 198 MessageInfos: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes, 199 }.Build() 200 File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto = out.File 201 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc = nil 202 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes = nil 203 file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs = nil 204 }