This repository has been archived by the owner on Mar 14, 2022. It is now read-only.
forked from istio/istio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.pb.go
3581 lines (3483 loc) · 97.2 KB
/
config.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: mixer/adapter/stackdriver/config/config.proto
/*
Package config is a generated protocol buffer package.
The `stackdriver` adapter enables Istio to deliver log, metric and traces to the
[Stackdriver](https://cloud.google.com/stackdriver/) backend.
This adapter supports the [metric template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/metric/),
the [logentry template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/logentry/),
and the [tracespan template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/tracespan/).
It is generated from these files:
mixer/adapter/stackdriver/config/config.proto
It has these top-level messages:
Params
*/
package config
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import google_api1 "google.golang.org/genproto/googleapis/api/metric"
import _ "github.com/gogo/protobuf/types"
import time "time"
import binary "encoding/binary"
import types "github.com/gogo/protobuf/types"
import strings "strings"
import reflect "reflect"
import sortkeys "github.com/gogo/protobuf/sortkeys"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Configuration format for the `stackdriver` adapter.
type Params struct {
// Endpoint URL to send stackdriver data - leave empty to use the
// StackDriver SDK's default value (monitoring.googleapis.com).
Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
// GCP Project to attach metrics to.
ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
// This adapter batches the data it sends to Stackdriver; we will push to stackdriver every push_interval.
// If no value is provided we default to once per minute.
PushInterval time.Duration `protobuf:"bytes,3,opt,name=push_interval,json=pushInterval,stdduration" json:"push_interval"`
// Credentials must be attached to every call made to StackDriver. This
// can be an API key, a service account secret key, or Oauth2 tokens.
//
// TODO: do we want to support oauth?
//
// Types that are valid to be assigned to Creds:
// *Params_AppCredentials
// *Params_ApiKey
// *Params_ServiceAccountPath
Creds isParams_Creds `protobuf_oneof:"creds"`
// A map of Istio metric name to Stackdriver metric info.
MetricInfo map[string]*Params_MetricInfo `protobuf:"bytes,8,rep,name=metric_info,json=metricInfo" json:"metric_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
// A map of Istio LogEntry name to Stackdriver log info.
LogInfo map[string]*Params_LogInfo `protobuf:"bytes,9,rep,name=log_info,json=logInfo" json:"log_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
// Stackdriver Trace configuration.
Trace *Params_Trace `protobuf:"bytes,10,opt,name=trace" json:"trace,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) { return fileDescriptorConfig, []int{0} }
type isParams_Creds interface {
isParams_Creds()
MarshalTo([]byte) (int, error)
Size() int
}
type Params_AppCredentials struct {
AppCredentials bool `protobuf:"varint,4,opt,name=app_credentials,json=appCredentials,proto3,oneof"`
}
type Params_ApiKey struct {
ApiKey string `protobuf:"bytes,5,opt,name=api_key,json=apiKey,proto3,oneof"`
}
type Params_ServiceAccountPath struct {
ServiceAccountPath string `protobuf:"bytes,6,opt,name=service_account_path,json=serviceAccountPath,proto3,oneof"`
}
func (*Params_AppCredentials) isParams_Creds() {}
func (*Params_ApiKey) isParams_Creds() {}
func (*Params_ServiceAccountPath) isParams_Creds() {}
func (m *Params) GetCreds() isParams_Creds {
if m != nil {
return m.Creds
}
return nil
}
func (m *Params) GetAppCredentials() bool {
if x, ok := m.GetCreds().(*Params_AppCredentials); ok {
return x.AppCredentials
}
return false
}
func (m *Params) GetApiKey() string {
if x, ok := m.GetCreds().(*Params_ApiKey); ok {
return x.ApiKey
}
return ""
}
func (m *Params) GetServiceAccountPath() string {
if x, ok := m.GetCreds().(*Params_ServiceAccountPath); ok {
return x.ServiceAccountPath
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Params) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Params_OneofMarshaler, _Params_OneofUnmarshaler, _Params_OneofSizer, []interface{}{
(*Params_AppCredentials)(nil),
(*Params_ApiKey)(nil),
(*Params_ServiceAccountPath)(nil),
}
}
func _Params_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Params)
// creds
switch x := m.Creds.(type) {
case *Params_AppCredentials:
t := uint64(0)
if x.AppCredentials {
t = 1
}
_ = b.EncodeVarint(4<<3 | proto.WireVarint)
_ = b.EncodeVarint(t)
case *Params_ApiKey:
_ = b.EncodeVarint(5<<3 | proto.WireBytes)
_ = b.EncodeStringBytes(x.ApiKey)
case *Params_ServiceAccountPath:
_ = b.EncodeVarint(6<<3 | proto.WireBytes)
_ = b.EncodeStringBytes(x.ServiceAccountPath)
case nil:
default:
return fmt.Errorf("Params.Creds has unexpected type %T", x)
}
return nil
}
func _Params_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Params)
switch tag {
case 4: // creds.app_credentials
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.Creds = &Params_AppCredentials{x != 0}
return true, err
case 5: // creds.api_key
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Creds = &Params_ApiKey{x}
return true, err
case 6: // creds.service_account_path
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Creds = &Params_ServiceAccountPath{x}
return true, err
default:
return false, nil
}
}
func _Params_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Params)
// creds
switch x := m.Creds.(type) {
case *Params_AppCredentials:
n += proto.SizeVarint(4<<3 | proto.WireVarint)
n += 1
case *Params_ApiKey:
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.ApiKey)))
n += len(x.ApiKey)
case *Params_ServiceAccountPath:
n += proto.SizeVarint(6<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.ServiceAccountPath)))
n += len(x.ServiceAccountPath)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Describes how to represent an Istio metric in Stackdriver.
// See https://github.com/googleapis/googleapis/blob/master/google/api/metric.proto
type Params_MetricInfo struct {
Kind google_api1.MetricDescriptor_MetricKind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.api.MetricDescriptor_MetricKind" json:"kind,omitempty"`
Value google_api1.MetricDescriptor_ValueType `protobuf:"varint,2,opt,name=value,proto3,enum=google.api.MetricDescriptor_ValueType" json:"value,omitempty"`
// For metrics with a metric value of DISTRIBUTION, this provides a mechanism
// for configuring the buckets that will be used to store the aggregated values.
// This field must be provided for metrics declared to be of type DISTRIBUTION.
// This field will be ignored for non-distribution metric kinds.
Buckets *Params_MetricInfo_BucketsDefinition `protobuf:"bytes,3,opt,name=buckets" json:"buckets,omitempty"`
// Stackdriver metric type name, e.g.
// istio.io/service/server/request_count. If this is not provided, a
// concantenation of custom metric prefix (custom.googleapis.com/) and
// Istio metric name will be used.
MetricType string `protobuf:"bytes,4,opt,name=metric_type,json=metricType,proto3" json:"metric_type,omitempty"`
}
func (m *Params_MetricInfo) Reset() { *m = Params_MetricInfo{} }
func (*Params_MetricInfo) ProtoMessage() {}
func (*Params_MetricInfo) Descriptor() ([]byte, []int) { return fileDescriptorConfig, []int{0, 0} }
// Describes buckets for DISTRIBUTION valued metrics.
// TODO: look into using google.api.distribution.proto instead - we would pull it in but it has a ton of
// dependencies it doesn't actually use.
type Params_MetricInfo_BucketsDefinition struct {
// Exactly one of these three fields must be set.
//
// Types that are valid to be assigned to Definition:
// *Params_MetricInfo_BucketsDefinition_LinearBuckets
// *Params_MetricInfo_BucketsDefinition_ExponentialBuckets
// *Params_MetricInfo_BucketsDefinition_ExplicitBuckets
Definition isParams_MetricInfo_BucketsDefinition_Definition `protobuf_oneof:"definition"`
}
func (m *Params_MetricInfo_BucketsDefinition) Reset() { *m = Params_MetricInfo_BucketsDefinition{} }
func (*Params_MetricInfo_BucketsDefinition) ProtoMessage() {}
func (*Params_MetricInfo_BucketsDefinition) Descriptor() ([]byte, []int) {
return fileDescriptorConfig, []int{0, 0, 0}
}
type isParams_MetricInfo_BucketsDefinition_Definition interface {
isParams_MetricInfo_BucketsDefinition_Definition()
MarshalTo([]byte) (int, error)
Size() int
}
type Params_MetricInfo_BucketsDefinition_LinearBuckets struct {
LinearBuckets *Params_MetricInfo_BucketsDefinition_Linear `protobuf:"bytes,1,opt,name=linear_buckets,json=linearBuckets,oneof"`
}
type Params_MetricInfo_BucketsDefinition_ExponentialBuckets struct {
ExponentialBuckets *Params_MetricInfo_BucketsDefinition_Exponential `protobuf:"bytes,2,opt,name=exponential_buckets,json=exponentialBuckets,oneof"`
}
type Params_MetricInfo_BucketsDefinition_ExplicitBuckets struct {
ExplicitBuckets *Params_MetricInfo_BucketsDefinition_Explicit `protobuf:"bytes,3,opt,name=explicit_buckets,json=explicitBuckets,oneof"`
}
func (*Params_MetricInfo_BucketsDefinition_LinearBuckets) isParams_MetricInfo_BucketsDefinition_Definition() {
}
func (*Params_MetricInfo_BucketsDefinition_ExponentialBuckets) isParams_MetricInfo_BucketsDefinition_Definition() {
}
func (*Params_MetricInfo_BucketsDefinition_ExplicitBuckets) isParams_MetricInfo_BucketsDefinition_Definition() {
}
func (m *Params_MetricInfo_BucketsDefinition) GetDefinition() isParams_MetricInfo_BucketsDefinition_Definition {
if m != nil {
return m.Definition
}
return nil
}
func (m *Params_MetricInfo_BucketsDefinition) GetLinearBuckets() *Params_MetricInfo_BucketsDefinition_Linear {
if x, ok := m.GetDefinition().(*Params_MetricInfo_BucketsDefinition_LinearBuckets); ok {
return x.LinearBuckets
}
return nil
}
func (m *Params_MetricInfo_BucketsDefinition) GetExponentialBuckets() *Params_MetricInfo_BucketsDefinition_Exponential {
if x, ok := m.GetDefinition().(*Params_MetricInfo_BucketsDefinition_ExponentialBuckets); ok {
return x.ExponentialBuckets
}
return nil
}
func (m *Params_MetricInfo_BucketsDefinition) GetExplicitBuckets() *Params_MetricInfo_BucketsDefinition_Explicit {
if x, ok := m.GetDefinition().(*Params_MetricInfo_BucketsDefinition_ExplicitBuckets); ok {
return x.ExplicitBuckets
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Params_MetricInfo_BucketsDefinition) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Params_MetricInfo_BucketsDefinition_OneofMarshaler, _Params_MetricInfo_BucketsDefinition_OneofUnmarshaler, _Params_MetricInfo_BucketsDefinition_OneofSizer, []interface{}{
(*Params_MetricInfo_BucketsDefinition_LinearBuckets)(nil),
(*Params_MetricInfo_BucketsDefinition_ExponentialBuckets)(nil),
(*Params_MetricInfo_BucketsDefinition_ExplicitBuckets)(nil),
}
}
func _Params_MetricInfo_BucketsDefinition_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Params_MetricInfo_BucketsDefinition)
// definition
switch x := m.Definition.(type) {
case *Params_MetricInfo_BucketsDefinition_LinearBuckets:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.LinearBuckets); err != nil {
return err
}
case *Params_MetricInfo_BucketsDefinition_ExponentialBuckets:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ExponentialBuckets); err != nil {
return err
}
case *Params_MetricInfo_BucketsDefinition_ExplicitBuckets:
_ = b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ExplicitBuckets); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Params_MetricInfo_BucketsDefinition.Definition has unexpected type %T", x)
}
return nil
}
func _Params_MetricInfo_BucketsDefinition_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Params_MetricInfo_BucketsDefinition)
switch tag {
case 1: // definition.linear_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Params_MetricInfo_BucketsDefinition_Linear)
err := b.DecodeMessage(msg)
m.Definition = &Params_MetricInfo_BucketsDefinition_LinearBuckets{msg}
return true, err
case 2: // definition.exponential_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Params_MetricInfo_BucketsDefinition_Exponential)
err := b.DecodeMessage(msg)
m.Definition = &Params_MetricInfo_BucketsDefinition_ExponentialBuckets{msg}
return true, err
case 3: // definition.explicit_buckets
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Params_MetricInfo_BucketsDefinition_Explicit)
err := b.DecodeMessage(msg)
m.Definition = &Params_MetricInfo_BucketsDefinition_ExplicitBuckets{msg}
return true, err
default:
return false, nil
}
}
func _Params_MetricInfo_BucketsDefinition_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Params_MetricInfo_BucketsDefinition)
// definition
switch x := m.Definition.(type) {
case *Params_MetricInfo_BucketsDefinition_LinearBuckets:
s := proto.Size(x.LinearBuckets)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Params_MetricInfo_BucketsDefinition_ExponentialBuckets:
s := proto.Size(x.ExponentialBuckets)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Params_MetricInfo_BucketsDefinition_ExplicitBuckets:
s := proto.Size(x.ExplicitBuckets)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Specifies a linear sequence of buckets that all have the same width
// (except overflow and underflow). Each bucket represents a constant
// absolute uncertainty on the specific value in the bucket.
//
// There are `num_finite_buckets + 2` (= `N`) buckets. The two additional
// buckets are the underflow and overflow buckets.
//
// Bucket `i` has the following boundaries:
//
// * Upper bound (`0 <= i < N-1`): `offset + (width * i)`
// * Lower bound (`1 <= i < N`): `offset + (width * (i - 1))`
type Params_MetricInfo_BucketsDefinition_Linear struct {
// Must be greater than 0.
NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"`
// Must be greater than 0.
Width float64 `protobuf:"fixed64,2,opt,name=width,proto3" json:"width,omitempty"`
// Lower bound of the first bucket.
Offset float64 `protobuf:"fixed64,3,opt,name=offset,proto3" json:"offset,omitempty"`
}
func (m *Params_MetricInfo_BucketsDefinition_Linear) Reset() {
*m = Params_MetricInfo_BucketsDefinition_Linear{}
}
func (*Params_MetricInfo_BucketsDefinition_Linear) ProtoMessage() {}
func (*Params_MetricInfo_BucketsDefinition_Linear) Descriptor() ([]byte, []int) {
return fileDescriptorConfig, []int{0, 0, 0, 0}
}
// Specifies an exponential sequence of buckets that have a width that is
// proportional to the value of the lower bound. Each bucket represents a
// constant relative uncertainty on a specific value in the bucket.
//
// There are `num_finite_buckets + 2` (= `N`) buckets. The two additional
// buckets are the underflow and overflow buckets.
//
// Bucket `i` has the following boundaries:
//
// * Upper bound (0 <= i < N-1): `scale * (growth_factor ^ i)`
// * Lower bound (1 <= i < N): `scale * (growth_factor ^ (i - 1))`
type Params_MetricInfo_BucketsDefinition_Exponential struct {
// Must be greater than 0.
NumFiniteBuckets int32 `protobuf:"varint,1,opt,name=num_finite_buckets,json=numFiniteBuckets,proto3" json:"num_finite_buckets,omitempty"`
// Must be greater than 1.
GrowthFactor float64 `protobuf:"fixed64,2,opt,name=growth_factor,json=growthFactor,proto3" json:"growth_factor,omitempty"`
// Must be greater than 0.
Scale float64 `protobuf:"fixed64,3,opt,name=scale,proto3" json:"scale,omitempty"`
}
func (m *Params_MetricInfo_BucketsDefinition_Exponential) Reset() {
*m = Params_MetricInfo_BucketsDefinition_Exponential{}
}
func (*Params_MetricInfo_BucketsDefinition_Exponential) ProtoMessage() {}
func (*Params_MetricInfo_BucketsDefinition_Exponential) Descriptor() ([]byte, []int) {
return fileDescriptorConfig, []int{0, 0, 0, 1}
}
// Specifies a set of buckets with arbitrary widths.
//
// There are `size(bounds) + 1` (= `N`) buckets. Bucket `i` has the following
// boundaries:
//
// * Upper bound (`0 <= i < N-1`): `bounds[i]`
// * Lower bound (`1 <= i < N`): `bounds[i - 1]`
//
// The `bounds` field must contain at least one element. If `bounds` has
// only one element, then there are no finite buckets, and that single
// element is the common boundary of the overflow and underflow buckets.
type Params_MetricInfo_BucketsDefinition_Explicit struct {
// The values must be monotonically increasing.
Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds" json:"bounds,omitempty"`
}
func (m *Params_MetricInfo_BucketsDefinition_Explicit) Reset() {
*m = Params_MetricInfo_BucketsDefinition_Explicit{}
}
func (*Params_MetricInfo_BucketsDefinition_Explicit) ProtoMessage() {}
func (*Params_MetricInfo_BucketsDefinition_Explicit) Descriptor() ([]byte, []int) {
return fileDescriptorConfig, []int{0, 0, 0, 2}
}
// Describes how to represent an Istio Log in Stackdriver.
type Params_LogInfo struct {
// The logging template provides a set of variables; these list the subset of variables that should be used to
// form Stackdriver labels for the log entry.
LabelNames []string `protobuf:"bytes,1,rep,name=label_names,json=labelNames" json:"label_names,omitempty"`
// A golang text/template template that will be executed to construct the payload for this log entry.
// It will be given the full set of variables for the log to use to construct its result.
PayloadTemplate string `protobuf:"bytes,2,opt,name=payload_template,json=payloadTemplate,proto3" json:"payload_template,omitempty"`
// If an HttpRequestMapping is provided, a HttpRequest object will be filled out for this log entry using the
// variables named in the mapping to populate the fields of the request struct from the instance's variables.
HttpMapping *Params_LogInfo_HttpRequestMapping `protobuf:"bytes,3,opt,name=http_mapping,json=httpMapping" json:"http_mapping,omitempty"`
// If SinkInfo is provided, Stackriver logs would be exported to that sink.
SinkInfo *Params_LogInfo_SinkInfo `protobuf:"bytes,4,opt,name=sink_info,json=sinkInfo" json:"sink_info,omitempty"`
}
func (m *Params_LogInfo) Reset() { *m = Params_LogInfo{} }
func (*Params_LogInfo) ProtoMessage() {}
func (*Params_LogInfo) Descriptor() ([]byte, []int) { return fileDescriptorConfig, []int{0, 2} }
// Maps from template variable names to the various fields of Stackdriver's HTTP request struct.
// See https://godoc.org/cloud.google.com/go/logging#HTTPRequest
type Params_LogInfo_HttpRequestMapping struct {
// template variable name to map into HTTPRequest.Status
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
// template variable name to map into HTTPRequest.RequestSize
RequestSize string `protobuf:"bytes,2,opt,name=request_size,json=requestSize,proto3" json:"request_size,omitempty"`
// template variable name to map into HTTPRequest.ResponseSize
ResponseSize string `protobuf:"bytes,3,opt,name=response_size,json=responseSize,proto3" json:"response_size,omitempty"`
// template variable name to map into HTTPRequest.Latency
Latency string `protobuf:"bytes,4,opt,name=latency,proto3" json:"latency,omitempty"`
// template variable name to map into HTTPRequest.LocalIP
LocalIp string `protobuf:"bytes,5,opt,name=local_ip,json=localIp,proto3" json:"local_ip,omitempty"`
// template variable name to map into HTTPRequest.RemoteIP
RemoteIp string `protobuf:"bytes,6,opt,name=remote_ip,json=remoteIp,proto3" json:"remote_ip,omitempty"`
// template variable name to map into HTTPRequest.Request.Url
Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"`
// template variable name to map into HTTPRequest.RequestMethod
Method string `protobuf:"bytes,8,opt,name=method,proto3" json:"method,omitempty"`
// template variable name to map into HTTPRequest.UserAgent
UserAgent string `protobuf:"bytes,9,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
// template variable name to map into HTTPRequest.Referer
Referer string `protobuf:"bytes,10,opt,name=referer,proto3" json:"referer,omitempty"`
}
func (m *Params_LogInfo_HttpRequestMapping) Reset() { *m = Params_LogInfo_HttpRequestMapping{} }
func (*Params_LogInfo_HttpRequestMapping) ProtoMessage() {}
func (*Params_LogInfo_HttpRequestMapping) Descriptor() ([]byte, []int) {
return fileDescriptorConfig, []int{0, 2, 0}
}
// Contains information about sink to export Stackdriver logs to.
// See https://godoc.org/cloud.google.com/go/logging/logadmin#Sink.
// Ex: If you want to export it to a GCS bucket, id would be a unique idetifier you want for the sink,
// destination would be the storage be name of GCS Storage bucket and filter would be user defined condition for
// filtering logs. See below for a sample config:
// id: 'info-errors-to-gcs'
// destination: 'storage.googleapis.com/<bucket_name>'
// filter: 'severity >= Default'
type Params_LogInfo_SinkInfo struct {
// Client assigned sink identifier.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Export Destination.
Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
// Filter that specifies any filtering to be done on logs.
Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
}
func (m *Params_LogInfo_SinkInfo) Reset() { *m = Params_LogInfo_SinkInfo{} }
func (*Params_LogInfo_SinkInfo) ProtoMessage() {}
func (*Params_LogInfo_SinkInfo) Descriptor() ([]byte, []int) {
return fileDescriptorConfig, []int{0, 2, 1}
}
// Details of Stackdriver Trace configuration for tracespan template.
type Params_Trace struct {
// Proability that a particular trace ID will be sampled.
SampleProbability float64 `protobuf:"fixed64,1,opt,name=sample_probability,json=sampleProbability,proto3" json:"sample_probability,omitempty"`
}
func (m *Params_Trace) Reset() { *m = Params_Trace{} }
func (*Params_Trace) ProtoMessage() {}
func (*Params_Trace) Descriptor() ([]byte, []int) { return fileDescriptorConfig, []int{0, 4} }
func init() {
proto.RegisterType((*Params)(nil), "adapter.stackdriver.config.Params")
proto.RegisterType((*Params_MetricInfo)(nil), "adapter.stackdriver.config.Params.MetricInfo")
proto.RegisterType((*Params_MetricInfo_BucketsDefinition)(nil), "adapter.stackdriver.config.Params.MetricInfo.BucketsDefinition")
proto.RegisterType((*Params_MetricInfo_BucketsDefinition_Linear)(nil), "adapter.stackdriver.config.Params.MetricInfo.BucketsDefinition.Linear")
proto.RegisterType((*Params_MetricInfo_BucketsDefinition_Exponential)(nil), "adapter.stackdriver.config.Params.MetricInfo.BucketsDefinition.Exponential")
proto.RegisterType((*Params_MetricInfo_BucketsDefinition_Explicit)(nil), "adapter.stackdriver.config.Params.MetricInfo.BucketsDefinition.Explicit")
proto.RegisterType((*Params_LogInfo)(nil), "adapter.stackdriver.config.Params.LogInfo")
proto.RegisterType((*Params_LogInfo_HttpRequestMapping)(nil), "adapter.stackdriver.config.Params.LogInfo.HttpRequestMapping")
proto.RegisterType((*Params_LogInfo_SinkInfo)(nil), "adapter.stackdriver.config.Params.LogInfo.SinkInfo")
proto.RegisterType((*Params_Trace)(nil), "adapter.stackdriver.config.Params.Trace")
}
func (m *Params) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Endpoint) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.Endpoint)))
i += copy(dAtA[i:], m.Endpoint)
}
if len(m.ProjectId) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.ProjectId)))
i += copy(dAtA[i:], m.ProjectId)
}
dAtA[i] = 0x1a
i++
i = encodeVarintConfig(dAtA, i, uint64(types.SizeOfStdDuration(m.PushInterval)))
n1, err := types.StdDurationMarshalTo(m.PushInterval, dAtA[i:])
if err != nil {
return 0, err
}
i += n1
if m.Creds != nil {
nn2, err := m.Creds.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += nn2
}
if len(m.MetricInfo) > 0 {
for k, _ := range m.MetricInfo {
dAtA[i] = 0x42
i++
v := m.MetricInfo[k]
msgSize := 0
if v != nil {
msgSize = v.Size()
msgSize += 1 + sovConfig(uint64(msgSize))
}
mapSize := 1 + len(k) + sovConfig(uint64(len(k))) + msgSize
i = encodeVarintConfig(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintConfig(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
if v != nil {
dAtA[i] = 0x12
i++
i = encodeVarintConfig(dAtA, i, uint64(v.Size()))
n3, err := v.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
}
}
if len(m.LogInfo) > 0 {
for k, _ := range m.LogInfo {
dAtA[i] = 0x4a
i++
v := m.LogInfo[k]
msgSize := 0
if v != nil {
msgSize = v.Size()
msgSize += 1 + sovConfig(uint64(msgSize))
}
mapSize := 1 + len(k) + sovConfig(uint64(len(k))) + msgSize
i = encodeVarintConfig(dAtA, i, uint64(mapSize))
dAtA[i] = 0xa
i++
i = encodeVarintConfig(dAtA, i, uint64(len(k)))
i += copy(dAtA[i:], k)
if v != nil {
dAtA[i] = 0x12
i++
i = encodeVarintConfig(dAtA, i, uint64(v.Size()))
n4, err := v.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n4
}
}
}
if m.Trace != nil {
dAtA[i] = 0x52
i++
i = encodeVarintConfig(dAtA, i, uint64(m.Trace.Size()))
n5, err := m.Trace.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n5
}
return i, nil
}
func (m *Params_AppCredentials) MarshalTo(dAtA []byte) (int, error) {
i := 0
dAtA[i] = 0x20
i++
if m.AppCredentials {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
return i, nil
}
func (m *Params_ApiKey) MarshalTo(dAtA []byte) (int, error) {
i := 0
dAtA[i] = 0x2a
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.ApiKey)))
i += copy(dAtA[i:], m.ApiKey)
return i, nil
}
func (m *Params_ServiceAccountPath) MarshalTo(dAtA []byte) (int, error) {
i := 0
dAtA[i] = 0x32
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.ServiceAccountPath)))
i += copy(dAtA[i:], m.ServiceAccountPath)
return i, nil
}
func (m *Params_MetricInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params_MetricInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Kind != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintConfig(dAtA, i, uint64(m.Kind))
}
if m.Value != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintConfig(dAtA, i, uint64(m.Value))
}
if m.Buckets != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintConfig(dAtA, i, uint64(m.Buckets.Size()))
n6, err := m.Buckets.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n6
}
if len(m.MetricType) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.MetricType)))
i += copy(dAtA[i:], m.MetricType)
}
return i, nil
}
func (m *Params_MetricInfo_BucketsDefinition) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params_MetricInfo_BucketsDefinition) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Definition != nil {
nn7, err := m.Definition.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += nn7
}
return i, nil
}
func (m *Params_MetricInfo_BucketsDefinition_LinearBuckets) MarshalTo(dAtA []byte) (int, error) {
i := 0
if m.LinearBuckets != nil {
dAtA[i] = 0xa
i++
i = encodeVarintConfig(dAtA, i, uint64(m.LinearBuckets.Size()))
n8, err := m.LinearBuckets.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n8
}
return i, nil
}
func (m *Params_MetricInfo_BucketsDefinition_ExponentialBuckets) MarshalTo(dAtA []byte) (int, error) {
i := 0
if m.ExponentialBuckets != nil {
dAtA[i] = 0x12
i++
i = encodeVarintConfig(dAtA, i, uint64(m.ExponentialBuckets.Size()))
n9, err := m.ExponentialBuckets.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n9
}
return i, nil
}
func (m *Params_MetricInfo_BucketsDefinition_ExplicitBuckets) MarshalTo(dAtA []byte) (int, error) {
i := 0
if m.ExplicitBuckets != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintConfig(dAtA, i, uint64(m.ExplicitBuckets.Size()))
n10, err := m.ExplicitBuckets.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n10
}
return i, nil
}
func (m *Params_MetricInfo_BucketsDefinition_Linear) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params_MetricInfo_BucketsDefinition_Linear) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.NumFiniteBuckets != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintConfig(dAtA, i, uint64(m.NumFiniteBuckets))
}
if m.Width != 0 {
dAtA[i] = 0x11
i++
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Width))))
i += 8
}
if m.Offset != 0 {
dAtA[i] = 0x19
i++
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Offset))))
i += 8
}
return i, nil
}
func (m *Params_MetricInfo_BucketsDefinition_Exponential) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params_MetricInfo_BucketsDefinition_Exponential) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.NumFiniteBuckets != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintConfig(dAtA, i, uint64(m.NumFiniteBuckets))
}
if m.GrowthFactor != 0 {
dAtA[i] = 0x11
i++
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GrowthFactor))))
i += 8
}
if m.Scale != 0 {
dAtA[i] = 0x19
i++
binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Scale))))
i += 8
}
return i, nil
}
func (m *Params_MetricInfo_BucketsDefinition_Explicit) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params_MetricInfo_BucketsDefinition_Explicit) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Bounds) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.Bounds)*8))
for _, num := range m.Bounds {
f11 := math.Float64bits(float64(num))
binary.LittleEndian.PutUint64(dAtA[i:], uint64(f11))
i += 8
}
}
return i, nil
}
func (m *Params_LogInfo) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params_LogInfo) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.LabelNames) > 0 {
for _, s := range m.LabelNames {
dAtA[i] = 0xa
i++
l = len(s)
for l >= 1<<7 {
dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
dAtA[i] = uint8(l)
i++
i += copy(dAtA[i:], s)
}
}
if len(m.PayloadTemplate) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.PayloadTemplate)))
i += copy(dAtA[i:], m.PayloadTemplate)
}
if m.HttpMapping != nil {
dAtA[i] = 0x1a
i++
i = encodeVarintConfig(dAtA, i, uint64(m.HttpMapping.Size()))
n12, err := m.HttpMapping.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n12
}
if m.SinkInfo != nil {
dAtA[i] = 0x22
i++
i = encodeVarintConfig(dAtA, i, uint64(m.SinkInfo.Size()))
n13, err := m.SinkInfo.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n13
}
return i, nil
}
func (m *Params_LogInfo_HttpRequestMapping) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Params_LogInfo_HttpRequestMapping) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Status) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintConfig(dAtA, i, uint64(len(m.Status)))