forked from joeholley/supergloo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouting.pb.go
1708 lines (1593 loc) · 54.9 KB
/
routing.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: github.com/solo-io/supergloo/api/v1/routing.proto
package v1
import (
bytes "bytes"
fmt "fmt"
math "math"
time "time"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/gogo/protobuf/types"
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
v1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1"
core "github.com/solo-io/solo-kit/pkg/api/v1/resources/core"
v1alpha3 "github.com/solo-io/supergloo/pkg/api/external/istio/networking/v1alpha3"
)
// 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
// types of delays available, currently only fixed is supported
type FaultInjection_Delay_Type int32
const (
FaultInjection_Delay_FIXED FaultInjection_Delay_Type = 0
)
var FaultInjection_Delay_Type_name = map[int32]string{
0: "FIXED",
}
var FaultInjection_Delay_Type_value = map[string]int32{
"FIXED": 0,
}
func (x FaultInjection_Delay_Type) String() string {
return proto.EnumName(FaultInjection_Delay_Type_name, int32(x))
}
func (FaultInjection_Delay_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{5, 0, 0}
}
// a routing rule applies some L7 routing features to an existing mesh
// routing rules specify the following:
// for all requests:
// - originating from from **source pods**
// - sent to **destination pods**
// - matching one or more **request matcher**
// apply the specified RoutingRuleSpec
type RoutingRule struct {
// Status indicates the validation status of this resource.
// Status is read-only by clients, and set by supergloo during validation
Status core.Status `protobuf:"bytes,100,opt,name=status,proto3" json:"status"`
// Metadata contains the object metadata for this resource
Metadata core.Metadata `protobuf:"bytes,101,opt,name=metadata,proto3" json:"metadata"`
// target where we apply this rule. this can be a mesh group or an individual mesh
TargetMesh *core.ResourceRef `protobuf:"bytes,1,opt,name=target_mesh,json=targetMesh,proto3" json:"target_mesh,omitempty"`
// requests originating from these pods will have the rule applied
// leave empty to have all pods in the mesh apply these rules
//
// > Note: Source Selectors are ignored when RoutingRules are
// applied to pods in a Linkerd mesh. RoutingRules will apply to
// all selected destinations in Linkerd, regardless of the source.
SourceSelector *PodSelector `protobuf:"bytes,2,opt,name=source_selector,json=sourceSelector,proto3" json:"source_selector,omitempty"`
// requests destined for these pods will have the rule applied
// leave empty to apply to all destination pods in the mesh
DestinationSelector *PodSelector `protobuf:"bytes,3,opt,name=destination_selector,json=destinationSelector,proto3" json:"destination_selector,omitempty"`
// if specified, this rule will only apply to http requests
// in the mesh matching these parameters
// note that Linkerd only supports matching on Request Path and Method
RequestMatchers []*v1.Matcher `protobuf:"bytes,4,rep,name=request_matchers,json=requestMatchers,proto3" json:"request_matchers,omitempty"`
// contains the configuration that will be applied to
// selected pods within the target mesh(es)
Spec *RoutingRuleSpec `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RoutingRule) Reset() { *m = RoutingRule{} }
func (m *RoutingRule) String() string { return proto.CompactTextString(m) }
func (*RoutingRule) ProtoMessage() {}
func (*RoutingRule) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{0}
}
func (m *RoutingRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RoutingRule.Unmarshal(m, b)
}
func (m *RoutingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RoutingRule.Marshal(b, m, deterministic)
}
func (m *RoutingRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_RoutingRule.Merge(m, src)
}
func (m *RoutingRule) XXX_Size() int {
return xxx_messageInfo_RoutingRule.Size(m)
}
func (m *RoutingRule) XXX_DiscardUnknown() {
xxx_messageInfo_RoutingRule.DiscardUnknown(m)
}
var xxx_messageInfo_RoutingRule proto.InternalMessageInfo
func (m *RoutingRule) GetStatus() core.Status {
if m != nil {
return m.Status
}
return core.Status{}
}
func (m *RoutingRule) GetMetadata() core.Metadata {
if m != nil {
return m.Metadata
}
return core.Metadata{}
}
func (m *RoutingRule) GetTargetMesh() *core.ResourceRef {
if m != nil {
return m.TargetMesh
}
return nil
}
func (m *RoutingRule) GetSourceSelector() *PodSelector {
if m != nil {
return m.SourceSelector
}
return nil
}
func (m *RoutingRule) GetDestinationSelector() *PodSelector {
if m != nil {
return m.DestinationSelector
}
return nil
}
func (m *RoutingRule) GetRequestMatchers() []*v1.Matcher {
if m != nil {
return m.RequestMatchers
}
return nil
}
func (m *RoutingRule) GetSpec() *RoutingRuleSpec {
if m != nil {
return m.Spec
}
return nil
}
// the routing configuration that will be applied to the mesh(es)
type RoutingRuleSpec struct {
// a routing rule can have one of several types
// Note: types imported from istio will be replaced with our own
// simpler types, this is just a place to start from
//
// Types that are valid to be assigned to RuleType:
// *RoutingRuleSpec_TrafficShifting
// *RoutingRuleSpec_FaultInjection
// *RoutingRuleSpec_RequestTimeout
// *RoutingRuleSpec_Retries
// *RoutingRuleSpec_CorsPolicy
// *RoutingRuleSpec_Mirror
// *RoutingRuleSpec_HeaderManipulation
RuleType isRoutingRuleSpec_RuleType `protobuf_oneof:"rule_type"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RoutingRuleSpec) Reset() { *m = RoutingRuleSpec{} }
func (m *RoutingRuleSpec) String() string { return proto.CompactTextString(m) }
func (*RoutingRuleSpec) ProtoMessage() {}
func (*RoutingRuleSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{1}
}
func (m *RoutingRuleSpec) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RoutingRuleSpec.Unmarshal(m, b)
}
func (m *RoutingRuleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RoutingRuleSpec.Marshal(b, m, deterministic)
}
func (m *RoutingRuleSpec) XXX_Merge(src proto.Message) {
xxx_messageInfo_RoutingRuleSpec.Merge(m, src)
}
func (m *RoutingRuleSpec) XXX_Size() int {
return xxx_messageInfo_RoutingRuleSpec.Size(m)
}
func (m *RoutingRuleSpec) XXX_DiscardUnknown() {
xxx_messageInfo_RoutingRuleSpec.DiscardUnknown(m)
}
var xxx_messageInfo_RoutingRuleSpec proto.InternalMessageInfo
type isRoutingRuleSpec_RuleType interface {
isRoutingRuleSpec_RuleType()
Equal(interface{}) bool
}
type RoutingRuleSpec_TrafficShifting struct {
TrafficShifting *TrafficShifting `protobuf:"bytes,1,opt,name=traffic_shifting,json=trafficShifting,proto3,oneof"`
}
type RoutingRuleSpec_FaultInjection struct {
FaultInjection *FaultInjection `protobuf:"bytes,2,opt,name=fault_injection,json=faultInjection,proto3,oneof"`
}
type RoutingRuleSpec_RequestTimeout struct {
RequestTimeout *time.Duration `protobuf:"bytes,7,opt,name=request_timeout,json=requestTimeout,proto3,oneof,stdduration"`
}
type RoutingRuleSpec_Retries struct {
Retries *RetryPolicy `protobuf:"bytes,8,opt,name=retries,proto3,oneof"`
}
type RoutingRuleSpec_CorsPolicy struct {
CorsPolicy *v1alpha3.CorsPolicy `protobuf:"bytes,10,opt,name=cors_policy,json=corsPolicy,proto3,oneof"`
}
type RoutingRuleSpec_Mirror struct {
Mirror *v1.Destination `protobuf:"bytes,9,opt,name=mirror,proto3,oneof"`
}
type RoutingRuleSpec_HeaderManipulation struct {
HeaderManipulation *HeaderManipulation `protobuf:"bytes,12,opt,name=header_manipulation,json=headerManipulation,proto3,oneof"`
}
func (*RoutingRuleSpec_TrafficShifting) isRoutingRuleSpec_RuleType() {}
func (*RoutingRuleSpec_FaultInjection) isRoutingRuleSpec_RuleType() {}
func (*RoutingRuleSpec_RequestTimeout) isRoutingRuleSpec_RuleType() {}
func (*RoutingRuleSpec_Retries) isRoutingRuleSpec_RuleType() {}
func (*RoutingRuleSpec_CorsPolicy) isRoutingRuleSpec_RuleType() {}
func (*RoutingRuleSpec_Mirror) isRoutingRuleSpec_RuleType() {}
func (*RoutingRuleSpec_HeaderManipulation) isRoutingRuleSpec_RuleType() {}
func (m *RoutingRuleSpec) GetRuleType() isRoutingRuleSpec_RuleType {
if m != nil {
return m.RuleType
}
return nil
}
func (m *RoutingRuleSpec) GetTrafficShifting() *TrafficShifting {
if x, ok := m.GetRuleType().(*RoutingRuleSpec_TrafficShifting); ok {
return x.TrafficShifting
}
return nil
}
func (m *RoutingRuleSpec) GetFaultInjection() *FaultInjection {
if x, ok := m.GetRuleType().(*RoutingRuleSpec_FaultInjection); ok {
return x.FaultInjection
}
return nil
}
func (m *RoutingRuleSpec) GetRequestTimeout() *time.Duration {
if x, ok := m.GetRuleType().(*RoutingRuleSpec_RequestTimeout); ok {
return x.RequestTimeout
}
return nil
}
func (m *RoutingRuleSpec) GetRetries() *RetryPolicy {
if x, ok := m.GetRuleType().(*RoutingRuleSpec_Retries); ok {
return x.Retries
}
return nil
}
func (m *RoutingRuleSpec) GetCorsPolicy() *v1alpha3.CorsPolicy {
if x, ok := m.GetRuleType().(*RoutingRuleSpec_CorsPolicy); ok {
return x.CorsPolicy
}
return nil
}
func (m *RoutingRuleSpec) GetMirror() *v1.Destination {
if x, ok := m.GetRuleType().(*RoutingRuleSpec_Mirror); ok {
return x.Mirror
}
return nil
}
func (m *RoutingRuleSpec) GetHeaderManipulation() *HeaderManipulation {
if x, ok := m.GetRuleType().(*RoutingRuleSpec_HeaderManipulation); ok {
return x.HeaderManipulation
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*RoutingRuleSpec) 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 _RoutingRuleSpec_OneofMarshaler, _RoutingRuleSpec_OneofUnmarshaler, _RoutingRuleSpec_OneofSizer, []interface{}{
(*RoutingRuleSpec_TrafficShifting)(nil),
(*RoutingRuleSpec_FaultInjection)(nil),
(*RoutingRuleSpec_RequestTimeout)(nil),
(*RoutingRuleSpec_Retries)(nil),
(*RoutingRuleSpec_CorsPolicy)(nil),
(*RoutingRuleSpec_Mirror)(nil),
(*RoutingRuleSpec_HeaderManipulation)(nil),
}
}
func _RoutingRuleSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*RoutingRuleSpec)
// rule_type
switch x := m.RuleType.(type) {
case *RoutingRuleSpec_TrafficShifting:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TrafficShifting); err != nil {
return err
}
case *RoutingRuleSpec_FaultInjection:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.FaultInjection); err != nil {
return err
}
case *RoutingRuleSpec_RequestTimeout:
_ = b.EncodeVarint(7<<3 | proto.WireBytes)
dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.RequestTimeout)
if err != nil {
return err
}
if err := b.EncodeRawBytes(dAtA); err != nil {
return err
}
case *RoutingRuleSpec_Retries:
_ = b.EncodeVarint(8<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Retries); err != nil {
return err
}
case *RoutingRuleSpec_CorsPolicy:
_ = b.EncodeVarint(10<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.CorsPolicy); err != nil {
return err
}
case *RoutingRuleSpec_Mirror:
_ = b.EncodeVarint(9<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Mirror); err != nil {
return err
}
case *RoutingRuleSpec_HeaderManipulation:
_ = b.EncodeVarint(12<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.HeaderManipulation); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("RoutingRuleSpec.RuleType has unexpected type %T", x)
}
return nil
}
func _RoutingRuleSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*RoutingRuleSpec)
switch tag {
case 1: // rule_type.traffic_shifting
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TrafficShifting)
err := b.DecodeMessage(msg)
m.RuleType = &RoutingRuleSpec_TrafficShifting{msg}
return true, err
case 2: // rule_type.fault_injection
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(FaultInjection)
err := b.DecodeMessage(msg)
m.RuleType = &RoutingRuleSpec_FaultInjection{msg}
return true, err
case 7: // rule_type.request_timeout
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
if err != nil {
return true, err
}
c := new(time.Duration)
if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil {
return true, err
}
m.RuleType = &RoutingRuleSpec_RequestTimeout{c}
return true, err
case 8: // rule_type.retries
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(RetryPolicy)
err := b.DecodeMessage(msg)
m.RuleType = &RoutingRuleSpec_Retries{msg}
return true, err
case 10: // rule_type.cors_policy
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(v1alpha3.CorsPolicy)
err := b.DecodeMessage(msg)
m.RuleType = &RoutingRuleSpec_CorsPolicy{msg}
return true, err
case 9: // rule_type.mirror
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(v1.Destination)
err := b.DecodeMessage(msg)
m.RuleType = &RoutingRuleSpec_Mirror{msg}
return true, err
case 12: // rule_type.header_manipulation
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(HeaderManipulation)
err := b.DecodeMessage(msg)
m.RuleType = &RoutingRuleSpec_HeaderManipulation{msg}
return true, err
default:
return false, nil
}
}
func _RoutingRuleSpec_OneofSizer(msg proto.Message) (n int) {
m := msg.(*RoutingRuleSpec)
// rule_type
switch x := m.RuleType.(type) {
case *RoutingRuleSpec_TrafficShifting:
s := proto.Size(x.TrafficShifting)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *RoutingRuleSpec_FaultInjection:
s := proto.Size(x.FaultInjection)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *RoutingRuleSpec_RequestTimeout:
s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.RequestTimeout)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *RoutingRuleSpec_Retries:
s := proto.Size(x.Retries)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *RoutingRuleSpec_CorsPolicy:
s := proto.Size(x.CorsPolicy)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *RoutingRuleSpec_Mirror:
s := proto.Size(x.Mirror)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *RoutingRuleSpec_HeaderManipulation:
s := proto.Size(x.HeaderManipulation)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// RetryPolicy contains mesh-specific retry configuration
// Different meshes support different Retry features
// SuperGloo's RetryPolicy exposes config for multiple meshes simultaneously,
// Allowing the same RoutingRule to apply retries to different mesh types
// The configuration applied to the target mesh will use the corresponding
// config for each type, while other config types will be ignored
type RetryPolicy struct {
// retry each failed request until success or max number of retries met
// this retry policy will be applied to any targeted Istio Mesh Instances
MaxRetries *v1alpha3.HTTPRetry `protobuf:"bytes,1,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
// allocate a 'retry budget' for each mesh sidecar
// once the proxy reaches its retry budget limit, it will
// stop retrying all requests for the given retry window.
// this can be used to prevent cascading failures when
// outages cause bursts of retries.
// this retry policy will be applied to any targeted Linkerd Mesh Instances
RetryBudget *RetryBudget `protobuf:"bytes,2,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetryPolicy) Reset() { *m = RetryPolicy{} }
func (m *RetryPolicy) String() string { return proto.CompactTextString(m) }
func (*RetryPolicy) ProtoMessage() {}
func (*RetryPolicy) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{2}
}
func (m *RetryPolicy) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetryPolicy.Unmarshal(m, b)
}
func (m *RetryPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetryPolicy.Marshal(b, m, deterministic)
}
func (m *RetryPolicy) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetryPolicy.Merge(m, src)
}
func (m *RetryPolicy) XXX_Size() int {
return xxx_messageInfo_RetryPolicy.Size(m)
}
func (m *RetryPolicy) XXX_DiscardUnknown() {
xxx_messageInfo_RetryPolicy.DiscardUnknown(m)
}
var xxx_messageInfo_RetryPolicy proto.InternalMessageInfo
func (m *RetryPolicy) GetMaxRetries() *v1alpha3.HTTPRetry {
if m != nil {
return m.MaxRetries
}
return nil
}
func (m *RetryPolicy) GetRetryBudget() *RetryBudget {
if m != nil {
return m.RetryBudget
}
return nil
}
// RetryBudget describes the maximum number of retries that should be issued to
// the destination services. Can only be applied to Linkerd meshes
type RetryBudget struct {
// The ratio of additional traffic that may be added by retries. A
// retry_ratio of 0.1 means that 1 retry may be attempted for every 10 regular
// requests. A retry_ratio of 1.0 means that 1 retry may be attempted for
// every 1 regular request (in other words, total request load may be doubled
// as a result of retries).
RetryRatio float32 `protobuf:"fixed32,1,opt,name=retry_ratio,json=retryRatio,proto3" json:"retry_ratio,omitempty"`
// The proxy may always attempt this number of retries per second, even if it
// would violate the retryRatio. This is to allow retries to happen even
// when the request rate is very low.
MinRetriesPerSecond uint32 `protobuf:"varint,2,opt,name=min_retries_per_second,json=minRetriesPerSecond,proto3" json:"min_retries_per_second,omitempty"`
// This duration indicates for how long requests should be considered for the
// purposes of enforcing the retryRatio. A higher value considers a larger
// window and therefore allows burstier retries.
Ttl time.Duration `protobuf:"bytes,3,opt,name=ttl,proto3,stdduration" json:"ttl"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetryBudget) Reset() { *m = RetryBudget{} }
func (m *RetryBudget) String() string { return proto.CompactTextString(m) }
func (*RetryBudget) ProtoMessage() {}
func (*RetryBudget) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{3}
}
func (m *RetryBudget) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetryBudget.Unmarshal(m, b)
}
func (m *RetryBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetryBudget.Marshal(b, m, deterministic)
}
func (m *RetryBudget) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetryBudget.Merge(m, src)
}
func (m *RetryBudget) XXX_Size() int {
return xxx_messageInfo_RetryBudget.Size(m)
}
func (m *RetryBudget) XXX_DiscardUnknown() {
xxx_messageInfo_RetryBudget.DiscardUnknown(m)
}
var xxx_messageInfo_RetryBudget proto.InternalMessageInfo
func (m *RetryBudget) GetRetryRatio() float32 {
if m != nil {
return m.RetryRatio
}
return 0
}
func (m *RetryBudget) GetMinRetriesPerSecond() uint32 {
if m != nil {
return m.MinRetriesPerSecond
}
return 0
}
func (m *RetryBudget) GetTtl() time.Duration {
if m != nil {
return m.Ttl
}
return 0
}
// requests for this rule will be routed to these destinations
type TrafficShifting struct {
// split traffic between these subsets based on their weights
// weights are relative to the sum of the weights
Destinations *v1.MultiDestination `protobuf:"bytes,1,opt,name=destinations,proto3" json:"destinations,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TrafficShifting) Reset() { *m = TrafficShifting{} }
func (m *TrafficShifting) String() string { return proto.CompactTextString(m) }
func (*TrafficShifting) ProtoMessage() {}
func (*TrafficShifting) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{4}
}
func (m *TrafficShifting) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TrafficShifting.Unmarshal(m, b)
}
func (m *TrafficShifting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TrafficShifting.Marshal(b, m, deterministic)
}
func (m *TrafficShifting) XXX_Merge(src proto.Message) {
xxx_messageInfo_TrafficShifting.Merge(m, src)
}
func (m *TrafficShifting) XXX_Size() int {
return xxx_messageInfo_TrafficShifting.Size(m)
}
func (m *TrafficShifting) XXX_DiscardUnknown() {
xxx_messageInfo_TrafficShifting.DiscardUnknown(m)
}
var xxx_messageInfo_TrafficShifting proto.InternalMessageInfo
func (m *TrafficShifting) GetDestinations() *v1.MultiDestination {
if m != nil {
return m.Destinations
}
return nil
}
// FaultInjection can be used to specify one or more faults to inject
// while forwarding http requests to the destination specified in a route.
// Faults include aborting the Http request from downstream service, and/or delaying
// proxying of requests. A fault rule MUST HAVE delay or abort.
type FaultInjection struct {
// Types that are valid to be assigned to FaultInjectionType:
// *FaultInjection_Delay_
// *FaultInjection_Abort_
FaultInjectionType isFaultInjection_FaultInjectionType `protobuf_oneof:"fault_injection_type"`
// Percentage of requests to be faulted with the error code provided.
// Values range between 0 and 100
Percentage float64 `protobuf:"fixed64,5,opt,name=percentage,proto3" json:"percentage,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FaultInjection) Reset() { *m = FaultInjection{} }
func (m *FaultInjection) String() string { return proto.CompactTextString(m) }
func (*FaultInjection) ProtoMessage() {}
func (*FaultInjection) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{5}
}
func (m *FaultInjection) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FaultInjection.Unmarshal(m, b)
}
func (m *FaultInjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FaultInjection.Marshal(b, m, deterministic)
}
func (m *FaultInjection) XXX_Merge(src proto.Message) {
xxx_messageInfo_FaultInjection.Merge(m, src)
}
func (m *FaultInjection) XXX_Size() int {
return xxx_messageInfo_FaultInjection.Size(m)
}
func (m *FaultInjection) XXX_DiscardUnknown() {
xxx_messageInfo_FaultInjection.DiscardUnknown(m)
}
var xxx_messageInfo_FaultInjection proto.InternalMessageInfo
type isFaultInjection_FaultInjectionType interface {
isFaultInjection_FaultInjectionType()
Equal(interface{}) bool
}
type FaultInjection_Delay_ struct {
Delay *FaultInjection_Delay `protobuf:"bytes,1,opt,name=delay,proto3,oneof"`
}
type FaultInjection_Abort_ struct {
Abort *FaultInjection_Abort `protobuf:"bytes,2,opt,name=abort,proto3,oneof"`
}
func (*FaultInjection_Delay_) isFaultInjection_FaultInjectionType() {}
func (*FaultInjection_Abort_) isFaultInjection_FaultInjectionType() {}
func (m *FaultInjection) GetFaultInjectionType() isFaultInjection_FaultInjectionType {
if m != nil {
return m.FaultInjectionType
}
return nil
}
func (m *FaultInjection) GetDelay() *FaultInjection_Delay {
if x, ok := m.GetFaultInjectionType().(*FaultInjection_Delay_); ok {
return x.Delay
}
return nil
}
func (m *FaultInjection) GetAbort() *FaultInjection_Abort {
if x, ok := m.GetFaultInjectionType().(*FaultInjection_Abort_); ok {
return x.Abort
}
return nil
}
func (m *FaultInjection) GetPercentage() float64 {
if m != nil {
return m.Percentage
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*FaultInjection) 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 _FaultInjection_OneofMarshaler, _FaultInjection_OneofUnmarshaler, _FaultInjection_OneofSizer, []interface{}{
(*FaultInjection_Delay_)(nil),
(*FaultInjection_Abort_)(nil),
}
}
func _FaultInjection_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*FaultInjection)
// fault_injection_type
switch x := m.FaultInjectionType.(type) {
case *FaultInjection_Delay_:
_ = b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Delay); err != nil {
return err
}
case *FaultInjection_Abort_:
_ = b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Abort); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("FaultInjection.FaultInjectionType has unexpected type %T", x)
}
return nil
}
func _FaultInjection_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*FaultInjection)
switch tag {
case 1: // fault_injection_type.delay
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(FaultInjection_Delay)
err := b.DecodeMessage(msg)
m.FaultInjectionType = &FaultInjection_Delay_{msg}
return true, err
case 2: // fault_injection_type.abort
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(FaultInjection_Abort)
err := b.DecodeMessage(msg)
m.FaultInjectionType = &FaultInjection_Abort_{msg}
return true, err
default:
return false, nil
}
}
func _FaultInjection_OneofSizer(msg proto.Message) (n int) {
m := msg.(*FaultInjection)
// fault_injection_type
switch x := m.FaultInjectionType.(type) {
case *FaultInjection_Delay_:
s := proto.Size(x.Delay)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *FaultInjection_Abort_:
s := proto.Size(x.Abort)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// The _fixedDelay_ field is used to indicate the amount of delay in seconds.
// The optional _percentage_ field can be used to only delay a certain
// percentage of requests. If left unspecified, all request will be delayed.
type FaultInjection_Delay struct {
// duration of delay, matches golang duration spec
Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration"`
// type of delay based on the enum below
DelayType FaultInjection_Delay_Type `protobuf:"varint,6,opt,name=delay_type,json=delayType,proto3,enum=supergloo.solo.io.FaultInjection_Delay_Type" json:"delay_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FaultInjection_Delay) Reset() { *m = FaultInjection_Delay{} }
func (m *FaultInjection_Delay) String() string { return proto.CompactTextString(m) }
func (*FaultInjection_Delay) ProtoMessage() {}
func (*FaultInjection_Delay) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{5, 0}
}
func (m *FaultInjection_Delay) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FaultInjection_Delay.Unmarshal(m, b)
}
func (m *FaultInjection_Delay) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FaultInjection_Delay.Marshal(b, m, deterministic)
}
func (m *FaultInjection_Delay) XXX_Merge(src proto.Message) {
xxx_messageInfo_FaultInjection_Delay.Merge(m, src)
}
func (m *FaultInjection_Delay) XXX_Size() int {
return xxx_messageInfo_FaultInjection_Delay.Size(m)
}
func (m *FaultInjection_Delay) XXX_DiscardUnknown() {
xxx_messageInfo_FaultInjection_Delay.DiscardUnknown(m)
}
var xxx_messageInfo_FaultInjection_Delay proto.InternalMessageInfo
func (m *FaultInjection_Delay) GetDuration() time.Duration {
if m != nil {
return m.Duration
}
return 0
}
func (m *FaultInjection_Delay) GetDelayType() FaultInjection_Delay_Type {
if m != nil {
return m.DelayType
}
return FaultInjection_Delay_FIXED
}
// The _httpStatus_ field is used to indicate the HTTP status code to
// return to the caller. The optional _percentage_ field can be used to only
// abort a certain percentage of requests. If not specified, all requests are
// aborted.
type FaultInjection_Abort struct {
// Types that are valid to be assigned to ErrorType:
// *FaultInjection_Abort_HttpStatus
ErrorType isFaultInjection_Abort_ErrorType `protobuf_oneof:"error_type"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FaultInjection_Abort) Reset() { *m = FaultInjection_Abort{} }
func (m *FaultInjection_Abort) String() string { return proto.CompactTextString(m) }
func (*FaultInjection_Abort) ProtoMessage() {}
func (*FaultInjection_Abort) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{5, 1}
}
func (m *FaultInjection_Abort) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FaultInjection_Abort.Unmarshal(m, b)
}
func (m *FaultInjection_Abort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FaultInjection_Abort.Marshal(b, m, deterministic)
}
func (m *FaultInjection_Abort) XXX_Merge(src proto.Message) {
xxx_messageInfo_FaultInjection_Abort.Merge(m, src)
}
func (m *FaultInjection_Abort) XXX_Size() int {
return xxx_messageInfo_FaultInjection_Abort.Size(m)
}
func (m *FaultInjection_Abort) XXX_DiscardUnknown() {
xxx_messageInfo_FaultInjection_Abort.DiscardUnknown(m)
}
var xxx_messageInfo_FaultInjection_Abort proto.InternalMessageInfo
type isFaultInjection_Abort_ErrorType interface {
isFaultInjection_Abort_ErrorType()
Equal(interface{}) bool
}
type FaultInjection_Abort_HttpStatus struct {
HttpStatus int32 `protobuf:"varint,4,opt,name=http_status,json=httpStatus,proto3,oneof"`
}
func (*FaultInjection_Abort_HttpStatus) isFaultInjection_Abort_ErrorType() {}
func (m *FaultInjection_Abort) GetErrorType() isFaultInjection_Abort_ErrorType {
if m != nil {
return m.ErrorType
}
return nil
}
func (m *FaultInjection_Abort) GetHttpStatus() int32 {
if x, ok := m.GetErrorType().(*FaultInjection_Abort_HttpStatus); ok {
return x.HttpStatus
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*FaultInjection_Abort) 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 _FaultInjection_Abort_OneofMarshaler, _FaultInjection_Abort_OneofUnmarshaler, _FaultInjection_Abort_OneofSizer, []interface{}{
(*FaultInjection_Abort_HttpStatus)(nil),
}
}
func _FaultInjection_Abort_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*FaultInjection_Abort)
// error_type
switch x := m.ErrorType.(type) {
case *FaultInjection_Abort_HttpStatus:
_ = b.EncodeVarint(4<<3 | proto.WireVarint)
_ = b.EncodeVarint(uint64(x.HttpStatus))
case nil:
default:
return fmt.Errorf("FaultInjection_Abort.ErrorType has unexpected type %T", x)
}
return nil
}
func _FaultInjection_Abort_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*FaultInjection_Abort)
switch tag {
case 4: // error_type.http_status
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.ErrorType = &FaultInjection_Abort_HttpStatus{int32(x)}
return true, err
default:
return false, nil
}
}
func _FaultInjection_Abort_OneofSizer(msg proto.Message) (n int) {
m := msg.(*FaultInjection_Abort)
// error_type
switch x := m.ErrorType.(type) {
case *FaultInjection_Abort_HttpStatus:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.HttpStatus))
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// manipulate request and response headers
type HeaderManipulation struct {
// HTTP headers to remove before returning a response to the caller.
RemoveResponseHeaders []string `protobuf:"bytes,12,rep,name=remove_response_headers,json=removeResponseHeaders,proto3" json:"remove_response_headers,omitempty"`
// Additional HTTP headers to add before returning a response to the
// caller.
AppendResponseHeaders map[string]string `protobuf:"bytes,13,rep,name=append_response_headers,json=appendResponseHeaders,proto3" json:"append_response_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// HTTP headers to remove before forwarding a request to the
// destination service.
RemoveRequestHeaders []string `protobuf:"bytes,14,rep,name=remove_request_headers,json=removeRequestHeaders,proto3" json:"remove_request_headers,omitempty"`
// Additional HTTP headers to add before forwarding a request to the
// destination service.
AppendRequestHeaders map[string]string `protobuf:"bytes,15,rep,name=append_request_headers,json=appendRequestHeaders,proto3" json:"append_request_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HeaderManipulation) Reset() { *m = HeaderManipulation{} }
func (m *HeaderManipulation) String() string { return proto.CompactTextString(m) }
func (*HeaderManipulation) ProtoMessage() {}
func (*HeaderManipulation) Descriptor() ([]byte, []int) {
return fileDescriptor_29316bfaa5f4ba1a, []int{6}
}
func (m *HeaderManipulation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HeaderManipulation.Unmarshal(m, b)
}
func (m *HeaderManipulation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HeaderManipulation.Marshal(b, m, deterministic)
}
func (m *HeaderManipulation) XXX_Merge(src proto.Message) {
xxx_messageInfo_HeaderManipulation.Merge(m, src)