-
Notifications
You must be signed in to change notification settings - Fork 523
/
Copy pathexternal_processor.pb.go
executable file
·1924 lines (1724 loc) · 84.8 KB
/
external_processor.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-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.30.0
// protoc v5.29.3
// source: envoy/service/ext_proc/v3/external_processor.proto
package ext_procv3
import (
_ "github.com/cncf/xds/go/udpa/annotations"
_ "github.com/cncf/xds/go/xds/annotations/v3"
_ "github.com/envoyproxy/go-control-plane/envoy/annotations"
v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
v31 "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_proc/v3"
v32 "github.com/envoyproxy/go-control-plane/envoy/type/v3"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
structpb "google.golang.org/protobuf/types/known/structpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The status of the response.
type CommonResponse_ResponseStatus int32
const (
// Apply the mutation instructions in this message to the
// request or response, and then continue processing the filter
// stream as normal. This is the default.
CommonResponse_CONTINUE CommonResponse_ResponseStatus = 0
// Apply the specified header mutation, replace the body with the body
// specified in the body mutation (if present), and do not send any
// further messages for this request or response even if the processing
// mode is configured to do so.
//
// When used in response to a request_headers or response_headers message,
// this status makes it possible to either completely replace the body
// while discarding the original body, or to add a body to a message that
// formerly did not have one.
//
// In other words, this response makes it possible to turn an HTTP GET
// into a POST, PUT, or PATCH.
CommonResponse_CONTINUE_AND_REPLACE CommonResponse_ResponseStatus = 1
)
// Enum value maps for CommonResponse_ResponseStatus.
var (
CommonResponse_ResponseStatus_name = map[int32]string{
0: "CONTINUE",
1: "CONTINUE_AND_REPLACE",
}
CommonResponse_ResponseStatus_value = map[string]int32{
"CONTINUE": 0,
"CONTINUE_AND_REPLACE": 1,
}
)
func (x CommonResponse_ResponseStatus) Enum() *CommonResponse_ResponseStatus {
p := new(CommonResponse_ResponseStatus)
*p = x
return p
}
func (x CommonResponse_ResponseStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommonResponse_ResponseStatus) Descriptor() protoreflect.EnumDescriptor {
return file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes[0].Descriptor()
}
func (CommonResponse_ResponseStatus) Type() protoreflect.EnumType {
return &file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes[0]
}
func (x CommonResponse_ResponseStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommonResponse_ResponseStatus.Descriptor instead.
func (CommonResponse_ResponseStatus) EnumDescriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{8, 0}
}
// This represents the different types of messages that Envoy can send
// to an external processing server.
// [#next-free-field: 11]
type ProcessingRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Each request message will include one of the following sub-messages. Which
// ones are set for a particular HTTP request/response depend on the
// processing mode.
//
// Types that are assignable to Request:
//
// *ProcessingRequest_RequestHeaders
// *ProcessingRequest_ResponseHeaders
// *ProcessingRequest_RequestBody
// *ProcessingRequest_ResponseBody
// *ProcessingRequest_RequestTrailers
// *ProcessingRequest_ResponseTrailers
Request isProcessingRequest_Request `protobuf_oneof:"request"`
// Dynamic metadata associated with the request.
MetadataContext *v3.Metadata `protobuf:"bytes,8,opt,name=metadata_context,json=metadataContext,proto3" json:"metadata_context,omitempty"`
// The values of properties selected by the “request_attributes“
// or “response_attributes“ list in the configuration. Each entry
// in the list is populated from the standard
// :ref:`attributes <arch_overview_attributes>` supported across Envoy.
Attributes map[string]*structpb.Struct `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Specify whether the filter that sent this request is running in :ref:`observability_mode
// <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.observability_mode>`
// and defaults to false.
//
// - A value of “false“ indicates that the server must respond
// to this message by either sending back a matching ProcessingResponse message,
// or by closing the stream.
// - A value of “true“ indicates that the server should not respond to this message, as any
// responses will be ignored. However, it may still close the stream to indicate that no more messages
// are needed.
ObservabilityMode bool `protobuf:"varint,10,opt,name=observability_mode,json=observabilityMode,proto3" json:"observability_mode,omitempty"`
}
func (x *ProcessingRequest) Reset() {
*x = ProcessingRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProcessingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProcessingRequest) ProtoMessage() {}
func (x *ProcessingRequest) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProcessingRequest.ProtoReflect.Descriptor instead.
func (*ProcessingRequest) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{0}
}
func (m *ProcessingRequest) GetRequest() isProcessingRequest_Request {
if m != nil {
return m.Request
}
return nil
}
func (x *ProcessingRequest) GetRequestHeaders() *HttpHeaders {
if x, ok := x.GetRequest().(*ProcessingRequest_RequestHeaders); ok {
return x.RequestHeaders
}
return nil
}
func (x *ProcessingRequest) GetResponseHeaders() *HttpHeaders {
if x, ok := x.GetRequest().(*ProcessingRequest_ResponseHeaders); ok {
return x.ResponseHeaders
}
return nil
}
func (x *ProcessingRequest) GetRequestBody() *HttpBody {
if x, ok := x.GetRequest().(*ProcessingRequest_RequestBody); ok {
return x.RequestBody
}
return nil
}
func (x *ProcessingRequest) GetResponseBody() *HttpBody {
if x, ok := x.GetRequest().(*ProcessingRequest_ResponseBody); ok {
return x.ResponseBody
}
return nil
}
func (x *ProcessingRequest) GetRequestTrailers() *HttpTrailers {
if x, ok := x.GetRequest().(*ProcessingRequest_RequestTrailers); ok {
return x.RequestTrailers
}
return nil
}
func (x *ProcessingRequest) GetResponseTrailers() *HttpTrailers {
if x, ok := x.GetRequest().(*ProcessingRequest_ResponseTrailers); ok {
return x.ResponseTrailers
}
return nil
}
func (x *ProcessingRequest) GetMetadataContext() *v3.Metadata {
if x != nil {
return x.MetadataContext
}
return nil
}
func (x *ProcessingRequest) GetAttributes() map[string]*structpb.Struct {
if x != nil {
return x.Attributes
}
return nil
}
func (x *ProcessingRequest) GetObservabilityMode() bool {
if x != nil {
return x.ObservabilityMode
}
return false
}
type isProcessingRequest_Request interface {
isProcessingRequest_Request()
}
type ProcessingRequest_RequestHeaders struct {
// Information about the HTTP request headers, as well as peer info and additional
// properties. Unless “observability_mode“ is “true“, the server must send back a
// HeaderResponse message, an ImmediateResponse message, or close the stream.
RequestHeaders *HttpHeaders `protobuf:"bytes,2,opt,name=request_headers,json=requestHeaders,proto3,oneof"`
}
type ProcessingRequest_ResponseHeaders struct {
// Information about the HTTP response headers, as well as peer info and additional
// properties. Unless “observability_mode“ is “true“, the server must send back a
// HeaderResponse message or close the stream.
ResponseHeaders *HttpHeaders `protobuf:"bytes,3,opt,name=response_headers,json=responseHeaders,proto3,oneof"`
}
type ProcessingRequest_RequestBody struct {
// A chunk of the HTTP request body. Unless “observability_mode“ is true, the server must send back
// a BodyResponse message, an ImmediateResponse message, or close the stream.
RequestBody *HttpBody `protobuf:"bytes,4,opt,name=request_body,json=requestBody,proto3,oneof"`
}
type ProcessingRequest_ResponseBody struct {
// A chunk of the HTTP response body. Unless “observability_mode“ is “true“, the server must send back
// a BodyResponse message or close the stream.
ResponseBody *HttpBody `protobuf:"bytes,5,opt,name=response_body,json=responseBody,proto3,oneof"`
}
type ProcessingRequest_RequestTrailers struct {
// The HTTP trailers for the request path. Unless “observability_mode“ is “true“, the server
// must send back a TrailerResponse message or close the stream.
//
// This message is only sent if the trailers processing mode is set to “SEND“ and
// the original downstream request has trailers.
RequestTrailers *HttpTrailers `protobuf:"bytes,6,opt,name=request_trailers,json=requestTrailers,proto3,oneof"`
}
type ProcessingRequest_ResponseTrailers struct {
// The HTTP trailers for the response path. Unless “observability_mode“ is “true“, the server
// must send back a TrailerResponse message or close the stream.
//
// This message is only sent if the trailers processing mode is set to “SEND“ and
// the original upstream response has trailers.
ResponseTrailers *HttpTrailers `protobuf:"bytes,7,opt,name=response_trailers,json=responseTrailers,proto3,oneof"`
}
func (*ProcessingRequest_RequestHeaders) isProcessingRequest_Request() {}
func (*ProcessingRequest_ResponseHeaders) isProcessingRequest_Request() {}
func (*ProcessingRequest_RequestBody) isProcessingRequest_Request() {}
func (*ProcessingRequest_ResponseBody) isProcessingRequest_Request() {}
func (*ProcessingRequest_RequestTrailers) isProcessingRequest_Request() {}
func (*ProcessingRequest_ResponseTrailers) isProcessingRequest_Request() {}
// For every ProcessingRequest received by the server with the “observability_mode“ field
// set to false, the server must send back exactly one ProcessingResponse message.
// [#next-free-field: 11]
type ProcessingResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The response type that is sent by the server.
//
// Types that are assignable to Response:
//
// *ProcessingResponse_RequestHeaders
// *ProcessingResponse_ResponseHeaders
// *ProcessingResponse_RequestBody
// *ProcessingResponse_ResponseBody
// *ProcessingResponse_RequestTrailers
// *ProcessingResponse_ResponseTrailers
// *ProcessingResponse_ImmediateResponse
Response isProcessingResponse_Response `protobuf_oneof:"response"`
// Optional metadata that will be emitted as dynamic metadata to be consumed by
// following filters. This metadata will be placed in the namespace(s) specified by the top-level
// field name(s) of the struct.
DynamicMetadata *structpb.Struct `protobuf:"bytes,8,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"`
// Override how parts of the HTTP request and response are processed
// for the duration of this particular request/response only. Servers
// may use this to intelligently control how requests are processed
// based on the headers and other metadata that they see.
// This field is only applicable when servers responding to the header requests.
// If it is set in the response to the body or trailer requests, it will be ignored by Envoy.
// It is also ignored by Envoy when the ext_proc filter config
// :ref:`allow_mode_override
// <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.allow_mode_override>`
// is set to false, or
// :ref:`send_body_without_waiting_for_header_response
// <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.send_body_without_waiting_for_header_response>`
// is set to true.
ModeOverride *v31.ProcessingMode `protobuf:"bytes,9,opt,name=mode_override,json=modeOverride,proto3" json:"mode_override,omitempty"`
// When ext_proc server receives a request message, in case it needs more
// time to process the message, it sends back a ProcessingResponse message
// with a new timeout value. When Envoy receives this response message,
// it ignores other fields in the response, just stop the original timer,
// which has the timeout value specified in
// :ref:`message_timeout
// <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.message_timeout>`
// and start a new timer with this “override_message_timeout“ value and keep the
// Envoy ext_proc filter state machine intact.
// Has to be >= 1ms and <=
// :ref:`max_message_timeout <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.max_message_timeout>`
// Such message can be sent at most once in a particular Envoy ext_proc filter processing state.
// To enable this API, one has to set “max_message_timeout“ to a number >= 1ms.
OverrideMessageTimeout *durationpb.Duration `protobuf:"bytes,10,opt,name=override_message_timeout,json=overrideMessageTimeout,proto3" json:"override_message_timeout,omitempty"`
}
func (x *ProcessingResponse) Reset() {
*x = ProcessingResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProcessingResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProcessingResponse) ProtoMessage() {}
func (x *ProcessingResponse) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProcessingResponse.ProtoReflect.Descriptor instead.
func (*ProcessingResponse) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{1}
}
func (m *ProcessingResponse) GetResponse() isProcessingResponse_Response {
if m != nil {
return m.Response
}
return nil
}
func (x *ProcessingResponse) GetRequestHeaders() *HeadersResponse {
if x, ok := x.GetResponse().(*ProcessingResponse_RequestHeaders); ok {
return x.RequestHeaders
}
return nil
}
func (x *ProcessingResponse) GetResponseHeaders() *HeadersResponse {
if x, ok := x.GetResponse().(*ProcessingResponse_ResponseHeaders); ok {
return x.ResponseHeaders
}
return nil
}
func (x *ProcessingResponse) GetRequestBody() *BodyResponse {
if x, ok := x.GetResponse().(*ProcessingResponse_RequestBody); ok {
return x.RequestBody
}
return nil
}
func (x *ProcessingResponse) GetResponseBody() *BodyResponse {
if x, ok := x.GetResponse().(*ProcessingResponse_ResponseBody); ok {
return x.ResponseBody
}
return nil
}
func (x *ProcessingResponse) GetRequestTrailers() *TrailersResponse {
if x, ok := x.GetResponse().(*ProcessingResponse_RequestTrailers); ok {
return x.RequestTrailers
}
return nil
}
func (x *ProcessingResponse) GetResponseTrailers() *TrailersResponse {
if x, ok := x.GetResponse().(*ProcessingResponse_ResponseTrailers); ok {
return x.ResponseTrailers
}
return nil
}
func (x *ProcessingResponse) GetImmediateResponse() *ImmediateResponse {
if x, ok := x.GetResponse().(*ProcessingResponse_ImmediateResponse); ok {
return x.ImmediateResponse
}
return nil
}
func (x *ProcessingResponse) GetDynamicMetadata() *structpb.Struct {
if x != nil {
return x.DynamicMetadata
}
return nil
}
func (x *ProcessingResponse) GetModeOverride() *v31.ProcessingMode {
if x != nil {
return x.ModeOverride
}
return nil
}
func (x *ProcessingResponse) GetOverrideMessageTimeout() *durationpb.Duration {
if x != nil {
return x.OverrideMessageTimeout
}
return nil
}
type isProcessingResponse_Response interface {
isProcessingResponse_Response()
}
type ProcessingResponse_RequestHeaders struct {
// The server must send back this message in response to a message with the
// “request_headers“ field set.
RequestHeaders *HeadersResponse `protobuf:"bytes,1,opt,name=request_headers,json=requestHeaders,proto3,oneof"`
}
type ProcessingResponse_ResponseHeaders struct {
// The server must send back this message in response to a message with the
// “response_headers“ field set.
ResponseHeaders *HeadersResponse `protobuf:"bytes,2,opt,name=response_headers,json=responseHeaders,proto3,oneof"`
}
type ProcessingResponse_RequestBody struct {
// The server must send back this message in response to a message with
// the “request_body“ field set.
RequestBody *BodyResponse `protobuf:"bytes,3,opt,name=request_body,json=requestBody,proto3,oneof"`
}
type ProcessingResponse_ResponseBody struct {
// The server must send back this message in response to a message with
// the “response_body“ field set.
ResponseBody *BodyResponse `protobuf:"bytes,4,opt,name=response_body,json=responseBody,proto3,oneof"`
}
type ProcessingResponse_RequestTrailers struct {
// The server must send back this message in response to a message with
// the “request_trailers“ field set.
RequestTrailers *TrailersResponse `protobuf:"bytes,5,opt,name=request_trailers,json=requestTrailers,proto3,oneof"`
}
type ProcessingResponse_ResponseTrailers struct {
// The server must send back this message in response to a message with
// the “response_trailers“ field set.
ResponseTrailers *TrailersResponse `protobuf:"bytes,6,opt,name=response_trailers,json=responseTrailers,proto3,oneof"`
}
type ProcessingResponse_ImmediateResponse struct {
// If specified, attempt to create a locally generated response, send it
// downstream, and stop processing additional filters and ignore any
// additional messages received from the remote server for this request or
// response. If a response has already started -- for example, if this
// message is sent response to a “response_body“ message -- then
// this will either ship the reply directly to the downstream codec,
// or reset the stream.
ImmediateResponse *ImmediateResponse `protobuf:"bytes,7,opt,name=immediate_response,json=immediateResponse,proto3,oneof"`
}
func (*ProcessingResponse_RequestHeaders) isProcessingResponse_Response() {}
func (*ProcessingResponse_ResponseHeaders) isProcessingResponse_Response() {}
func (*ProcessingResponse_RequestBody) isProcessingResponse_Response() {}
func (*ProcessingResponse_ResponseBody) isProcessingResponse_Response() {}
func (*ProcessingResponse_RequestTrailers) isProcessingResponse_Response() {}
func (*ProcessingResponse_ResponseTrailers) isProcessingResponse_Response() {}
func (*ProcessingResponse_ImmediateResponse) isProcessingResponse_Response() {}
// This message is sent to the external server when the HTTP request and responses
// are first received.
type HttpHeaders struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The HTTP request headers. All header keys will be
// lower-cased, because HTTP header keys are case-insensitive.
// The header value is encoded in the
// :ref:`raw_value <envoy_v3_api_field_config.core.v3.HeaderValue.raw_value>` field.
Headers *v3.HeaderMap `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
// [#not-implemented-hide:]
// This field is deprecated and not implemented. Attributes will be sent in
// the top-level :ref:`attributes <envoy_v3_api_field_service.ext_proc.v3.ProcessingRequest.attributes`
// field.
//
// Deprecated: Marked as deprecated in envoy/service/ext_proc/v3/external_processor.proto.
Attributes map[string]*structpb.Struct `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// If “true“, then there is no message body associated with this
// request or response.
EndOfStream bool `protobuf:"varint,3,opt,name=end_of_stream,json=endOfStream,proto3" json:"end_of_stream,omitempty"`
}
func (x *HttpHeaders) Reset() {
*x = HttpHeaders{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HttpHeaders) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpHeaders) ProtoMessage() {}
func (x *HttpHeaders) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HttpHeaders.ProtoReflect.Descriptor instead.
func (*HttpHeaders) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{2}
}
func (x *HttpHeaders) GetHeaders() *v3.HeaderMap {
if x != nil {
return x.Headers
}
return nil
}
// Deprecated: Marked as deprecated in envoy/service/ext_proc/v3/external_processor.proto.
func (x *HttpHeaders) GetAttributes() map[string]*structpb.Struct {
if x != nil {
return x.Attributes
}
return nil
}
func (x *HttpHeaders) GetEndOfStream() bool {
if x != nil {
return x.EndOfStream
}
return false
}
// This message is sent to the external server when the HTTP request and
// response bodies are received.
type HttpBody struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The contents of the body in the HTTP request/response. Note that in
// streaming mode multiple “HttpBody“ messages may be sent.
Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// If “true“, this will be the last “HttpBody“ message that will be sent and no
// trailers will be sent for the current request/response.
EndOfStream bool `protobuf:"varint,2,opt,name=end_of_stream,json=endOfStream,proto3" json:"end_of_stream,omitempty"`
}
func (x *HttpBody) Reset() {
*x = HttpBody{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HttpBody) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpBody) ProtoMessage() {}
func (x *HttpBody) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HttpBody.ProtoReflect.Descriptor instead.
func (*HttpBody) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{3}
}
func (x *HttpBody) GetBody() []byte {
if x != nil {
return x.Body
}
return nil
}
func (x *HttpBody) GetEndOfStream() bool {
if x != nil {
return x.EndOfStream
}
return false
}
// This message is sent to the external server when the HTTP request and
// response trailers are received.
type HttpTrailers struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The header value is encoded in the
// :ref:`raw_value <envoy_v3_api_field_config.core.v3.HeaderValue.raw_value>` field.
Trailers *v3.HeaderMap `protobuf:"bytes,1,opt,name=trailers,proto3" json:"trailers,omitempty"`
}
func (x *HttpTrailers) Reset() {
*x = HttpTrailers{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HttpTrailers) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HttpTrailers) ProtoMessage() {}
func (x *HttpTrailers) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HttpTrailers.ProtoReflect.Descriptor instead.
func (*HttpTrailers) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{4}
}
func (x *HttpTrailers) GetTrailers() *v3.HeaderMap {
if x != nil {
return x.Trailers
}
return nil
}
// This message is sent by the external server to Envoy after “HttpHeaders“ was
// sent to it.
type HeadersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Details the modifications (if any) to be made by Envoy to the current
// request/response.
Response *CommonResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
}
func (x *HeadersResponse) Reset() {
*x = HeadersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeadersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeadersResponse) ProtoMessage() {}
func (x *HeadersResponse) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HeadersResponse.ProtoReflect.Descriptor instead.
func (*HeadersResponse) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{5}
}
func (x *HeadersResponse) GetResponse() *CommonResponse {
if x != nil {
return x.Response
}
return nil
}
// This message is sent by the external server to Envoy after “HttpBody“ was
// sent to it.
type BodyResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Details the modifications (if any) to be made by Envoy to the current
// request/response.
Response *CommonResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
}
func (x *BodyResponse) Reset() {
*x = BodyResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BodyResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BodyResponse) ProtoMessage() {}
func (x *BodyResponse) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BodyResponse.ProtoReflect.Descriptor instead.
func (*BodyResponse) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{6}
}
func (x *BodyResponse) GetResponse() *CommonResponse {
if x != nil {
return x.Response
}
return nil
}
// This message is sent by the external server to Envoy after “HttpTrailers“ was
// sent to it.
type TrailersResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Details the modifications (if any) to be made by Envoy to the current
// request/response trailers.
HeaderMutation *HeaderMutation `protobuf:"bytes,1,opt,name=header_mutation,json=headerMutation,proto3" json:"header_mutation,omitempty"`
}
func (x *TrailersResponse) Reset() {
*x = TrailersResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TrailersResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TrailersResponse) ProtoMessage() {}
func (x *TrailersResponse) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TrailersResponse.ProtoReflect.Descriptor instead.
func (*TrailersResponse) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{7}
}
func (x *TrailersResponse) GetHeaderMutation() *HeaderMutation {
if x != nil {
return x.HeaderMutation
}
return nil
}
// This message contains common fields between header and body responses.
// [#next-free-field: 6]
type CommonResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// If set, provide additional direction on how the Envoy proxy should
// handle the rest of the HTTP filter chain.
Status CommonResponse_ResponseStatus `protobuf:"varint,1,opt,name=status,proto3,enum=envoy.service.ext_proc.v3.CommonResponse_ResponseStatus" json:"status,omitempty"`
// Instructions on how to manipulate the headers. When responding to an
// HttpBody request, header mutations will only take effect if
// the current processing mode for the body is BUFFERED.
HeaderMutation *HeaderMutation `protobuf:"bytes,2,opt,name=header_mutation,json=headerMutation,proto3" json:"header_mutation,omitempty"`
// Replace the body of the last message sent to the remote server on this
// stream. If responding to an HttpBody request, simply replace or clear
// the body chunk that was sent with that request. Body mutations may take
// effect in response either to “header“ or “body“ messages. When it is
// in response to “header“ messages, it only take effect if the
// :ref:`status <envoy_v3_api_field_service.ext_proc.v3.CommonResponse.status>`
// is set to CONTINUE_AND_REPLACE.
BodyMutation *BodyMutation `protobuf:"bytes,3,opt,name=body_mutation,json=bodyMutation,proto3" json:"body_mutation,omitempty"`
// [#not-implemented-hide:]
// Add new trailers to the message. This may be used when responding to either a
// HttpHeaders or HttpBody message, but only if this message is returned
// along with the CONTINUE_AND_REPLACE status.
// The header value is encoded in the
// :ref:`raw_value <envoy_v3_api_field_config.core.v3.HeaderValue.raw_value>` field.
Trailers *v3.HeaderMap `protobuf:"bytes,4,opt,name=trailers,proto3" json:"trailers,omitempty"`
// Clear the route cache for the current client request. This is necessary
// if the remote server modified headers that are used to calculate the route.
// This field is ignored in the response direction. This field is also ignored
// if the Envoy ext_proc filter is in the upstream filter chain.
ClearRouteCache bool `protobuf:"varint,5,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
}
func (x *CommonResponse) Reset() {
*x = CommonResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CommonResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CommonResponse) ProtoMessage() {}
func (x *CommonResponse) ProtoReflect() protoreflect.Message {
mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead.
func (*CommonResponse) Descriptor() ([]byte, []int) {
return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{8}
}
func (x *CommonResponse) GetStatus() CommonResponse_ResponseStatus {
if x != nil {
return x.Status
}
return CommonResponse_CONTINUE
}
func (x *CommonResponse) GetHeaderMutation() *HeaderMutation {
if x != nil {
return x.HeaderMutation
}
return nil
}
func (x *CommonResponse) GetBodyMutation() *BodyMutation {
if x != nil {
return x.BodyMutation
}
return nil
}
func (x *CommonResponse) GetTrailers() *v3.HeaderMap {
if x != nil {
return x.Trailers
}
return nil
}
func (x *CommonResponse) GetClearRouteCache() bool {
if x != nil {
return x.ClearRouteCache
}
return false
}
// This message causes the filter to attempt to create a locally
// generated response, send it downstream, stop processing
// additional filters, and ignore any additional messages received
// from the remote server for this request or response. If a response
// has already started, then this will either ship the reply directly
// to the downstream codec, or reset the stream.
// [#next-free-field: 6]
type ImmediateResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The response code to return.
Status *v32.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
// Apply changes to the default headers, which will include content-type.
Headers *HeaderMutation `protobuf:"bytes,2,opt,name=headers,proto3" json:"headers,omitempty"`
// The message body to return with the response which is sent using the
// text/plain content type, or encoded in the grpc-message header.
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
// If set, then include a gRPC status trailer.
GrpcStatus *GrpcStatus `protobuf:"bytes,4,opt,name=grpc_status,json=grpcStatus,proto3" json:"grpc_status,omitempty"`
// A string detailing why this local reply was sent, which may be included
// in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS%
// command operator field for use in access logging).
Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"`
}
func (x *ImmediateResponse) Reset() {
*x = ImmediateResponse{}
if protoimpl.UnsafeEnabled {