github.com/google/cloudprober@v0.11.3/metrics/payload/proto/config.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.26.0 4 // protoc v3.17.3 5 // source: github.com/google/cloudprober/metrics/payload/proto/config.proto 6 7 package proto 8 9 import ( 10 proto "github.com/google/cloudprober/metrics/proto" 11 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 12 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 13 reflect "reflect" 14 sync "sync" 15 ) 16 17 const ( 18 // Verify that this generated code is sufficiently up-to-date. 19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 // Verify that runtime/protoimpl is sufficiently up-to-date. 21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 ) 23 24 // MetricsKind specifies whether to treat output metrics as GAUGE or 25 // CUMULATIVE. If left unspecified, metrics from ONCE mode probes are treated 26 // as GAUGE and metrics from SERVER mode probes are treated as CUMULATIVE. 27 type OutputMetricsOptions_MetricsKind int32 28 29 const ( 30 OutputMetricsOptions_UNDEFINED OutputMetricsOptions_MetricsKind = 0 31 OutputMetricsOptions_GAUGE OutputMetricsOptions_MetricsKind = 1 32 OutputMetricsOptions_CUMULATIVE OutputMetricsOptions_MetricsKind = 2 33 ) 34 35 // Enum value maps for OutputMetricsOptions_MetricsKind. 36 var ( 37 OutputMetricsOptions_MetricsKind_name = map[int32]string{ 38 0: "UNDEFINED", 39 1: "GAUGE", 40 2: "CUMULATIVE", 41 } 42 OutputMetricsOptions_MetricsKind_value = map[string]int32{ 43 "UNDEFINED": 0, 44 "GAUGE": 1, 45 "CUMULATIVE": 2, 46 } 47 ) 48 49 func (x OutputMetricsOptions_MetricsKind) Enum() *OutputMetricsOptions_MetricsKind { 50 p := new(OutputMetricsOptions_MetricsKind) 51 *p = x 52 return p 53 } 54 55 func (x OutputMetricsOptions_MetricsKind) String() string { 56 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 57 } 58 59 func (OutputMetricsOptions_MetricsKind) Descriptor() protoreflect.EnumDescriptor { 60 return file_github_com_google_cloudprober_metrics_payload_proto_config_proto_enumTypes[0].Descriptor() 61 } 62 63 func (OutputMetricsOptions_MetricsKind) Type() protoreflect.EnumType { 64 return &file_github_com_google_cloudprober_metrics_payload_proto_config_proto_enumTypes[0] 65 } 66 67 func (x OutputMetricsOptions_MetricsKind) Number() protoreflect.EnumNumber { 68 return protoreflect.EnumNumber(x) 69 } 70 71 // Deprecated: Do not use. 72 func (x *OutputMetricsOptions_MetricsKind) UnmarshalJSON(b []byte) error { 73 num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) 74 if err != nil { 75 return err 76 } 77 *x = OutputMetricsOptions_MetricsKind(num) 78 return nil 79 } 80 81 // Deprecated: Use OutputMetricsOptions_MetricsKind.Descriptor instead. 82 func (OutputMetricsOptions_MetricsKind) EnumDescriptor() ([]byte, []int) { 83 return file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescGZIP(), []int{0, 0} 84 } 85 86 type OutputMetricsOptions struct { 87 state protoimpl.MessageState 88 sizeCache protoimpl.SizeCache 89 unknownFields protoimpl.UnknownFields 90 91 MetricsKind *OutputMetricsOptions_MetricsKind `protobuf:"varint,1,opt,name=metrics_kind,json=metricsKind,enum=cloudprober.metrics.payload.OutputMetricsOptions_MetricsKind" json:"metrics_kind,omitempty"` 92 // Additional labels (comma-separated) to attach to the output metrics, e.g. 93 // "region=us-east1,zone=us-east1-d". ptype="external" and probe="<probeName>" 94 // are attached automatically. 95 AdditionalLabels *string `protobuf:"bytes,2,opt,name=additional_labels,json=additionalLabels" json:"additional_labels,omitempty"` 96 // Whether to aggregate metrics in Cloudprober. If enabled, Cloudprober 97 // aggregates the metrics returned by the external probe process -- external 98 // probe process should return metrics only since the last probe run. 99 // Note that this option is mutually exclusive with GAUGE metrics and 100 // cloudprober will fail during initialization if both options are enabled. 101 AggregateInCloudprober *bool `protobuf:"varint,3,opt,name=aggregate_in_cloudprober,json=aggregateInCloudprober,def=0" json:"aggregate_in_cloudprober,omitempty"` 102 // Metrics that should be treated as distributions. These metrics are exported 103 // by the external probe program as comma-separated list of values, for 104 // example: "op_latency 4.7,5.6,5.9,6.1,4.9". To be able to build distribution 105 // from these values, these metrics should be pre-configured in external 106 // probe: 107 // dist_metric { 108 // key: "op_latency" 109 // value { 110 // explicit_buckets: "1,2,4,8,16,32,64,128,256" 111 // } 112 // } 113 DistMetric map[string]*proto.Dist `protobuf:"bytes,4,rep,name=dist_metric,json=distMetric" json:"dist_metric,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` 114 } 115 116 // Default values for OutputMetricsOptions fields. 117 const ( 118 Default_OutputMetricsOptions_AggregateInCloudprober = bool(false) 119 ) 120 121 func (x *OutputMetricsOptions) Reset() { 122 *x = OutputMetricsOptions{} 123 if protoimpl.UnsafeEnabled { 124 mi := &file_github_com_google_cloudprober_metrics_payload_proto_config_proto_msgTypes[0] 125 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 126 ms.StoreMessageInfo(mi) 127 } 128 } 129 130 func (x *OutputMetricsOptions) String() string { 131 return protoimpl.X.MessageStringOf(x) 132 } 133 134 func (*OutputMetricsOptions) ProtoMessage() {} 135 136 func (x *OutputMetricsOptions) ProtoReflect() protoreflect.Message { 137 mi := &file_github_com_google_cloudprober_metrics_payload_proto_config_proto_msgTypes[0] 138 if protoimpl.UnsafeEnabled && x != nil { 139 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 140 if ms.LoadMessageInfo() == nil { 141 ms.StoreMessageInfo(mi) 142 } 143 return ms 144 } 145 return mi.MessageOf(x) 146 } 147 148 // Deprecated: Use OutputMetricsOptions.ProtoReflect.Descriptor instead. 149 func (*OutputMetricsOptions) Descriptor() ([]byte, []int) { 150 return file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescGZIP(), []int{0} 151 } 152 153 func (x *OutputMetricsOptions) GetMetricsKind() OutputMetricsOptions_MetricsKind { 154 if x != nil && x.MetricsKind != nil { 155 return *x.MetricsKind 156 } 157 return OutputMetricsOptions_UNDEFINED 158 } 159 160 func (x *OutputMetricsOptions) GetAdditionalLabels() string { 161 if x != nil && x.AdditionalLabels != nil { 162 return *x.AdditionalLabels 163 } 164 return "" 165 } 166 167 func (x *OutputMetricsOptions) GetAggregateInCloudprober() bool { 168 if x != nil && x.AggregateInCloudprober != nil { 169 return *x.AggregateInCloudprober 170 } 171 return Default_OutputMetricsOptions_AggregateInCloudprober 172 } 173 174 func (x *OutputMetricsOptions) GetDistMetric() map[string]*proto.Dist { 175 if x != nil { 176 return x.DistMetric 177 } 178 return nil 179 } 180 181 var File_github_com_google_cloudprober_metrics_payload_proto_config_proto protoreflect.FileDescriptor 182 183 var file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDesc = []byte{ 184 0x0a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 185 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 186 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 187 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 188 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 189 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 190 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 191 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x6d, 192 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x69, 0x73, 193 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x03, 0x0a, 0x14, 0x4f, 0x75, 0x74, 0x70, 194 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 195 0x12, 0x60, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6b, 0x69, 0x6e, 0x64, 196 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 197 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x61, 0x79, 198 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 199 0x63, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 200 0x73, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4b, 0x69, 201 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 202 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 203 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 204 0x3f, 0x0a, 0x18, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x5f, 205 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 206 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x16, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 207 0x61, 0x74, 0x65, 0x49, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 208 0x12, 0x62, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 209 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 210 0x62, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x61, 0x79, 0x6c, 211 0x6f, 0x61, 0x64, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 212 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 213 0x72, 0x69, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x4d, 0x65, 214 0x74, 0x72, 0x69, 0x63, 0x1a, 0x58, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x72, 215 0x69, 0x63, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 216 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 217 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 218 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x44, 219 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x37, 220 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0d, 0x0a, 221 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 222 0x47, 0x41, 0x55, 0x47, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x55, 0x4d, 0x55, 0x4c, 223 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 224 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 225 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 226 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 227 } 228 229 var ( 230 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescOnce sync.Once 231 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescData = file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDesc 232 ) 233 234 func file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescGZIP() []byte { 235 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescOnce.Do(func() { 236 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescData) 237 }) 238 return file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDescData 239 } 240 241 var file_github_com_google_cloudprober_metrics_payload_proto_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 242 var file_github_com_google_cloudprober_metrics_payload_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 243 var file_github_com_google_cloudprober_metrics_payload_proto_config_proto_goTypes = []interface{}{ 244 (OutputMetricsOptions_MetricsKind)(0), // 0: cloudprober.metrics.payload.OutputMetricsOptions.MetricsKind 245 (*OutputMetricsOptions)(nil), // 1: cloudprober.metrics.payload.OutputMetricsOptions 246 nil, // 2: cloudprober.metrics.payload.OutputMetricsOptions.DistMetricEntry 247 (*proto.Dist)(nil), // 3: cloudprober.metrics.Dist 248 } 249 var file_github_com_google_cloudprober_metrics_payload_proto_config_proto_depIdxs = []int32{ 250 0, // 0: cloudprober.metrics.payload.OutputMetricsOptions.metrics_kind:type_name -> cloudprober.metrics.payload.OutputMetricsOptions.MetricsKind 251 2, // 1: cloudprober.metrics.payload.OutputMetricsOptions.dist_metric:type_name -> cloudprober.metrics.payload.OutputMetricsOptions.DistMetricEntry 252 3, // 2: cloudprober.metrics.payload.OutputMetricsOptions.DistMetricEntry.value:type_name -> cloudprober.metrics.Dist 253 3, // [3:3] is the sub-list for method output_type 254 3, // [3:3] is the sub-list for method input_type 255 3, // [3:3] is the sub-list for extension type_name 256 3, // [3:3] is the sub-list for extension extendee 257 0, // [0:3] is the sub-list for field type_name 258 } 259 260 func init() { file_github_com_google_cloudprober_metrics_payload_proto_config_proto_init() } 261 func file_github_com_google_cloudprober_metrics_payload_proto_config_proto_init() { 262 if File_github_com_google_cloudprober_metrics_payload_proto_config_proto != nil { 263 return 264 } 265 if !protoimpl.UnsafeEnabled { 266 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 267 switch v := v.(*OutputMetricsOptions); i { 268 case 0: 269 return &v.state 270 case 1: 271 return &v.sizeCache 272 case 2: 273 return &v.unknownFields 274 default: 275 return nil 276 } 277 } 278 } 279 type x struct{} 280 out := protoimpl.TypeBuilder{ 281 File: protoimpl.DescBuilder{ 282 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 283 RawDescriptor: file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDesc, 284 NumEnums: 1, 285 NumMessages: 2, 286 NumExtensions: 0, 287 NumServices: 0, 288 }, 289 GoTypes: file_github_com_google_cloudprober_metrics_payload_proto_config_proto_goTypes, 290 DependencyIndexes: file_github_com_google_cloudprober_metrics_payload_proto_config_proto_depIdxs, 291 EnumInfos: file_github_com_google_cloudprober_metrics_payload_proto_config_proto_enumTypes, 292 MessageInfos: file_github_com_google_cloudprober_metrics_payload_proto_config_proto_msgTypes, 293 }.Build() 294 File_github_com_google_cloudprober_metrics_payload_proto_config_proto = out.File 295 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_rawDesc = nil 296 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_goTypes = nil 297 file_github_com_google_cloudprober_metrics_payload_proto_config_proto_depIdxs = nil 298 }