1// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: mixer/adapter/statsd/config/config.proto
3
4// The `statsd` adapter enables Istio to deliver metric data to a
5// [StatsD](https://github.com/etsy/statsd) monitoring backend.
6//
7// This adapter supports the [metric template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/metric/).
8
9package config
10
11import (
12	encoding_binary "encoding/binary"
13	fmt "fmt"
14	_ "github.com/gogo/protobuf/gogoproto"
15	proto "github.com/gogo/protobuf/proto"
16	github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
17	_ "github.com/gogo/protobuf/types"
18	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
19	io "io"
20	math "math"
21	math_bits "math/bits"
22	reflect "reflect"
23	strconv "strconv"
24	strings "strings"
25	time "time"
26)
27
28// Reference imports to suppress errors if they are not otherwise used.
29var _ = proto.Marshal
30var _ = fmt.Errorf
31var _ = math.Inf
32var _ = time.Kitchen
33
34// This is a compile-time assertion to ensure that this generated file
35// is compatible with the proto package it is being compiled against.
36// A compilation error at this line likely means your copy of the
37// proto package needs to be updated.
38const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
39
40// The type of metric.
41type Params_MetricInfo_Type int32
42
43const (
44	UNKNOWN      Params_MetricInfo_Type = 0
45	COUNTER      Params_MetricInfo_Type = 1
46	GAUGE        Params_MetricInfo_Type = 2
47	DISTRIBUTION Params_MetricInfo_Type = 3
48)
49
50var Params_MetricInfo_Type_name = map[int32]string{
51	0: "UNKNOWN",
52	1: "COUNTER",
53	2: "GAUGE",
54	3: "DISTRIBUTION",
55}
56
57var Params_MetricInfo_Type_value = map[string]int32{
58	"UNKNOWN":      0,
59	"COUNTER":      1,
60	"GAUGE":        2,
61	"DISTRIBUTION": 3,
62}
63
64func (Params_MetricInfo_Type) EnumDescriptor() ([]byte, []int) {
65	return fileDescriptor_ff30cbfcd304f9cd, []int{0, 0, 0}
66}
67
68// Configuration format for the `statsd` adapter.
69type Params struct {
70	// Address of the statsd server, e.g. localhost:8125
71	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
72	// Metric prefix, do not specify for no prefix
73	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
74	// FlushDuration controls the maximum amount of time between sending metrics to the statsd collection server.
75	// Metrics are reported when either flush_bytes is full or flush_duration time has elapsed since the last report.
76	FlushDuration time.Duration `protobuf:"bytes,3,opt,name=flush_duration,json=flushDuration,proto3,stdduration" json:"flush_duration"`
77	// Maximum UDP packet size to send; if not specified defaults to 512 bytes. If the statsd server is running on the
78	// same (private) network 1432 bytes is recommended for better performance.
79	FlushBytes int32 `protobuf:"varint,4,opt,name=flush_bytes,json=flushBytes,proto3" json:"flush_bytes,omitempty"`
80	// Chance that any particular metric is sampled when incremented; can take the range [0, 1], defaults to 1 if unspecified.
81	SamplingRate float32 `protobuf:"fixed32,5,opt,name=sampling_rate,json=samplingRate,proto3" json:"sampling_rate,omitempty"`
82	// Map of metric name -> info. If a metric's name is not in the map then the metric will not be exported to statsd.
83	Metrics map[string]*Params_MetricInfo `protobuf:"bytes,6,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
84}
85
86func (m *Params) Reset()      { *m = Params{} }
87func (*Params) ProtoMessage() {}
88func (*Params) Descriptor() ([]byte, []int) {
89	return fileDescriptor_ff30cbfcd304f9cd, []int{0}
90}
91func (m *Params) XXX_Unmarshal(b []byte) error {
92	return m.Unmarshal(b)
93}
94func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
95	if deterministic {
96		return xxx_messageInfo_Params.Marshal(b, m, deterministic)
97	} else {
98		b = b[:cap(b)]
99		n, err := m.MarshalToSizedBuffer(b)
100		if err != nil {
101			return nil, err
102		}
103		return b[:n], nil
104	}
105}
106func (m *Params) XXX_Merge(src proto.Message) {
107	xxx_messageInfo_Params.Merge(m, src)
108}
109func (m *Params) XXX_Size() int {
110	return m.Size()
111}
112func (m *Params) XXX_DiscardUnknown() {
113	xxx_messageInfo_Params.DiscardUnknown(m)
114}
115
116var xxx_messageInfo_Params proto.InternalMessageInfo
117
118// Describes how to represent this metric in statsd
119type Params_MetricInfo struct {
120	Type Params_MetricInfo_Type `protobuf:"varint,1,opt,name=type,proto3,enum=adapter.statsd.config.Params_MetricInfo_Type" json:"type,omitempty"`
121	// The template will be filled with values from the metric's labels and the resulting string will be used as
122	// the statsd metric name. This allows easier creation of statsd metrics like `action_name-response_code`.
123	// The template strings must conform to go's text/template syntax. For the example of `action_name-response_code`,
124	// we use the template:
125	//    `{{.apiMethod}}-{{.responseCode}}`
126	//
127	// If name_template is the empty string the Istio metric name will be used for statsd metric's name.
128	NameTemplate string `protobuf:"bytes,2,opt,name=name_template,json=nameTemplate,proto3" json:"name_template,omitempty"`
129}
130
131func (m *Params_MetricInfo) Reset()      { *m = Params_MetricInfo{} }
132func (*Params_MetricInfo) ProtoMessage() {}
133func (*Params_MetricInfo) Descriptor() ([]byte, []int) {
134	return fileDescriptor_ff30cbfcd304f9cd, []int{0, 0}
135}
136func (m *Params_MetricInfo) XXX_Unmarshal(b []byte) error {
137	return m.Unmarshal(b)
138}
139func (m *Params_MetricInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
140	if deterministic {
141		return xxx_messageInfo_Params_MetricInfo.Marshal(b, m, deterministic)
142	} else {
143		b = b[:cap(b)]
144		n, err := m.MarshalToSizedBuffer(b)
145		if err != nil {
146			return nil, err
147		}
148		return b[:n], nil
149	}
150}
151func (m *Params_MetricInfo) XXX_Merge(src proto.Message) {
152	xxx_messageInfo_Params_MetricInfo.Merge(m, src)
153}
154func (m *Params_MetricInfo) XXX_Size() int {
155	return m.Size()
156}
157func (m *Params_MetricInfo) XXX_DiscardUnknown() {
158	xxx_messageInfo_Params_MetricInfo.DiscardUnknown(m)
159}
160
161var xxx_messageInfo_Params_MetricInfo proto.InternalMessageInfo
162
163func init() {
164	proto.RegisterEnum("adapter.statsd.config.Params_MetricInfo_Type", Params_MetricInfo_Type_name, Params_MetricInfo_Type_value)
165	proto.RegisterType((*Params)(nil), "adapter.statsd.config.Params")
166	proto.RegisterMapType((map[string]*Params_MetricInfo)(nil), "adapter.statsd.config.Params.MetricsEntry")
167	proto.RegisterType((*Params_MetricInfo)(nil), "adapter.statsd.config.Params.MetricInfo")
168}
169
170func init() {
171	proto.RegisterFile("mixer/adapter/statsd/config/config.proto", fileDescriptor_ff30cbfcd304f9cd)
172}
173
174var fileDescriptor_ff30cbfcd304f9cd = []byte{
175	// 501 bytes of a gzipped FileDescriptorProto
176	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xbd, 0x8e, 0xd3, 0x40,
177	0x10, 0xde, 0xcd, 0x2f, 0xb7, 0xc9, 0x9d, 0xac, 0x15, 0x20, 0x93, 0x62, 0x13, 0x1d, 0x8d, 0x85,
178	0xc4, 0x5a, 0x0a, 0x0d, 0x42, 0x02, 0x71, 0x21, 0xd1, 0x29, 0x20, 0x12, 0xb4, 0x24, 0x42, 0xa2,
179	0x89, 0x36, 0xe7, 0x8d, 0xb1, 0x88, 0x7f, 0xb4, 0xde, 0xa0, 0x73, 0xc7, 0x23, 0x50, 0xf2, 0x08,
180	0x54, 0x34, 0xbc, 0x44, 0xca, 0x94, 0x57, 0x01, 0x71, 0x1a, 0xca, 0x7b, 0x04, 0x64, 0xaf, 0x2d,
181	0x51, 0x50, 0x5c, 0xe5, 0x99, 0x6f, 0xbe, 0x6f, 0xe6, 0x9b, 0xf1, 0x22, 0xcb, 0xf7, 0x2e, 0x85,
182	0xb4, 0xb9, 0xc3, 0x23, 0x25, 0xa4, 0x1d, 0x2b, 0xae, 0x62, 0xc7, 0xbe, 0x08, 0x83, 0x95, 0xe7,
183	0x16, 0x1f, 0x1a, 0xc9, 0x50, 0x85, 0xf8, 0x4e, 0xc1, 0xa1, 0x9a, 0x43, 0x75, 0xb1, 0x43, 0xdc,
184	0x30, 0x74, 0xd7, 0xc2, 0xce, 0x49, 0xcb, 0xcd, 0xca, 0x76, 0x36, 0x92, 0x2b, 0x2f, 0x0c, 0xb4,
185	0xac, 0x73, 0xdb, 0x0d, 0xdd, 0x30, 0x0f, 0xed, 0x2c, 0xd2, 0xe8, 0xe9, 0xf7, 0x1a, 0x6a, 0xbc,
186	0xe1, 0x92, 0xfb, 0x31, 0x36, 0x51, 0x93, 0x3b, 0x8e, 0x14, 0x71, 0x6c, 0xc2, 0x1e, 0xb4, 0x8e,
187	0x58, 0x99, 0xe2, 0xbb, 0xa8, 0x11, 0x49, 0xb1, 0xf2, 0x2e, 0xcd, 0x4a, 0x5e, 0x28, 0x32, 0xfc,
188	0x12, 0x9d, 0xac, 0xd6, 0x9b, 0xf8, 0xc3, 0xa2, 0x1c, 0x65, 0x56, 0x7b, 0xd0, 0x6a, 0xf5, 0xef,
189	0x51, 0xed, 0x85, 0x96, 0x5e, 0xe8, 0xb0, 0x20, 0x0c, 0x6e, 0x6d, 0x7f, 0x76, 0xc1, 0xd7, 0x5f,
190	0x5d, 0xc8, 0x8e, 0x73, 0x69, 0x59, 0xc0, 0x5d, 0xd4, 0xd2, 0xbd, 0x96, 0x89, 0x12, 0xb1, 0x59,
191	0xeb, 0x41, 0xab, 0xce, 0x50, 0x0e, 0x0d, 0x32, 0x04, 0xdf, 0x47, 0xc7, 0x31, 0xf7, 0xa3, 0xb5,
192	0x17, 0xb8, 0x0b, 0xc9, 0x95, 0x30, 0xeb, 0x3d, 0x68, 0x55, 0x58, 0xbb, 0x04, 0x19, 0x57, 0x02,
193	0x0f, 0x51, 0xd3, 0x17, 0x4a, 0x7a, 0x17, 0xb1, 0xd9, 0xe8, 0x55, 0xad, 0x56, 0xff, 0x01, 0xfd,
194	0xef, 0xb5, 0xa8, 0xde, 0x99, 0xbe, 0xd6, 0xe4, 0x51, 0xa0, 0x64, 0xc2, 0x4a, 0x69, 0xe7, 0x07,
195	0x44, 0x48, 0x57, 0xc6, 0xc1, 0x2a, 0xc4, 0x67, 0xa8, 0xa6, 0x92, 0x48, 0xe4, 0x57, 0x39, 0xe9,
196	0x3f, 0xbc, 0x49, 0xc7, 0x4c, 0x47, 0x67, 0x49, 0x24, 0x58, 0x2e, 0xcd, 0xcc, 0x07, 0xdc, 0x17,
197	0x0b, 0x25, 0xfc, 0x68, 0x9d, 0x99, 0xd7, 0x87, 0x6c, 0x67, 0xe0, 0xac, 0xc0, 0x4e, 0x9f, 0xa2,
198	0x5a, 0x26, 0xc1, 0x2d, 0xd4, 0x9c, 0x4f, 0x5e, 0x4d, 0xa6, 0xef, 0x26, 0x06, 0xc8, 0x92, 0x17,
199	0xd3, 0xf9, 0x64, 0x36, 0x62, 0x06, 0xc4, 0x47, 0xa8, 0x7e, 0x7e, 0x36, 0x3f, 0x1f, 0x19, 0x15,
200	0x6c, 0xa0, 0xf6, 0x70, 0xfc, 0x76, 0xc6, 0xc6, 0x83, 0xf9, 0x6c, 0x3c, 0x9d, 0x18, 0xd5, 0x8e,
201	0x83, 0xda, 0xff, 0xae, 0x83, 0x0d, 0x54, 0xfd, 0x28, 0x92, 0xe2, 0x5f, 0x66, 0x21, 0x7e, 0x86,
202	0xea, 0x9f, 0xf8, 0x7a, 0xa3, 0xa7, 0xb7, 0xfa, 0xd6, 0x4d, 0x37, 0x61, 0x5a, 0xf6, 0xa4, 0xf2,
203	0x18, 0x0e, 0x9e, 0x6f, 0xf7, 0x04, 0xec, 0xf6, 0x04, 0x5c, 0xed, 0x09, 0xb8, 0xde, 0x13, 0xf0,
204	0x39, 0x25, 0xf0, 0x5b, 0x4a, 0xc0, 0x36, 0x25, 0x70, 0x97, 0x12, 0xf8, 0x3b, 0x25, 0xf0, 0x4f,
205	0x4a, 0xc0, 0x75, 0x4a, 0xe0, 0x97, 0x03, 0x01, 0xbb, 0x03, 0x01, 0x57, 0x07, 0x02, 0xde, 0x37,
206	0x74, 0xfb, 0x65, 0x23, 0x7f, 0x15, 0x8f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x49, 0x63, 0xdc,
207	0x5a, 0xf2, 0x02, 0x00, 0x00,
208}
209
210func (x Params_MetricInfo_Type) String() string {
211	s, ok := Params_MetricInfo_Type_name[int32(x)]
212	if ok {
213		return s
214	}
215	return strconv.Itoa(int(x))
216}
217func (m *Params) Marshal() (dAtA []byte, err error) {
218	size := m.Size()
219	dAtA = make([]byte, size)
220	n, err := m.MarshalToSizedBuffer(dAtA[:size])
221	if err != nil {
222		return nil, err
223	}
224	return dAtA[:n], nil
225}
226
227func (m *Params) MarshalTo(dAtA []byte) (int, error) {
228	size := m.Size()
229	return m.MarshalToSizedBuffer(dAtA[:size])
230}
231
232func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
233	i := len(dAtA)
234	_ = i
235	var l int
236	_ = l
237	if len(m.Metrics) > 0 {
238		for k := range m.Metrics {
239			v := m.Metrics[k]
240			baseI := i
241			if v != nil {
242				{
243					size, err := v.MarshalToSizedBuffer(dAtA[:i])
244					if err != nil {
245						return 0, err
246					}
247					i -= size
248					i = encodeVarintConfig(dAtA, i, uint64(size))
249				}
250				i--
251				dAtA[i] = 0x12
252			}
253			i -= len(k)
254			copy(dAtA[i:], k)
255			i = encodeVarintConfig(dAtA, i, uint64(len(k)))
256			i--
257			dAtA[i] = 0xa
258			i = encodeVarintConfig(dAtA, i, uint64(baseI-i))
259			i--
260			dAtA[i] = 0x32
261		}
262	}
263	if m.SamplingRate != 0 {
264		i -= 4
265		encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SamplingRate))))
266		i--
267		dAtA[i] = 0x2d
268	}
269	if m.FlushBytes != 0 {
270		i = encodeVarintConfig(dAtA, i, uint64(m.FlushBytes))
271		i--
272		dAtA[i] = 0x20
273	}
274	n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.FlushDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.FlushDuration):])
275	if err2 != nil {
276		return 0, err2
277	}
278	i -= n2
279	i = encodeVarintConfig(dAtA, i, uint64(n2))
280	i--
281	dAtA[i] = 0x1a
282	if len(m.Prefix) > 0 {
283		i -= len(m.Prefix)
284		copy(dAtA[i:], m.Prefix)
285		i = encodeVarintConfig(dAtA, i, uint64(len(m.Prefix)))
286		i--
287		dAtA[i] = 0x12
288	}
289	if len(m.Address) > 0 {
290		i -= len(m.Address)
291		copy(dAtA[i:], m.Address)
292		i = encodeVarintConfig(dAtA, i, uint64(len(m.Address)))
293		i--
294		dAtA[i] = 0xa
295	}
296	return len(dAtA) - i, nil
297}
298
299func (m *Params_MetricInfo) Marshal() (dAtA []byte, err error) {
300	size := m.Size()
301	dAtA = make([]byte, size)
302	n, err := m.MarshalToSizedBuffer(dAtA[:size])
303	if err != nil {
304		return nil, err
305	}
306	return dAtA[:n], nil
307}
308
309func (m *Params_MetricInfo) MarshalTo(dAtA []byte) (int, error) {
310	size := m.Size()
311	return m.MarshalToSizedBuffer(dAtA[:size])
312}
313
314func (m *Params_MetricInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
315	i := len(dAtA)
316	_ = i
317	var l int
318	_ = l
319	if len(m.NameTemplate) > 0 {
320		i -= len(m.NameTemplate)
321		copy(dAtA[i:], m.NameTemplate)
322		i = encodeVarintConfig(dAtA, i, uint64(len(m.NameTemplate)))
323		i--
324		dAtA[i] = 0x12
325	}
326	if m.Type != 0 {
327		i = encodeVarintConfig(dAtA, i, uint64(m.Type))
328		i--
329		dAtA[i] = 0x8
330	}
331	return len(dAtA) - i, nil
332}
333
334func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
335	offset -= sovConfig(v)
336	base := offset
337	for v >= 1<<7 {
338		dAtA[offset] = uint8(v&0x7f | 0x80)
339		v >>= 7
340		offset++
341	}
342	dAtA[offset] = uint8(v)
343	return base
344}
345func (m *Params) Size() (n int) {
346	if m == nil {
347		return 0
348	}
349	var l int
350	_ = l
351	l = len(m.Address)
352	if l > 0 {
353		n += 1 + l + sovConfig(uint64(l))
354	}
355	l = len(m.Prefix)
356	if l > 0 {
357		n += 1 + l + sovConfig(uint64(l))
358	}
359	l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.FlushDuration)
360	n += 1 + l + sovConfig(uint64(l))
361	if m.FlushBytes != 0 {
362		n += 1 + sovConfig(uint64(m.FlushBytes))
363	}
364	if m.SamplingRate != 0 {
365		n += 5
366	}
367	if len(m.Metrics) > 0 {
368		for k, v := range m.Metrics {
369			_ = k
370			_ = v
371			l = 0
372			if v != nil {
373				l = v.Size()
374				l += 1 + sovConfig(uint64(l))
375			}
376			mapEntrySize := 1 + len(k) + sovConfig(uint64(len(k))) + l
377			n += mapEntrySize + 1 + sovConfig(uint64(mapEntrySize))
378		}
379	}
380	return n
381}
382
383func (m *Params_MetricInfo) Size() (n int) {
384	if m == nil {
385		return 0
386	}
387	var l int
388	_ = l
389	if m.Type != 0 {
390		n += 1 + sovConfig(uint64(m.Type))
391	}
392	l = len(m.NameTemplate)
393	if l > 0 {
394		n += 1 + l + sovConfig(uint64(l))
395	}
396	return n
397}
398
399func sovConfig(x uint64) (n int) {
400	return (math_bits.Len64(x|1) + 6) / 7
401}
402func sozConfig(x uint64) (n int) {
403	return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
404}
405func (this *Params) String() string {
406	if this == nil {
407		return "nil"
408	}
409	keysForMetrics := make([]string, 0, len(this.Metrics))
410	for k, _ := range this.Metrics {
411		keysForMetrics = append(keysForMetrics, k)
412	}
413	github_com_gogo_protobuf_sortkeys.Strings(keysForMetrics)
414	mapStringForMetrics := "map[string]*Params_MetricInfo{"
415	for _, k := range keysForMetrics {
416		mapStringForMetrics += fmt.Sprintf("%v: %v,", k, this.Metrics[k])
417	}
418	mapStringForMetrics += "}"
419	s := strings.Join([]string{`&Params{`,
420		`Address:` + fmt.Sprintf("%v", this.Address) + `,`,
421		`Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`,
422		`FlushDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.FlushDuration), "Duration", "types.Duration", 1), `&`, ``, 1) + `,`,
423		`FlushBytes:` + fmt.Sprintf("%v", this.FlushBytes) + `,`,
424		`SamplingRate:` + fmt.Sprintf("%v", this.SamplingRate) + `,`,
425		`Metrics:` + mapStringForMetrics + `,`,
426		`}`,
427	}, "")
428	return s
429}
430func (this *Params_MetricInfo) String() string {
431	if this == nil {
432		return "nil"
433	}
434	s := strings.Join([]string{`&Params_MetricInfo{`,
435		`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
436		`NameTemplate:` + fmt.Sprintf("%v", this.NameTemplate) + `,`,
437		`}`,
438	}, "")
439	return s
440}
441func valueToStringConfig(v interface{}) string {
442	rv := reflect.ValueOf(v)
443	if rv.IsNil() {
444		return "nil"
445	}
446	pv := reflect.Indirect(rv).Interface()
447	return fmt.Sprintf("*%v", pv)
448}
449func (m *Params) Unmarshal(dAtA []byte) error {
450	l := len(dAtA)
451	iNdEx := 0
452	for iNdEx < l {
453		preIndex := iNdEx
454		var wire uint64
455		for shift := uint(0); ; shift += 7 {
456			if shift >= 64 {
457				return ErrIntOverflowConfig
458			}
459			if iNdEx >= l {
460				return io.ErrUnexpectedEOF
461			}
462			b := dAtA[iNdEx]
463			iNdEx++
464			wire |= uint64(b&0x7F) << shift
465			if b < 0x80 {
466				break
467			}
468		}
469		fieldNum := int32(wire >> 3)
470		wireType := int(wire & 0x7)
471		if wireType == 4 {
472			return fmt.Errorf("proto: Params: wiretype end group for non-group")
473		}
474		if fieldNum <= 0 {
475			return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
476		}
477		switch fieldNum {
478		case 1:
479			if wireType != 2 {
480				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
481			}
482			var stringLen uint64
483			for shift := uint(0); ; shift += 7 {
484				if shift >= 64 {
485					return ErrIntOverflowConfig
486				}
487				if iNdEx >= l {
488					return io.ErrUnexpectedEOF
489				}
490				b := dAtA[iNdEx]
491				iNdEx++
492				stringLen |= uint64(b&0x7F) << shift
493				if b < 0x80 {
494					break
495				}
496			}
497			intStringLen := int(stringLen)
498			if intStringLen < 0 {
499				return ErrInvalidLengthConfig
500			}
501			postIndex := iNdEx + intStringLen
502			if postIndex < 0 {
503				return ErrInvalidLengthConfig
504			}
505			if postIndex > l {
506				return io.ErrUnexpectedEOF
507			}
508			m.Address = string(dAtA[iNdEx:postIndex])
509			iNdEx = postIndex
510		case 2:
511			if wireType != 2 {
512				return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
513			}
514			var stringLen uint64
515			for shift := uint(0); ; shift += 7 {
516				if shift >= 64 {
517					return ErrIntOverflowConfig
518				}
519				if iNdEx >= l {
520					return io.ErrUnexpectedEOF
521				}
522				b := dAtA[iNdEx]
523				iNdEx++
524				stringLen |= uint64(b&0x7F) << shift
525				if b < 0x80 {
526					break
527				}
528			}
529			intStringLen := int(stringLen)
530			if intStringLen < 0 {
531				return ErrInvalidLengthConfig
532			}
533			postIndex := iNdEx + intStringLen
534			if postIndex < 0 {
535				return ErrInvalidLengthConfig
536			}
537			if postIndex > l {
538				return io.ErrUnexpectedEOF
539			}
540			m.Prefix = string(dAtA[iNdEx:postIndex])
541			iNdEx = postIndex
542		case 3:
543			if wireType != 2 {
544				return fmt.Errorf("proto: wrong wireType = %d for field FlushDuration", wireType)
545			}
546			var msglen int
547			for shift := uint(0); ; shift += 7 {
548				if shift >= 64 {
549					return ErrIntOverflowConfig
550				}
551				if iNdEx >= l {
552					return io.ErrUnexpectedEOF
553				}
554				b := dAtA[iNdEx]
555				iNdEx++
556				msglen |= int(b&0x7F) << shift
557				if b < 0x80 {
558					break
559				}
560			}
561			if msglen < 0 {
562				return ErrInvalidLengthConfig
563			}
564			postIndex := iNdEx + msglen
565			if postIndex < 0 {
566				return ErrInvalidLengthConfig
567			}
568			if postIndex > l {
569				return io.ErrUnexpectedEOF
570			}
571			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.FlushDuration, dAtA[iNdEx:postIndex]); err != nil {
572				return err
573			}
574			iNdEx = postIndex
575		case 4:
576			if wireType != 0 {
577				return fmt.Errorf("proto: wrong wireType = %d for field FlushBytes", wireType)
578			}
579			m.FlushBytes = 0
580			for shift := uint(0); ; shift += 7 {
581				if shift >= 64 {
582					return ErrIntOverflowConfig
583				}
584				if iNdEx >= l {
585					return io.ErrUnexpectedEOF
586				}
587				b := dAtA[iNdEx]
588				iNdEx++
589				m.FlushBytes |= int32(b&0x7F) << shift
590				if b < 0x80 {
591					break
592				}
593			}
594		case 5:
595			if wireType != 5 {
596				return fmt.Errorf("proto: wrong wireType = %d for field SamplingRate", wireType)
597			}
598			var v uint32
599			if (iNdEx + 4) > l {
600				return io.ErrUnexpectedEOF
601			}
602			v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
603			iNdEx += 4
604			m.SamplingRate = float32(math.Float32frombits(v))
605		case 6:
606			if wireType != 2 {
607				return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
608			}
609			var msglen int
610			for shift := uint(0); ; shift += 7 {
611				if shift >= 64 {
612					return ErrIntOverflowConfig
613				}
614				if iNdEx >= l {
615					return io.ErrUnexpectedEOF
616				}
617				b := dAtA[iNdEx]
618				iNdEx++
619				msglen |= int(b&0x7F) << shift
620				if b < 0x80 {
621					break
622				}
623			}
624			if msglen < 0 {
625				return ErrInvalidLengthConfig
626			}
627			postIndex := iNdEx + msglen
628			if postIndex < 0 {
629				return ErrInvalidLengthConfig
630			}
631			if postIndex > l {
632				return io.ErrUnexpectedEOF
633			}
634			if m.Metrics == nil {
635				m.Metrics = make(map[string]*Params_MetricInfo)
636			}
637			var mapkey string
638			var mapvalue *Params_MetricInfo
639			for iNdEx < postIndex {
640				entryPreIndex := iNdEx
641				var wire uint64
642				for shift := uint(0); ; shift += 7 {
643					if shift >= 64 {
644						return ErrIntOverflowConfig
645					}
646					if iNdEx >= l {
647						return io.ErrUnexpectedEOF
648					}
649					b := dAtA[iNdEx]
650					iNdEx++
651					wire |= uint64(b&0x7F) << shift
652					if b < 0x80 {
653						break
654					}
655				}
656				fieldNum := int32(wire >> 3)
657				if fieldNum == 1 {
658					var stringLenmapkey uint64
659					for shift := uint(0); ; shift += 7 {
660						if shift >= 64 {
661							return ErrIntOverflowConfig
662						}
663						if iNdEx >= l {
664							return io.ErrUnexpectedEOF
665						}
666						b := dAtA[iNdEx]
667						iNdEx++
668						stringLenmapkey |= uint64(b&0x7F) << shift
669						if b < 0x80 {
670							break
671						}
672					}
673					intStringLenmapkey := int(stringLenmapkey)
674					if intStringLenmapkey < 0 {
675						return ErrInvalidLengthConfig
676					}
677					postStringIndexmapkey := iNdEx + intStringLenmapkey
678					if postStringIndexmapkey < 0 {
679						return ErrInvalidLengthConfig
680					}
681					if postStringIndexmapkey > l {
682						return io.ErrUnexpectedEOF
683					}
684					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
685					iNdEx = postStringIndexmapkey
686				} else if fieldNum == 2 {
687					var mapmsglen int
688					for shift := uint(0); ; shift += 7 {
689						if shift >= 64 {
690							return ErrIntOverflowConfig
691						}
692						if iNdEx >= l {
693							return io.ErrUnexpectedEOF
694						}
695						b := dAtA[iNdEx]
696						iNdEx++
697						mapmsglen |= int(b&0x7F) << shift
698						if b < 0x80 {
699							break
700						}
701					}
702					if mapmsglen < 0 {
703						return ErrInvalidLengthConfig
704					}
705					postmsgIndex := iNdEx + mapmsglen
706					if postmsgIndex < 0 {
707						return ErrInvalidLengthConfig
708					}
709					if postmsgIndex > l {
710						return io.ErrUnexpectedEOF
711					}
712					mapvalue = &Params_MetricInfo{}
713					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
714						return err
715					}
716					iNdEx = postmsgIndex
717				} else {
718					iNdEx = entryPreIndex
719					skippy, err := skipConfig(dAtA[iNdEx:])
720					if err != nil {
721						return err
722					}
723					if skippy < 0 {
724						return ErrInvalidLengthConfig
725					}
726					if (iNdEx + skippy) > postIndex {
727						return io.ErrUnexpectedEOF
728					}
729					iNdEx += skippy
730				}
731			}
732			m.Metrics[mapkey] = mapvalue
733			iNdEx = postIndex
734		default:
735			iNdEx = preIndex
736			skippy, err := skipConfig(dAtA[iNdEx:])
737			if err != nil {
738				return err
739			}
740			if skippy < 0 {
741				return ErrInvalidLengthConfig
742			}
743			if (iNdEx + skippy) < 0 {
744				return ErrInvalidLengthConfig
745			}
746			if (iNdEx + skippy) > l {
747				return io.ErrUnexpectedEOF
748			}
749			iNdEx += skippy
750		}
751	}
752
753	if iNdEx > l {
754		return io.ErrUnexpectedEOF
755	}
756	return nil
757}
758func (m *Params_MetricInfo) Unmarshal(dAtA []byte) error {
759	l := len(dAtA)
760	iNdEx := 0
761	for iNdEx < l {
762		preIndex := iNdEx
763		var wire uint64
764		for shift := uint(0); ; shift += 7 {
765			if shift >= 64 {
766				return ErrIntOverflowConfig
767			}
768			if iNdEx >= l {
769				return io.ErrUnexpectedEOF
770			}
771			b := dAtA[iNdEx]
772			iNdEx++
773			wire |= uint64(b&0x7F) << shift
774			if b < 0x80 {
775				break
776			}
777		}
778		fieldNum := int32(wire >> 3)
779		wireType := int(wire & 0x7)
780		if wireType == 4 {
781			return fmt.Errorf("proto: MetricInfo: wiretype end group for non-group")
782		}
783		if fieldNum <= 0 {
784			return fmt.Errorf("proto: MetricInfo: illegal tag %d (wire type %d)", fieldNum, wire)
785		}
786		switch fieldNum {
787		case 1:
788			if wireType != 0 {
789				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
790			}
791			m.Type = 0
792			for shift := uint(0); ; shift += 7 {
793				if shift >= 64 {
794					return ErrIntOverflowConfig
795				}
796				if iNdEx >= l {
797					return io.ErrUnexpectedEOF
798				}
799				b := dAtA[iNdEx]
800				iNdEx++
801				m.Type |= Params_MetricInfo_Type(b&0x7F) << shift
802				if b < 0x80 {
803					break
804				}
805			}
806		case 2:
807			if wireType != 2 {
808				return fmt.Errorf("proto: wrong wireType = %d for field NameTemplate", wireType)
809			}
810			var stringLen uint64
811			for shift := uint(0); ; shift += 7 {
812				if shift >= 64 {
813					return ErrIntOverflowConfig
814				}
815				if iNdEx >= l {
816					return io.ErrUnexpectedEOF
817				}
818				b := dAtA[iNdEx]
819				iNdEx++
820				stringLen |= uint64(b&0x7F) << shift
821				if b < 0x80 {
822					break
823				}
824			}
825			intStringLen := int(stringLen)
826			if intStringLen < 0 {
827				return ErrInvalidLengthConfig
828			}
829			postIndex := iNdEx + intStringLen
830			if postIndex < 0 {
831				return ErrInvalidLengthConfig
832			}
833			if postIndex > l {
834				return io.ErrUnexpectedEOF
835			}
836			m.NameTemplate = string(dAtA[iNdEx:postIndex])
837			iNdEx = postIndex
838		default:
839			iNdEx = preIndex
840			skippy, err := skipConfig(dAtA[iNdEx:])
841			if err != nil {
842				return err
843			}
844			if skippy < 0 {
845				return ErrInvalidLengthConfig
846			}
847			if (iNdEx + skippy) < 0 {
848				return ErrInvalidLengthConfig
849			}
850			if (iNdEx + skippy) > l {
851				return io.ErrUnexpectedEOF
852			}
853			iNdEx += skippy
854		}
855	}
856
857	if iNdEx > l {
858		return io.ErrUnexpectedEOF
859	}
860	return nil
861}
862func skipConfig(dAtA []byte) (n int, err error) {
863	l := len(dAtA)
864	iNdEx := 0
865	for iNdEx < l {
866		var wire uint64
867		for shift := uint(0); ; shift += 7 {
868			if shift >= 64 {
869				return 0, ErrIntOverflowConfig
870			}
871			if iNdEx >= l {
872				return 0, io.ErrUnexpectedEOF
873			}
874			b := dAtA[iNdEx]
875			iNdEx++
876			wire |= (uint64(b) & 0x7F) << shift
877			if b < 0x80 {
878				break
879			}
880		}
881		wireType := int(wire & 0x7)
882		switch wireType {
883		case 0:
884			for shift := uint(0); ; shift += 7 {
885				if shift >= 64 {
886					return 0, ErrIntOverflowConfig
887				}
888				if iNdEx >= l {
889					return 0, io.ErrUnexpectedEOF
890				}
891				iNdEx++
892				if dAtA[iNdEx-1] < 0x80 {
893					break
894				}
895			}
896			return iNdEx, nil
897		case 1:
898			iNdEx += 8
899			return iNdEx, nil
900		case 2:
901			var length int
902			for shift := uint(0); ; shift += 7 {
903				if shift >= 64 {
904					return 0, ErrIntOverflowConfig
905				}
906				if iNdEx >= l {
907					return 0, io.ErrUnexpectedEOF
908				}
909				b := dAtA[iNdEx]
910				iNdEx++
911				length |= (int(b) & 0x7F) << shift
912				if b < 0x80 {
913					break
914				}
915			}
916			if length < 0 {
917				return 0, ErrInvalidLengthConfig
918			}
919			iNdEx += length
920			if iNdEx < 0 {
921				return 0, ErrInvalidLengthConfig
922			}
923			return iNdEx, nil
924		case 3:
925			for {
926				var innerWire uint64
927				var start int = iNdEx
928				for shift := uint(0); ; shift += 7 {
929					if shift >= 64 {
930						return 0, ErrIntOverflowConfig
931					}
932					if iNdEx >= l {
933						return 0, io.ErrUnexpectedEOF
934					}
935					b := dAtA[iNdEx]
936					iNdEx++
937					innerWire |= (uint64(b) & 0x7F) << shift
938					if b < 0x80 {
939						break
940					}
941				}
942				innerWireType := int(innerWire & 0x7)
943				if innerWireType == 4 {
944					break
945				}
946				next, err := skipConfig(dAtA[start:])
947				if err != nil {
948					return 0, err
949				}
950				iNdEx = start + next
951				if iNdEx < 0 {
952					return 0, ErrInvalidLengthConfig
953				}
954			}
955			return iNdEx, nil
956		case 4:
957			return iNdEx, nil
958		case 5:
959			iNdEx += 4
960			return iNdEx, nil
961		default:
962			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
963		}
964	}
965	panic("unreachable")
966}
967
968var (
969	ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
970	ErrIntOverflowConfig   = fmt.Errorf("proto: integer overflow")
971)
972