github.com/google/cloudprober@v0.11.3/surfacers/prometheus/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/surfacers/prometheus/proto/config.proto
     6  
     7  package proto
     8  
     9  import (
    10  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    11  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    12  	reflect "reflect"
    13  	sync "sync"
    14  )
    15  
    16  const (
    17  	// Verify that this generated code is sufficiently up-to-date.
    18  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    19  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    20  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    21  )
    22  
    23  type SurfacerConf struct {
    24  	state         protoimpl.MessageState
    25  	sizeCache     protoimpl.SizeCache
    26  	unknownFields protoimpl.UnknownFields
    27  
    28  	// How many metrics entries (EventMetrics) to buffer. Incoming metrics
    29  	// processing is paused while serving data to prometheus. This buffer is to
    30  	// make writes to prometheus surfacer non-blocking.
    31  	// NOTE: This field is confusing for users and will be removed from the config
    32  	// after v0.10.3.
    33  	MetricsBufferSize *int64 `protobuf:"varint,1,opt,name=metrics_buffer_size,json=metricsBufferSize,def=10000" json:"metrics_buffer_size,omitempty"`
    34  	// Whether to include timestamps in metrics. If enabled (default) each metric
    35  	// string includes the metric timestamp as recorded in the EventMetric.
    36  	// Prometheus associates the scraped values with this timestamp. If disabled,
    37  	// i.e. timestamps are not exported, prometheus associates scraped values with
    38  	// scrape timestamp.
    39  	IncludeTimestamp *bool `protobuf:"varint,2,opt,name=include_timestamp,json=includeTimestamp,def=1" json:"include_timestamp,omitempty"`
    40  	// URL that prometheus scrapes metrics from.
    41  	MetricsUrl *string `protobuf:"bytes,3,opt,name=metrics_url,json=metricsUrl,def=/metrics" json:"metrics_url,omitempty"`
    42  	// Prefix to add to all metric names. For example setting this field to
    43  	// "cloudprober_" will result in metrics with names:
    44  	// cloudprober_total, cloudprober_success, cloudprober_latency, ..
    45  	MetricsPrefix *string `protobuf:"bytes,4,opt,name=metrics_prefix,json=metricsPrefix" json:"metrics_prefix,omitempty"`
    46  }
    47  
    48  // Default values for SurfacerConf fields.
    49  const (
    50  	Default_SurfacerConf_MetricsBufferSize = int64(10000)
    51  	Default_SurfacerConf_IncludeTimestamp  = bool(true)
    52  	Default_SurfacerConf_MetricsUrl        = string("/metrics")
    53  )
    54  
    55  func (x *SurfacerConf) Reset() {
    56  	*x = SurfacerConf{}
    57  	if protoimpl.UnsafeEnabled {
    58  		mi := &file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_msgTypes[0]
    59  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    60  		ms.StoreMessageInfo(mi)
    61  	}
    62  }
    63  
    64  func (x *SurfacerConf) String() string {
    65  	return protoimpl.X.MessageStringOf(x)
    66  }
    67  
    68  func (*SurfacerConf) ProtoMessage() {}
    69  
    70  func (x *SurfacerConf) ProtoReflect() protoreflect.Message {
    71  	mi := &file_github_com_google_cloudprober_surfacers_prometheus_proto_config_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 SurfacerConf.ProtoReflect.Descriptor instead.
    83  func (*SurfacerConf) Descriptor() ([]byte, []int) {
    84  	return file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescGZIP(), []int{0}
    85  }
    86  
    87  func (x *SurfacerConf) GetMetricsBufferSize() int64 {
    88  	if x != nil && x.MetricsBufferSize != nil {
    89  		return *x.MetricsBufferSize
    90  	}
    91  	return Default_SurfacerConf_MetricsBufferSize
    92  }
    93  
    94  func (x *SurfacerConf) GetIncludeTimestamp() bool {
    95  	if x != nil && x.IncludeTimestamp != nil {
    96  		return *x.IncludeTimestamp
    97  	}
    98  	return Default_SurfacerConf_IncludeTimestamp
    99  }
   100  
   101  func (x *SurfacerConf) GetMetricsUrl() string {
   102  	if x != nil && x.MetricsUrl != nil {
   103  		return *x.MetricsUrl
   104  	}
   105  	return Default_SurfacerConf_MetricsUrl
   106  }
   107  
   108  func (x *SurfacerConf) GetMetricsPrefix() string {
   109  	if x != nil && x.MetricsPrefix != nil {
   110  		return *x.MetricsPrefix
   111  	}
   112  	return ""
   113  }
   114  
   115  var File_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto protoreflect.FileDescriptor
   116  
   117  var file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDesc = []byte{
   118  	0x0a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f,
   119  	0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f,
   120  	0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74,
   121  	0x68, 0x65, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
   122  	0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72,
   123  	0x6f, 0x62, 0x65, 0x72, 0x2e, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72,
   124  	0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x72,
   125  	0x66, 0x61, 0x63, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x35, 0x0a, 0x13, 0x6d, 0x65, 0x74,
   126  	0x72, 0x69, 0x63, 0x73, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65,
   127  	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x3a, 0x05, 0x31, 0x30, 0x30, 0x30, 0x30, 0x52, 0x11, 0x6d,
   128  	0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65,
   129  	0x12, 0x31, 0x0a, 0x11, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
   130  	0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75,
   131  	0x65, 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
   132  	0x61, 0x6d, 0x70, 0x12, 0x29, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x75,
   133  	0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x08, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
   134  	0x63, 0x73, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x55, 0x72, 0x6c, 0x12, 0x25,
   135  	0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78,
   136  	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50,
   137  	0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
   138  	0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64,
   139  	0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x73, 0x75, 0x72, 0x66, 0x61, 0x63, 0x65, 0x72, 0x73,
   140  	0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74,
   141  	0x6f,
   142  }
   143  
   144  var (
   145  	file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescOnce sync.Once
   146  	file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescData = file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDesc
   147  )
   148  
   149  func file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescGZIP() []byte {
   150  	file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescOnce.Do(func() {
   151  		file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescData)
   152  	})
   153  	return file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDescData
   154  }
   155  
   156  var file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   157  var file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_goTypes = []interface{}{
   158  	(*SurfacerConf)(nil), // 0: cloudprober.surfacer.prometheus.SurfacerConf
   159  }
   160  var file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_depIdxs = []int32{
   161  	0, // [0:0] is the sub-list for method output_type
   162  	0, // [0:0] is the sub-list for method input_type
   163  	0, // [0:0] is the sub-list for extension type_name
   164  	0, // [0:0] is the sub-list for extension extendee
   165  	0, // [0:0] is the sub-list for field type_name
   166  }
   167  
   168  func init() { file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_init() }
   169  func file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_init() {
   170  	if File_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto != nil {
   171  		return
   172  	}
   173  	if !protoimpl.UnsafeEnabled {
   174  		file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   175  			switch v := v.(*SurfacerConf); i {
   176  			case 0:
   177  				return &v.state
   178  			case 1:
   179  				return &v.sizeCache
   180  			case 2:
   181  				return &v.unknownFields
   182  			default:
   183  				return nil
   184  			}
   185  		}
   186  	}
   187  	type x struct{}
   188  	out := protoimpl.TypeBuilder{
   189  		File: protoimpl.DescBuilder{
   190  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   191  			RawDescriptor: file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDesc,
   192  			NumEnums:      0,
   193  			NumMessages:   1,
   194  			NumExtensions: 0,
   195  			NumServices:   0,
   196  		},
   197  		GoTypes:           file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_goTypes,
   198  		DependencyIndexes: file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_depIdxs,
   199  		MessageInfos:      file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_msgTypes,
   200  	}.Build()
   201  	File_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto = out.File
   202  	file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_rawDesc = nil
   203  	file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_goTypes = nil
   204  	file_github_com_google_cloudprober_surfacers_prometheus_proto_config_proto_depIdxs = nil
   205  }