Skip to main content

xds_api/generated/
envoy.data.tap.v3.rs

1// This file is @generated by prost-build.
2/// Wrapper for tapped body data. This includes HTTP request/response body, transport socket received
3/// and transmitted data, etc.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Body {
6    /// Specifies whether body data has been truncated to fit within the specified
7    /// :ref:`max_buffered_rx_bytes
8    /// <envoy_v3_api_field_config.tap.v3.OutputConfig.max_buffered_rx_bytes>` and
9    /// :ref:`max_buffered_tx_bytes
10    /// <envoy_v3_api_field_config.tap.v3.OutputConfig.max_buffered_tx_bytes>` settings.
11    #[prost(bool, tag = "3")]
12    pub truncated: bool,
13    #[prost(oneof = "body::BodyType", tags = "1, 2")]
14    pub body_type: ::core::option::Option<body::BodyType>,
15}
16/// Nested message and enum types in `Body`.
17pub mod body {
18    #[derive(Clone, PartialEq, ::prost::Oneof)]
19    pub enum BodyType {
20        /// Body data as bytes. By default, tap body data will be present in this field, as the proto
21        /// ``bytes`` type can contain any valid byte.
22        #[prost(bytes, tag = "1")]
23        AsBytes(::prost::alloc::vec::Vec<u8>),
24        /// Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
25        /// <envoy_v3_api_enum_value_config.tap.v3.OutputSink.Format.JSON_BODY_AS_STRING>` sink
26        /// format type is selected. See the documentation for that option for why this is useful.
27        #[prost(string, tag = "2")]
28        AsString(::prost::alloc::string::String),
29    }
30}
31impl ::prost::Name for Body {
32    const NAME: &'static str = "Body";
33    const PACKAGE: &'static str = "envoy.data.tap.v3";
34    fn full_name() -> ::prost::alloc::string::String {
35        "envoy.data.tap.v3.Body".into()
36    }
37    fn type_url() -> ::prost::alloc::string::String {
38        "type.googleapis.com/envoy.data.tap.v3.Body".into()
39    }
40}
41/// Connection properties.
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct Connection {
44    /// Local address.
45    #[prost(message, optional, tag = "1")]
46    pub local_address: ::core::option::Option<
47        super::super::super::config::core::v3::Address,
48    >,
49    /// Remote address.
50    #[prost(message, optional, tag = "2")]
51    pub remote_address: ::core::option::Option<
52        super::super::super::config::core::v3::Address,
53    >,
54}
55impl ::prost::Name for Connection {
56    const NAME: &'static str = "Connection";
57    const PACKAGE: &'static str = "envoy.data.tap.v3";
58    fn full_name() -> ::prost::alloc::string::String {
59        "envoy.data.tap.v3.Connection".into()
60    }
61    fn type_url() -> ::prost::alloc::string::String {
62        "type.googleapis.com/envoy.data.tap.v3.Connection".into()
63    }
64}
65/// A fully buffered HTTP trace message.
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct HttpBufferedTrace {
68    /// Request message.
69    #[prost(message, optional, tag = "1")]
70    pub request: ::core::option::Option<http_buffered_trace::Message>,
71    /// Response message.
72    #[prost(message, optional, tag = "2")]
73    pub response: ::core::option::Option<http_buffered_trace::Message>,
74    /// downstream connection
75    #[prost(message, optional, tag = "3")]
76    pub downstream_connection: ::core::option::Option<Connection>,
77}
78/// Nested message and enum types in `HttpBufferedTrace`.
79pub mod http_buffered_trace {
80    /// HTTP message wrapper.
81    #[derive(Clone, PartialEq, ::prost::Message)]
82    pub struct Message {
83        /// Message headers.
84        #[prost(message, repeated, tag = "1")]
85        pub headers: ::prost::alloc::vec::Vec<
86            super::super::super::super::config::core::v3::HeaderValue,
87        >,
88        /// Message body.
89        #[prost(message, optional, tag = "2")]
90        pub body: ::core::option::Option<super::Body>,
91        /// Message trailers.
92        #[prost(message, repeated, tag = "3")]
93        pub trailers: ::prost::alloc::vec::Vec<
94            super::super::super::super::config::core::v3::HeaderValue,
95        >,
96        /// The timestamp after receiving the message headers.
97        #[prost(message, optional, tag = "4")]
98        pub headers_received_time: ::core::option::Option<
99            super::super::super::super::super::google::protobuf::Timestamp,
100        >,
101    }
102    impl ::prost::Name for Message {
103        const NAME: &'static str = "Message";
104        const PACKAGE: &'static str = "envoy.data.tap.v3";
105        fn full_name() -> ::prost::alloc::string::String {
106            "envoy.data.tap.v3.HttpBufferedTrace.Message".into()
107        }
108        fn type_url() -> ::prost::alloc::string::String {
109            "type.googleapis.com/envoy.data.tap.v3.HttpBufferedTrace.Message".into()
110        }
111    }
112}
113impl ::prost::Name for HttpBufferedTrace {
114    const NAME: &'static str = "HttpBufferedTrace";
115    const PACKAGE: &'static str = "envoy.data.tap.v3";
116    fn full_name() -> ::prost::alloc::string::String {
117        "envoy.data.tap.v3.HttpBufferedTrace".into()
118    }
119    fn type_url() -> ::prost::alloc::string::String {
120        "type.googleapis.com/envoy.data.tap.v3.HttpBufferedTrace".into()
121    }
122}
123/// A streamed HTTP trace segment. Multiple segments make up a full trace.
124/// \[#next-free-field: 8\]
125#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct HttpStreamedTraceSegment {
127    /// Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used
128    /// for long term stable uniqueness.
129    #[prost(uint64, tag = "1")]
130    pub trace_id: u64,
131    #[prost(
132        oneof = "http_streamed_trace_segment::MessagePiece",
133        tags = "2, 3, 4, 5, 6, 7"
134    )]
135    pub message_piece: ::core::option::Option<http_streamed_trace_segment::MessagePiece>,
136}
137/// Nested message and enum types in `HttpStreamedTraceSegment`.
138pub mod http_streamed_trace_segment {
139    #[derive(Clone, PartialEq, ::prost::Oneof)]
140    pub enum MessagePiece {
141        /// Request headers.
142        #[prost(message, tag = "2")]
143        RequestHeaders(super::super::super::super::config::core::v3::HeaderMap),
144        /// Request body chunk.
145        #[prost(message, tag = "3")]
146        RequestBodyChunk(super::Body),
147        /// Request trailers.
148        #[prost(message, tag = "4")]
149        RequestTrailers(super::super::super::super::config::core::v3::HeaderMap),
150        /// Response headers.
151        #[prost(message, tag = "5")]
152        ResponseHeaders(super::super::super::super::config::core::v3::HeaderMap),
153        /// Response body chunk.
154        #[prost(message, tag = "6")]
155        ResponseBodyChunk(super::Body),
156        /// Response trailers.
157        #[prost(message, tag = "7")]
158        ResponseTrailers(super::super::super::super::config::core::v3::HeaderMap),
159    }
160}
161impl ::prost::Name for HttpStreamedTraceSegment {
162    const NAME: &'static str = "HttpStreamedTraceSegment";
163    const PACKAGE: &'static str = "envoy.data.tap.v3";
164    fn full_name() -> ::prost::alloc::string::String {
165        "envoy.data.tap.v3.HttpStreamedTraceSegment".into()
166    }
167    fn type_url() -> ::prost::alloc::string::String {
168        "type.googleapis.com/envoy.data.tap.v3.HttpStreamedTraceSegment".into()
169    }
170}
171/// Event in a socket trace.
172#[derive(Clone, PartialEq, ::prost::Message)]
173pub struct SocketEvent {
174    /// Timestamp for event.
175    #[prost(message, optional, tag = "1")]
176    pub timestamp: ::core::option::Option<
177        super::super::super::super::google::protobuf::Timestamp,
178    >,
179    /// Read or write with content as bytes string.
180    #[prost(oneof = "socket_event::EventSelector", tags = "2, 3, 4")]
181    pub event_selector: ::core::option::Option<socket_event::EventSelector>,
182}
183/// Nested message and enum types in `SocketEvent`.
184pub mod socket_event {
185    /// Data read by Envoy from the transport socket.
186    ///
187    /// TODO(htuch): Half-close for reads.
188    #[derive(Clone, PartialEq, ::prost::Message)]
189    pub struct Read {
190        /// Binary data read.
191        #[prost(message, optional, tag = "1")]
192        pub data: ::core::option::Option<super::Body>,
193    }
194    impl ::prost::Name for Read {
195        const NAME: &'static str = "Read";
196        const PACKAGE: &'static str = "envoy.data.tap.v3";
197        fn full_name() -> ::prost::alloc::string::String {
198            "envoy.data.tap.v3.SocketEvent.Read".into()
199        }
200        fn type_url() -> ::prost::alloc::string::String {
201            "type.googleapis.com/envoy.data.tap.v3.SocketEvent.Read".into()
202        }
203    }
204    /// Data written by Envoy to the transport socket.
205    #[derive(Clone, PartialEq, ::prost::Message)]
206    pub struct Write {
207        /// Binary data written.
208        #[prost(message, optional, tag = "1")]
209        pub data: ::core::option::Option<super::Body>,
210        /// Stream was half closed after this write.
211        #[prost(bool, tag = "2")]
212        pub end_stream: bool,
213    }
214    impl ::prost::Name for Write {
215        const NAME: &'static str = "Write";
216        const PACKAGE: &'static str = "envoy.data.tap.v3";
217        fn full_name() -> ::prost::alloc::string::String {
218            "envoy.data.tap.v3.SocketEvent.Write".into()
219        }
220        fn type_url() -> ::prost::alloc::string::String {
221            "type.googleapis.com/envoy.data.tap.v3.SocketEvent.Write".into()
222        }
223    }
224    /// The connection was closed.
225    ///
226    /// TODO(mattklein123): Close event type.
227    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
228    pub struct Closed {}
229    impl ::prost::Name for Closed {
230        const NAME: &'static str = "Closed";
231        const PACKAGE: &'static str = "envoy.data.tap.v3";
232        fn full_name() -> ::prost::alloc::string::String {
233            "envoy.data.tap.v3.SocketEvent.Closed".into()
234        }
235        fn type_url() -> ::prost::alloc::string::String {
236            "type.googleapis.com/envoy.data.tap.v3.SocketEvent.Closed".into()
237        }
238    }
239    /// Read or write with content as bytes string.
240    #[derive(Clone, PartialEq, ::prost::Oneof)]
241    pub enum EventSelector {
242        #[prost(message, tag = "2")]
243        Read(Read),
244        #[prost(message, tag = "3")]
245        Write(Write),
246        #[prost(message, tag = "4")]
247        Closed(Closed),
248    }
249}
250impl ::prost::Name for SocketEvent {
251    const NAME: &'static str = "SocketEvent";
252    const PACKAGE: &'static str = "envoy.data.tap.v3";
253    fn full_name() -> ::prost::alloc::string::String {
254        "envoy.data.tap.v3.SocketEvent".into()
255    }
256    fn type_url() -> ::prost::alloc::string::String {
257        "type.googleapis.com/envoy.data.tap.v3.SocketEvent".into()
258    }
259}
260/// Sequence of read/write events that constitute a buffered trace on a socket.
261/// \[#next-free-field: 6\]
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct SocketBufferedTrace {
264    /// Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used
265    /// for long term stable uniqueness. Matches connection IDs used in Envoy logs.
266    #[prost(uint64, tag = "1")]
267    pub trace_id: u64,
268    /// Connection properties.
269    #[prost(message, optional, tag = "2")]
270    pub connection: ::core::option::Option<Connection>,
271    /// Sequence of observed events.
272    #[prost(message, repeated, tag = "3")]
273    pub events: ::prost::alloc::vec::Vec<SocketEvent>,
274    /// Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes
275    /// <envoy_v3_api_field_config.tap.v3.OutputConfig.max_buffered_rx_bytes>` setting.
276    #[prost(bool, tag = "4")]
277    pub read_truncated: bool,
278    /// Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes
279    /// <envoy_v3_api_field_config.tap.v3.OutputConfig.max_buffered_tx_bytes>` setting.
280    #[prost(bool, tag = "5")]
281    pub write_truncated: bool,
282}
283impl ::prost::Name for SocketBufferedTrace {
284    const NAME: &'static str = "SocketBufferedTrace";
285    const PACKAGE: &'static str = "envoy.data.tap.v3";
286    fn full_name() -> ::prost::alloc::string::String {
287        "envoy.data.tap.v3.SocketBufferedTrace".into()
288    }
289    fn type_url() -> ::prost::alloc::string::String {
290        "type.googleapis.com/envoy.data.tap.v3.SocketBufferedTrace".into()
291    }
292}
293/// A streamed socket trace segment. Multiple segments make up a full trace.
294#[derive(Clone, PartialEq, ::prost::Message)]
295pub struct SocketStreamedTraceSegment {
296    /// Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used
297    /// for long term stable uniqueness. Matches connection IDs used in Envoy logs.
298    #[prost(uint64, tag = "1")]
299    pub trace_id: u64,
300    #[prost(oneof = "socket_streamed_trace_segment::MessagePiece", tags = "2, 3")]
301    pub message_piece: ::core::option::Option<
302        socket_streamed_trace_segment::MessagePiece,
303    >,
304}
305/// Nested message and enum types in `SocketStreamedTraceSegment`.
306pub mod socket_streamed_trace_segment {
307    #[derive(Clone, PartialEq, ::prost::Oneof)]
308    pub enum MessagePiece {
309        /// Connection properties.
310        #[prost(message, tag = "2")]
311        Connection(super::Connection),
312        /// Socket event.
313        #[prost(message, tag = "3")]
314        Event(super::SocketEvent),
315    }
316}
317impl ::prost::Name for SocketStreamedTraceSegment {
318    const NAME: &'static str = "SocketStreamedTraceSegment";
319    const PACKAGE: &'static str = "envoy.data.tap.v3";
320    fn full_name() -> ::prost::alloc::string::String {
321        "envoy.data.tap.v3.SocketStreamedTraceSegment".into()
322    }
323    fn type_url() -> ::prost::alloc::string::String {
324        "type.googleapis.com/envoy.data.tap.v3.SocketStreamedTraceSegment".into()
325    }
326}
327/// Wrapper for all fully buffered and streamed tap traces that Envoy emits. This is required for
328/// sending traces over gRPC APIs or more easily persisting binary messages to files.
329#[derive(Clone, PartialEq, ::prost::Message)]
330pub struct TraceWrapper {
331    #[prost(oneof = "trace_wrapper::Trace", tags = "1, 2, 3, 4")]
332    pub trace: ::core::option::Option<trace_wrapper::Trace>,
333}
334/// Nested message and enum types in `TraceWrapper`.
335pub mod trace_wrapper {
336    #[derive(Clone, PartialEq, ::prost::Oneof)]
337    pub enum Trace {
338        /// An HTTP buffered tap trace.
339        #[prost(message, tag = "1")]
340        HttpBufferedTrace(super::HttpBufferedTrace),
341        /// An HTTP streamed tap trace segment.
342        #[prost(message, tag = "2")]
343        HttpStreamedTraceSegment(super::HttpStreamedTraceSegment),
344        /// A socket buffered tap trace.
345        #[prost(message, tag = "3")]
346        SocketBufferedTrace(super::SocketBufferedTrace),
347        /// A socket streamed tap trace segment.
348        #[prost(message, tag = "4")]
349        SocketStreamedTraceSegment(super::SocketStreamedTraceSegment),
350    }
351}
352impl ::prost::Name for TraceWrapper {
353    const NAME: &'static str = "TraceWrapper";
354    const PACKAGE: &'static str = "envoy.data.tap.v3";
355    fn full_name() -> ::prost::alloc::string::String {
356        "envoy.data.tap.v3.TraceWrapper".into()
357    }
358    fn type_url() -> ::prost::alloc::string::String {
359        "type.googleapis.com/envoy.data.tap.v3.TraceWrapper".into()
360    }
361}