├── .gitignore ├── .gitmodules ├── .rustfmt.toml ├── AUTHORS ├── CODE_OF_CONDUCT.md ├── Cargo.toml ├── LICENSE ├── README.md ├── build.rs └── src └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | Cargo.lock 3 | /.idea 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "data-plane-api"] 2 | path = data-plane-api 3 | url = https://github.com/envoyproxy/data-plane-api 4 | [submodule "xds"] 5 | path = xds 6 | url = https://github.com/cncf/xds 7 | [submodule "protoc-gen-validate"] 8 | path = protoc-gen-validate 9 | url = https://github.com/envoyproxy/protoc-gen-validate 10 | [submodule "googleapis"] 11 | path = googleapis 12 | url = https://github.com/googleapis/googleapis 13 | [submodule "opencensus-proto"] 14 | path = opencensus-proto 15 | url = https://github.com/census-instrumentation/opencensus-proto 16 | [submodule "opentelemetry-proto"] 17 | path = opentelemetry-proto 18 | url = https://github.com/open-telemetry/opentelemetry-proto 19 | [submodule "client_model"] 20 | path = prometheus_client_model 21 | url = https://github.com/prometheus/client_model 22 | -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | max_width = 200 2 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Bobby Powers 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to make participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies within all project spaces, and it also applies when 49 | an individual is representing the project or its community in public spaces. 50 | Examples of representing a project or community include using an official 51 | project e-mail address, posting via an official social media account, or acting 52 | as an appointed representative at an online or offline event. Representation of 53 | a project may be further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at bobbypowers@gmail.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | 78 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "envoy-control-plane" 3 | version = "0.4.0" 4 | license = "Apache-2.0" 5 | edition = "2021" 6 | build = "build.rs" 7 | description = "Envoy xDS v3 APIs" 8 | repository = "https://github.com/bpowers/rust-envoy-control-plane" 9 | 10 | [dependencies] 11 | prost = "^0.12" 12 | prost-wkt-types = { version = "^0.5", optional = true } 13 | tonic = { version = "^0.11", default-features = false, optional = true } 14 | pbjson = { version = "^0.6", optional = true } 15 | pbjson-types = { version = "^0.6", optional = true } 16 | serde = { version = "^1", features = ["derive"], optional = true } 17 | typetag = { version = "^0.2", optional = true } 18 | 19 | [build-dependencies] 20 | prost-build = "^0.12" 21 | tonic-build = { version = "^0.11", optional = true } 22 | pbjson-build = { version = "^0.6", optional = true } 23 | 24 | [dev-dependencies] 25 | serde_json = "1" 26 | 27 | [features] 28 | grpc = ["tonic/codegen", "tonic/prost", "tonic/transport", "tonic-build", "pbjson-types", "prost-wkt-types"] 29 | json = ["pbjson", "pbjson-build", "pbjson-types", "prost-wkt-types", "serde", "typetag"] 30 | default = ["grpc", "json"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | `envoy-control-plane` for Rust 2 | ============================== 3 | 4 | This package exposes the Envoy xDS protos and gRPC services via [prost](https://github.com/tokio-rs/prost). 5 | It also enables reading JSON and YAML bootstrap files into prost-generated structs, e.g. if you have a `bootstrap.yaml` containing: 6 | 7 | ```yaml 8 | --- 9 | admin: 10 | address: 11 | socketAddress: 12 | address: "127.0.0.1" 13 | portValue: 9901 14 | node: 15 | id: envoy-test-1 16 | cluster: envoy-test-cluster-1 17 | staticResources: 18 | listeners: 19 | - name: server-1 20 | address: 21 | socketAddress: 22 | address: 127.0.0.1 23 | portValue: 9000 24 | filterChains: 25 | - filters: 26 | - name: envoy.filters.network.http_connection_manager 27 | typedConfig: 28 | "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager 29 | statPrefix: ingress_http 30 | httpFilters: 31 | - name: envoy.filters.http.router 32 | routeConfig: 33 | name: local_route 34 | virtualHosts: 35 | - name: local_service 36 | domains: ["*"] 37 | routes: 38 | - match: 39 | prefix: "/" 40 | route: 41 | cluster: local-srv 42 | transportSocket: 43 | name: envoy.transport_sockets.tls 44 | typedConfig: 45 | '@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext 46 | requireClientCertificate: 47 | value: true 48 | commonTlsContext: 49 | tlsParams: 50 | tlsMinimumProtocolVersion: TLSv1_3 51 | tlsMaximumProtocolVersion: TLSv1_3 52 | validationContext: 53 | trustedCa: 54 | filename: ./certs/ca.crt 55 | matchTypedSubjectAltNames: 56 | - sanType: DNS 57 | matcher: 58 | exact: client.test 59 | tlsCertificates: 60 | - certificateChain: 61 | filename: ./certs/server.test.ecdsa-p256.crt 62 | privateKey: 63 | filename: ./certs/server.test.ecdsa-p256.key 64 | clusters: 65 | - name: local-srv 66 | type: STATIC 67 | lbPolicy: ROUND_ROBIN 68 | loadAssignment: 69 | clusterName: local-srv 70 | endpoints: 71 | - lbEndpoints: 72 | - endpoint: 73 | address: 74 | socketAddress: 75 | address: "127.0.0.1" 76 | portValue: 9110 77 | ``` 78 | 79 | You can read that Bootstrap config in with: 80 | 81 | ```rust 82 | use envoy_control_plane::envoy::config::bootstrap::v3::Bootstrap; 83 | 84 | let config_contents = read_all(&args.config_path).await?; 85 | let config_ext = args.config_path.extension().unwrap_or_default(); 86 | let bootstrap: Bootstrap = if config_ext == "yaml" || config_ext == "yml" { 87 | eprintln!("WARNING: YAML support is incomplete (e.g. durations don't work)"); 88 | serde_yaml::from_str(&config_contents)? 89 | } else { 90 | serde_json::from_str(&config_contents)? 91 | }; 92 | ``` 93 | 94 | Envoy uses a lot of protobuf `Any` values for polymorphism. As you can see above we read them off disk just fine, but there is an additional hoop to jump through in order to actually access a typed instance: 95 | 96 | ```rust 97 | let downstream_tls_context_type_url = DownstreamTlsContext::default().type_url(); 98 | 99 | // this works for the bootstrap config above, but real code wouldn't hardcode pulling 100 | // the value out in such a fragile way. 101 | let bootstrap_tls_config = bootstrap 102 | .static_resources 103 | .as_ref() 104 | .unwrap() 105 | .listeners[0] 106 | .filter_chains[0] 107 | .transport_socket 108 | .as_ref() 109 | .unwrap() 110 | .config_type 111 | .as_ref() 112 | .unwrap(); 113 | // there are not other `ConfigType` enum variants, so this let works fine. 114 | let ConfigType::TypedConfig(tls_any) = bootstrap_tls_config; 115 | // because the `TypedConfig` is `Any`, we need to check the type_url 116 | if &tls_any.type_url == downstream_tls_context_type_url { 117 | let ctx = DownstreamTlsContext::decode(&*tls_any.value).unwrap(); 118 | // store or do something with the `DownstreamTlsContext` instance 119 | } else { 120 | panic!("unsupported typed config: {}", &tls_any.type_url); 121 | } 122 | ``` 123 | 124 | ## Caveats 125 | 126 | * Envoy's JSON/YAML support allows both camelCase and snake_case for field names, but we only support snake case (e.g. `lbPolicy` and not `lb_policy`). 127 | * We're using a [hacked-up fork of `pbjson`](https://github.com/bpowers/pbjson/tree/any-support) to correctly read in `Any` values from JSON/YAML. 128 | 129 | ## License 130 | 131 | The code in this package is available under the Apache 2.0 license, as found in the LICENSE file. 132 | Envoy itself (and its API protos) are also licensed under Apache 2.0. 133 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The rust-control-plane Authors. All rights reserved. 2 | // Use of this source code is governed by the Apache License, 3 | // Version 2.0, that can be found in the LICENSE file. 4 | 5 | use std::env; 6 | use std::io::Result; 7 | use std::path::PathBuf; 8 | 9 | fn main() -> Result<()> { 10 | let descriptor_path = PathBuf::from(env::var("OUT_DIR").unwrap()).join("proto_descriptor.bin"); 11 | 12 | tonic_build::configure() 13 | .build_server(true) 14 | .build_client(true) 15 | .file_descriptor_set_path(descriptor_path.clone()) 16 | .compile_well_known_types(true) 17 | .extern_path(".google.protobuf.Any", "::prost_wkt_types::Any") 18 | .extern_path(".google.protobuf", "::pbjson_types") 19 | .compile( 20 | &[ 21 | "data-plane-api/envoy/admin/v3/certs.proto", 22 | "data-plane-api/envoy/admin/v3/clusters.proto", 23 | "data-plane-api/envoy/admin/v3/config_dump.proto", 24 | "data-plane-api/envoy/admin/v3/init_dump.proto", 25 | "data-plane-api/envoy/admin/v3/listeners.proto", 26 | "data-plane-api/envoy/admin/v3/memory.proto", 27 | "data-plane-api/envoy/admin/v3/metrics.proto", 28 | "data-plane-api/envoy/admin/v3/mutex_stats.proto", 29 | "data-plane-api/envoy/admin/v3/server_info.proto", 30 | "data-plane-api/envoy/admin/v3/tap.proto", 31 | "data-plane-api/envoy/config/accesslog/v3/accesslog.proto", 32 | "data-plane-api/envoy/config/bootstrap/v3/bootstrap.proto", 33 | "data-plane-api/envoy/config/cluster/v3/circuit_breaker.proto", 34 | "data-plane-api/envoy/config/cluster/v3/cluster.proto", 35 | "data-plane-api/envoy/config/cluster/v3/filter.proto", 36 | "data-plane-api/envoy/config/cluster/v3/outlier_detection.proto", 37 | "data-plane-api/envoy/config/common/key_value/v3/config.proto", 38 | "data-plane-api/envoy/config/common/matcher/v3/matcher.proto", 39 | "data-plane-api/envoy/config/common/mutation_rules/v3/mutation_rules.proto", 40 | "data-plane-api/envoy/config/core/v3/address.proto", 41 | "data-plane-api/envoy/config/core/v3/backoff.proto", 42 | "data-plane-api/envoy/config/core/v3/base.proto", 43 | "data-plane-api/envoy/config/core/v3/config_source.proto", 44 | "data-plane-api/envoy/config/core/v3/event_service_config.proto", 45 | "data-plane-api/envoy/config/core/v3/extension.proto", 46 | "data-plane-api/envoy/config/core/v3/grpc_method_list.proto", 47 | "data-plane-api/envoy/config/core/v3/grpc_service.proto", 48 | "data-plane-api/envoy/config/core/v3/health_check.proto", 49 | "data-plane-api/envoy/config/core/v3/http_uri.proto", 50 | "data-plane-api/envoy/config/core/v3/protocol.proto", 51 | "data-plane-api/envoy/config/core/v3/proxy_protocol.proto", 52 | "data-plane-api/envoy/config/core/v3/resolver.proto", 53 | "data-plane-api/envoy/config/core/v3/socket_option.proto", 54 | "data-plane-api/envoy/config/core/v3/substitution_format_string.proto", 55 | "data-plane-api/envoy/config/core/v3/udp_socket_config.proto", 56 | "data-plane-api/envoy/config/endpoint/v3/endpoint.proto", 57 | "data-plane-api/envoy/config/endpoint/v3/endpoint_components.proto", 58 | "data-plane-api/envoy/config/endpoint/v3/load_report.proto", 59 | "data-plane-api/envoy/config/grpc_credential/v3/aws_iam.proto", 60 | "data-plane-api/envoy/config/grpc_credential/v3/file_based_metadata.proto", 61 | "data-plane-api/envoy/config/listener/v3/api_listener.proto", 62 | "data-plane-api/envoy/config/listener/v3/listener.proto", 63 | "data-plane-api/envoy/config/listener/v3/listener_components.proto", 64 | "data-plane-api/envoy/config/listener/v3/quic_config.proto", 65 | "data-plane-api/envoy/config/listener/v3/udp_listener_config.proto", 66 | "data-plane-api/envoy/config/metrics/v3/metrics_service.proto", 67 | "data-plane-api/envoy/config/metrics/v3/stats.proto", 68 | "data-plane-api/envoy/config/overload/v3/overload.proto", 69 | "data-plane-api/envoy/config/ratelimit/v3/rls.proto", 70 | "data-plane-api/envoy/config/rbac/v3/rbac.proto", 71 | "data-plane-api/envoy/config/route/v3/route.proto", 72 | "data-plane-api/envoy/config/route/v3/route_components.proto", 73 | "data-plane-api/envoy/config/route/v3/scoped_route.proto", 74 | "data-plane-api/envoy/config/tap/v3/common.proto", 75 | "data-plane-api/envoy/config/trace/v3/datadog.proto", 76 | "data-plane-api/envoy/config/trace/v3/dynamic_ot.proto", 77 | "data-plane-api/envoy/config/trace/v3/http_tracer.proto", 78 | "data-plane-api/envoy/config/trace/v3/lightstep.proto", 79 | "data-plane-api/envoy/config/trace/v3/opencensus.proto", 80 | "data-plane-api/envoy/config/trace/v3/service.proto", 81 | "data-plane-api/envoy/config/trace/v3/skywalking.proto", 82 | "data-plane-api/envoy/config/trace/v3/trace.proto", 83 | "data-plane-api/envoy/config/trace/v3/xray.proto", 84 | "data-plane-api/envoy/config/trace/v3/zipkin.proto", 85 | "data-plane-api/envoy/data/accesslog/v3/accesslog.proto", 86 | "data-plane-api/envoy/data/cluster/v3/outlier_detection_event.proto", 87 | "data-plane-api/envoy/data/core/v3/health_check_event.proto", 88 | "data-plane-api/envoy/data/dns/v3/dns_table.proto", 89 | "data-plane-api/envoy/data/tap/v3/common.proto", 90 | "data-plane-api/envoy/data/tap/v3/http.proto", 91 | "data-plane-api/envoy/data/tap/v3/transport.proto", 92 | "data-plane-api/envoy/data/tap/v3/wrapper.proto", 93 | "data-plane-api/envoy/extensions/access_loggers/file/v3/file.proto", 94 | "data-plane-api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto", 95 | "data-plane-api/envoy/extensions/access_loggers/grpc/v3/als.proto", 96 | "data-plane-api/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto", 97 | "data-plane-api/envoy/extensions/access_loggers/stream/v3/stream.proto", 98 | "data-plane-api/envoy/extensions/access_loggers/wasm/v3/wasm.proto", 99 | "data-plane-api/envoy/extensions/cache/simple_http_cache/v3/config.proto", 100 | "data-plane-api/envoy/extensions/clusters/aggregate/v3/cluster.proto", 101 | "data-plane-api/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto", 102 | "data-plane-api/envoy/extensions/clusters/redis/v3/redis_cluster.proto", 103 | "data-plane-api/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto", 104 | "data-plane-api/envoy/extensions/common/matching/v3/extension_matcher.proto", 105 | "data-plane-api/envoy/extensions/common/ratelimit/v3/ratelimit.proto", 106 | "data-plane-api/envoy/extensions/common/tap/v3/common.proto", 107 | "data-plane-api/envoy/extensions/compression/brotli/compressor/v3/brotli.proto", 108 | "data-plane-api/envoy/extensions/compression/brotli/decompressor/v3/brotli.proto", 109 | "data-plane-api/envoy/extensions/compression/gzip/compressor/v3/gzip.proto", 110 | "data-plane-api/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto", 111 | "data-plane-api/envoy/extensions/filters/common/dependency/v3/dependency.proto", 112 | "data-plane-api/envoy/extensions/filters/common/fault/v3/fault.proto", 113 | "data-plane-api/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto", 114 | "data-plane-api/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto", 115 | "data-plane-api/envoy/extensions/filters/http/admission_control/v3/admission_control.proto", 116 | "data-plane-api/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto", 117 | "data-plane-api/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto", 118 | "data-plane-api/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto", 119 | "data-plane-api/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto", 120 | "data-plane-api/envoy/extensions/filters/http/buffer/v3/buffer.proto", 121 | "data-plane-api/envoy/extensions/filters/http/cache/v3/cache.proto", 122 | "data-plane-api/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto", 123 | "data-plane-api/envoy/extensions/filters/http/composite/v3/composite.proto", 124 | "data-plane-api/envoy/extensions/filters/http/compressor/v3/compressor.proto", 125 | "data-plane-api/envoy/extensions/filters/http/cors/v3/cors.proto", 126 | "data-plane-api/envoy/extensions/filters/http/csrf/v3/csrf.proto", 127 | "data-plane-api/envoy/extensions/filters/http/decompressor/v3/decompressor.proto", 128 | "data-plane-api/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto", 129 | "data-plane-api/envoy/extensions/filters/http/dynamo/v3/dynamo.proto", 130 | "data-plane-api/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto", 131 | "data-plane-api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto", 132 | "data-plane-api/envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto", 133 | "data-plane-api/envoy/extensions/filters/http/fault/v3/fault.proto", 134 | "data-plane-api/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto", 135 | "data-plane-api/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto", 136 | "data-plane-api/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto", 137 | "data-plane-api/envoy/extensions/filters/http/grpc_stats/v3/config.proto", 138 | "data-plane-api/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto", 139 | "data-plane-api/envoy/extensions/filters/http/gzip/v3/gzip.proto", 140 | "data-plane-api/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto", 141 | "data-plane-api/envoy/extensions/filters/http/health_check/v3/health_check.proto", 142 | "data-plane-api/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto", 143 | "data-plane-api/envoy/extensions/filters/http/jwt_authn/v3/config.proto", 144 | "data-plane-api/envoy/extensions/filters/http/kill_request/v3/kill_request.proto", 145 | "data-plane-api/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto", 146 | "data-plane-api/envoy/extensions/filters/http/lua/v3/lua.proto", 147 | "data-plane-api/envoy/extensions/filters/http/oauth2/v3/oauth.proto", 148 | "data-plane-api/envoy/extensions/filters/http/on_demand/v3/on_demand.proto", 149 | "data-plane-api/envoy/extensions/filters/http/original_src/v3/original_src.proto", 150 | "data-plane-api/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto", 151 | "data-plane-api/envoy/extensions/filters/http/rbac/v3/rbac.proto", 152 | "data-plane-api/envoy/extensions/filters/http/router/v3/router.proto", 153 | "data-plane-api/envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto", 154 | "data-plane-api/envoy/extensions/filters/http/tap/v3/tap.proto", 155 | "data-plane-api/envoy/extensions/filters/http/wasm/v3/wasm.proto", 156 | "data-plane-api/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto", 157 | "data-plane-api/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto", 158 | "data-plane-api/envoy/extensions/filters/listener/original_src/v3/original_src.proto", 159 | "data-plane-api/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto", 160 | "data-plane-api/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto", 161 | "data-plane-api/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto", 162 | "data-plane-api/envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto", 163 | "data-plane-api/envoy/extensions/filters/network/direct_response/v3/config.proto", 164 | "data-plane-api/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto", 165 | "data-plane-api/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto", 166 | "data-plane-api/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto", 167 | "data-plane-api/envoy/extensions/filters/network/echo/v3/echo.proto", 168 | "data-plane-api/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto", 169 | "data-plane-api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto", 170 | "data-plane-api/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto", 171 | "data-plane-api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto", 172 | "data-plane-api/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto", 173 | "data-plane-api/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto", 174 | "data-plane-api/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto", 175 | "data-plane-api/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto", 176 | "data-plane-api/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto", 177 | "data-plane-api/envoy/extensions/filters/network/rbac/v3/rbac.proto", 178 | "data-plane-api/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto", 179 | "data-plane-api/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto", 180 | "data-plane-api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto", 181 | "data-plane-api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto", 182 | "data-plane-api/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto", 183 | "data-plane-api/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto", 184 | "data-plane-api/envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto", 185 | "data-plane-api/envoy/extensions/filters/network/thrift_proxy/v3/route.proto", 186 | "data-plane-api/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto", 187 | "data-plane-api/envoy/extensions/filters/network/wasm/v3/wasm.proto", 188 | "data-plane-api/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto", 189 | "data-plane-api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto", 190 | "data-plane-api/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto", 191 | "data-plane-api/envoy/extensions/formatter/metadata/v3/metadata.proto", 192 | "data-plane-api/envoy/extensions/formatter/req_without_query/v3/req_without_query.proto", 193 | "data-plane-api/envoy/extensions/health_checkers/redis/v3/redis.proto", 194 | "data-plane-api/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto", 195 | "data-plane-api/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto", 196 | "data-plane-api/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto", 197 | "data-plane-api/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto", 198 | "data-plane-api/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto", 199 | "data-plane-api/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto", 200 | "data-plane-api/envoy/extensions/key_value/file_based/v3/config.proto", 201 | "data-plane-api/envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto", 202 | "data-plane-api/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto", 203 | "data-plane-api/envoy/extensions/matching/input_matchers/ip/v3/ip.proto", 204 | "data-plane-api/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto", 205 | "data-plane-api/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto", 206 | "data-plane-api/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto", 207 | "data-plane-api/envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto", 208 | "data-plane-api/envoy/extensions/quic/proof_source/v3/proof_source.proto", 209 | "data-plane-api/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto", 210 | "data-plane-api/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto", 211 | "data-plane-api/envoy/extensions/request_id/uuid/v3/uuid.proto", 212 | "data-plane-api/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto", 213 | "data-plane-api/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto", 214 | "data-plane-api/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto", 215 | "data-plane-api/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto", 216 | "data-plane-api/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto", 217 | "data-plane-api/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto", 218 | "data-plane-api/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto", 219 | "data-plane-api/envoy/extensions/stat_sinks/wasm/v3/wasm.proto", 220 | "data-plane-api/envoy/extensions/transport_sockets/alts/v3/alts.proto", 221 | "data-plane-api/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto", 222 | "data-plane-api/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto", 223 | "data-plane-api/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto", 224 | "data-plane-api/envoy/extensions/transport_sockets/s2a/v3/s2a.proto", 225 | "data-plane-api/envoy/extensions/transport_sockets/starttls/v3/starttls.proto", 226 | "data-plane-api/envoy/extensions/transport_sockets/tap/v3/tap.proto", 227 | "data-plane-api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto", 228 | "data-plane-api/envoy/extensions/transport_sockets/tls/v3/cert.proto", 229 | "data-plane-api/envoy/extensions/transport_sockets/tls/v3/common.proto", 230 | "data-plane-api/envoy/extensions/transport_sockets/tls/v3/secret.proto", 231 | "data-plane-api/envoy/extensions/transport_sockets/tls/v3/tls.proto", 232 | "data-plane-api/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto", 233 | "data-plane-api/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto", 234 | "data-plane-api/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto", 235 | "data-plane-api/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto", 236 | "data-plane-api/envoy/extensions/upstreams/http/v3/http_protocol_options.proto", 237 | "data-plane-api/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto", 238 | "data-plane-api/envoy/extensions/wasm/v3/wasm.proto", 239 | "data-plane-api/envoy/extensions/watchdog/profile_action/v3/profile_action.proto", 240 | "data-plane-api/envoy/service/accesslog/v3/als.proto", 241 | "data-plane-api/envoy/service/auth/v3/attribute_context.proto", 242 | "data-plane-api/envoy/service/auth/v3/external_auth.proto", 243 | "data-plane-api/envoy/service/cluster/v3/cds.proto", 244 | "data-plane-api/envoy/service/discovery/v3/ads.proto", 245 | "data-plane-api/envoy/service/discovery/v3/discovery.proto", 246 | "data-plane-api/envoy/service/endpoint/v3/eds.proto", 247 | "data-plane-api/envoy/service/endpoint/v3/leds.proto", 248 | "data-plane-api/envoy/service/event_reporting/v3/event_reporting_service.proto", 249 | "data-plane-api/envoy/service/ext_proc/v3/external_processor.proto", 250 | "data-plane-api/envoy/service/extension/v3/config_discovery.proto", 251 | "data-plane-api/envoy/service/health/v3/hds.proto", 252 | "data-plane-api/envoy/service/listener/v3/lds.proto", 253 | "data-plane-api/envoy/service/load_stats/v3/lrs.proto", 254 | "data-plane-api/envoy/service/metrics/v3/metrics_service.proto", 255 | "data-plane-api/envoy/service/ratelimit/v3/rls.proto", 256 | "data-plane-api/envoy/service/route/v3/rds.proto", 257 | "data-plane-api/envoy/service/route/v3/srds.proto", 258 | "data-plane-api/envoy/service/runtime/v3/rtds.proto", 259 | "data-plane-api/envoy/service/secret/v3/sds.proto", 260 | "data-plane-api/envoy/service/status/v3/csds.proto", 261 | "data-plane-api/envoy/service/tap/v3/tap.proto", 262 | "data-plane-api/envoy/service/trace/v3/trace_service.proto", 263 | "data-plane-api/envoy/type/http/v3/path_transformation.proto", 264 | "data-plane-api/envoy/type/matcher/v3/http_inputs.proto", 265 | "data-plane-api/envoy/type/matcher/v3/metadata.proto", 266 | "data-plane-api/envoy/type/matcher/v3/node.proto", 267 | "data-plane-api/envoy/type/matcher/v3/number.proto", 268 | "data-plane-api/envoy/type/matcher/v3/path.proto", 269 | "data-plane-api/envoy/type/matcher/v3/regex.proto", 270 | "data-plane-api/envoy/type/matcher/v3/string.proto", 271 | "data-plane-api/envoy/type/matcher/v3/struct.proto", 272 | "data-plane-api/envoy/type/matcher/v3/value.proto", 273 | "data-plane-api/envoy/type/metadata/v3/metadata.proto", 274 | "data-plane-api/envoy/type/tracing/v3/custom_tag.proto", 275 | "data-plane-api/envoy/type/v3/hash_policy.proto", 276 | "data-plane-api/envoy/type/v3/http.proto", 277 | "data-plane-api/envoy/type/v3/http_status.proto", 278 | "data-plane-api/envoy/type/v3/percent.proto", 279 | "data-plane-api/envoy/type/v3/range.proto", 280 | "data-plane-api/envoy/type/v3/ratelimit_unit.proto", 281 | "data-plane-api/envoy/type/v3/semantic_version.proto", 282 | "data-plane-api/envoy/type/v3/token_bucket.proto", 283 | "data-plane-api/envoy/watchdog/v3/abort_action.proto", 284 | ], 285 | &[ 286 | "data-plane-api/", 287 | "xds/", 288 | "protoc-gen-validate/", 289 | "googleapis/", 290 | "opencensus-proto/src/", 291 | "opentelemetry-proto/", 292 | "prometheus_client_model/", 293 | ], 294 | )?; 295 | 296 | build_pbjson(descriptor_path)?; 297 | 298 | Ok(()) 299 | } 300 | 301 | #[cfg(feature = "json")] 302 | fn build_pbjson(descriptor_path: PathBuf) -> Result<()> { 303 | let descriptor_set = std::fs::read(descriptor_path)?; 304 | pbjson_build::Builder::new() 305 | .register_descriptors(&descriptor_set)? 306 | .extern_path(".google.protobuf", "::pbjson_types") 307 | .build(&[ 308 | ".envoy", 309 | ".xds", 310 | ".google.api", 311 | // ".google.protobuf", 312 | ".google.rpc", 313 | ".io.prometheus", 314 | ".opencensus", 315 | ".opentelemetry", 316 | ".udpa", 317 | ".validate", 318 | ])?; 319 | Ok(()) 320 | } 321 | 322 | #[cfg(not(feature = "json"))] 323 | fn build_pbjson(_: PathBuf) -> Result<()> { Ok(()) } 324 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The rust-control-plane Authors. All rights reserved. 2 | // Use of this source code is governed by the Apache License, 3 | // Version 2.0, that can be found in the LICENSE file. 4 | 5 | pub use pbjson_types; 6 | pub use prost; 7 | pub use prost_wkt_types; 8 | 9 | // list of files generated with: 10 | // $ find target/debug/build/rust-control-plane-4a01c79a4c642ce5/out -name '*.rs' | sort | while read f; do echo "pub mod $(basename $f | perl -lpe '$_=substr($_,0,-3) if eof') { include!(concat!(env!(""OUT_DIR""), \"$(basename $f)\")); }"; done | pbcopy 11 | // (and then heavily modified by hand) 12 | 13 | pub mod envoy { 14 | pub mod admin { 15 | pub mod v3 { 16 | include!(concat!(env!("OUT_DIR"), "/envoy.admin.v3.rs")); 17 | #[cfg(feature="json")] 18 | include!(concat!(env!("OUT_DIR"), "/envoy.admin.v3.serde.rs")); 19 | } 20 | } 21 | pub mod annotations { 22 | include!(concat!(env!("OUT_DIR"), "/envoy.annotations.rs")); 23 | #[cfg(feature="json")] 24 | include!(concat!(env!("OUT_DIR"), "/envoy.annotations.serde.rs")); 25 | } 26 | pub mod config { 27 | pub mod accesslog { 28 | pub mod v3 { 29 | include!(concat!(env!("OUT_DIR"), "/envoy.config.accesslog.v3.rs")); 30 | #[cfg(feature="json")] 31 | include!(concat!(env!("OUT_DIR"), "/envoy.config.accesslog.v3.serde.rs")); 32 | } 33 | } 34 | pub mod bootstrap { 35 | pub mod v3 { 36 | include!(concat!(env!("OUT_DIR"), "/envoy.config.bootstrap.v3.rs")); 37 | #[cfg(feature="json")] 38 | include!(concat!(env!("OUT_DIR"), "/envoy.config.bootstrap.v3.serde.rs")); 39 | } 40 | } 41 | pub mod cluster { 42 | pub mod v3 { 43 | include!(concat!(env!("OUT_DIR"), "/envoy.config.cluster.v3.rs")); 44 | #[cfg(feature="json")] 45 | include!(concat!(env!("OUT_DIR"), "/envoy.config.cluster.v3.serde.rs")); 46 | } 47 | } 48 | pub mod common { 49 | pub mod key_value { 50 | pub mod v3 { 51 | include!(concat!(env!("OUT_DIR"), "/envoy.config.common.key_value.v3.rs")); 52 | #[cfg(feature="json")] 53 | include!(concat!(env!("OUT_DIR"), "/envoy.config.common.key_value.v3.serde.rs")); 54 | } 55 | } 56 | pub mod matcher { 57 | pub mod v3 { 58 | include!(concat!(env!("OUT_DIR"), "/envoy.config.common.matcher.v3.rs")); 59 | #[cfg(feature="json")] 60 | include!(concat!(env!("OUT_DIR"), "/envoy.config.common.matcher.v3.serde.rs")); 61 | } 62 | } 63 | pub mod mutation_rules { 64 | pub mod v3 { 65 | include!(concat!(env!("OUT_DIR"), "/envoy.config.common.mutation_rules.v3.rs")); 66 | #[cfg(feature="json")] 67 | include!(concat!(env!("OUT_DIR"), "/envoy.config.common.mutation_rules.v3.serde.rs")); 68 | } 69 | } 70 | } 71 | pub mod core { 72 | pub mod v3 { 73 | include!(concat!(env!("OUT_DIR"), "/envoy.config.core.v3.rs")); 74 | #[cfg(feature="json")] 75 | include!(concat!(env!("OUT_DIR"), "/envoy.config.core.v3.serde.rs")); 76 | } 77 | } 78 | pub mod endpoint { 79 | pub mod v3 { 80 | include!(concat!(env!("OUT_DIR"), "/envoy.config.endpoint.v3.rs")); 81 | #[cfg(feature="json")] 82 | include!(concat!(env!("OUT_DIR"), "/envoy.config.endpoint.v3.serde.rs")); 83 | } 84 | } 85 | pub mod grpc_credential { 86 | pub mod v3 { 87 | include!(concat!(env!("OUT_DIR"), "/envoy.config.grpc_credential.v3.rs")); 88 | #[cfg(feature="json")] 89 | include!(concat!(env!("OUT_DIR"), "/envoy.config.grpc_credential.v3.serde.rs")); 90 | } 91 | } 92 | pub mod listener { 93 | pub mod v3 { 94 | include!(concat!(env!("OUT_DIR"), "/envoy.config.listener.v3.rs")); 95 | #[cfg(feature="json")] 96 | include!(concat!(env!("OUT_DIR"), "/envoy.config.listener.v3.serde.rs")); 97 | } 98 | } 99 | pub mod metrics { 100 | pub mod v3 { 101 | include!(concat!(env!("OUT_DIR"), "/envoy.config.metrics.v3.rs")); 102 | #[cfg(feature="json")] 103 | include!(concat!(env!("OUT_DIR"), "/envoy.config.metrics.v3.serde.rs")); 104 | } 105 | } 106 | pub mod overload { 107 | pub mod v3 { 108 | include!(concat!(env!("OUT_DIR"), "/envoy.config.overload.v3.rs")); 109 | #[cfg(feature="json")] 110 | include!(concat!(env!("OUT_DIR"), "/envoy.config.overload.v3.serde.rs")); 111 | } 112 | } 113 | pub mod ratelimit { 114 | pub mod v3 { 115 | include!(concat!(env!("OUT_DIR"), "/envoy.config.ratelimit.v3.rs")); 116 | #[cfg(feature="json")] 117 | include!(concat!(env!("OUT_DIR"), "/envoy.config.ratelimit.v3.serde.rs")); 118 | } 119 | } 120 | pub mod rbac { 121 | pub mod v3 { 122 | include!(concat!(env!("OUT_DIR"), "/envoy.config.rbac.v3.rs")); 123 | //#[cfg(feature="json")] 124 | //include!(concat!(env!("OUT_DIR"), "/envoy.config.rbac.v3.serde.rs")); 125 | } 126 | } 127 | pub mod route { 128 | pub mod v3 { 129 | include!(concat!(env!("OUT_DIR"), "/envoy.config.route.v3.rs")); 130 | #[cfg(feature="json")] 131 | include!(concat!(env!("OUT_DIR"), "/envoy.config.route.v3.serde.rs")); 132 | } 133 | } 134 | pub mod tap { 135 | pub mod v3 { 136 | include!(concat!(env!("OUT_DIR"), "/envoy.config.tap.v3.rs")); 137 | #[cfg(feature="json")] 138 | include!(concat!(env!("OUT_DIR"), "/envoy.config.tap.v3.serde.rs")); 139 | } 140 | } 141 | pub mod trace { 142 | pub mod v3 { 143 | include!(concat!(env!("OUT_DIR"), "/envoy.config.trace.v3.rs")); 144 | #[cfg(feature="json")] 145 | include!(concat!(env!("OUT_DIR"), "/envoy.config.trace.v3.serde.rs")); 146 | } 147 | } 148 | } 149 | pub mod data { 150 | pub mod accesslog { 151 | pub mod v3 { 152 | include!(concat!(env!("OUT_DIR"), "/envoy.data.accesslog.v3.rs")); 153 | #[cfg(feature="json")] 154 | include!(concat!(env!("OUT_DIR"), "/envoy.data.accesslog.v3.serde.rs")); 155 | } 156 | } 157 | pub mod cluster { 158 | pub mod v3 { 159 | include!(concat!(env!("OUT_DIR"), "/envoy.data.cluster.v3.rs")); 160 | #[cfg(feature="json")] 161 | include!(concat!(env!("OUT_DIR"), "/envoy.data.cluster.v3.serde.rs")); 162 | } 163 | } 164 | pub mod core { 165 | pub mod v3 { 166 | include!(concat!(env!("OUT_DIR"), "/envoy.data.core.v3.rs")); 167 | #[cfg(feature="json")] 168 | include!(concat!(env!("OUT_DIR"), "/envoy.data.core.v3.serde.rs")); 169 | } 170 | } 171 | pub mod dns { 172 | pub mod v3 { 173 | include!(concat!(env!("OUT_DIR"), "/envoy.data.dns.v3.rs")); 174 | #[cfg(feature="json")] 175 | include!(concat!(env!("OUT_DIR"), "/envoy.data.dns.v3.serde.rs")); 176 | } 177 | } 178 | pub mod tap { 179 | pub mod v3 { 180 | include!(concat!(env!("OUT_DIR"), "/envoy.data.tap.v3.rs")); 181 | #[cfg(feature="json")] 182 | include!(concat!(env!("OUT_DIR"), "/envoy.data.tap.v3.serde.rs")); 183 | } 184 | } 185 | } 186 | pub mod extensions { 187 | pub mod access_loggers { 188 | pub mod file { 189 | pub mod v3 { 190 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.file.v3.rs")); 191 | #[cfg(feature="json")] 192 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.file.v3.serde.rs")); 193 | } 194 | } 195 | pub mod filters { 196 | pub mod cel { 197 | pub mod v3 { 198 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.filters.cel.v3.rs")); 199 | #[cfg(feature="json")] 200 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.filters.cel.v3.serde.rs")); 201 | } 202 | } 203 | } 204 | pub mod grpc { 205 | pub mod v3 { 206 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.grpc.v3.rs")); 207 | #[cfg(feature="json")] 208 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.grpc.v3.serde.rs")); 209 | } 210 | } 211 | pub mod open_telemetry { 212 | pub mod v3 { 213 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.open_telemetry.v3.rs")); 214 | #[cfg(feature="json")] 215 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.open_telemetry.v3.serde.rs")); 216 | } 217 | } 218 | pub mod stream { 219 | pub mod v3 { 220 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.stream.v3.rs")); 221 | #[cfg(feature="json")] 222 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.stream.v3.serde.rs")); 223 | } 224 | } 225 | pub mod wasm { 226 | pub mod v3 { 227 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.wasm.v3.rs")); 228 | #[cfg(feature="json")] 229 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.access_loggers.wasm.v3.serde.rs")); 230 | } 231 | } 232 | } 233 | pub mod cache { 234 | pub mod simple_http_cache { 235 | pub mod v3 { 236 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.cache.simple_http_cache.v3.rs")); 237 | #[cfg(feature="json")] 238 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.cache.simple_http_cache.v3.serde.rs")); 239 | } 240 | } 241 | } 242 | pub mod common { 243 | pub mod dynamic_forward_proxy { 244 | pub mod v3 { 245 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.dynamic_forward_proxy.v3.rs")); 246 | #[cfg(feature="json")] 247 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.dynamic_forward_proxy.v3.serde.rs")); 248 | } 249 | } 250 | pub mod matching { 251 | pub mod v3 { 252 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.matching.v3.rs")); 253 | #[cfg(feature="json")] 254 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.matching.v3.serde.rs")); 255 | } 256 | } 257 | pub mod ratelimit { 258 | pub mod v3 { 259 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.ratelimit.v3.rs")); 260 | #[cfg(feature="json")] 261 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.ratelimit.v3.serde.rs")); 262 | } 263 | } 264 | pub mod tap { 265 | pub mod v3 { 266 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.tap.v3.rs")); 267 | #[cfg(feature="json")] 268 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.common.tap.v3.serde.rs")); 269 | } 270 | } 271 | } 272 | pub mod clusters { 273 | pub mod aggregate { 274 | pub mod v3 { 275 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.clusters.aggregate.v3.rs")); 276 | #[cfg(feature="json")] 277 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.clusters.aggregate.v3.serde.rs")); 278 | } 279 | } 280 | pub mod dynamic_forward_proxy { 281 | pub mod v3 { 282 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.clusters.dynamic_forward_proxy.v3.rs")); 283 | #[cfg(feature="json")] 284 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.clusters.dynamic_forward_proxy.v3.serde.rs")); 285 | } 286 | } 287 | pub mod redis { 288 | pub mod v3 { 289 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.clusters.redis.v3.rs")); 290 | #[cfg(feature="json")] 291 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.clusters.redis.v3.serde.rs")); 292 | } 293 | } 294 | } 295 | pub mod compression { 296 | pub mod brotli { 297 | pub mod compressor { 298 | pub mod v3 { 299 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.brotli.compressor.v3.rs")); 300 | #[cfg(feature="json")] 301 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.brotli.compressor.v3.serde.rs")); 302 | } 303 | } 304 | pub mod decompressor { 305 | pub mod v3 { 306 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.brotli.decompressor.v3.rs")); 307 | #[cfg(feature="json")] 308 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.brotli.decompressor.v3.serde.rs")); 309 | } 310 | } 311 | } 312 | pub mod gzip { 313 | pub mod compressor { 314 | pub mod v3 { 315 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.gzip.compressor.v3.rs")); 316 | #[cfg(feature="json")] 317 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.gzip.compressor.v3.serde.rs")); 318 | } 319 | } 320 | pub mod decompressor { 321 | pub mod v3 { 322 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.gzip.decompressor.v3.rs")); 323 | #[cfg(feature="json")] 324 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.compression.gzip.decompressor.v3.serde.rs")); 325 | } 326 | } 327 | } 328 | } 329 | pub mod filters { 330 | pub mod common { 331 | pub mod dependency { 332 | pub mod v3 { 333 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.common.dependency.v3.rs")); 334 | #[cfg(feature="json")] 335 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.common.dependency.v3.serde.rs")); 336 | } 337 | } 338 | pub mod fault { 339 | pub mod v3 { 340 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.common.fault.v3.rs")); 341 | #[cfg(feature="json")] 342 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.common.fault.v3.serde.rs")); 343 | } 344 | } 345 | pub mod matcher { 346 | pub mod action { 347 | pub mod v3 { 348 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.common.matcher.action.v3.rs")); 349 | #[cfg(feature="json")] 350 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.common.matcher.action.v3.serde.rs")); 351 | } 352 | } 353 | } 354 | } 355 | pub mod http { 356 | pub mod adaptive_concurrency { 357 | pub mod v3 { 358 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.adaptive_concurrency.v3.rs")); 359 | #[cfg(feature="json")] 360 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.adaptive_concurrency.v3.serde.rs")); 361 | } 362 | } 363 | pub mod admission_control { 364 | pub mod v3 { 365 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.admission_control.v3.rs")); 366 | #[cfg(feature="json")] 367 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.admission_control.v3.serde.rs")); 368 | } 369 | } 370 | pub mod alternate_protocols_cache { 371 | pub mod v3 { 372 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.alternate_protocols_cache.v3.rs")); 373 | #[cfg(feature="json")] 374 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.alternate_protocols_cache.v3.serde.rs")); 375 | } 376 | } 377 | pub mod aws_lambda { 378 | pub mod v3 { 379 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.aws_lambda.v3.rs")); 380 | #[cfg(feature="json")] 381 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.aws_lambda.v3.serde.rs")); 382 | } 383 | } 384 | pub mod aws_request_signing { 385 | pub mod v3 { 386 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.aws_request_signing.v3.rs")); 387 | #[cfg(feature="json")] 388 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.aws_request_signing.v3.serde.rs")); 389 | } 390 | } 391 | pub mod bandwidth_limit { 392 | pub mod v3 { 393 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.bandwidth_limit.v3.rs")); 394 | #[cfg(feature="json")] 395 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.bandwidth_limit.v3.serde.rs")); 396 | } 397 | } 398 | pub mod buffer { 399 | pub mod v3 { 400 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.buffer.v3.rs")); 401 | #[cfg(feature="json")] 402 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.buffer.v3.serde.rs")); 403 | } 404 | } 405 | pub mod cache { 406 | pub mod v3 { 407 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.cache.v3.rs")); 408 | #[cfg(feature="json")] 409 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.cache.v3.serde.rs")); 410 | } 411 | } 412 | pub mod cdn_loop { 413 | pub mod v3 { 414 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.cdn_loop.v3.rs")); 415 | #[cfg(feature="json")] 416 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.cdn_loop.v3.serde.rs")); 417 | } 418 | } 419 | pub mod composite { 420 | pub mod v3 { 421 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.composite.v3.rs")); 422 | #[cfg(feature="json")] 423 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.composite.v3.serde.rs")); 424 | } 425 | } 426 | pub mod compressor { 427 | pub mod v3 { 428 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.compressor.v3.rs")); 429 | #[cfg(feature="json")] 430 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.compressor.v3.serde.rs")); 431 | } 432 | } 433 | pub mod cors { 434 | pub mod v3 { 435 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.cors.v3.rs")); 436 | #[cfg(feature="json")] 437 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.cors.v3.serde.rs")); 438 | } 439 | } 440 | pub mod csrf { 441 | pub mod v3 { 442 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.csrf.v3.rs")); 443 | #[cfg(feature="json")] 444 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.csrf.v3.serde.rs")); 445 | } 446 | } 447 | pub mod decompressor { 448 | pub mod v3 { 449 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.decompressor.v3.rs")); 450 | #[cfg(feature="json")] 451 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.decompressor.v3.serde.rs")); 452 | } 453 | } 454 | pub mod dynamic_forward_proxy { 455 | pub mod v3 { 456 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.dynamic_forward_proxy.v3.rs")); 457 | #[cfg(feature="json")] 458 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.dynamic_forward_proxy.v3.serde.rs")); 459 | } 460 | } 461 | pub mod dynamo { 462 | pub mod v3 { 463 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.dynamo.v3.rs")); 464 | #[cfg(feature="json")] 465 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.dynamo.v3.serde.rs")); 466 | } 467 | } 468 | pub mod ext_authz { 469 | pub mod v3 { 470 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ext_authz.v3.rs")); 471 | #[cfg(feature="json")] 472 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ext_authz.v3.serde.rs")); 473 | } 474 | } 475 | pub mod ext_proc { 476 | pub mod v3 { 477 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ext_proc.v3.rs")); 478 | #[cfg(feature="json")] 479 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ext_proc.v3.serde.rs")); 480 | } 481 | } 482 | pub mod fault { 483 | pub mod v3 { 484 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.fault.v3.rs")); 485 | #[cfg(feature="json")] 486 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.fault.v3.serde.rs")); 487 | } 488 | } 489 | pub mod grpc_http1_bridge { 490 | pub mod v3 { 491 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_http1_bridge.v3.rs")); 492 | #[cfg(feature="json")] 493 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_http1_bridge.v3.serde.rs")); 494 | } 495 | } 496 | pub mod grpc_http1_reverse_bridge { 497 | pub mod v3 { 498 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3.rs")); 499 | #[cfg(feature="json")] 500 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3.serde.rs")); 501 | } 502 | } 503 | pub mod grpc_json_transcoder { 504 | pub mod v3 { 505 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_json_transcoder.v3.rs")); 506 | #[cfg(feature="json")] 507 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_json_transcoder.v3.serde.rs")); 508 | } 509 | } 510 | pub mod grpc_stats { 511 | pub mod v3 { 512 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_stats.v3.rs")); 513 | #[cfg(feature="json")] 514 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_stats.v3.serde.rs")); 515 | } 516 | } 517 | pub mod grpc_web { 518 | pub mod v3 { 519 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_web.v3.rs")); 520 | #[cfg(feature="json")] 521 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.grpc_web.v3.serde.rs")); 522 | } 523 | } 524 | pub mod gzip { 525 | pub mod v3 { 526 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.gzip.v3.rs")); 527 | #[cfg(feature="json")] 528 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.gzip.v3.serde.rs")); 529 | } 530 | } 531 | pub mod header_to_metadata { 532 | pub mod v3 { 533 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.header_to_metadata.v3.rs")); 534 | #[cfg(feature="json")] 535 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.header_to_metadata.v3.serde.rs")); 536 | } 537 | } 538 | pub mod health_check { 539 | pub mod v3 { 540 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.health_check.v3.rs")); 541 | #[cfg(feature="json")] 542 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.health_check.v3.serde.rs")); 543 | } 544 | } 545 | pub mod ip_tagging { 546 | pub mod v3 { 547 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ip_tagging.v3.rs")); 548 | #[cfg(feature="json")] 549 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ip_tagging.v3.serde.rs")); 550 | } 551 | } 552 | pub mod jwt_authn { 553 | pub mod v3 { 554 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.jwt_authn.v3.rs")); 555 | #[cfg(feature="json")] 556 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.jwt_authn.v3.serde.rs")); 557 | } 558 | } 559 | pub mod kill_request { 560 | pub mod v3 { 561 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.kill_request.v3.rs")); 562 | #[cfg(feature="json")] 563 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.kill_request.v3.serde.rs")); 564 | } 565 | } 566 | pub mod local_ratelimit { 567 | pub mod v3 { 568 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.local_ratelimit.v3.rs")); 569 | #[cfg(feature="json")] 570 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.local_ratelimit.v3.serde.rs")); 571 | } 572 | } 573 | pub mod lua { 574 | pub mod v3 { 575 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.lua.v3.rs")); 576 | #[cfg(feature="json")] 577 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.lua.v3.serde.rs")); 578 | } 579 | } 580 | pub mod oauth2 { 581 | pub mod v3 { 582 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.oauth2.v3.rs")); 583 | #[cfg(feature="json")] 584 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.oauth2.v3.serde.rs")); 585 | } 586 | } 587 | pub mod on_demand { 588 | pub mod v3 { 589 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.on_demand.v3.rs")); 590 | #[cfg(feature="json")] 591 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.on_demand.v3.serde.rs")); 592 | } 593 | } 594 | pub mod original_src { 595 | pub mod v3 { 596 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.original_src.v3.rs")); 597 | #[cfg(feature="json")] 598 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.original_src.v3.serde.rs")); 599 | } 600 | } 601 | pub mod ratelimit { 602 | pub mod v3 { 603 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ratelimit.v3.rs")); 604 | #[cfg(feature="json")] 605 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.ratelimit.v3.serde.rs")); 606 | } 607 | } 608 | pub mod rbac { 609 | pub mod v3 { 610 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.rbac.v3.rs")); 611 | //#[cfg(feature="json")] 612 | //include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.rbac.v3.serde.rs")); 613 | } 614 | } 615 | pub mod router { 616 | pub mod v3 { 617 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.router.v3.rs")); 618 | #[cfg(feature="json")] 619 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.router.v3.serde.rs")); 620 | } 621 | } 622 | pub mod set_metadata { 623 | pub mod v3 { 624 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.set_metadata.v3.rs")); 625 | #[cfg(feature="json")] 626 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.set_metadata.v3.serde.rs")); 627 | } 628 | } 629 | pub mod tap { 630 | pub mod v3 { 631 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.tap.v3.rs")); 632 | #[cfg(feature="json")] 633 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.tap.v3.serde.rs")); 634 | } 635 | } 636 | pub mod wasm { 637 | pub mod v3 { 638 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.wasm.v3.rs")); 639 | #[cfg(feature="json")] 640 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.http.wasm.v3.serde.rs")); 641 | } 642 | } 643 | } 644 | pub mod listener { 645 | pub mod http_inspector { 646 | pub mod v3 { 647 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.http_inspector.v3.rs")); 648 | #[cfg(feature="json")] 649 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.http_inspector.v3.serde.rs")); 650 | } 651 | } 652 | pub mod original_dst { 653 | pub mod v3 { 654 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.original_dst.v3.rs")); 655 | #[cfg(feature="json")] 656 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.original_dst.v3.serde.rs")); 657 | } 658 | } 659 | pub mod original_src { 660 | pub mod v3 { 661 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.original_src.v3.rs")); 662 | #[cfg(feature="json")] 663 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.original_src.v3.serde.rs")); 664 | } 665 | } 666 | pub mod proxy_protocol { 667 | pub mod v3 { 668 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.proxy_protocol.v3.rs")); 669 | #[cfg(feature="json")] 670 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.proxy_protocol.v3.serde.rs")); 671 | } 672 | } 673 | pub mod tls_inspector { 674 | pub mod v3 { 675 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.tls_inspector.v3.rs")); 676 | #[cfg(feature="json")] 677 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.listener.tls_inspector.v3.serde.rs")); 678 | } 679 | } 680 | } 681 | pub mod network { 682 | pub mod client_ssl_auth { 683 | pub mod v3 { 684 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.client_ssl_auth.v3.rs")); 685 | #[cfg(feature="json")] 686 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.client_ssl_auth.v3.serde.rs")); 687 | } 688 | } 689 | pub mod connection_limit { 690 | pub mod v3 { 691 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.connection_limit.v3.rs")); 692 | #[cfg(feature="json")] 693 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.connection_limit.v3.serde.rs")); 694 | } 695 | } 696 | pub mod direct_response { 697 | pub mod v3 { 698 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.direct_response.v3.rs")); 699 | #[cfg(feature="json")] 700 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.direct_response.v3.serde.rs")); 701 | } 702 | } 703 | pub mod dubbo_proxy { 704 | pub mod router { 705 | pub mod v3 { 706 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.dubbo_proxy.router.v3.rs")); 707 | #[cfg(feature="json")] 708 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.dubbo_proxy.router.v3.serde.rs")); 709 | } 710 | } 711 | pub mod v3 { 712 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.dubbo_proxy.v3.rs")); 713 | #[cfg(feature="json")] 714 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.dubbo_proxy.v3.serde.rs")); 715 | } 716 | } 717 | pub mod echo { 718 | pub mod v3 { 719 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.echo.v3.rs")); 720 | #[cfg(feature="json")] 721 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.echo.v3.serde.rs")); 722 | } 723 | } 724 | pub mod ext_authz { 725 | pub mod v3 { 726 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.ext_authz.v3.rs")); 727 | #[cfg(feature="json")] 728 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.ext_authz.v3.serde.rs")); 729 | } 730 | } 731 | pub mod http_connection_manager { 732 | pub mod v3 { 733 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.http_connection_manager.v3.rs")); 734 | #[cfg(feature="json")] 735 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.http_connection_manager.v3.serde.rs")); 736 | } 737 | } 738 | pub mod local_ratelimit { 739 | pub mod v3 { 740 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.local_ratelimit.v3.rs")); 741 | #[cfg(feature="json")] 742 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.local_ratelimit.v3.serde.rs")); 743 | } 744 | } 745 | pub mod meta_protocol_proxy { 746 | pub mod matcher { 747 | pub mod action { 748 | pub mod v3 { 749 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.rs")); 750 | #[cfg(feature="json")] 751 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.serde.rs")); 752 | } 753 | } 754 | pub mod v3 { 755 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.rs")); 756 | #[cfg(feature="json")] 757 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.serde.rs")); 758 | } 759 | } 760 | pub mod v3 { 761 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.meta_protocol_proxy.v3.rs")); 762 | #[cfg(feature="json")] 763 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.meta_protocol_proxy.v3.serde.rs")); 764 | } 765 | } 766 | pub mod mongo_proxy { 767 | pub mod v3 { 768 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.mongo_proxy.v3.rs")); 769 | #[cfg(feature="json")] 770 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.mongo_proxy.v3.serde.rs")); 771 | } 772 | } 773 | pub mod ratelimit { 774 | pub mod v3 { 775 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.ratelimit.v3.rs")); 776 | #[cfg(feature="json")] 777 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.ratelimit.v3.serde.rs")); 778 | } 779 | } 780 | pub mod rbac { 781 | pub mod v3 { 782 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.rbac.v3.rs")); 783 | //#[cfg(feature="json")] 784 | //include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.rbac.v3.serde.rs")); 785 | } 786 | } 787 | pub mod redis_proxy { 788 | pub mod v3 { 789 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.redis_proxy.v3.rs")); 790 | #[cfg(feature="json")] 791 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.redis_proxy.v3.serde.rs")); 792 | } 793 | } 794 | pub mod sni_cluster { 795 | pub mod v3 { 796 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.sni_cluster.v3.rs")); 797 | #[cfg(feature="json")] 798 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.sni_cluster.v3.serde.rs")); 799 | } 800 | } 801 | pub mod sni_dynamic_forward_proxy { 802 | pub mod v3 { 803 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3.rs")); 804 | #[cfg(feature="json")] 805 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3.serde.rs")); 806 | } 807 | } 808 | pub mod tcp_proxy { 809 | pub mod v3 { 810 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.tcp_proxy.v3.rs")); 811 | #[cfg(feature="json")] 812 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.tcp_proxy.v3.serde.rs")); 813 | } 814 | } 815 | pub mod thrift_proxy { 816 | pub mod filters { 817 | pub mod header_to_metadata { 818 | pub mod v3 { 819 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.rs")); 820 | #[cfg(feature="json")] 821 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.serde.rs")); 822 | } 823 | } 824 | pub mod ratelimit { 825 | pub mod v3 { 826 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3.rs")); 827 | #[cfg(feature="json")] 828 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3.serde.rs")); 829 | } 830 | } 831 | } 832 | pub mod router { 833 | pub mod v3 { 834 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.router.v3.rs")); 835 | #[cfg(feature="json")] 836 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.router.v3.serde.rs")); 837 | } 838 | } 839 | pub mod v3 { 840 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.v3.rs")); 841 | #[cfg(feature="json")] 842 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.thrift_proxy.v3.serde.rs")); 843 | } 844 | } 845 | pub mod wasm { 846 | pub mod v3 { 847 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.wasm.v3.rs")); 848 | #[cfg(feature="json")] 849 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.wasm.v3.serde.rs")); 850 | } 851 | } 852 | pub mod zookeeper_proxy { 853 | pub mod v3 { 854 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.zookeeper_proxy.v3.rs")); 855 | #[cfg(feature="json")] 856 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.network.zookeeper_proxy.v3.serde.rs")); 857 | } 858 | } 859 | } 860 | pub mod udp { 861 | pub mod dns_filter { 862 | pub mod v3 { 863 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.udp.dns_filter.v3.rs")); 864 | #[cfg(feature="json")] 865 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.udp.dns_filter.v3.serde.rs")); 866 | } 867 | } 868 | pub mod udp_proxy { 869 | pub mod v3 { 870 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.udp.udp_proxy.v3.rs")); 871 | #[cfg(feature="json")] 872 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.filters.udp.udp_proxy.v3.serde.rs")); 873 | } 874 | } 875 | } 876 | } 877 | pub mod formatter { 878 | pub mod metadata { 879 | pub mod v3 { 880 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.formatter.metadata.v3.rs")); 881 | #[cfg(feature="json")] 882 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.formatter.metadata.v3.serde.rs")); 883 | } 884 | } 885 | pub mod req_without_query { 886 | pub mod v3 { 887 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.formatter.req_without_query.v3.rs")); 888 | #[cfg(feature="json")] 889 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.formatter.req_without_query.v3.serde.rs")); 890 | } 891 | } 892 | } 893 | pub mod health_checkers { 894 | pub mod redis { 895 | pub mod v3 { 896 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.health_checkers.redis.v3.rs")); 897 | #[cfg(feature="json")] 898 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.health_checkers.redis.v3.serde.rs")); 899 | } 900 | } 901 | } 902 | pub mod http { 903 | pub mod header_formatters { 904 | pub mod preserve_case { 905 | pub mod v3 { 906 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.http.header_formatters.preserve_case.v3.rs")); 907 | #[cfg(feature="json")] 908 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.http.header_formatters.preserve_case.v3.serde.rs")); 909 | } 910 | } 911 | } 912 | pub mod original_ip_detection { 913 | pub mod custom_header { 914 | pub mod v3 { 915 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.http.original_ip_detection.custom_header.v3.rs")); 916 | #[cfg(feature="json")] 917 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.http.original_ip_detection.custom_header.v3.serde.rs")); 918 | } 919 | } 920 | pub mod xff { 921 | pub mod v3 { 922 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.http.original_ip_detection.xff.v3.rs")); 923 | #[cfg(feature="json")] 924 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.http.original_ip_detection.xff.v3.serde.rs")); 925 | } 926 | } 927 | } 928 | } 929 | pub mod internal_redirect { 930 | pub mod allow_listed_routes { 931 | pub mod v3 { 932 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.internal_redirect.allow_listed_routes.v3.rs")); 933 | #[cfg(feature="json")] 934 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.internal_redirect.allow_listed_routes.v3.serde.rs")); 935 | } 936 | } 937 | pub mod previous_routes { 938 | pub mod v3 { 939 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.internal_redirect.previous_routes.v3.rs")); 940 | #[cfg(feature="json")] 941 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.internal_redirect.previous_routes.v3.serde.rs")); 942 | } 943 | } 944 | pub mod safe_cross_scheme { 945 | pub mod v3 { 946 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.internal_redirect.safe_cross_scheme.v3.rs")); 947 | #[cfg(feature="json")] 948 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.internal_redirect.safe_cross_scheme.v3.serde.rs")); 949 | } 950 | } 951 | } 952 | pub mod key_value { 953 | pub mod file_based { 954 | pub mod v3 { 955 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.key_value.file_based.v3.rs")); 956 | #[cfg(feature="json")] 957 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.key_value.file_based.v3.serde.rs")); 958 | } 959 | } 960 | } 961 | pub mod matching { 962 | pub mod common_inputs { 963 | pub mod environment_variable { 964 | pub mod v3 { 965 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.matching.common_inputs.environment_variable.v3.rs")); 966 | #[cfg(feature="json")] 967 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.matching.common_inputs.environment_variable.v3.serde.rs")); 968 | } 969 | } 970 | } 971 | pub mod input_matchers { 972 | pub mod consistent_hashing { 973 | pub mod v3 { 974 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.matching.input_matchers.consistent_hashing.v3.rs")); 975 | #[cfg(feature="json")] 976 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.matching.input_matchers.consistent_hashing.v3.serde.rs")); 977 | } 978 | } 979 | pub mod ip { 980 | pub mod v3 { 981 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.matching.input_matchers.ip.v3.rs")); 982 | #[cfg(feature="json")] 983 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.matching.input_matchers.ip.v3.serde.rs")); 984 | } 985 | } 986 | } 987 | } 988 | pub mod network { 989 | pub mod dns_resolver { 990 | pub mod apple { 991 | pub mod v3 { 992 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.network.dns_resolver.apple.v3.rs")); 993 | #[cfg(feature="json")] 994 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.network.dns_resolver.apple.v3.serde.rs")); 995 | } 996 | } 997 | pub mod cares { 998 | pub mod v3 { 999 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.network.dns_resolver.cares.v3.rs")); 1000 | #[cfg(feature="json")] 1001 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.network.dns_resolver.cares.v3.serde.rs")); 1002 | } 1003 | } 1004 | } 1005 | pub mod socket_interface { 1006 | pub mod v3 { 1007 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.network.socket_interface.v3.rs")); 1008 | #[cfg(feature="json")] 1009 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.network.socket_interface.v3.serde.rs")); 1010 | } 1011 | } 1012 | } 1013 | pub mod quic { 1014 | pub mod crypto_stream { 1015 | pub mod v3 { 1016 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.quic.crypto_stream.v3.rs")); 1017 | #[cfg(feature="json")] 1018 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.quic.crypto_stream.v3.serde.rs")); 1019 | } 1020 | } 1021 | pub mod proof_source { 1022 | pub mod v3 { 1023 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.quic.proof_source.v3.rs")); 1024 | #[cfg(feature="json")] 1025 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.quic.proof_source.v3.serde.rs")); 1026 | } 1027 | } 1028 | } 1029 | pub mod rate_limit_descriptors { 1030 | pub mod expr { 1031 | pub mod v3 { 1032 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.rate_limit_descriptors.expr.v3.rs")); 1033 | // #[cfg(feature="json")] 1034 | // include!(concat!(env!("OUT_DIR"), "/envoy.extensions.rate_limit_descriptors.expr.v3.serde.rs")); 1035 | } 1036 | } 1037 | } 1038 | pub mod rbac { 1039 | pub mod matchers { 1040 | pub mod upstream_ip_port { 1041 | pub mod v3 { 1042 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.rbac.matchers.upstream_ip_port.v3.rs")); 1043 | #[cfg(feature="json")] 1044 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.rbac.matchers.upstream_ip_port.v3.serde.rs")); 1045 | } 1046 | } 1047 | } 1048 | } 1049 | pub mod request_id { 1050 | pub mod uuid { 1051 | pub mod v3 { 1052 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.request_id.uuid.v3.rs")); 1053 | #[cfg(feature="json")] 1054 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.request_id.uuid.v3.serde.rs")); 1055 | } 1056 | } 1057 | } 1058 | pub mod resource_monitors { 1059 | pub mod fixed_heap { 1060 | pub mod v3 { 1061 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.resource_monitors.fixed_heap.v3.rs")); 1062 | #[cfg(feature="json")] 1063 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.resource_monitors.fixed_heap.v3.serde.rs")); 1064 | } 1065 | } 1066 | pub mod injected_resource { 1067 | pub mod v3 { 1068 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.resource_monitors.injected_resource.v3.rs")); 1069 | #[cfg(feature="json")] 1070 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.resource_monitors.injected_resource.v3.serde.rs")); 1071 | } 1072 | } 1073 | } 1074 | pub mod retry { 1075 | pub mod host { 1076 | pub mod omit_canary_hosts { 1077 | pub mod v3 { 1078 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.host.omit_canary_hosts.v3.rs")); 1079 | #[cfg(feature="json")] 1080 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.host.omit_canary_hosts.v3.serde.rs")); 1081 | } 1082 | } 1083 | pub mod omit_host_metadata { 1084 | pub mod v3 { 1085 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.host.omit_host_metadata.v3.rs")); 1086 | #[cfg(feature="json")] 1087 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.host.omit_host_metadata.v3.serde.rs")); 1088 | } 1089 | } 1090 | pub mod previous_hosts { 1091 | pub mod v3 { 1092 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.host.previous_hosts.v3.rs")); 1093 | #[cfg(feature="json")] 1094 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.host.previous_hosts.v3.serde.rs")); 1095 | } 1096 | } 1097 | } 1098 | pub mod priority { 1099 | pub mod previous_priorities { 1100 | pub mod v3 { 1101 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.priority.previous_priorities.v3.rs")); 1102 | #[cfg(feature="json")] 1103 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.retry.priority.previous_priorities.v3.serde.rs")); 1104 | } 1105 | } 1106 | } 1107 | } 1108 | pub mod stats_sinks { 1109 | pub mod graphite_statsd { 1110 | pub mod v3 { 1111 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.stat_sinks.graphite_statsd.v3.rs")); 1112 | #[cfg(feature="json")] 1113 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.stat_sinks.graphite_statsd.v3.serde.rs")); 1114 | } 1115 | } 1116 | pub mod wasm { 1117 | pub mod v3 { 1118 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.stat_sinks.wasm.v3.rs")); 1119 | #[cfg(feature="json")] 1120 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.stat_sinks.wasm.v3.serde.rs")); 1121 | } 1122 | } 1123 | } 1124 | pub mod transport_sockets { 1125 | pub mod alts { 1126 | pub mod v3 { 1127 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.alts.v3.rs")); 1128 | #[cfg(feature="json")] 1129 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.alts.v3.serde.rs")); 1130 | } 1131 | } 1132 | pub mod proxy_protocol { 1133 | pub mod v3 { 1134 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.proxy_protocol.v3.rs")); 1135 | #[cfg(feature="json")] 1136 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.proxy_protocol.v3.serde.rs")); 1137 | } 1138 | } 1139 | pub mod quic { 1140 | pub mod v3 { 1141 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.quic.v3.rs")); 1142 | #[cfg(feature="json")] 1143 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.quic.v3.serde.rs")); 1144 | } 1145 | } 1146 | pub mod raw_buffer { 1147 | pub mod v3 { 1148 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.raw_buffer.v3.rs")); 1149 | #[cfg(feature="json")] 1150 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.raw_buffer.v3.serde.rs")); 1151 | } 1152 | } 1153 | pub mod s2a { 1154 | pub mod v3 { 1155 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.s2a.v3.rs")); 1156 | #[cfg(feature="json")] 1157 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.s2a.v3.serde.rs")); 1158 | } 1159 | } 1160 | pub mod starttls { 1161 | pub mod v3 { 1162 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.starttls.v3.rs")); 1163 | #[cfg(feature="json")] 1164 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.starttls.v3.serde.rs")); 1165 | } 1166 | } 1167 | pub mod tap { 1168 | pub mod v3 { 1169 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.tap.v3.rs")); 1170 | #[cfg(feature="json")] 1171 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.tap.v3.serde.rs")); 1172 | } 1173 | } 1174 | pub mod tcp_stats { 1175 | pub mod v3 { 1176 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.tcp_stats.v3.rs")); 1177 | #[cfg(feature="json")] 1178 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.tcp_stats.v3.serde.rs")); 1179 | } 1180 | } 1181 | pub mod tls { 1182 | pub mod v3 { 1183 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.tls.v3.rs")); 1184 | #[cfg(feature="json")] 1185 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.transport_sockets.tls.v3.serde.rs")); 1186 | } 1187 | } 1188 | } 1189 | pub mod upstreams { 1190 | pub mod http { 1191 | pub mod generic { 1192 | pub mod v3 { 1193 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.generic.v3.rs")); 1194 | #[cfg(feature="json")] 1195 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.generic.v3.serde.rs")); 1196 | } 1197 | } 1198 | pub mod http { 1199 | pub mod v3 { 1200 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.http.v3.rs")); 1201 | #[cfg(feature="json")] 1202 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.http.v3.serde.rs")); 1203 | } 1204 | } 1205 | pub mod tcp { 1206 | pub mod v3 { 1207 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.tcp.v3.rs")); 1208 | #[cfg(feature="json")] 1209 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.tcp.v3.serde.rs")); 1210 | } 1211 | } 1212 | pub mod v3 { 1213 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.v3.rs")); 1214 | #[cfg(feature="json")] 1215 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.http.v3.serde.rs")); 1216 | } 1217 | } 1218 | pub mod tcp { 1219 | pub mod generic { 1220 | pub mod v3 { 1221 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.tcp.generic.v3.rs")); 1222 | #[cfg(feature="json")] 1223 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.upstreams.tcp.generic.v3.serde.rs")); 1224 | } 1225 | } 1226 | } 1227 | } 1228 | pub mod wasm { 1229 | pub mod v3 { 1230 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.wasm.v3.rs")); 1231 | #[cfg(feature="json")] 1232 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.wasm.v3.serde.rs")); 1233 | } 1234 | } 1235 | pub mod watchdog { 1236 | pub mod profile_action { 1237 | pub mod v3 { 1238 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.watchdog.profile_action.v3.rs")); 1239 | #[cfg(feature="json")] 1240 | include!(concat!(env!("OUT_DIR"), "/envoy.extensions.watchdog.profile_action.v3.serde.rs")); 1241 | } 1242 | } 1243 | } 1244 | } 1245 | pub mod r#type { 1246 | pub mod http { 1247 | pub mod v3 { 1248 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.http.v3.rs")); 1249 | #[cfg(feature="json")] 1250 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.http.v3.serde.rs")); 1251 | } 1252 | } 1253 | pub mod matcher { 1254 | pub mod v3 { 1255 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.matcher.v3.rs")); 1256 | #[cfg(feature="json")] 1257 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.matcher.v3.serde.rs")); 1258 | } 1259 | } 1260 | pub mod metadata { 1261 | pub mod v3 { 1262 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.metadata.v3.rs")); 1263 | #[cfg(feature="json")] 1264 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.metadata.v3.serde.rs")); 1265 | } 1266 | } 1267 | pub mod tracing { 1268 | pub mod v3 { 1269 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.tracing.v3.rs")); 1270 | #[cfg(feature="json")] 1271 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.tracing.v3.serde.rs")); 1272 | } 1273 | } 1274 | pub mod v3 { 1275 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.v3.rs")); 1276 | #[cfg(feature="json")] 1277 | include!(concat!(env!("OUT_DIR"), "/envoy.r#type.v3.serde.rs")); 1278 | } 1279 | } 1280 | pub mod service { 1281 | pub mod accesslog { 1282 | pub mod v3 { 1283 | include!(concat!(env!("OUT_DIR"), "/envoy.service.accesslog.v3.rs")); 1284 | // #[cfg(feature="json")] 1285 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.accesslog.v3.serde.rs")); 1286 | } 1287 | } 1288 | pub mod auth { 1289 | pub mod v3 { 1290 | include!(concat!(env!("OUT_DIR"), "/envoy.service.auth.v3.rs")); 1291 | // #[cfg(feature="json")] 1292 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.auth.v3.serde.rs")); 1293 | } 1294 | } 1295 | pub mod cluster { 1296 | pub mod v3 { 1297 | include!(concat!(env!("OUT_DIR"), "/envoy.service.cluster.v3.rs")); 1298 | // #[cfg(feature="json")] 1299 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.cluster.v3.serde.rs")); 1300 | } 1301 | } 1302 | pub mod discovery { 1303 | pub mod v3 { 1304 | include!(concat!(env!("OUT_DIR"), "/envoy.service.discovery.v3.rs")); 1305 | // #[cfg(feature="json")] 1306 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.discovery.v3.serde.rs")); 1307 | } 1308 | } 1309 | pub mod endpoint { 1310 | pub mod v3 { 1311 | include!(concat!(env!("OUT_DIR"), "/envoy.service.endpoint.v3.rs")); 1312 | // #[cfg(feature="json")] 1313 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.endpoint.v3.serde.rs")); 1314 | } 1315 | } 1316 | pub mod event_reporting { 1317 | pub mod v3 { 1318 | include!(concat!(env!("OUT_DIR"), "/envoy.service.event_reporting.v3.rs")); 1319 | // #[cfg(feature="json")] 1320 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.event_reporting.v3.serde.rs")); 1321 | } 1322 | } 1323 | pub mod ext_proc { 1324 | pub mod v3 { 1325 | include!(concat!(env!("OUT_DIR"), "/envoy.service.ext_proc.v3.rs")); 1326 | // #[cfg(feature="json")] 1327 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.ext_proc.v3.serde.rs")); 1328 | } 1329 | } 1330 | pub mod extension { 1331 | pub mod v3 { 1332 | include!(concat!(env!("OUT_DIR"), "/envoy.service.extension.v3.rs")); 1333 | // #[cfg(feature="json")] 1334 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.extension.v3.serde.rs")); 1335 | } 1336 | } 1337 | pub mod health { 1338 | pub mod v3 { 1339 | include!(concat!(env!("OUT_DIR"), "/envoy.service.health.v3.rs")); 1340 | // #[cfg(feature="json")] 1341 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.health.v3.serde.rs")); 1342 | } 1343 | } 1344 | pub mod listener { 1345 | pub mod v3 { 1346 | include!(concat!(env!("OUT_DIR"), "/envoy.service.listener.v3.rs")); 1347 | // #[cfg(feature="json")] 1348 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.listener.v3.serde.rs")); 1349 | } 1350 | } 1351 | pub mod load_stats { 1352 | pub mod v3 { 1353 | include!(concat!(env!("OUT_DIR"), "/envoy.service.load_stats.v3.rs")); 1354 | // #[cfg(feature="json")] 1355 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.load_stats.v3.serde.rs")); 1356 | } 1357 | } 1358 | pub mod metrics { 1359 | pub mod v3 { 1360 | include!(concat!(env!("OUT_DIR"), "/envoy.service.metrics.v3.rs")); 1361 | // #[cfg(feature="json")] 1362 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.metrics.v3.serde.rs")); 1363 | } 1364 | } 1365 | pub mod ratelimit { 1366 | pub mod v3 { 1367 | include!(concat!(env!("OUT_DIR"), "/envoy.service.ratelimit.v3.rs")); 1368 | // #[cfg(feature="json")] 1369 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.ratelimit.v3.serde.rs")); 1370 | } 1371 | } 1372 | pub mod route { 1373 | pub mod v3 { 1374 | include!(concat!(env!("OUT_DIR"), "/envoy.service.route.v3.rs")); 1375 | // #[cfg(feature="json")] 1376 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.route.v3.serde.rs")); 1377 | } 1378 | } 1379 | pub mod runtime { 1380 | pub mod v3 { 1381 | include!(concat!(env!("OUT_DIR"), "/envoy.service.runtime.v3.rs")); 1382 | // #[cfg(feature="json")] 1383 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.runtime.v3.serde.rs")); 1384 | } 1385 | } 1386 | pub mod secret { 1387 | pub mod v3 { 1388 | include!(concat!(env!("OUT_DIR"), "/envoy.service.secret.v3.rs")); 1389 | // #[cfg(feature="json")] 1390 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.secret.v3.serde.rs")); 1391 | } 1392 | } 1393 | pub mod status { 1394 | pub mod v3 { 1395 | include!(concat!(env!("OUT_DIR"), "/envoy.service.status.v3.rs")); 1396 | // #[cfg(feature="json")] 1397 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.status.v3.serde.rs")); 1398 | } 1399 | } 1400 | pub mod tap { 1401 | pub mod v3 { 1402 | include!(concat!(env!("OUT_DIR"), "/envoy.service.tap.v3.rs")); 1403 | // #[cfg(feature="json")] 1404 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.tap.v3.serde.rs")); 1405 | } 1406 | } 1407 | pub mod trace { 1408 | pub mod v3 { 1409 | include!(concat!(env!("OUT_DIR"), "/envoy.service.trace.v3.rs")); 1410 | // #[cfg(feature="json")] 1411 | // include!(concat!(env!("OUT_DIR"), "/envoy.service.trace.v3.serde.rs")); 1412 | } 1413 | } 1414 | } 1415 | pub mod watchdog { 1416 | pub mod v3 { 1417 | include!(concat!(env!("OUT_DIR"), "/envoy.watchdog.v3.rs")); 1418 | #[cfg(feature="json")] 1419 | include!(concat!(env!("OUT_DIR"), "/envoy.watchdog.v3.serde.rs")); 1420 | } 1421 | } 1422 | } 1423 | pub mod google { 1424 | pub mod api { 1425 | pub mod expr { 1426 | pub mod v1alpha1 { 1427 | include!(concat!(env!("OUT_DIR"), "/google.api.expr.v1alpha1.rs")); 1428 | #[cfg(feature="json")] 1429 | include!(concat!(env!("OUT_DIR"), "/google.api.expr.v1alpha1.serde.rs")); 1430 | } 1431 | } 1432 | // include!(concat!(env!("OUT_DIR"), "/google.api.rs")); 1433 | // #[cfg(feature="json")] 1434 | // include!(concat!(env!("OUT_DIR"), "/google.api.serde.rs")); 1435 | } 1436 | pub mod protobuf { 1437 | // include!(concat!(env!("OUT_DIR"), "/google.protobuf.rs")); 1438 | // #[cfg(feature="json")] 1439 | // include!(concat!(env!("OUT_DIR"), "/google.protobuf.serde.rs")); 1440 | } 1441 | pub mod rpc { 1442 | include!(concat!(env!("OUT_DIR"), "/google.rpc.rs")); 1443 | #[cfg(feature="json")] 1444 | include!(concat!(env!("OUT_DIR"), "/google.rpc.serde.rs")); 1445 | } 1446 | } 1447 | pub mod io { 1448 | pub mod prometheus { 1449 | pub mod client { 1450 | include!(concat!(env!("OUT_DIR"), "/io.prometheus.client.rs")); 1451 | #[cfg(feature="json")] 1452 | include!(concat!(env!("OUT_DIR"), "/io.prometheus.client.serde.rs")); 1453 | } 1454 | } 1455 | } 1456 | pub mod opencensus { 1457 | pub mod proto { 1458 | pub mod resource { 1459 | pub mod v1 { 1460 | include!(concat!(env!("OUT_DIR"), "/opencensus.proto.resource.v1.rs")); 1461 | #[cfg(feature="json")] 1462 | include!(concat!(env!("OUT_DIR"), "/opencensus.proto.resource.v1.serde.rs")); 1463 | } 1464 | } 1465 | pub mod trace { 1466 | pub mod v1 { 1467 | include!(concat!(env!("OUT_DIR"), "/opencensus.proto.trace.v1.rs")); 1468 | #[cfg(feature="json")] 1469 | include!(concat!(env!("OUT_DIR"), "/opencensus.proto.trace.v1.serde.rs")); 1470 | } 1471 | } 1472 | } 1473 | } 1474 | pub mod opentelemetry { 1475 | pub mod proto { 1476 | pub mod common { 1477 | pub mod v1 { 1478 | include!(concat!(env!("OUT_DIR"), "/opentelemetry.proto.common.v1.rs")); 1479 | #[cfg(feature="json")] 1480 | include!(concat!(env!("OUT_DIR"), "/opentelemetry.proto.common.v1.serde.rs")); 1481 | } 1482 | } 1483 | } 1484 | } 1485 | pub mod udpa { 1486 | pub mod annotations { 1487 | include!(concat!(env!("OUT_DIR"), "/udpa.annotations.rs")); 1488 | #[cfg(feature="json")] 1489 | include!(concat!(env!("OUT_DIR"), "/udpa.annotations.serde.rs")); 1490 | } 1491 | } 1492 | pub mod validate { 1493 | include!(concat!(env!("OUT_DIR"), "/validate.rs")); 1494 | #[cfg(feature="json")] 1495 | include!(concat!(env!("OUT_DIR"), "/validate.serde.rs")); 1496 | } 1497 | pub mod xds { 1498 | pub mod annotations { 1499 | pub mod v3 { 1500 | include!(concat!(env!("OUT_DIR"), "/xds.annotations.v3.rs")); 1501 | #[cfg(feature="json")] 1502 | include!(concat!(env!("OUT_DIR"), "/xds.annotations.v3.serde.rs")); 1503 | } 1504 | } 1505 | pub mod core { 1506 | pub mod v3 { 1507 | include!(concat!(env!("OUT_DIR"), "/xds.core.v3.rs")); 1508 | #[cfg(feature="json")] 1509 | include!(concat!(env!("OUT_DIR"), "/xds.core.v3.serde.rs")); 1510 | } 1511 | } 1512 | pub mod r#type { 1513 | pub mod matcher { 1514 | pub mod v3 { 1515 | include!(concat!(env!("OUT_DIR"), "/xds.r#type.matcher.v3.rs")); 1516 | #[cfg(feature="json")] 1517 | include!(concat!(env!("OUT_DIR"), "/xds.r#type.matcher.v3.serde.rs")); 1518 | } 1519 | } 1520 | } 1521 | } 1522 | 1523 | #[test] 1524 | fn test_any_json_roundtrip() { 1525 | use crate::envoy::config::bootstrap::v3::bootstrap::StaticResources; 1526 | use crate::envoy::config::bootstrap::v3::Bootstrap; 1527 | use crate::envoy::config::core::v3::address; 1528 | use crate::envoy::config::core::v3::data_source::Specifier; 1529 | use crate::envoy::config::core::v3::socket_address::PortSpecifier; 1530 | use crate::envoy::config::core::v3::transport_socket::ConfigType; 1531 | use crate::envoy::config::core::v3::{Address, DataSource, SocketAddress, TransportSocket}; 1532 | use crate::envoy::config::listener::v3::{FilterChain, Listener}; 1533 | use crate::envoy::extensions::transport_sockets::tls::v3::common_tls_context::ValidationContextType; 1534 | use crate::envoy::extensions::transport_sockets::tls::v3::subject_alt_name_matcher::SanType; 1535 | use crate::envoy::extensions::transport_sockets::tls::v3::tls_parameters::TlsProtocol; 1536 | use crate::envoy::extensions::transport_sockets::tls::v3::{CertificateValidationContext, SubjectAltNameMatcher}; 1537 | use crate::envoy::extensions::transport_sockets::tls::v3::{CommonTlsContext, DownstreamTlsContext, TlsCertificate, TlsParameters}; 1538 | use crate::envoy::r#type::matcher::v3::string_matcher::MatchPattern; 1539 | use crate::envoy::r#type::matcher::v3::StringMatcher; 1540 | use crate::pbjson_types_any::BoolValue; 1541 | use crate::prost_wkt_types::Any; 1542 | 1543 | const BOOTSTRAP_JSON: &str = r#"{ 1544 | "staticResources": { 1545 | "listeners": [ 1546 | { 1547 | "name": "server-1", 1548 | "address": { 1549 | "socketAddress": { 1550 | "address": "127.0.0.1", 1551 | "portValue": 9000 1552 | } 1553 | }, 1554 | "filterChains": [ 1555 | { 1556 | "filters": [], 1557 | "transportSocket": { 1558 | "name": "envoy.transport_sockets.tls", 1559 | "typedConfig": { 1560 | "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", 1561 | "requireClientCertificate": { "value": true }, 1562 | "commonTlsContext": { 1563 | "tlsParams": { 1564 | "tlsMinimumProtocolVersion": "TLSv1_3", 1565 | "tlsMaximumProtocolVersion": "TLSv1_3" 1566 | }, 1567 | "validationContext": { 1568 | "trustedCa": { 1569 | "filename": "./certs/ca.crt" 1570 | }, 1571 | "matchTypedSubjectAltNames": [ 1572 | { 1573 | "sanType": "DNS", 1574 | "matcher": { 1575 | "exact": "client.test" 1576 | } 1577 | } 1578 | ] 1579 | }, 1580 | "tlsCertificates": [ 1581 | { 1582 | "certificateChain": { 1583 | "filename": "./certs/server.test.ecdsa-p256.crt" 1584 | }, 1585 | "privateKey": { 1586 | "filename": "./certs/server.test.ecdsa-p256.key" 1587 | } 1588 | } 1589 | ] 1590 | } 1591 | } 1592 | } 1593 | } 1594 | ] 1595 | } 1596 | ] 1597 | } 1598 | } 1599 | "#; 1600 | 1601 | let expected_tls_context = DownstreamTlsContext { 1602 | require_client_certificate: Some(BoolValue { value: true }), 1603 | common_tls_context: Some(CommonTlsContext { 1604 | tls_params: Some(TlsParameters { 1605 | tls_minimum_protocol_version: TlsProtocol::TlSv13 as i32, 1606 | tls_maximum_protocol_version: TlsProtocol::TlSv13 as i32, 1607 | ..Default::default() 1608 | }), 1609 | validation_context_type: Some(ValidationContextType::ValidationContext(CertificateValidationContext { 1610 | trusted_ca: Some(DataSource { 1611 | specifier: Some(Specifier::Filename("./certs/ca.crt".to_string())), 1612 | }), 1613 | match_typed_subject_alt_names: vec![SubjectAltNameMatcher { 1614 | san_type: SanType::Dns as i32, 1615 | matcher: Some(StringMatcher { 1616 | ignore_case: false, 1617 | match_pattern: Some(MatchPattern::Exact("client.test".to_string())), 1618 | }), 1619 | }], 1620 | ..Default::default() 1621 | })), 1622 | tls_certificates: vec![TlsCertificate { 1623 | certificate_chain: Some(DataSource { 1624 | specifier: Some(Specifier::Filename("./certs/server.test.ecdsa-p256.crt".to_string())), 1625 | }), 1626 | private_key: Some(DataSource { 1627 | specifier: Some(Specifier::Filename("./certs/server.test.ecdsa-p256.key".to_string())), 1628 | }), 1629 | ..Default::default() 1630 | }], 1631 | ..Default::default() 1632 | }), 1633 | ..Default::default() 1634 | }; 1635 | 1636 | let bootstrap: Bootstrap = serde_json::from_str(BOOTSTRAP_JSON).unwrap(); 1637 | let expected = Bootstrap { 1638 | static_resources: Some(StaticResources { 1639 | listeners: vec![Listener { 1640 | name: "server-1".to_string(), 1641 | address: Some(Address { 1642 | address: Some(address::Address::SocketAddress(SocketAddress { 1643 | address: "127.0.0.1".to_string(), 1644 | port_specifier: Some(PortSpecifier::PortValue(9000)), 1645 | ..Default::default() 1646 | })), 1647 | }), 1648 | filter_chains: vec![FilterChain { 1649 | filters: vec![], 1650 | transport_socket: Some(TransportSocket { 1651 | name: "envoy.transport_sockets.tls".to_string(), 1652 | config_type: Some(ConfigType::TypedConfig(Any::try_pack(expected_tls_context.clone()).unwrap())), 1653 | }), 1654 | ..Default::default() 1655 | }], 1656 | ..Default::default() 1657 | }], 1658 | ..Default::default() 1659 | }), 1660 | ..Default::default() 1661 | }; 1662 | 1663 | use pbjson_any::prost_wkt::MessageSerde; 1664 | use prost::Message; 1665 | 1666 | let downstream_tls_context_type_url = DownstreamTlsContext::default().type_url(); 1667 | 1668 | let expected_tls_any = expected.static_resources.as_ref().unwrap().listeners[0].filter_chains[0] 1669 | .transport_socket 1670 | .as_ref() 1671 | .unwrap() 1672 | .config_type 1673 | .as_ref() 1674 | .unwrap(); 1675 | let ConfigType::TypedConfig(tls_any) = expected_tls_any; 1676 | if &tls_any.type_url == downstream_tls_context_type_url { 1677 | let ctx = DownstreamTlsContext::decode(&*tls_any.value).unwrap(); 1678 | assert_eq!(&expected_tls_context, &ctx); 1679 | } else { 1680 | panic!("unknown envoy.transport_sockets.tls typed config: {}", &tls_any.type_url); 1681 | } 1682 | 1683 | let bootstrap_tls_any = bootstrap.static_resources.as_ref().unwrap().listeners[0].filter_chains[0] 1684 | .transport_socket 1685 | .as_ref() 1686 | .unwrap() 1687 | .config_type 1688 | .as_ref() 1689 | .unwrap(); 1690 | let ConfigType::TypedConfig(tls_any) = bootstrap_tls_any; 1691 | if &tls_any.type_url == downstream_tls_context_type_url { 1692 | let ctx = DownstreamTlsContext::decode(&*tls_any.value).unwrap(); 1693 | assert_eq!(&expected_tls_context, &ctx); 1694 | } else { 1695 | panic!("unknown envoy.transport_sockets.tls typed config: {}", &tls_any.type_url); 1696 | } 1697 | 1698 | assert_eq!(expected, bootstrap); 1699 | } 1700 | --------------------------------------------------------------------------------