From f6dc3aff5cbf1d7fee660d27ee6ae71e39b8716f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 09:26:10 +0100 Subject: [PATCH 01/23] Bump helm/kind-action from 1.5.0 to 1.7.0 (#9494) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.5.0 to 1.7.0.
Release notes

Sourced from helm/kind-action's releases.

v1.7.0

What's Changed

Full Changelog: https://github.com/helm/kind-action/compare/v1.6.0...v1.7.0

v1.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/helm/kind-action/compare/v1.5.0...v1.6.0

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=helm/kind-action&package-manager=github_actions&previous-version=1.5.0&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> --- .github/workflows/helm-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-ci.yml b/.github/workflows/helm-ci.yml index ba9c7d67d9c3..206e83a37436 100644 --- a/.github/workflows/helm-ci.yml +++ b/.github/workflows/helm-ci.yml @@ -74,7 +74,7 @@ jobs: run: ct lint --config "${CT_CONFIGFILE}" --check-version-increment=false - name: Create kind cluster - uses: helm/kind-action@v1.5.0 + uses: helm/kind-action@v1.7.0 if: steps.list-changed.outputs.changed == 'true' - name: Install prometheus operator From e81dd8aed245cba6c93c370ae229e79bfe353cec Mon Sep 17 00:00:00 2001 From: Dylan Guedes Date: Tue, 23 May 2023 07:15:05 -0300 Subject: [PATCH 02/23] Loki: Bump `dskit` to inherit new backoff configs (#9484) **What this PR does / why we need it**: Bump `dskit` to inherit https://github.com/grafana/dskit/pull/296. It will allow us to configure custom backoff timeouts. **Which issue(s) this PR fixes**: N/A --- docs/sources/configuration/_index.md | 27 +- go.mod | 15 +- go.sum | 96 +- .../envoy/api/v2/auth/cert.pb.go | 84 - .../envoy/api/v2/auth/cert.pb.validate.go | 36 - .../envoy/api/v2/auth/common.pb.go | 1079 -- .../envoy/api/v2/auth/common.pb.validate.go | 1082 -- .../envoy/api/v2/auth/secret.pb.go | 421 - .../envoy/api/v2/auth/secret.pb.validate.go | 565 -- .../envoy/api/v2/auth/tls.pb.go | 764 -- .../envoy/api/v2/auth/tls.pb.validate.go | 1062 -- .../go-control-plane/envoy/api/v2/cds.pb.go | 413 - .../envoy/api/v2/cds.pb.validate.go | 135 - .../envoy/api/v2/cluster.pb.go | 3364 ------- .../envoy/api/v2/cluster.pb.validate.go | 3828 -------- .../api/v2/cluster/circuit_breaker.pb.go | 469 - .../v2/cluster/circuit_breaker.pb.validate.go | 627 -- .../envoy/api/v2/cluster/filter.pb.go | 184 - .../api/v2/cluster/filter.pb.validate.go | 174 - .../api/v2/cluster/outlier_detection.pb.go | 548 -- .../cluster/outlier_detection.pb.validate.go | 565 -- .../envoy/api/v2/discovery.pb.go | 834 -- .../envoy/api/v2/discovery.pb.validate.go | 813 -- .../go-control-plane/envoy/api/v2/eds.pb.go | 418 - .../envoy/api/v2/eds.pb.validate.go | 135 - .../envoy/api/v2/endpoint.pb.go | 487 - .../envoy/api/v2/endpoint.pb.validate.go | 588 -- .../envoy/api/v2/endpoint/endpoint.pb.go | 74 - .../api/v2/endpoint/endpoint.pb.validate.go | 36 - .../api/v2/endpoint/endpoint_components.pb.go | 631 -- .../endpoint_components.pb.validate.go | 737 -- .../envoy/api/v2/endpoint/load_report.pb.go | 772 -- .../v2/endpoint/load_report.pb.validate.go | 893 -- .../go-control-plane/envoy/api/v2/lds.pb.go | 413 - .../envoy/api/v2/lds.pb.validate.go | 135 - .../envoy/api/v2/listener.pb.go | 891 -- .../envoy/api/v2/listener.pb.validate.go | 1047 -- .../envoy/api/v2/listener/listener.pb.go | 78 - .../api/v2/listener/listener.pb.validate.go | 36 - .../api/v2/listener/listener_components.pb.go | 1178 --- .../listener_components.pb.validate.go | 1446 --- .../envoy/api/v2/listener/quic_config.pb.go | 210 - .../v2/listener/quic_config.pb.validate.go | 225 - .../api/v2/listener/udp_listener_config.pb.go | 288 - .../udp_listener_config.pb.validate.go | 329 - .../go-control-plane/envoy/api/v2/rds.pb.go | 530 - .../envoy/api/v2/rds.pb.validate.go | 135 - .../go-control-plane/envoy/api/v2/route.pb.go | 417 - .../envoy/api/v2/route.pb.validate.go | 516 - .../envoy/api/v2/route/route.pb.go | 73 - .../envoy/api/v2/route/route.pb.validate.go | 36 - .../envoy/api/v2/route/route_components.pb.go | 6405 ------------ .../v2/route/route_components.pb.validate.go | 8694 ----------------- .../envoy/api/v2/scoped_route.pb.go | 413 - .../envoy/api/v2/scoped_route.pb.validate.go | 482 - .../go-control-plane/envoy/api/v2/srds.pb.go | 416 - .../envoy/api/v2/srds.pb.validate.go | 135 - .../filter/accesslog/v2/accesslog.pb.go | 1692 ---- .../accesslog/v2/accesslog.pb.validate.go | 2469 ----- .../config/listener/v2/api_listener.pb.go | 177 - .../listener/v2/api_listener.pb.validate.go | 164 - .../envoy/service/discovery/v2/ads.pb.go | 359 - .../service/discovery/v2/ads.pb.validate.go | 135 - .../envoy/service/discovery/v2/hds.pb.go | 1100 --- .../service/discovery/v2/hds.pb.validate.go | 1261 --- .../envoy/service/discovery/v2/rtds.pb.go | 499 - .../service/discovery/v2/rtds.pb.validate.go | 273 - .../envoy/service/discovery/v2/sds.pb.go | 414 - .../service/discovery/v2/sds.pb.validate.go | 135 - .../envoy/service/load_stats/v2/lrs.pb.go | 489 - .../service/load_stats/v2/lrs.pb.validate.go | 334 - .../envoy/type/metadata/v2/metadata.pb.go | 662 -- .../type/metadata/v2/metadata.pb.validate.go | 1024 -- .../envoy/type/tracing/v2/custom_tag.pb.go | 591 -- .../type/tracing/v2/custom_tag.pb.validate.go | 846 -- .../grafana/dskit/grpcclient/grpcclient.go | 30 + .../grafana/dskit/ring/basic_lifecycler.go | 33 +- vendor/github.com/grafana/dskit/ring/model.go | 2 +- .../grafana/dskit/ring/replication_set.go | 158 +- .../dskit/ring/replication_set_tracker.go | 104 + vendor/github.com/grafana/dskit/ring/ring.go | 152 +- .../prometheus/common/expfmt/decode.go | 5 +- .../prometheus/common/expfmt/encode.go | 13 +- .../prometheus/common/expfmt/expfmt.go | 26 +- .../prometheus/common/expfmt/text_parse.go | 2 +- .../github.com/sercand/kuberesolver/README.md | 28 - .../sercand/kuberesolver/{ => v4}/.gitignore | 0 .../sercand/kuberesolver/{ => v4}/LICENSE | 0 .../sercand/kuberesolver/v4/README.md | 64 + .../sercand/kuberesolver/{ => v4}/builder.go | 103 +- .../kuberesolver/{ => v4}/kubernetes.go | 84 +- .../sercand/kuberesolver/{ => v4}/models.go | 0 .../sercand/kuberesolver/{ => v4}/stream.go | 3 + .../sercand/kuberesolver/{ => v4}/util.go | 0 vendor/github.com/soheilhy/cmux/.gitignore | 24 + vendor/github.com/soheilhy/cmux/.travis.yml | 29 + vendor/github.com/soheilhy/cmux/CONTRIBUTORS | 12 + vendor/github.com/soheilhy/cmux/LICENSE | 202 + vendor/github.com/soheilhy/cmux/README.md | 83 + vendor/github.com/soheilhy/cmux/buffer.go | 67 + vendor/github.com/soheilhy/cmux/cmux.go | 307 + vendor/github.com/soheilhy/cmux/doc.go | 18 + vendor/github.com/soheilhy/cmux/matchers.go | 267 + vendor/github.com/soheilhy/cmux/patricia.go | 179 + .../common/httpgrpc/server/server.go | 14 +- .../common/middleware/errorhandler.go | 5 + .../weaveworks/common/middleware/logging.go | 39 +- .../weaveworks/common/middleware/response.go | 5 + .../weaveworks/common/server/server.go | 126 +- vendor/golang.org/x/oauth2/README.md | 12 +- vendor/golang.org/x/oauth2/google/default.go | 16 +- vendor/golang.org/x/oauth2/google/doc.go | 61 +- vendor/golang.org/x/oauth2/google/google.go | 6 +- vendor/golang.org/x/oauth2/oauth2.go | 33 +- vendor/golang.org/x/oauth2/token.go | 14 +- .../grpc/balancer/balancer.go | 8 + .../grpc/balancer/grpclb/grpclb.go | 4 +- .../balancer/grpclb/grpclb_remote_balancer.go | 2 +- vendor/google.golang.org/grpc/clientconn.go | 35 +- .../grpc/credentials/oauth/oauth.go | 8 +- .../google.golang.org/grpc/credentials/tls.go | 4 +- .../tls/certprovider/pemfile/watcher.go | 8 +- vendor/google.golang.org/grpc/dialoptions.go | 15 + .../grpc/encoding/encoding.go | 4 +- .../grpc/encoding/gzip/gzip.go | 5 +- .../grpc/grpclog/loggerv2.go | 7 +- .../internal/balancergroup/balancergroup.go | 17 +- .../grpc/internal/binarylog/method_logger.go | 126 +- .../grpc/internal/binarylog/sink.go | 12 +- .../grpc/internal/envconfig/envconfig.go | 39 +- .../grpc/internal/envconfig/xds.go | 31 +- .../googlecloud/manufacturer_linux.go | 4 +- .../grpc/internal/internal.go | 3 + .../internal/resolver/dns/dns_resolver.go | 2 +- .../resolver/passthrough/passthrough.go | 4 +- .../grpc/internal/testutils/balancer.go | 372 + .../grpc/internal/testutils/channel.go | 104 + .../grpc/internal/testutils/http_client.go | 63 + .../grpc/internal/testutils/local_listener.go | 26 + .../grpc/internal/testutils/marshal_any.go | 36 + .../grpc/internal/testutils/parse_url.go | 34 + .../grpc/internal/testutils/pipe_listener.go | 96 + .../testutils/restartable_listener.go | 98 + .../grpc/internal/testutils/status_equal.go | 38 + .../grpc/internal/testutils/wrappers.go | 74 + .../grpc/internal/testutils/wrr.go | 73 + .../grpc/internal/transport/controlbuf.go | 22 +- .../grpc/internal/transport/defaults.go | 6 + .../grpc/internal/transport/handler_server.go | 4 +- .../grpc/internal/transport/http2_client.go | 52 +- .../grpc/internal/transport/http2_server.go | 46 +- .../grpc/internal/transport/transport.go | 4 +- .../google.golang.org/grpc/picker_wrapper.go | 28 +- vendor/google.golang.org/grpc/pickfirst.go | 2 +- .../grpc/resolver/resolver.go | 22 +- vendor/google.golang.org/grpc/rpc_util.go | 17 +- vendor/google.golang.org/grpc/server.go | 2 +- .../google.golang.org/grpc/service_config.go | 10 +- vendor/google.golang.org/grpc/stream.go | 40 +- vendor/google.golang.org/grpc/version.go | 2 +- vendor/google.golang.org/grpc/vet.sh | 20 +- .../google.golang.org/grpc/xds/csds/csds.go | 127 +- .../grpc/xds/googledirectpath/googlec2p.go | 14 +- .../grpc/xds/googledirectpath/utils.go | 4 +- .../balancer/cdsbalancer/cdsbalancer.go | 2 +- .../clusterresolver/resource_resolver_dns.go | 3 +- .../internal/balancer/priority/balancer.go | 2 +- .../balancer/priority/balancer_child.go | 2 +- .../balancer/priority/balancer_priority.go | 14 +- .../xds/internal/balancer/ringhash/config.go | 15 +- .../xds/internal/clusterspecifier/rls/rls.go | 2 +- .../xds/internal/resolver/xds_resolver.go | 32 +- .../grpc/xds/internal/xdsclient/authority.go | 453 +- .../internal/xdsclient/bootstrap/bootstrap.go | 14 +- .../grpc/xds/internal/xdsclient/client.go | 11 +- .../grpc/xds/internal/xdsclient/client_new.go | 86 +- .../grpc/xds/internal/xdsclient/clientimpl.go | 7 +- .../xdsclient/clientimpl_authority.go | 54 +- .../xds/internal/xdsclient/clientimpl_dump.go | 50 +- .../xdsclient/clientimpl_loadreport.go | 6 +- .../xdsclient/clientimpl_validator.go | 67 - .../internal/xdsclient/clientimpl_watchers.go | 196 +- .../xdsclient/controller/controller.go | 201 - .../xdsclient/controller/loadreport.go | 145 - .../xdsclient/controller/transport.go | 443 - .../xdsclient/controller/version/v2/client.go | 155 - .../controller/version/v2/loadreport.go | 170 - .../xdsclient/controller/version/v3/client.go | 157 - .../controller/version/v3/loadreport.go | 169 - .../xdsclient/controller/version/version.go | 123 - .../xds/internal/xdsclient/pubsub/dump.go | 87 - .../internal/xdsclient/pubsub/interface.go | 39 - .../xds/internal/xdsclient/pubsub/pubsub.go | 186 - .../xds/internal/xdsclient/pubsub/update.go | 318 - .../xds/internal/xdsclient/pubsub/watch.go | 239 - .../grpc/xds/internal/xdsclient/singleton.go | 86 +- .../xdsclient/transport/loadreport.go | 268 + .../internal/xdsclient/transport/transport.go | 572 ++ .../xdsresource/cluster_resource_type.go | 6 +- .../xdsresource/endpoints_resource_type.go | 3 +- .../xdsresource/listener_resource_type.go | 5 +- .../xdsclient/xdsresource/resource_type.go | 18 +- .../xdsresource/route_config_resource_type.go | 3 +- .../internal/xdsclient/xdsresource/type.go | 54 + .../xdsclient/xdsresource/unmarshal.go | 114 +- .../xdsclient/xdsresource/unmarshal_cds.go | 22 +- .../xdsclient/xdsresource/unmarshal_eds.go | 9 - .../xdsclient/xdsresource/unmarshal_lds.go | 16 +- .../xdsclient/xdsresource/unmarshal_rds.go | 12 +- vendor/google.golang.org/grpc/xds/server.go | 16 +- vendor/google.golang.org/grpc/xds/xds.go | 20 +- vendor/modules.txt | 40 +- 212 files changed, 5338 insertions(+), 62582 deletions(-) delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go delete mode 100644 vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go delete mode 100644 vendor/github.com/sercand/kuberesolver/README.md rename vendor/github.com/sercand/kuberesolver/{ => v4}/.gitignore (100%) rename vendor/github.com/sercand/kuberesolver/{ => v4}/LICENSE (100%) create mode 100644 vendor/github.com/sercand/kuberesolver/v4/README.md rename vendor/github.com/sercand/kuberesolver/{ => v4}/builder.go (73%) rename vendor/github.com/sercand/kuberesolver/{ => v4}/kubernetes.go (58%) rename vendor/github.com/sercand/kuberesolver/{ => v4}/models.go (100%) rename vendor/github.com/sercand/kuberesolver/{ => v4}/stream.go (97%) rename vendor/github.com/sercand/kuberesolver/{ => v4}/util.go (100%) create mode 100644 vendor/github.com/soheilhy/cmux/.gitignore create mode 100644 vendor/github.com/soheilhy/cmux/.travis.yml create mode 100644 vendor/github.com/soheilhy/cmux/CONTRIBUTORS create mode 100644 vendor/github.com/soheilhy/cmux/LICENSE create mode 100644 vendor/github.com/soheilhy/cmux/README.md create mode 100644 vendor/github.com/soheilhy/cmux/buffer.go create mode 100644 vendor/github.com/soheilhy/cmux/cmux.go create mode 100644 vendor/github.com/soheilhy/cmux/doc.go create mode 100644 vendor/github.com/soheilhy/cmux/matchers.go create mode 100644 vendor/github.com/soheilhy/cmux/patricia.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/balancer.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/channel.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/http_client.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/local_listener.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/marshal_any.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/parse_url.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/pipe_listener.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/restartable_listener.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/status_equal.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/wrappers.go create mode 100644 vendor/google.golang.org/grpc/internal/testutils/wrr.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_validator.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/controller.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/loadreport.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/transport.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/client.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/loadreport.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/client.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/loadreport.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/version.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/dump.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/interface.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/pubsub.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/update.go delete mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/watch.go create mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/loadreport.go create mode 100644 vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/transport.go diff --git a/docs/sources/configuration/_index.md b/docs/sources/configuration/_index.md index ec49efe13a3d..c825b70cb7cf 100644 --- a/docs/sources/configuration/_index.md +++ b/docs/sources/configuration/_index.md @@ -389,10 +389,20 @@ grpc_tls_config: # CLI flag: -server.log-source-ips-regex [log_source_ips_regex: | default = ""] -# Optionally log requests at info level instead of debug level. +# Optionally log request headers. +# CLI flag: -server.log-request-headers +[log_request_headers: | default = false] + +# Optionally log requests at info level instead of debug level. Applies to +# request headers as well if server.log-request-headers is enabled. # CLI flag: -server.log-request-at-info-level-enabled [log_request_at_info_level_enabled: | default = false] +# Comma separated list of headers to exclude from loggin. Only used if +# server.log-request-headers is true. +# CLI flag: -server.log-request-headers-exclude-list +[log_request_exclude_headers_list: | default = ""] + # Base path to serve all API routes from (e.g. /v1/) # CLI flag: -server.path-prefix [http_path_prefix: | default = ""] @@ -3622,6 +3632,21 @@ backoff_config: # VersionTLS11, VersionTLS12, VersionTLS13 # CLI flag: -.tls-min-version [tls_min_version: | default = ""] + +# The maximum amount of time to establish a connection. A value of 0 means +# default gRPC connect timeout and backoff. +# CLI flag: -.connect-timeout +[connect_timeout: | default = 0s] + +# Initial backoff delay after first connection failure. Only relevant if +# ConnectTimeout > 0. +# CLI flag: -.connect-backoff-base-delay +[connect_backoff_base_delay: | default = 1s] + +# Maximum backoff delay when establishing a connection. Only relevant if +# ConnectTimeout > 0. +# CLI flag: -.connect-backoff-max-delay +[connect_backoff_max_delay: | default = 5s] ``` ### tls_config diff --git a/go.mod b/go.mod index adb2ff8ef7f3..fadfdefc998b 100644 --- a/go.mod +++ b/go.mod @@ -49,7 +49,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 - github.com/grafana/dskit v0.0.0-20230417151531-1725bcc1e9a1 + github.com/grafana/dskit v0.0.0-20230518162305-3c92c534827e github.com/grafana/go-gelf/v2 v2.0.1 github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd @@ -84,7 +84,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.15.1 github.com/prometheus/client_model v0.4.0 - github.com/prometheus/common v0.42.0 + github.com/prometheus/common v0.43.0 github.com/prometheus/prometheus v0.43.1-0.20230419161410-69155c6ba1e9 github.com/segmentio/fasthash v1.0.3 github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 @@ -94,7 +94,7 @@ require ( github.com/stretchr/testify v1.8.2 github.com/tonistiigi/fifo v0.0.0-20190226154929-a9fb20d87448 github.com/uber/jaeger-client-go v2.30.0+incompatible - github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 + github.com/weaveworks/common v0.0.0-20230511094633-334485600903 github.com/xdg-go/scram v1.1.2 go.etcd.io/bbolt v1.3.6 go.uber.org/atomic v1.10.0 @@ -105,7 +105,7 @@ require ( golang.org/x/sys v0.8.0 golang.org/x/time v0.3.0 google.golang.org/api v0.114.0 - google.golang.org/grpc v1.53.0 + google.golang.org/grpc v1.55.0 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -125,7 +125,7 @@ require ( github.com/willf/bloom v2.0.3+incompatible go4.org/netipx v0.0.0-20230125063823-8449b0a6169f golang.org/x/exp v0.0.0-20230321023759-10a507213a29 - golang.org/x/oauth2 v0.6.0 + golang.org/x/oauth2 v0.7.0 golang.org/x/text v0.9.0 ) @@ -271,9 +271,10 @@ require ( github.com/rootless-containers/rootlesskit v1.1.0 // indirect github.com/rs/xid v1.4.0 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect - github.com/sercand/kuberesolver v2.4.0+incompatible // indirect + github.com/sercand/kuberesolver/v4 v4.0.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/sirupsen/logrus v1.9.0 // indirect + github.com/soheilhy/cmux v0.1.5 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/cast v1.3.1 // indirect github.com/spf13/pflag v1.0.5 // indirect @@ -340,4 +341,4 @@ replace github.com/grafana/regexp => github.com/grafana/regexp v0.0.0-2022100509 replace github.com/grafana/loki/pkg/push => ./pkg/push // Pin grpc to previous version: using newer version breaks kuberesolver, but updating kuberesolver needs to be done in weaveworks/common. -replace google.golang.org/grpc => google.golang.org/grpc v1.52.3 +replace google.golang.org/grpc => google.golang.org/grpc v1.53.0 diff --git a/go.sum b/go.sum index 697b1a7052d7..836b0f2c2628 100644 --- a/go.sum +++ b/go.sum @@ -29,11 +29,13 @@ cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= @@ -42,6 +44,7 @@ cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= @@ -84,6 +87,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= cloud.google.com/go/bigtable v1.18.1 h1:SxQk9Bj6OKxeiuvevG/KBjqGn/7X8heZbWfK0tYkFd8= cloud.google.com/go/bigtable v1.18.1/go.mod h1:NAVyfJot9jlo+KmgWLUJ5DJGwNDoChzAcrecLpmuAmY= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= @@ -115,9 +119,13 @@ cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQH cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= @@ -149,6 +157,7 @@ cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4c cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= @@ -170,12 +179,14 @@ cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1 cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= @@ -195,10 +206,12 @@ cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZ cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= cloud.google.com/go/iam v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= @@ -207,6 +220,7 @@ cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+ cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= cloud.google.com/go/kms v1.9.0 h1:b0votJQa/9DSsxgHwN33/tTLA7ZHVzfWhDCrfiXijSo= @@ -216,12 +230,14 @@ cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiP cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -270,8 +286,11 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= +cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= cloud.google.com/go/pubsub v1.28.0 h1:XzabfdPx/+eNrsVVGLFgeUnQQKPGkMb8klRCeYK52is= cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= @@ -326,6 +345,7 @@ cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5 cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -368,6 +388,7 @@ cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= @@ -602,6 +623,7 @@ github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -626,6 +648,8 @@ github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 h1:XP+uhjN0yBCN/tPkr8Z0BNDc5rZam9RG6UWyf2FrSQ0= github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= @@ -732,9 +756,11 @@ github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKf github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.0.0-20180919002855-2137d9196328/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/ericchiang/k8s v1.2.0/go.mod h1:/OmBgSq2cd9IANnsGHGlEz27nwMZV2YxlpXuQtU3Bz4= @@ -750,7 +776,6 @@ github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBD github.com/fatih/structs v0.0.0-20180123065059-ebf56d35bba7/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= @@ -764,6 +789,7 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsouza/fake-gcs-server v1.7.0 h1:Un0BXUXrRWYSmYyC1Rqm2e2WJfTPyDy/HGMz31emTi8= @@ -914,6 +940,7 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -1035,6 +1062,7 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -1061,8 +1089,8 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 h1:qhugDMdQ4Vp68H0tp/0iN17DM2ehRo1rLEdOFe/gB8I= github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2/go.mod h1:w/aiO1POVIeXUQyl0VQSZjl5OAGDTL5aX+4v0RA1tcw= -github.com/grafana/dskit v0.0.0-20230417151531-1725bcc1e9a1 h1:sMRNbvPdgXIBh3LMJeZ6ykxZE7kchj8vkvmjBypu43M= -github.com/grafana/dskit v0.0.0-20230417151531-1725bcc1e9a1/go.mod h1:31wpEibXmd1yC7sUBw1ilN9dhWatwQwbcOAbZGtTr/M= +github.com/grafana/dskit v0.0.0-20230518162305-3c92c534827e h1:ODjv+9dmklDS33O2B4zPgIDKdnji18o9ofD9qWA+mAs= +github.com/grafana/dskit v0.0.0-20230518162305-3c92c534827e/go.mod h1:M03k2fzuQ2n9TVE1xfVKTESibxsXdw0wYfWT3+9Owp4= github.com/grafana/go-gelf/v2 v2.0.1 h1:BOChP0h/jLeD+7F9mL7tq10xVkDG15he3T1zHuQaWak= github.com/grafana/go-gelf/v2 v2.0.1/go.mod h1:lexHie0xzYGwCgiRGcvZ723bSNyNI8ZRD4s0CLobh90= github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 h1:xLuzPoOzdfNb/RF/IENCw+oLVdZB4G21VPhkHBgwSHY= @@ -1084,6 +1112,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= @@ -1178,6 +1208,7 @@ github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4 github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -1300,6 +1331,8 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v1.14.1 h1:uGxQyy0BidoEpLGdvfi4cPgEW+0YUFsEGrLEhcTfjNc= github.com/lstoll/grpce v1.7.0/go.mod h1:XiCWl3R+avNCT7KsTjv3qCblgsSqd0SC4ymySrH226g= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-validate v0.0.0-20180911180927-64fcb82c878e/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180717111219-efc7eb8984d6/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -1489,6 +1522,7 @@ github.com/pkg/errors v0.8.2-0.20190227000051-27936f6d90f9/go.mod h1:bwawxfHBFNV github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1513,6 +1547,7 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1522,6 +1557,7 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20180326160409-38c53a9f4bfc/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= @@ -1536,8 +1572,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.43.0 h1:iq+BVjvYLei5f27wiuNiB1DN6DYQkp1c8Bx0Vykh5us= +github.com/prometheus/common v0.43.0/go.mod h1:NCvr5cQIh3Y/gy73/RdVtC9r8xxrxwJnB+2lB3BxrFc= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0= @@ -1572,7 +1608,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rollbar/rollbar-go v1.0.2/go.mod h1:AcFs5f0I+c71bpHlXNNDbOWJiKwjFDtISeXco0L5PKQ= github.com/rollbar/rollbar-go v1.2.0/go.mod h1:czC86b8U4xdUH7W2C6gomi2jutLm8qK0OtrF5WMvpcc= github.com/rootless-containers/rootlesskit v1.1.0 h1:cRaRIYxY8oce4eE/zeAUZhgKu/4tU1p9YHN4+suwV7M= @@ -1592,8 +1628,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sercand/kuberesolver v2.4.0+incompatible h1:WE2OlRf6wjLxHwNkkFLQGaZcVLEXjMjBPjjEU5vksH8= -github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= +github.com/sercand/kuberesolver/v4 v4.0.0 h1:frL7laPDG/lFm5n98ODmWnn+cvPpzlkf3LhzuPhcHP4= +github.com/sercand/kuberesolver/v4 v4.0.0/go.mod h1:F4RGyuRmMAjeXHKL+w4P7AwUnPceEAPAhxUgXZjKgvM= github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.21.9/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ= @@ -1621,6 +1657,8 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/softlayer/softlayer-go v0.0.0-20180806151055-260589d94c7d/go.mod h1:Cw4GTlQccdRGSEf6KiMju767x0NEHE0YIVPJSaXjlsw= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/soniah/gosnmp v1.25.0/go.mod h1:8YvfZxH388NIIw2A+X5z2Oh97VcNhtmxDLt5QeUzVuQ= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= @@ -1629,6 +1667,9 @@ github.com/soveran/redisurl v0.0.0-20180322091936-eb325bc7a4b8/go.mod h1:FVJ8jbH github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= @@ -1704,8 +1745,8 @@ github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59b github.com/vmware/govmomi v0.19.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/wavefronthq/wavefront-sdk-go v0.9.2/go.mod h1:hQI6y8M9OtTCtc0xdwh+dCER4osxXdEAeCpacjpDZEU= -github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 h1:qZcnPZbiX8gGs3VmipVc3ft29vPYBZzlox/04Von6+k= -github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63/go.mod h1:KoQ+3z63GUJzQ7AhU0AWQNU+LPda2EwL/cx1PlbDzVQ= +github.com/weaveworks/common v0.0.0-20230511094633-334485600903 h1:ph7R2CS/0o1gBzpzK/CioUKJVsXNVXfDGR8FZ9rMZIw= +github.com/weaveworks/common v0.0.0-20230511094633-334485600903/go.mod h1:rgbeLfJUtEr+G74cwFPR1k/4N0kDeaeSv/qhUNE4hm8= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= @@ -1797,6 +1838,7 @@ go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyK go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.starlark.net v0.0.0-20200901195727-6e684ef5eeee/go.mod h1:f0znQkUKRrkk36XxWbGjMqQM8wGv/xHBVE2qc3B5oFU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1829,6 +1871,7 @@ golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1840,6 +1883,7 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -1889,7 +1933,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -1941,6 +1987,7 @@ golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1952,6 +1999,7 @@ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1 golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1968,7 +2016,7 @@ golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= @@ -1999,8 +2047,9 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2105,6 +2154,7 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2134,7 +2184,7 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= @@ -2143,7 +2193,7 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= @@ -2160,7 +2210,7 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= @@ -2169,6 +2219,8 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2242,6 +2294,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= @@ -2314,6 +2367,7 @@ google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -2404,6 +2458,7 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= @@ -2439,11 +2494,16 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20210916203835-567da6b86340/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go deleted file mode 100644 index 225e71961aaf..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/auth/cert.proto - -package auth - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_envoy_api_v2_auth_cert_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_auth_cert_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x63, 0x65, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x99, - 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x42, 0x09, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, - 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x50, 0x01, 0x50, 0x02, 0x50, 0x03, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_envoy_api_v2_auth_cert_proto_goTypes = []interface{}{} -var file_envoy_api_v2_auth_cert_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_auth_cert_proto_init() } -func file_envoy_api_v2_auth_cert_proto_init() { - if File_envoy_api_v2_auth_cert_proto != nil { - return - } - file_envoy_api_v2_auth_common_proto_init() - file_envoy_api_v2_auth_secret_proto_init() - file_envoy_api_v2_auth_tls_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_auth_cert_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_auth_cert_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_auth_cert_proto_depIdxs, - }.Build() - File_envoy_api_v2_auth_cert_proto = out.File - file_envoy_api_v2_auth_cert_proto_rawDesc = nil - file_envoy_api_v2_auth_cert_proto_goTypes = nil - file_envoy_api_v2_auth_cert_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go deleted file mode 100644 index 334ff3986462..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/cert.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/auth/cert.proto - -package auth - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.go deleted file mode 100644 index 8f05100da7c6..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.go +++ /dev/null @@ -1,1079 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/auth/common.proto - -package auth - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - any1 "github.com/golang/protobuf/ptypes/any" - _struct "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TlsParameters_TlsProtocol int32 - -const ( - // Envoy will choose the optimal TLS version. - TlsParameters_TLS_AUTO TlsParameters_TlsProtocol = 0 - // TLS 1.0 - TlsParameters_TLSv1_0 TlsParameters_TlsProtocol = 1 - // TLS 1.1 - TlsParameters_TLSv1_1 TlsParameters_TlsProtocol = 2 - // TLS 1.2 - TlsParameters_TLSv1_2 TlsParameters_TlsProtocol = 3 - // TLS 1.3 - TlsParameters_TLSv1_3 TlsParameters_TlsProtocol = 4 -) - -// Enum value maps for TlsParameters_TlsProtocol. -var ( - TlsParameters_TlsProtocol_name = map[int32]string{ - 0: "TLS_AUTO", - 1: "TLSv1_0", - 2: "TLSv1_1", - 3: "TLSv1_2", - 4: "TLSv1_3", - } - TlsParameters_TlsProtocol_value = map[string]int32{ - "TLS_AUTO": 0, - "TLSv1_0": 1, - "TLSv1_1": 2, - "TLSv1_2": 3, - "TLSv1_3": 4, - } -) - -func (x TlsParameters_TlsProtocol) Enum() *TlsParameters_TlsProtocol { - p := new(TlsParameters_TlsProtocol) - *p = x - return p -} - -func (x TlsParameters_TlsProtocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TlsParameters_TlsProtocol) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_auth_common_proto_enumTypes[0].Descriptor() -} - -func (TlsParameters_TlsProtocol) Type() protoreflect.EnumType { - return &file_envoy_api_v2_auth_common_proto_enumTypes[0] -} - -func (x TlsParameters_TlsProtocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TlsParameters_TlsProtocol.Descriptor instead. -func (TlsParameters_TlsProtocol) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_common_proto_rawDescGZIP(), []int{0, 0} -} - -// Peer certificate verification mode. -type CertificateValidationContext_TrustChainVerification int32 - -const ( - // Perform default certificate verification (e.g., against CA / verification lists) - CertificateValidationContext_VERIFY_TRUST_CHAIN CertificateValidationContext_TrustChainVerification = 0 - // Connections where the certificate fails verification will be permitted. - // For HTTP connections, the result of certificate verification can be used in route matching. ( - // see :ref:`validated ` ). - CertificateValidationContext_ACCEPT_UNTRUSTED CertificateValidationContext_TrustChainVerification = 1 -) - -// Enum value maps for CertificateValidationContext_TrustChainVerification. -var ( - CertificateValidationContext_TrustChainVerification_name = map[int32]string{ - 0: "VERIFY_TRUST_CHAIN", - 1: "ACCEPT_UNTRUSTED", - } - CertificateValidationContext_TrustChainVerification_value = map[string]int32{ - "VERIFY_TRUST_CHAIN": 0, - "ACCEPT_UNTRUSTED": 1, - } -) - -func (x CertificateValidationContext_TrustChainVerification) Enum() *CertificateValidationContext_TrustChainVerification { - p := new(CertificateValidationContext_TrustChainVerification) - *p = x - return p -} - -func (x CertificateValidationContext_TrustChainVerification) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CertificateValidationContext_TrustChainVerification) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_auth_common_proto_enumTypes[1].Descriptor() -} - -func (CertificateValidationContext_TrustChainVerification) Type() protoreflect.EnumType { - return &file_envoy_api_v2_auth_common_proto_enumTypes[1] -} - -func (x CertificateValidationContext_TrustChainVerification) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CertificateValidationContext_TrustChainVerification.Descriptor instead. -func (CertificateValidationContext_TrustChainVerification) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_common_proto_rawDescGZIP(), []int{4, 0} -} - -type TlsParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for both clients and servers. - TlsMinimumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,1,opt,name=tls_minimum_protocol_version,json=tlsMinimumProtocolVersion,proto3,enum=envoy.api.v2.auth.TlsParameters_TlsProtocol" json:"tls_minimum_protocol_version,omitempty"` - // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for - // servers. - TlsMaximumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,2,opt,name=tls_maximum_protocol_version,json=tlsMaximumProtocolVersion,proto3,enum=envoy.api.v2.auth.TlsParameters_TlsProtocol" json:"tls_maximum_protocol_version,omitempty"` - // If specified, the TLS listener will only support the specified `cipher list - // `_ - // when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). If not - // specified, the default list will be used. - // - // In non-FIPS builds, the default cipher list is: - // - // .. code-block:: none - // - // [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305] - // [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305] - // ECDHE-ECDSA-AES128-SHA - // ECDHE-RSA-AES128-SHA - // AES128-GCM-SHA256 - // AES128-SHA - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // ECDHE-ECDSA-AES256-SHA - // ECDHE-RSA-AES256-SHA - // AES256-GCM-SHA384 - // AES256-SHA - // - // In builds using :ref:`BoringSSL FIPS `, the default cipher list is: - // - // .. code-block:: none - // - // ECDHE-ECDSA-AES128-GCM-SHA256 - // ECDHE-RSA-AES128-GCM-SHA256 - // ECDHE-ECDSA-AES128-SHA - // ECDHE-RSA-AES128-SHA - // AES128-GCM-SHA256 - // AES128-SHA - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // ECDHE-ECDSA-AES256-SHA - // ECDHE-RSA-AES256-SHA - // AES256-GCM-SHA384 - // AES256-SHA - CipherSuites []string `protobuf:"bytes,3,rep,name=cipher_suites,json=cipherSuites,proto3" json:"cipher_suites,omitempty"` - // If specified, the TLS connection will only support the specified ECDH - // curves. If not specified, the default curves will be used. - // - // In non-FIPS builds, the default curves are: - // - // .. code-block:: none - // - // X25519 - // P-256 - // - // In builds using :ref:`BoringSSL FIPS `, the default curve is: - // - // .. code-block:: none - // - // P-256 - EcdhCurves []string `protobuf:"bytes,4,rep,name=ecdh_curves,json=ecdhCurves,proto3" json:"ecdh_curves,omitempty"` -} - -func (x *TlsParameters) Reset() { - *x = TlsParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TlsParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TlsParameters) ProtoMessage() {} - -func (x *TlsParameters) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TlsParameters.ProtoReflect.Descriptor instead. -func (*TlsParameters) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_common_proto_rawDescGZIP(), []int{0} -} - -func (x *TlsParameters) GetTlsMinimumProtocolVersion() TlsParameters_TlsProtocol { - if x != nil { - return x.TlsMinimumProtocolVersion - } - return TlsParameters_TLS_AUTO -} - -func (x *TlsParameters) GetTlsMaximumProtocolVersion() TlsParameters_TlsProtocol { - if x != nil { - return x.TlsMaximumProtocolVersion - } - return TlsParameters_TLS_AUTO -} - -func (x *TlsParameters) GetCipherSuites() []string { - if x != nil { - return x.CipherSuites - } - return nil -} - -func (x *TlsParameters) GetEcdhCurves() []string { - if x != nil { - return x.EcdhCurves - } - return nil -} - -// BoringSSL private key method configuration. The private key methods are used for external -// (potentially asynchronous) signing and decryption operations. Some use cases for private key -// methods would be TPM support and TLS acceleration. -type PrivateKeyProvider struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Private key method provider name. The name must match a - // supported private key method provider type. - ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"` - // Private key method provider specific configuration. - // - // Types that are assignable to ConfigType: - // *PrivateKeyProvider_Config - // *PrivateKeyProvider_TypedConfig - ConfigType isPrivateKeyProvider_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *PrivateKeyProvider) Reset() { - *x = PrivateKeyProvider{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PrivateKeyProvider) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PrivateKeyProvider) ProtoMessage() {} - -func (x *PrivateKeyProvider) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PrivateKeyProvider.ProtoReflect.Descriptor instead. -func (*PrivateKeyProvider) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_common_proto_rawDescGZIP(), []int{1} -} - -func (x *PrivateKeyProvider) GetProviderName() string { - if x != nil { - return x.ProviderName - } - return "" -} - -func (m *PrivateKeyProvider) GetConfigType() isPrivateKeyProvider_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *PrivateKeyProvider) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*PrivateKeyProvider_Config); ok { - return x.Config - } - return nil -} - -func (x *PrivateKeyProvider) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*PrivateKeyProvider_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isPrivateKeyProvider_ConfigType interface { - isPrivateKeyProvider_ConfigType() -} - -type PrivateKeyProvider_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} - -type PrivateKeyProvider_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*PrivateKeyProvider_Config) isPrivateKeyProvider_ConfigType() {} - -func (*PrivateKeyProvider_TypedConfig) isPrivateKeyProvider_ConfigType() {} - -// [#next-free-field: 7] -type TlsCertificate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The TLS certificate chain. - CertificateChain *core.DataSource `protobuf:"bytes,1,opt,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` - // The TLS private key. - PrivateKey *core.DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // BoringSSL private key method provider. This is an alternative to :ref:`private_key - // ` field. This can't be - // marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key - // ` and - // :ref:`private_key_provider - // ` fields will result in an - // error. - PrivateKeyProvider *PrivateKeyProvider `protobuf:"bytes,6,opt,name=private_key_provider,json=privateKeyProvider,proto3" json:"private_key_provider,omitempty"` - // The password to decrypt the TLS private key. If this field is not set, it is assumed that the - // TLS private key is not password encrypted. - Password *core.DataSource `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - // [#not-implemented-hide:] - OcspStaple *core.DataSource `protobuf:"bytes,4,opt,name=ocsp_staple,json=ocspStaple,proto3" json:"ocsp_staple,omitempty"` - // [#not-implemented-hide:] - SignedCertificateTimestamp []*core.DataSource `protobuf:"bytes,5,rep,name=signed_certificate_timestamp,json=signedCertificateTimestamp,proto3" json:"signed_certificate_timestamp,omitempty"` -} - -func (x *TlsCertificate) Reset() { - *x = TlsCertificate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TlsCertificate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TlsCertificate) ProtoMessage() {} - -func (x *TlsCertificate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TlsCertificate.ProtoReflect.Descriptor instead. -func (*TlsCertificate) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_common_proto_rawDescGZIP(), []int{2} -} - -func (x *TlsCertificate) GetCertificateChain() *core.DataSource { - if x != nil { - return x.CertificateChain - } - return nil -} - -func (x *TlsCertificate) GetPrivateKey() *core.DataSource { - if x != nil { - return x.PrivateKey - } - return nil -} - -func (x *TlsCertificate) GetPrivateKeyProvider() *PrivateKeyProvider { - if x != nil { - return x.PrivateKeyProvider - } - return nil -} - -func (x *TlsCertificate) GetPassword() *core.DataSource { - if x != nil { - return x.Password - } - return nil -} - -func (x *TlsCertificate) GetOcspStaple() *core.DataSource { - if x != nil { - return x.OcspStaple - } - return nil -} - -func (x *TlsCertificate) GetSignedCertificateTimestamp() []*core.DataSource { - if x != nil { - return x.SignedCertificateTimestamp - } - return nil -} - -type TlsSessionTicketKeys struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Keys for encrypting and decrypting TLS session tickets. The - // first key in the array contains the key to encrypt all new sessions created by this context. - // All keys are candidates for decrypting received tickets. This allows for easy rotation of keys - // by, for example, putting the new key first, and the previous key second. - // - // If :ref:`session_ticket_keys ` - // is not specified, the TLS library will still support resuming sessions via tickets, but it will - // use an internally-generated and managed key, so sessions cannot be resumed across hot restarts - // or on different hosts. - // - // Each key must contain exactly 80 bytes of cryptographically-secure random data. For - // example, the output of ``openssl rand 80``. - // - // .. attention:: - // - // Using this feature has serious security considerations and risks. Improper handling of keys - // may result in loss of secrecy in connections, even if ciphers supporting perfect forward - // secrecy are used. See https://www.imperialviolet.org/2013/06/27/botchingpfs.html for some - // discussion. To minimize the risk, you must: - // - // * Keep the session ticket keys at least as secure as your TLS certificate private keys - // * Rotate session ticket keys at least daily, and preferably hourly - // * Always generate keys using a cryptographically-secure random data source - Keys []*core.DataSource `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *TlsSessionTicketKeys) Reset() { - *x = TlsSessionTicketKeys{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TlsSessionTicketKeys) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TlsSessionTicketKeys) ProtoMessage() {} - -func (x *TlsSessionTicketKeys) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TlsSessionTicketKeys.ProtoReflect.Descriptor instead. -func (*TlsSessionTicketKeys) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_common_proto_rawDescGZIP(), []int{3} -} - -func (x *TlsSessionTicketKeys) GetKeys() []*core.DataSource { - if x != nil { - return x.Keys - } - return nil -} - -// [#next-free-field: 11] -type CertificateValidationContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // TLS certificate data containing certificate authority certificates to use in verifying - // a presented peer certificate (e.g. server certificate for clusters or client certificate - // for listeners). If not specified and a peer certificate is presented it will not be - // verified. By default, a client certificate is optional, unless one of the additional - // options (:ref:`require_client_certificate - // `, - // :ref:`verify_certificate_spki - // `, - // :ref:`verify_certificate_hash - // `, or - // :ref:`match_subject_alt_names - // `) is also - // specified. - // - // It can optionally contain certificate revocation lists, in which case Envoy will verify - // that the presented peer certificate has not been revoked by one of the included CRLs. - // - // See :ref:`the TLS overview ` for a list of common - // system CA locations. - TrustedCa *core.DataSource `protobuf:"bytes,1,opt,name=trusted_ca,json=trustedCa,proto3" json:"trusted_ca,omitempty"` - // An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the - // SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate - // matches one of the specified values. - // - // A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -pubkey - // | openssl pkey -pubin -outform DER - // | openssl dgst -sha256 -binary - // | openssl enc -base64 - // NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= - // - // This is the format used in HTTP Public Key Pinning. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - // - // .. attention:: - // - // This option is preferred over :ref:`verify_certificate_hash - // `, - // because SPKI is tied to a private key, so it doesn't change when the certificate - // is renewed using the same private key. - VerifyCertificateSpki []string `protobuf:"bytes,3,rep,name=verify_certificate_spki,json=verifyCertificateSpki,proto3" json:"verify_certificate_spki,omitempty"` - // An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that - // the SHA-256 of the DER-encoded presented certificate matches one of the specified values. - // - // A hex-encoded SHA-256 of the certificate can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 - // df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a - // - // A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 - // DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A - // - // Both of those formats are acceptable. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - VerifyCertificateHash []string `protobuf:"bytes,2,rep,name=verify_certificate_hash,json=verifyCertificateHash,proto3" json:"verify_certificate_hash,omitempty"` - // An optional list of Subject Alternative Names. If specified, Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified values. - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - // - // Deprecated: Do not use. - VerifySubjectAltName []string `protobuf:"bytes,4,rep,name=verify_subject_alt_name,json=verifySubjectAltName,proto3" json:"verify_subject_alt_name,omitempty"` - // An optional list of Subject Alternative name matchers. Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified matches. - // - // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be - // configured with exact match type in the :ref:`string matcher `. - // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", - // it should be configured as shown below. - // - // .. code-block:: yaml - // - // match_subject_alt_names: - // exact: "api.example.com" - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - MatchSubjectAltNames []*matcher.StringMatcher `protobuf:"bytes,9,rep,name=match_subject_alt_names,json=matchSubjectAltNames,proto3" json:"match_subject_alt_names,omitempty"` - // [#not-implemented-hide:] Must present a signed time-stamped OCSP response. - RequireOcspStaple *wrappers.BoolValue `protobuf:"bytes,5,opt,name=require_ocsp_staple,json=requireOcspStaple,proto3" json:"require_ocsp_staple,omitempty"` - // [#not-implemented-hide:] Must present signed certificate time-stamp. - RequireSignedCertificateTimestamp *wrappers.BoolValue `protobuf:"bytes,6,opt,name=require_signed_certificate_timestamp,json=requireSignedCertificateTimestamp,proto3" json:"require_signed_certificate_timestamp,omitempty"` - // An optional `certificate revocation list - // `_ - // (in PEM format). If specified, Envoy will verify that the presented peer - // certificate has not been revoked by this CRL. If this DataSource contains - // multiple CRLs, all of them will be used. - Crl *core.DataSource `protobuf:"bytes,7,opt,name=crl,proto3" json:"crl,omitempty"` - // If specified, Envoy will not reject expired certificates. - AllowExpiredCertificate bool `protobuf:"varint,8,opt,name=allow_expired_certificate,json=allowExpiredCertificate,proto3" json:"allow_expired_certificate,omitempty"` - // Certificate trust chain verification mode. - TrustChainVerification CertificateValidationContext_TrustChainVerification `protobuf:"varint,10,opt,name=trust_chain_verification,json=trustChainVerification,proto3,enum=envoy.api.v2.auth.CertificateValidationContext_TrustChainVerification" json:"trust_chain_verification,omitempty"` -} - -func (x *CertificateValidationContext) Reset() { - *x = CertificateValidationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CertificateValidationContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CertificateValidationContext) ProtoMessage() {} - -func (x *CertificateValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CertificateValidationContext.ProtoReflect.Descriptor instead. -func (*CertificateValidationContext) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_common_proto_rawDescGZIP(), []int{4} -} - -func (x *CertificateValidationContext) GetTrustedCa() *core.DataSource { - if x != nil { - return x.TrustedCa - } - return nil -} - -func (x *CertificateValidationContext) GetVerifyCertificateSpki() []string { - if x != nil { - return x.VerifyCertificateSpki - } - return nil -} - -func (x *CertificateValidationContext) GetVerifyCertificateHash() []string { - if x != nil { - return x.VerifyCertificateHash - } - return nil -} - -// Deprecated: Do not use. -func (x *CertificateValidationContext) GetVerifySubjectAltName() []string { - if x != nil { - return x.VerifySubjectAltName - } - return nil -} - -func (x *CertificateValidationContext) GetMatchSubjectAltNames() []*matcher.StringMatcher { - if x != nil { - return x.MatchSubjectAltNames - } - return nil -} - -func (x *CertificateValidationContext) GetRequireOcspStaple() *wrappers.BoolValue { - if x != nil { - return x.RequireOcspStaple - } - return nil -} - -func (x *CertificateValidationContext) GetRequireSignedCertificateTimestamp() *wrappers.BoolValue { - if x != nil { - return x.RequireSignedCertificateTimestamp - } - return nil -} - -func (x *CertificateValidationContext) GetCrl() *core.DataSource { - if x != nil { - return x.Crl - } - return nil -} - -func (x *CertificateValidationContext) GetAllowExpiredCertificate() bool { - if x != nil { - return x.AllowExpiredCertificate - } - return false -} - -func (x *CertificateValidationContext) GetTrustChainVerification() CertificateValidationContext_TrustChainVerification { - if x != nil { - return x.TrustChainVerification - } - return CertificateValidationContext_VERIFY_TRUST_CHAIN -} - -var File_envoy_api_v2_auth_common_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_auth_common_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x03, 0x0a, 0x0d, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, - 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x77, 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, - 0x74, 0x6c, 0x73, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x69, 0x70, - 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, 0x12, 0x1f, - 0x0a, 0x0b, 0x65, 0x63, 0x64, 0x68, 0x5f, 0x63, 0x75, 0x72, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x63, 0x64, 0x68, 0x43, 0x75, 0x72, 0x76, 0x65, 0x73, 0x22, - 0x4f, 0x0a, 0x0b, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0c, - 0x0a, 0x08, 0x54, 0x4c, 0x53, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, - 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x30, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, - 0x76, 0x31, 0x5f, 0x31, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, - 0x32, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, - 0x22, 0xd1, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, - 0x18, 0x01, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x06, - 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x22, 0xe1, 0x03, 0x0a, 0x0e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, - 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x57, 0x0a, 0x14, 0x70, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x12, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x0b, 0x6f, 0x63, 0x73, 0x70, 0x5f, - 0x73, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0a, 0x6f, 0x63, 0x73, - 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x12, 0x5f, 0x0a, 0x1c, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x1a, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x59, 0x0a, 0x14, 0x54, 0x6c, 0x73, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, - 0x12, 0x41, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x04, 0x6b, - 0x65, 0x79, 0x73, 0x22, 0xfc, 0x06, 0x0a, 0x1c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, - 0x63, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, - 0x43, 0x61, 0x12, 0x46, 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x6b, 0x69, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x20, - 0x2c, 0x28, 0x2c, 0x52, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6b, 0x69, 0x12, 0x46, 0x0a, 0x17, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, - 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x20, 0x40, 0x28, 0x5f, 0x52, 0x15, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x39, 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, - 0x17, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, - 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x52, 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, - 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x5f, 0x6f, 0x63, 0x73, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, - 0x70, 0x6c, 0x65, 0x12, 0x6b, 0x0a, 0x24, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x21, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x12, 0x2f, 0x0a, 0x03, 0x63, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x03, 0x63, 0x72, - 0x6c, 0x12, 0x3a, 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x8a, 0x01, - 0x0a, 0x18, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x2e, 0x54, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x16, 0x74, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x16, 0x54, 0x72, - 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x5f, 0x54, - 0x52, 0x55, 0x53, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, - 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x55, 0x4e, 0x54, 0x52, 0x55, 0x53, 0x54, 0x45, 0x44, - 0x10, 0x01, 0x42, 0xa3, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_auth_common_proto_rawDescOnce sync.Once - file_envoy_api_v2_auth_common_proto_rawDescData = file_envoy_api_v2_auth_common_proto_rawDesc -) - -func file_envoy_api_v2_auth_common_proto_rawDescGZIP() []byte { - file_envoy_api_v2_auth_common_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_auth_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_auth_common_proto_rawDescData) - }) - return file_envoy_api_v2_auth_common_proto_rawDescData -} - -var file_envoy_api_v2_auth_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_api_v2_auth_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_api_v2_auth_common_proto_goTypes = []interface{}{ - (TlsParameters_TlsProtocol)(0), // 0: envoy.api.v2.auth.TlsParameters.TlsProtocol - (CertificateValidationContext_TrustChainVerification)(0), // 1: envoy.api.v2.auth.CertificateValidationContext.TrustChainVerification - (*TlsParameters)(nil), // 2: envoy.api.v2.auth.TlsParameters - (*PrivateKeyProvider)(nil), // 3: envoy.api.v2.auth.PrivateKeyProvider - (*TlsCertificate)(nil), // 4: envoy.api.v2.auth.TlsCertificate - (*TlsSessionTicketKeys)(nil), // 5: envoy.api.v2.auth.TlsSessionTicketKeys - (*CertificateValidationContext)(nil), // 6: envoy.api.v2.auth.CertificateValidationContext - (*_struct.Struct)(nil), // 7: google.protobuf.Struct - (*any1.Any)(nil), // 8: google.protobuf.Any - (*core.DataSource)(nil), // 9: envoy.api.v2.core.DataSource - (*matcher.StringMatcher)(nil), // 10: envoy.type.matcher.StringMatcher - (*wrappers.BoolValue)(nil), // 11: google.protobuf.BoolValue -} -var file_envoy_api_v2_auth_common_proto_depIdxs = []int32{ - 0, // 0: envoy.api.v2.auth.TlsParameters.tls_minimum_protocol_version:type_name -> envoy.api.v2.auth.TlsParameters.TlsProtocol - 0, // 1: envoy.api.v2.auth.TlsParameters.tls_maximum_protocol_version:type_name -> envoy.api.v2.auth.TlsParameters.TlsProtocol - 7, // 2: envoy.api.v2.auth.PrivateKeyProvider.config:type_name -> google.protobuf.Struct - 8, // 3: envoy.api.v2.auth.PrivateKeyProvider.typed_config:type_name -> google.protobuf.Any - 9, // 4: envoy.api.v2.auth.TlsCertificate.certificate_chain:type_name -> envoy.api.v2.core.DataSource - 9, // 5: envoy.api.v2.auth.TlsCertificate.private_key:type_name -> envoy.api.v2.core.DataSource - 3, // 6: envoy.api.v2.auth.TlsCertificate.private_key_provider:type_name -> envoy.api.v2.auth.PrivateKeyProvider - 9, // 7: envoy.api.v2.auth.TlsCertificate.password:type_name -> envoy.api.v2.core.DataSource - 9, // 8: envoy.api.v2.auth.TlsCertificate.ocsp_staple:type_name -> envoy.api.v2.core.DataSource - 9, // 9: envoy.api.v2.auth.TlsCertificate.signed_certificate_timestamp:type_name -> envoy.api.v2.core.DataSource - 9, // 10: envoy.api.v2.auth.TlsSessionTicketKeys.keys:type_name -> envoy.api.v2.core.DataSource - 9, // 11: envoy.api.v2.auth.CertificateValidationContext.trusted_ca:type_name -> envoy.api.v2.core.DataSource - 10, // 12: envoy.api.v2.auth.CertificateValidationContext.match_subject_alt_names:type_name -> envoy.type.matcher.StringMatcher - 11, // 13: envoy.api.v2.auth.CertificateValidationContext.require_ocsp_staple:type_name -> google.protobuf.BoolValue - 11, // 14: envoy.api.v2.auth.CertificateValidationContext.require_signed_certificate_timestamp:type_name -> google.protobuf.BoolValue - 9, // 15: envoy.api.v2.auth.CertificateValidationContext.crl:type_name -> envoy.api.v2.core.DataSource - 1, // 16: envoy.api.v2.auth.CertificateValidationContext.trust_chain_verification:type_name -> envoy.api.v2.auth.CertificateValidationContext.TrustChainVerification - 17, // [17:17] is the sub-list for method output_type - 17, // [17:17] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_auth_common_proto_init() } -func file_envoy_api_v2_auth_common_proto_init() { - if File_envoy_api_v2_auth_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_auth_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TlsParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PrivateKeyProvider); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TlsCertificate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TlsSessionTicketKeys); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CertificateValidationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_auth_common_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*PrivateKeyProvider_Config)(nil), - (*PrivateKeyProvider_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_auth_common_proto_rawDesc, - NumEnums: 2, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_auth_common_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_auth_common_proto_depIdxs, - EnumInfos: file_envoy_api_v2_auth_common_proto_enumTypes, - MessageInfos: file_envoy_api_v2_auth_common_proto_msgTypes, - }.Build() - File_envoy_api_v2_auth_common_proto = out.File - file_envoy_api_v2_auth_common_proto_rawDesc = nil - file_envoy_api_v2_auth_common_proto_goTypes = nil - file_envoy_api_v2_auth_common_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.validate.go deleted file mode 100644 index bebb4810071f..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.validate.go +++ /dev/null @@ -1,1082 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/auth/common.proto - -package auth - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on TlsParameters with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *TlsParameters) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TlsParameters with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TlsParametersMultiError, or -// nil if none found. -func (m *TlsParameters) ValidateAll() error { - return m.validate(true) -} - -func (m *TlsParameters) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMinimumProtocolVersion())]; !ok { - err := TlsParametersValidationError{ - field: "TlsMinimumProtocolVersion", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMaximumProtocolVersion())]; !ok { - err := TlsParametersValidationError{ - field: "TlsMaximumProtocolVersion", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return TlsParametersMultiError(errors) - } - - return nil -} - -// TlsParametersMultiError is an error wrapping multiple validation errors -// returned by TlsParameters.ValidateAll() if the designated constraints -// aren't met. -type TlsParametersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TlsParametersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TlsParametersMultiError) AllErrors() []error { return m } - -// TlsParametersValidationError is the validation error returned by -// TlsParameters.Validate if the designated constraints aren't met. -type TlsParametersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TlsParametersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TlsParametersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TlsParametersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TlsParametersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TlsParametersValidationError) ErrorName() string { return "TlsParametersValidationError" } - -// Error satisfies the builtin error interface -func (e TlsParametersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTlsParameters.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TlsParametersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TlsParametersValidationError{} - -// Validate checks the field values on PrivateKeyProvider with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *PrivateKeyProvider) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on PrivateKeyProvider with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// PrivateKeyProviderMultiError, or nil if none found. -func (m *PrivateKeyProvider) ValidateAll() error { - return m.validate(true) -} - -func (m *PrivateKeyProvider) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetProviderName()) < 1 { - err := PrivateKeyProviderValidationError{ - field: "ProviderName", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *PrivateKeyProvider_Config: - if v == nil { - err := PrivateKeyProviderValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PrivateKeyProviderValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PrivateKeyProviderValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrivateKeyProviderValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *PrivateKeyProvider_TypedConfig: - if v == nil { - err := PrivateKeyProviderValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, PrivateKeyProviderValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, PrivateKeyProviderValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PrivateKeyProviderValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return PrivateKeyProviderMultiError(errors) - } - - return nil -} - -// PrivateKeyProviderMultiError is an error wrapping multiple validation errors -// returned by PrivateKeyProvider.ValidateAll() if the designated constraints -// aren't met. -type PrivateKeyProviderMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m PrivateKeyProviderMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m PrivateKeyProviderMultiError) AllErrors() []error { return m } - -// PrivateKeyProviderValidationError is the validation error returned by -// PrivateKeyProvider.Validate if the designated constraints aren't met. -type PrivateKeyProviderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e PrivateKeyProviderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e PrivateKeyProviderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e PrivateKeyProviderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e PrivateKeyProviderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e PrivateKeyProviderValidationError) ErrorName() string { - return "PrivateKeyProviderValidationError" -} - -// Error satisfies the builtin error interface -func (e PrivateKeyProviderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sPrivateKeyProvider.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = PrivateKeyProviderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = PrivateKeyProviderValidationError{} - -// Validate checks the field values on TlsCertificate with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *TlsCertificate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TlsCertificate with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in TlsCertificateMultiError, -// or nil if none found. -func (m *TlsCertificate) ValidateAll() error { - return m.validate(true) -} - -func (m *TlsCertificate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCertificateChain()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "CertificateChain", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "CertificateChain", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCertificateChain()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "CertificateChain", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPrivateKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "PrivateKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPrivateKeyProvider()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "PrivateKeyProvider", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "PrivateKeyProvider", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPrivateKeyProvider()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "PrivateKeyProvider", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPassword()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "Password", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "Password", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPassword()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "Password", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetOcspStaple()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "OcspStaple", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: "OcspStaple", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOcspStaple()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: "OcspStaple", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetSignedCertificateTimestamp() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TlsCertificateValidationError{ - field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsCertificateValidationError{ - field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return TlsCertificateMultiError(errors) - } - - return nil -} - -// TlsCertificateMultiError is an error wrapping multiple validation errors -// returned by TlsCertificate.ValidateAll() if the designated constraints -// aren't met. -type TlsCertificateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TlsCertificateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TlsCertificateMultiError) AllErrors() []error { return m } - -// TlsCertificateValidationError is the validation error returned by -// TlsCertificate.Validate if the designated constraints aren't met. -type TlsCertificateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TlsCertificateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TlsCertificateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TlsCertificateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TlsCertificateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TlsCertificateValidationError) ErrorName() string { return "TlsCertificateValidationError" } - -// Error satisfies the builtin error interface -func (e TlsCertificateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTlsCertificate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TlsCertificateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TlsCertificateValidationError{} - -// Validate checks the field values on TlsSessionTicketKeys with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *TlsSessionTicketKeys) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TlsSessionTicketKeys with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TlsSessionTicketKeysMultiError, or nil if none found. -func (m *TlsSessionTicketKeys) ValidateAll() error { - return m.validate(true) -} - -func (m *TlsSessionTicketKeys) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetKeys()) < 1 { - err := TlsSessionTicketKeysValidationError{ - field: "Keys", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetKeys() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TlsSessionTicketKeysValidationError{ - field: fmt.Sprintf("Keys[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TlsSessionTicketKeysValidationError{ - field: fmt.Sprintf("Keys[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TlsSessionTicketKeysValidationError{ - field: fmt.Sprintf("Keys[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return TlsSessionTicketKeysMultiError(errors) - } - - return nil -} - -// TlsSessionTicketKeysMultiError is an error wrapping multiple validation -// errors returned by TlsSessionTicketKeys.ValidateAll() if the designated -// constraints aren't met. -type TlsSessionTicketKeysMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TlsSessionTicketKeysMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TlsSessionTicketKeysMultiError) AllErrors() []error { return m } - -// TlsSessionTicketKeysValidationError is the validation error returned by -// TlsSessionTicketKeys.Validate if the designated constraints aren't met. -type TlsSessionTicketKeysValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TlsSessionTicketKeysValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TlsSessionTicketKeysValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TlsSessionTicketKeysValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TlsSessionTicketKeysValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TlsSessionTicketKeysValidationError) ErrorName() string { - return "TlsSessionTicketKeysValidationError" -} - -// Error satisfies the builtin error interface -func (e TlsSessionTicketKeysValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTlsSessionTicketKeys.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TlsSessionTicketKeysValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TlsSessionTicketKeysValidationError{} - -// Validate checks the field values on CertificateValidationContext with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CertificateValidationContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CertificateValidationContext with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CertificateValidationContextMultiError, or nil if none found. -func (m *CertificateValidationContext) ValidateAll() error { - return m.validate(true) -} - -func (m *CertificateValidationContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetTrustedCa()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "TrustedCa", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "TrustedCa", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTrustedCa()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "TrustedCa", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetVerifyCertificateSpki() { - _, _ = idx, item - - if len(item) != 44 { - err := CertificateValidationContextValidationError{ - field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx), - reason: "value length must be 44 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - for idx, item := range m.GetVerifyCertificateHash() { - _, _ = idx, item - - if l := len(item); l < 64 || l > 95 { - err := CertificateValidationContextValidationError{ - field: fmt.Sprintf("VerifyCertificateHash[%v]", idx), - reason: "value length must be between 64 and 95 bytes, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - for idx, item := range m.GetMatchSubjectAltNames() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetRequireOcspStaple()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "RequireOcspStaple", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "RequireOcspStaple", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequireOcspStaple()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "RequireOcspStaple", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRequireSignedCertificateTimestamp()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "RequireSignedCertificateTimestamp", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "RequireSignedCertificateTimestamp", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequireSignedCertificateTimestamp()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "RequireSignedCertificateTimestamp", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCrl()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "Crl", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CertificateValidationContextValidationError{ - field: "Crl", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCrl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CertificateValidationContextValidationError{ - field: "Crl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for AllowExpiredCertificate - - if _, ok := CertificateValidationContext_TrustChainVerification_name[int32(m.GetTrustChainVerification())]; !ok { - err := CertificateValidationContextValidationError{ - field: "TrustChainVerification", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return CertificateValidationContextMultiError(errors) - } - - return nil -} - -// CertificateValidationContextMultiError is an error wrapping multiple -// validation errors returned by CertificateValidationContext.ValidateAll() if -// the designated constraints aren't met. -type CertificateValidationContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CertificateValidationContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CertificateValidationContextMultiError) AllErrors() []error { return m } - -// CertificateValidationContextValidationError is the validation error returned -// by CertificateValidationContext.Validate if the designated constraints -// aren't met. -type CertificateValidationContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CertificateValidationContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CertificateValidationContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CertificateValidationContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CertificateValidationContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CertificateValidationContextValidationError) ErrorName() string { - return "CertificateValidationContextValidationError" -} - -// Error satisfies the builtin error interface -func (e CertificateValidationContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCertificateValidationContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CertificateValidationContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CertificateValidationContextValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.go deleted file mode 100644 index 5139efb3ffa1..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.go +++ /dev/null @@ -1,421 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/auth/secret.proto - -package auth - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GenericSecret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Secret of generic type and is available to filters. - Secret *core.DataSource `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` -} - -func (x *GenericSecret) Reset() { - *x = GenericSecret{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_secret_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenericSecret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenericSecret) ProtoMessage() {} - -func (x *GenericSecret) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_secret_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenericSecret.ProtoReflect.Descriptor instead. -func (*GenericSecret) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_secret_proto_rawDescGZIP(), []int{0} -} - -func (x *GenericSecret) GetSecret() *core.DataSource { - if x != nil { - return x.Secret - } - return nil -} - -type SdsSecretConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. - // When both name and config are specified, then secret can be fetched and/or reloaded via - // SDS. When only name is specified, then secret will be loaded from static resources. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - SdsConfig *core.ConfigSource `protobuf:"bytes,2,opt,name=sds_config,json=sdsConfig,proto3" json:"sds_config,omitempty"` -} - -func (x *SdsSecretConfig) Reset() { - *x = SdsSecretConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_secret_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SdsSecretConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SdsSecretConfig) ProtoMessage() {} - -func (x *SdsSecretConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_secret_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SdsSecretConfig.ProtoReflect.Descriptor instead. -func (*SdsSecretConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_secret_proto_rawDescGZIP(), []int{1} -} - -func (x *SdsSecretConfig) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SdsSecretConfig) GetSdsConfig() *core.ConfigSource { - if x != nil { - return x.SdsConfig - } - return nil -} - -// [#next-free-field: 6] -type Secret struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to Type: - // *Secret_TlsCertificate - // *Secret_SessionTicketKeys - // *Secret_ValidationContext - // *Secret_GenericSecret - Type isSecret_Type `protobuf_oneof:"type"` -} - -func (x *Secret) Reset() { - *x = Secret{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_secret_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Secret) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Secret) ProtoMessage() {} - -func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_secret_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Secret.ProtoReflect.Descriptor instead. -func (*Secret) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_secret_proto_rawDescGZIP(), []int{2} -} - -func (x *Secret) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *Secret) GetType() isSecret_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *Secret) GetTlsCertificate() *TlsCertificate { - if x, ok := x.GetType().(*Secret_TlsCertificate); ok { - return x.TlsCertificate - } - return nil -} - -func (x *Secret) GetSessionTicketKeys() *TlsSessionTicketKeys { - if x, ok := x.GetType().(*Secret_SessionTicketKeys); ok { - return x.SessionTicketKeys - } - return nil -} - -func (x *Secret) GetValidationContext() *CertificateValidationContext { - if x, ok := x.GetType().(*Secret_ValidationContext); ok { - return x.ValidationContext - } - return nil -} - -func (x *Secret) GetGenericSecret() *GenericSecret { - if x, ok := x.GetType().(*Secret_GenericSecret); ok { - return x.GenericSecret - } - return nil -} - -type isSecret_Type interface { - isSecret_Type() -} - -type Secret_TlsCertificate struct { - TlsCertificate *TlsCertificate `protobuf:"bytes,2,opt,name=tls_certificate,json=tlsCertificate,proto3,oneof"` -} - -type Secret_SessionTicketKeys struct { - SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,3,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"` -} - -type Secret_ValidationContext struct { - ValidationContext *CertificateValidationContext `protobuf:"bytes,4,opt,name=validation_context,json=validationContext,proto3,oneof"` -} - -type Secret_GenericSecret struct { - GenericSecret *GenericSecret `protobuf:"bytes,5,opt,name=generic_secret,json=genericSecret,proto3,oneof"` -} - -func (*Secret_TlsCertificate) isSecret_Type() {} - -func (*Secret_SessionTicketKeys) isSecret_Type() {} - -func (*Secret_ValidationContext) isSecret_Type() {} - -func (*Secret_GenericSecret) isSecret_Type() {} - -var File_envoy_api_v2_auth_secret_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_auth_secret_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x0d, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, - 0x01, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x65, 0x0a, 0x0f, 0x53, 0x64, 0x73, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x73, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0xfa, 0x02, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x4c, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x74, - 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, - 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, - 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x60, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x49, 0x0a, 0x0e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0xa3, 0x01, - 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x42, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, - 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, - 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_auth_secret_proto_rawDescOnce sync.Once - file_envoy_api_v2_auth_secret_proto_rawDescData = file_envoy_api_v2_auth_secret_proto_rawDesc -) - -func file_envoy_api_v2_auth_secret_proto_rawDescGZIP() []byte { - file_envoy_api_v2_auth_secret_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_auth_secret_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_auth_secret_proto_rawDescData) - }) - return file_envoy_api_v2_auth_secret_proto_rawDescData -} - -var file_envoy_api_v2_auth_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_api_v2_auth_secret_proto_goTypes = []interface{}{ - (*GenericSecret)(nil), // 0: envoy.api.v2.auth.GenericSecret - (*SdsSecretConfig)(nil), // 1: envoy.api.v2.auth.SdsSecretConfig - (*Secret)(nil), // 2: envoy.api.v2.auth.Secret - (*core.DataSource)(nil), // 3: envoy.api.v2.core.DataSource - (*core.ConfigSource)(nil), // 4: envoy.api.v2.core.ConfigSource - (*TlsCertificate)(nil), // 5: envoy.api.v2.auth.TlsCertificate - (*TlsSessionTicketKeys)(nil), // 6: envoy.api.v2.auth.TlsSessionTicketKeys - (*CertificateValidationContext)(nil), // 7: envoy.api.v2.auth.CertificateValidationContext -} -var file_envoy_api_v2_auth_secret_proto_depIdxs = []int32{ - 3, // 0: envoy.api.v2.auth.GenericSecret.secret:type_name -> envoy.api.v2.core.DataSource - 4, // 1: envoy.api.v2.auth.SdsSecretConfig.sds_config:type_name -> envoy.api.v2.core.ConfigSource - 5, // 2: envoy.api.v2.auth.Secret.tls_certificate:type_name -> envoy.api.v2.auth.TlsCertificate - 6, // 3: envoy.api.v2.auth.Secret.session_ticket_keys:type_name -> envoy.api.v2.auth.TlsSessionTicketKeys - 7, // 4: envoy.api.v2.auth.Secret.validation_context:type_name -> envoy.api.v2.auth.CertificateValidationContext - 0, // 5: envoy.api.v2.auth.Secret.generic_secret:type_name -> envoy.api.v2.auth.GenericSecret - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_auth_secret_proto_init() } -func file_envoy_api_v2_auth_secret_proto_init() { - if File_envoy_api_v2_auth_secret_proto != nil { - return - } - file_envoy_api_v2_auth_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_auth_secret_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenericSecret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_secret_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SdsSecretConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_secret_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Secret); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_auth_secret_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Secret_TlsCertificate)(nil), - (*Secret_SessionTicketKeys)(nil), - (*Secret_ValidationContext)(nil), - (*Secret_GenericSecret)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_auth_secret_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_auth_secret_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_auth_secret_proto_depIdxs, - MessageInfos: file_envoy_api_v2_auth_secret_proto_msgTypes, - }.Build() - File_envoy_api_v2_auth_secret_proto = out.File - file_envoy_api_v2_auth_secret_proto_rawDesc = nil - file_envoy_api_v2_auth_secret_proto_goTypes = nil - file_envoy_api_v2_auth_secret_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.validate.go deleted file mode 100644 index 535d1e1632dc..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.validate.go +++ /dev/null @@ -1,565 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/auth/secret.proto - -package auth - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on GenericSecret with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GenericSecret) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GenericSecret with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in GenericSecretMultiError, or -// nil if none found. -func (m *GenericSecret) ValidateAll() error { - return m.validate(true) -} - -func (m *GenericSecret) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetSecret()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GenericSecretValidationError{ - field: "Secret", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GenericSecretValidationError{ - field: "Secret", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GenericSecretValidationError{ - field: "Secret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GenericSecretMultiError(errors) - } - - return nil -} - -// GenericSecretMultiError is an error wrapping multiple validation errors -// returned by GenericSecret.ValidateAll() if the designated constraints -// aren't met. -type GenericSecretMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GenericSecretMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GenericSecretMultiError) AllErrors() []error { return m } - -// GenericSecretValidationError is the validation error returned by -// GenericSecret.Validate if the designated constraints aren't met. -type GenericSecretValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GenericSecretValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GenericSecretValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GenericSecretValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GenericSecretValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GenericSecretValidationError) ErrorName() string { return "GenericSecretValidationError" } - -// Error satisfies the builtin error interface -func (e GenericSecretValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGenericSecret.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GenericSecretValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GenericSecretValidationError{} - -// Validate checks the field values on SdsSecretConfig with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *SdsSecretConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SdsSecretConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// SdsSecretConfigMultiError, or nil if none found. -func (m *SdsSecretConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *SdsSecretConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetSdsConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SdsSecretConfigValidationError{ - field: "SdsConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SdsSecretConfigValidationError{ - field: "SdsConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSdsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SdsSecretConfigValidationError{ - field: "SdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return SdsSecretConfigMultiError(errors) - } - - return nil -} - -// SdsSecretConfigMultiError is an error wrapping multiple validation errors -// returned by SdsSecretConfig.ValidateAll() if the designated constraints -// aren't met. -type SdsSecretConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SdsSecretConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SdsSecretConfigMultiError) AllErrors() []error { return m } - -// SdsSecretConfigValidationError is the validation error returned by -// SdsSecretConfig.Validate if the designated constraints aren't met. -type SdsSecretConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SdsSecretConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SdsSecretConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SdsSecretConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SdsSecretConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SdsSecretConfigValidationError) ErrorName() string { return "SdsSecretConfigValidationError" } - -// Error satisfies the builtin error interface -func (e SdsSecretConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSdsSecretConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SdsSecretConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SdsSecretConfigValidationError{} - -// Validate checks the field values on Secret with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Secret) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Secret with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in SecretMultiError, or nil if none found. -func (m *Secret) ValidateAll() error { - return m.validate(true) -} - -func (m *Secret) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - switch v := m.Type.(type) { - case *Secret_TlsCertificate: - if v == nil { - err := SecretValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTlsCertificate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SecretValidationError{ - field: "TlsCertificate", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SecretValidationError{ - field: "TlsCertificate", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTlsCertificate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretValidationError{ - field: "TlsCertificate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Secret_SessionTicketKeys: - if v == nil { - err := SecretValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSessionTicketKeys()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SecretValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SecretValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Secret_ValidationContext: - if v == nil { - err := SecretValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValidationContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SecretValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SecretValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Secret_GenericSecret: - if v == nil { - err := SecretValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetGenericSecret()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SecretValidationError{ - field: "GenericSecret", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SecretValidationError{ - field: "GenericSecret", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGenericSecret()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SecretValidationError{ - field: "GenericSecret", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return SecretMultiError(errors) - } - - return nil -} - -// SecretMultiError is an error wrapping multiple validation errors returned by -// Secret.ValidateAll() if the designated constraints aren't met. -type SecretMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SecretMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SecretMultiError) AllErrors() []error { return m } - -// SecretValidationError is the validation error returned by Secret.Validate if -// the designated constraints aren't met. -type SecretValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SecretValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SecretValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SecretValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SecretValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SecretValidationError) ErrorName() string { return "SecretValidationError" } - -// Error satisfies the builtin error interface -func (e SecretValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSecret.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SecretValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SecretValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.go deleted file mode 100644 index d0f0ab2c9542..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.go +++ /dev/null @@ -1,764 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/auth/tls.proto - -package auth - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - duration "github.com/golang/protobuf/ptypes/duration" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type UpstreamTlsContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Common TLS context settings. - // - // .. attention:: - // - // Server certificate verification is not enabled by default. Configure - // :ref:`trusted_ca` to enable - // verification. - CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"` - // SNI string to use when creating TLS backend connections. - Sni string `protobuf:"bytes,2,opt,name=sni,proto3" json:"sni,omitempty"` - // If true, server-initiated TLS renegotiation will be allowed. - // - // .. attention:: - // - // TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary. - AllowRenegotiation bool `protobuf:"varint,3,opt,name=allow_renegotiation,json=allowRenegotiation,proto3" json:"allow_renegotiation,omitempty"` - // Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets - // for TLSv1.2 and older) to store for the purpose of session resumption. - // - // Defaults to 1, setting this to 0 disables session resumption. - MaxSessionKeys *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_session_keys,json=maxSessionKeys,proto3" json:"max_session_keys,omitempty"` -} - -func (x *UpstreamTlsContext) Reset() { - *x = UpstreamTlsContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamTlsContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamTlsContext) ProtoMessage() {} - -func (x *UpstreamTlsContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamTlsContext.ProtoReflect.Descriptor instead. -func (*UpstreamTlsContext) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_tls_proto_rawDescGZIP(), []int{0} -} - -func (x *UpstreamTlsContext) GetCommonTlsContext() *CommonTlsContext { - if x != nil { - return x.CommonTlsContext - } - return nil -} - -func (x *UpstreamTlsContext) GetSni() string { - if x != nil { - return x.Sni - } - return "" -} - -func (x *UpstreamTlsContext) GetAllowRenegotiation() bool { - if x != nil { - return x.AllowRenegotiation - } - return false -} - -func (x *UpstreamTlsContext) GetMaxSessionKeys() *wrappers.UInt32Value { - if x != nil { - return x.MaxSessionKeys - } - return nil -} - -// [#next-free-field: 8] -type DownstreamTlsContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Common TLS context settings. - CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"` - // If specified, Envoy will reject connections without a valid client - // certificate. - RequireClientCertificate *wrappers.BoolValue `protobuf:"bytes,2,opt,name=require_client_certificate,json=requireClientCertificate,proto3" json:"require_client_certificate,omitempty"` - // If specified, Envoy will reject connections without a valid and matching SNI. - // [#not-implemented-hide:] - RequireSni *wrappers.BoolValue `protobuf:"bytes,3,opt,name=require_sni,json=requireSni,proto3" json:"require_sni,omitempty"` - // Types that are assignable to SessionTicketKeysType: - // *DownstreamTlsContext_SessionTicketKeys - // *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig - // *DownstreamTlsContext_DisableStatelessSessionResumption - SessionTicketKeysType isDownstreamTlsContext_SessionTicketKeysType `protobuf_oneof:"session_ticket_keys_type"` - // If specified, ``session_timeout`` will change the maximum lifetime (in seconds) of the TLS session. - // Currently this value is used as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_. - // Only seconds can be specified (fractional seconds are ignored). - SessionTimeout *duration.Duration `protobuf:"bytes,6,opt,name=session_timeout,json=sessionTimeout,proto3" json:"session_timeout,omitempty"` -} - -func (x *DownstreamTlsContext) Reset() { - *x = DownstreamTlsContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DownstreamTlsContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DownstreamTlsContext) ProtoMessage() {} - -func (x *DownstreamTlsContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DownstreamTlsContext.ProtoReflect.Descriptor instead. -func (*DownstreamTlsContext) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_tls_proto_rawDescGZIP(), []int{1} -} - -func (x *DownstreamTlsContext) GetCommonTlsContext() *CommonTlsContext { - if x != nil { - return x.CommonTlsContext - } - return nil -} - -func (x *DownstreamTlsContext) GetRequireClientCertificate() *wrappers.BoolValue { - if x != nil { - return x.RequireClientCertificate - } - return nil -} - -func (x *DownstreamTlsContext) GetRequireSni() *wrappers.BoolValue { - if x != nil { - return x.RequireSni - } - return nil -} - -func (m *DownstreamTlsContext) GetSessionTicketKeysType() isDownstreamTlsContext_SessionTicketKeysType { - if m != nil { - return m.SessionTicketKeysType - } - return nil -} - -func (x *DownstreamTlsContext) GetSessionTicketKeys() *TlsSessionTicketKeys { - if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_SessionTicketKeys); ok { - return x.SessionTicketKeys - } - return nil -} - -func (x *DownstreamTlsContext) GetSessionTicketKeysSdsSecretConfig() *SdsSecretConfig { - if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig); ok { - return x.SessionTicketKeysSdsSecretConfig - } - return nil -} - -func (x *DownstreamTlsContext) GetDisableStatelessSessionResumption() bool { - if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_DisableStatelessSessionResumption); ok { - return x.DisableStatelessSessionResumption - } - return false -} - -func (x *DownstreamTlsContext) GetSessionTimeout() *duration.Duration { - if x != nil { - return x.SessionTimeout - } - return nil -} - -type isDownstreamTlsContext_SessionTicketKeysType interface { - isDownstreamTlsContext_SessionTicketKeysType() -} - -type DownstreamTlsContext_SessionTicketKeys struct { - // TLS session ticket key settings. - SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,4,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"` -} - -type DownstreamTlsContext_SessionTicketKeysSdsSecretConfig struct { - // Config for fetching TLS session ticket keys via SDS API. - SessionTicketKeysSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,5,opt,name=session_ticket_keys_sds_secret_config,json=sessionTicketKeysSdsSecretConfig,proto3,oneof"` -} - -type DownstreamTlsContext_DisableStatelessSessionResumption struct { - // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS - // server to not issue TLS session tickets for the purposes of stateless TLS session resumption. - // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using - // the keys specified through either :ref:`session_ticket_keys ` - // or :ref:`session_ticket_keys_sds_secret_config `. - // If this config is set to false and no keys are explicitly configured, the TLS server will issue - // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the - // implication that sessions cannot be resumed across hot restarts or on different hosts. - DisableStatelessSessionResumption bool `protobuf:"varint,7,opt,name=disable_stateless_session_resumption,json=disableStatelessSessionResumption,proto3,oneof"` -} - -func (*DownstreamTlsContext_SessionTicketKeys) isDownstreamTlsContext_SessionTicketKeysType() {} - -func (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) isDownstreamTlsContext_SessionTicketKeysType() { -} - -func (*DownstreamTlsContext_DisableStatelessSessionResumption) isDownstreamTlsContext_SessionTicketKeysType() { -} - -// TLS context shared by both client and server TLS contexts. -// [#next-free-field: 9] -type CommonTlsContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // TLS protocol versions, cipher suites etc. - TlsParams *TlsParameters `protobuf:"bytes,1,opt,name=tls_params,json=tlsParams,proto3" json:"tls_params,omitempty"` - // :ref:`Multiple TLS certificates ` can be associated with the - // same context to allow both RSA and ECDSA certificates. - // - // Only a single TLS certificate is supported in client contexts. In server contexts, the first - // RSA certificate is used for clients that only support RSA and the first ECDSA certificate is - // used for clients that support ECDSA. - TlsCertificates []*TlsCertificate `protobuf:"bytes,2,rep,name=tls_certificates,json=tlsCertificates,proto3" json:"tls_certificates,omitempty"` - // Configs for fetching TLS certificates via SDS API. - TlsCertificateSdsSecretConfigs []*SdsSecretConfig `protobuf:"bytes,6,rep,name=tls_certificate_sds_secret_configs,json=tlsCertificateSdsSecretConfigs,proto3" json:"tls_certificate_sds_secret_configs,omitempty"` - // Types that are assignable to ValidationContextType: - // *CommonTlsContext_ValidationContext - // *CommonTlsContext_ValidationContextSdsSecretConfig - // *CommonTlsContext_CombinedValidationContext - ValidationContextType isCommonTlsContext_ValidationContextType `protobuf_oneof:"validation_context_type"` - // Supplies the list of ALPN protocols that the listener should expose. In - // practice this is likely to be set to one of two values (see the - // :ref:`codec_type - // ` - // parameter in the HTTP connection manager for more information): - // - // * "h2,http/1.1" If the listener is going to support both HTTP/2 and HTTP/1.1. - // * "http/1.1" If the listener is only going to support HTTP/1.1. - // - // There is no default for this parameter. If empty, Envoy will not expose ALPN. - AlpnProtocols []string `protobuf:"bytes,4,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"` -} - -func (x *CommonTlsContext) Reset() { - *x = CommonTlsContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTlsContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTlsContext) ProtoMessage() {} - -func (x *CommonTlsContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonTlsContext.ProtoReflect.Descriptor instead. -func (*CommonTlsContext) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_tls_proto_rawDescGZIP(), []int{2} -} - -func (x *CommonTlsContext) GetTlsParams() *TlsParameters { - if x != nil { - return x.TlsParams - } - return nil -} - -func (x *CommonTlsContext) GetTlsCertificates() []*TlsCertificate { - if x != nil { - return x.TlsCertificates - } - return nil -} - -func (x *CommonTlsContext) GetTlsCertificateSdsSecretConfigs() []*SdsSecretConfig { - if x != nil { - return x.TlsCertificateSdsSecretConfigs - } - return nil -} - -func (m *CommonTlsContext) GetValidationContextType() isCommonTlsContext_ValidationContextType { - if m != nil { - return m.ValidationContextType - } - return nil -} - -func (x *CommonTlsContext) GetValidationContext() *CertificateValidationContext { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContext); ok { - return x.ValidationContext - } - return nil -} - -func (x *CommonTlsContext) GetValidationContextSdsSecretConfig() *SdsSecretConfig { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextSdsSecretConfig); ok { - return x.ValidationContextSdsSecretConfig - } - return nil -} - -func (x *CommonTlsContext) GetCombinedValidationContext() *CommonTlsContext_CombinedCertificateValidationContext { - if x, ok := x.GetValidationContextType().(*CommonTlsContext_CombinedValidationContext); ok { - return x.CombinedValidationContext - } - return nil -} - -func (x *CommonTlsContext) GetAlpnProtocols() []string { - if x != nil { - return x.AlpnProtocols - } - return nil -} - -type isCommonTlsContext_ValidationContextType interface { - isCommonTlsContext_ValidationContextType() -} - -type CommonTlsContext_ValidationContext struct { - // How to validate peer certificates. - ValidationContext *CertificateValidationContext `protobuf:"bytes,3,opt,name=validation_context,json=validationContext,proto3,oneof"` -} - -type CommonTlsContext_ValidationContextSdsSecretConfig struct { - // Config for fetching validation context via SDS API. - ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,7,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3,oneof"` -} - -type CommonTlsContext_CombinedValidationContext struct { - // Combined certificate validation context holds a default CertificateValidationContext - // and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic - // and default CertificateValidationContext are merged into a new CertificateValidationContext - // for validation. This merge is done by Message::MergeFrom(), so dynamic - // CertificateValidationContext overwrites singular fields in default - // CertificateValidationContext, and concatenates repeated fields to default - // CertificateValidationContext, and logical OR is applied to boolean fields. - CombinedValidationContext *CommonTlsContext_CombinedCertificateValidationContext `protobuf:"bytes,8,opt,name=combined_validation_context,json=combinedValidationContext,proto3,oneof"` -} - -func (*CommonTlsContext_ValidationContext) isCommonTlsContext_ValidationContextType() {} - -func (*CommonTlsContext_ValidationContextSdsSecretConfig) isCommonTlsContext_ValidationContextType() { -} - -func (*CommonTlsContext_CombinedValidationContext) isCommonTlsContext_ValidationContextType() {} - -type CommonTlsContext_CombinedCertificateValidationContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // How to validate peer certificates. - DefaultValidationContext *CertificateValidationContext `protobuf:"bytes,1,opt,name=default_validation_context,json=defaultValidationContext,proto3" json:"default_validation_context,omitempty"` - // Config for fetching validation context via SDS API. - ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,2,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3" json:"validation_context_sds_secret_config,omitempty"` -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) Reset() { - *x = CommonTlsContext_CombinedCertificateValidationContext{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommonTlsContext_CombinedCertificateValidationContext) ProtoMessage() {} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_auth_tls_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CommonTlsContext_CombinedCertificateValidationContext.ProtoReflect.Descriptor instead. -func (*CommonTlsContext_CombinedCertificateValidationContext) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_auth_tls_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) GetDefaultValidationContext() *CertificateValidationContext { - if x != nil { - return x.DefaultValidationContext - } - return nil -} - -func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextSdsSecretConfig() *SdsSecretConfig { - if x != nil { - return x.ValidationContextSdsSecretConfig - } - return nil -} - -var File_envoy_api_v2_auth_tls_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_auth_tls_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, - 0x51, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x73, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0xff, 0x01, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x12, 0x2f, - 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x52, 0x65, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x46, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, - 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x97, 0x05, 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, - 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x51, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x58, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, - 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x6e, 0x69, 0x12, 0x59, 0x0a, 0x13, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, - 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x75, 0x0a, 0x25, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x64, 0x73, - 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x64, 0x73, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x24, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, - 0x73, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x21, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x54, 0x0a, 0x0f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x1a, 0x06, 0x08, 0x80, 0x80, - 0x80, 0x80, 0x10, 0x32, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0xe8, 0x07, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3f, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, - 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x09, 0x74, 0x6c, - 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, 0x78, 0x0a, 0x22, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x1e, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, - 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, - 0x60, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x12, 0x74, 0x0a, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8a, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x62, - 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x62, 0x69, - 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x6c, - 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x1a, 0x9d, 0x02, 0x0a, 0x24, - 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x12, 0x77, 0x0a, 0x1a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x18, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x7c, 0x0a, - 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x19, 0x0a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0xa0, 0x01, 0x0a, - 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x42, 0x08, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x2b, 0x12, 0x29, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, - 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_auth_tls_proto_rawDescOnce sync.Once - file_envoy_api_v2_auth_tls_proto_rawDescData = file_envoy_api_v2_auth_tls_proto_rawDesc -) - -func file_envoy_api_v2_auth_tls_proto_rawDescGZIP() []byte { - file_envoy_api_v2_auth_tls_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_auth_tls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_auth_tls_proto_rawDescData) - }) - return file_envoy_api_v2_auth_tls_proto_rawDescData -} - -var file_envoy_api_v2_auth_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_api_v2_auth_tls_proto_goTypes = []interface{}{ - (*UpstreamTlsContext)(nil), // 0: envoy.api.v2.auth.UpstreamTlsContext - (*DownstreamTlsContext)(nil), // 1: envoy.api.v2.auth.DownstreamTlsContext - (*CommonTlsContext)(nil), // 2: envoy.api.v2.auth.CommonTlsContext - (*CommonTlsContext_CombinedCertificateValidationContext)(nil), // 3: envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext - (*wrappers.UInt32Value)(nil), // 4: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 5: google.protobuf.BoolValue - (*TlsSessionTicketKeys)(nil), // 6: envoy.api.v2.auth.TlsSessionTicketKeys - (*SdsSecretConfig)(nil), // 7: envoy.api.v2.auth.SdsSecretConfig - (*duration.Duration)(nil), // 8: google.protobuf.Duration - (*TlsParameters)(nil), // 9: envoy.api.v2.auth.TlsParameters - (*TlsCertificate)(nil), // 10: envoy.api.v2.auth.TlsCertificate - (*CertificateValidationContext)(nil), // 11: envoy.api.v2.auth.CertificateValidationContext -} -var file_envoy_api_v2_auth_tls_proto_depIdxs = []int32{ - 2, // 0: envoy.api.v2.auth.UpstreamTlsContext.common_tls_context:type_name -> envoy.api.v2.auth.CommonTlsContext - 4, // 1: envoy.api.v2.auth.UpstreamTlsContext.max_session_keys:type_name -> google.protobuf.UInt32Value - 2, // 2: envoy.api.v2.auth.DownstreamTlsContext.common_tls_context:type_name -> envoy.api.v2.auth.CommonTlsContext - 5, // 3: envoy.api.v2.auth.DownstreamTlsContext.require_client_certificate:type_name -> google.protobuf.BoolValue - 5, // 4: envoy.api.v2.auth.DownstreamTlsContext.require_sni:type_name -> google.protobuf.BoolValue - 6, // 5: envoy.api.v2.auth.DownstreamTlsContext.session_ticket_keys:type_name -> envoy.api.v2.auth.TlsSessionTicketKeys - 7, // 6: envoy.api.v2.auth.DownstreamTlsContext.session_ticket_keys_sds_secret_config:type_name -> envoy.api.v2.auth.SdsSecretConfig - 8, // 7: envoy.api.v2.auth.DownstreamTlsContext.session_timeout:type_name -> google.protobuf.Duration - 9, // 8: envoy.api.v2.auth.CommonTlsContext.tls_params:type_name -> envoy.api.v2.auth.TlsParameters - 10, // 9: envoy.api.v2.auth.CommonTlsContext.tls_certificates:type_name -> envoy.api.v2.auth.TlsCertificate - 7, // 10: envoy.api.v2.auth.CommonTlsContext.tls_certificate_sds_secret_configs:type_name -> envoy.api.v2.auth.SdsSecretConfig - 11, // 11: envoy.api.v2.auth.CommonTlsContext.validation_context:type_name -> envoy.api.v2.auth.CertificateValidationContext - 7, // 12: envoy.api.v2.auth.CommonTlsContext.validation_context_sds_secret_config:type_name -> envoy.api.v2.auth.SdsSecretConfig - 3, // 13: envoy.api.v2.auth.CommonTlsContext.combined_validation_context:type_name -> envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext - 11, // 14: envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext.default_validation_context:type_name -> envoy.api.v2.auth.CertificateValidationContext - 7, // 15: envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext.validation_context_sds_secret_config:type_name -> envoy.api.v2.auth.SdsSecretConfig - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_auth_tls_proto_init() } -func file_envoy_api_v2_auth_tls_proto_init() { - if File_envoy_api_v2_auth_tls_proto != nil { - return - } - file_envoy_api_v2_auth_common_proto_init() - file_envoy_api_v2_auth_secret_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_auth_tls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamTlsContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_tls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DownstreamTlsContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_tls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_auth_tls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommonTlsContext_CombinedCertificateValidationContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_auth_tls_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*DownstreamTlsContext_SessionTicketKeys)(nil), - (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig)(nil), - (*DownstreamTlsContext_DisableStatelessSessionResumption)(nil), - } - file_envoy_api_v2_auth_tls_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*CommonTlsContext_ValidationContext)(nil), - (*CommonTlsContext_ValidationContextSdsSecretConfig)(nil), - (*CommonTlsContext_CombinedValidationContext)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_auth_tls_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_auth_tls_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_auth_tls_proto_depIdxs, - MessageInfos: file_envoy_api_v2_auth_tls_proto_msgTypes, - }.Build() - File_envoy_api_v2_auth_tls_proto = out.File - file_envoy_api_v2_auth_tls_proto_rawDesc = nil - file_envoy_api_v2_auth_tls_proto_goTypes = nil - file_envoy_api_v2_auth_tls_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.validate.go deleted file mode 100644 index 767a4691788b..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.validate.go +++ /dev/null @@ -1,1062 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/auth/tls.proto - -package auth - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on UpstreamTlsContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpstreamTlsContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpstreamTlsContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpstreamTlsContextMultiError, or nil if none found. -func (m *UpstreamTlsContext) ValidateAll() error { - return m.validate(true) -} - -func (m *UpstreamTlsContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCommonTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetSni()) > 255 { - err := UpstreamTlsContextValidationError{ - field: "Sni", - reason: "value length must be at most 255 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for AllowRenegotiation - - if all { - switch v := interface{}(m.GetMaxSessionKeys()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamTlsContextValidationError{ - field: "MaxSessionKeys", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamTlsContextValidationError{ - field: "MaxSessionKeys", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxSessionKeys()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamTlsContextValidationError{ - field: "MaxSessionKeys", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpstreamTlsContextMultiError(errors) - } - - return nil -} - -// UpstreamTlsContextMultiError is an error wrapping multiple validation errors -// returned by UpstreamTlsContext.ValidateAll() if the designated constraints -// aren't met. -type UpstreamTlsContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpstreamTlsContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpstreamTlsContextMultiError) AllErrors() []error { return m } - -// UpstreamTlsContextValidationError is the validation error returned by -// UpstreamTlsContext.Validate if the designated constraints aren't met. -type UpstreamTlsContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamTlsContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamTlsContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamTlsContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamTlsContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamTlsContextValidationError) ErrorName() string { - return "UpstreamTlsContextValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamTlsContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamTlsContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamTlsContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamTlsContextValidationError{} - -// Validate checks the field values on DownstreamTlsContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DownstreamTlsContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DownstreamTlsContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DownstreamTlsContextMultiError, or nil if none found. -func (m *DownstreamTlsContext) ValidateAll() error { - return m.validate(true) -} - -func (m *DownstreamTlsContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCommonTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "CommonTlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRequireClientCertificate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "RequireClientCertificate", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "RequireClientCertificate", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequireClientCertificate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "RequireClientCertificate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRequireSni()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "RequireSni", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "RequireSni", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequireSni()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "RequireSni", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetSessionTimeout(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = DownstreamTlsContextValidationError{ - field: "SessionTimeout", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - lt := time.Duration(4294967296*time.Second + 0*time.Nanosecond) - gte := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur < gte || dur >= lt { - err := DownstreamTlsContextValidationError{ - field: "SessionTimeout", - reason: "value must be inside range [0s, 1193046h28m16s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - switch v := m.SessionTicketKeysType.(type) { - case *DownstreamTlsContext_SessionTicketKeys: - if v == nil { - err := DownstreamTlsContextValidationError{ - field: "SessionTicketKeysType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSessionTicketKeys()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "SessionTicketKeys", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig: - if v == nil { - err := DownstreamTlsContextValidationError{ - field: "SessionTicketKeysType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "SessionTicketKeysSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DownstreamTlsContextValidationError{ - field: "SessionTicketKeysSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DownstreamTlsContextValidationError{ - field: "SessionTicketKeysSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *DownstreamTlsContext_DisableStatelessSessionResumption: - if v == nil { - err := DownstreamTlsContextValidationError{ - field: "SessionTicketKeysType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for DisableStatelessSessionResumption - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return DownstreamTlsContextMultiError(errors) - } - - return nil -} - -// DownstreamTlsContextMultiError is an error wrapping multiple validation -// errors returned by DownstreamTlsContext.ValidateAll() if the designated -// constraints aren't met. -type DownstreamTlsContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DownstreamTlsContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DownstreamTlsContextMultiError) AllErrors() []error { return m } - -// DownstreamTlsContextValidationError is the validation error returned by -// DownstreamTlsContext.Validate if the designated constraints aren't met. -type DownstreamTlsContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DownstreamTlsContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DownstreamTlsContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DownstreamTlsContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DownstreamTlsContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DownstreamTlsContextValidationError) ErrorName() string { - return "DownstreamTlsContextValidationError" -} - -// Error satisfies the builtin error interface -func (e DownstreamTlsContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDownstreamTlsContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DownstreamTlsContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DownstreamTlsContextValidationError{} - -// Validate checks the field values on CommonTlsContext with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CommonTlsContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CommonTlsContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CommonTlsContextMultiError, or nil if none found. -func (m *CommonTlsContext) ValidateAll() error { - return m.validate(true) -} - -func (m *CommonTlsContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetTlsParams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "TlsParams", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "TlsParams", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTlsParams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "TlsParams", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetTlsCertificates() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificates[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetTlsCertificateSdsSecretConfigs()) > 1 { - err := CommonTlsContextValidationError{ - field: "TlsCertificateSdsSecretConfigs", - reason: "value must contain no more than 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetTlsCertificateSdsSecretConfigs() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - switch v := m.ValidationContextType.(type) { - case *CommonTlsContext_ValidationContext: - if v == nil { - err := CommonTlsContextValidationError{ - field: "ValidationContextType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValidationContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "ValidationContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CommonTlsContext_ValidationContextSdsSecretConfig: - if v == nil { - err := CommonTlsContextValidationError{ - field: "ValidationContextType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CommonTlsContext_CombinedValidationContext: - if v == nil { - err := CommonTlsContextValidationError{ - field: "ValidationContextType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetCombinedValidationContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "CombinedValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContextValidationError{ - field: "CombinedValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCombinedValidationContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContextValidationError{ - field: "CombinedValidationContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return CommonTlsContextMultiError(errors) - } - - return nil -} - -// CommonTlsContextMultiError is an error wrapping multiple validation errors -// returned by CommonTlsContext.ValidateAll() if the designated constraints -// aren't met. -type CommonTlsContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CommonTlsContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CommonTlsContextMultiError) AllErrors() []error { return m } - -// CommonTlsContextValidationError is the validation error returned by -// CommonTlsContext.Validate if the designated constraints aren't met. -type CommonTlsContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonTlsContextValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CommonTlsContextValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CommonTlsContextValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CommonTlsContextValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CommonTlsContextValidationError) ErrorName() string { return "CommonTlsContextValidationError" } - -// Error satisfies the builtin error interface -func (e CommonTlsContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonTlsContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonTlsContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonTlsContextValidationError{} - -// Validate checks the field values on -// CommonTlsContext_CombinedCertificateValidationContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// CommonTlsContext_CombinedCertificateValidationContext with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CommonTlsContext_CombinedCertificateValidationContextMultiError, or nil if -// none found. -func (m *CommonTlsContext_CombinedCertificateValidationContext) ValidateAll() error { - return m.validate(true) -} - -func (m *CommonTlsContext_CombinedCertificateValidationContext) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetDefaultValidationContext() == nil { - err := CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "DefaultValidationContext", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetDefaultValidationContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "DefaultValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "DefaultValidationContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDefaultValidationContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "DefaultValidationContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if m.GetValidationContextSdsSecretConfig() == nil { - err := CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CommonTlsContext_CombinedCertificateValidationContextValidationError{ - field: "ValidationContextSdsSecretConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CommonTlsContext_CombinedCertificateValidationContextMultiError(errors) - } - - return nil -} - -// CommonTlsContext_CombinedCertificateValidationContextMultiError is an error -// wrapping multiple validation errors returned by -// CommonTlsContext_CombinedCertificateValidationContext.ValidateAll() if the -// designated constraints aren't met. -type CommonTlsContext_CombinedCertificateValidationContextMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) AllErrors() []error { - return m -} - -// CommonTlsContext_CombinedCertificateValidationContextValidationError is the -// validation error returned by -// CommonTlsContext_CombinedCertificateValidationContext.Validate if the -// designated constraints aren't met. -type CommonTlsContext_CombinedCertificateValidationContextValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Key() bool { - return e.key -} - -// ErrorName returns error name. -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) ErrorName() string { - return "CommonTlsContext_CombinedCertificateValidationContextValidationError" -} - -// Error satisfies the builtin error interface -func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCommonTlsContext_CombinedCertificateValidationContext.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CommonTlsContext_CombinedCertificateValidationContextValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CommonTlsContext_CombinedCertificateValidationContextValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go deleted file mode 100644 index e662a0f8cbcd..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.go +++ /dev/null @@ -1,413 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/cds.proto - -package apiv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -type CdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CdsDummy) Reset() { - *x = CdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CdsDummy) ProtoMessage() {} - -func (x *CdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CdsDummy.ProtoReflect.Descriptor instead. -func (*CdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cds_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_api_v2_cds_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_cds_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x0a, 0x0a, 0x08, 0x43, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xed, 0x02, 0x0a, 0x17, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x60, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, - 0x30, 0x01, 0x12, 0x79, 0x0a, 0x0d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x16, 0x2f, 0x76, - 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x1c, 0x8a, - 0xa4, 0x96, 0xf3, 0x07, 0x16, 0x0a, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x8e, 0x01, 0x0a, 0x1a, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x43, 0x64, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_cds_proto_rawDescOnce sync.Once - file_envoy_api_v2_cds_proto_rawDescData = file_envoy_api_v2_cds_proto_rawDesc -) - -func file_envoy_api_v2_cds_proto_rawDescGZIP() []byte { - file_envoy_api_v2_cds_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_cds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_cds_proto_rawDescData) - }) - return file_envoy_api_v2_cds_proto_rawDescData -} - -var file_envoy_api_v2_cds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_cds_proto_goTypes = []interface{}{ - (*CdsDummy)(nil), // 0: envoy.api.v2.CdsDummy - (*DiscoveryRequest)(nil), // 1: envoy.api.v2.DiscoveryRequest - (*DeltaDiscoveryRequest)(nil), // 2: envoy.api.v2.DeltaDiscoveryRequest - (*DiscoveryResponse)(nil), // 3: envoy.api.v2.DiscoveryResponse - (*DeltaDiscoveryResponse)(nil), // 4: envoy.api.v2.DeltaDiscoveryResponse -} -var file_envoy_api_v2_cds_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.ClusterDiscoveryService.StreamClusters:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 1: envoy.api.v2.ClusterDiscoveryService.DeltaClusters:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 1, // 2: envoy.api.v2.ClusterDiscoveryService.FetchClusters:input_type -> envoy.api.v2.DiscoveryRequest - 3, // 3: envoy.api.v2.ClusterDiscoveryService.StreamClusters:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 4: envoy.api.v2.ClusterDiscoveryService.DeltaClusters:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 3, // 5: envoy.api.v2.ClusterDiscoveryService.FetchClusters:output_type -> envoy.api.v2.DiscoveryResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_cds_proto_init() } -func file_envoy_api_v2_cds_proto_init() { - if File_envoy_api_v2_cds_proto != nil { - return - } - file_envoy_api_v2_discovery_proto_init() - file_envoy_api_v2_cluster_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_cds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_cds_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_api_v2_cds_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_cds_proto_depIdxs, - MessageInfos: file_envoy_api_v2_cds_proto_msgTypes, - }.Build() - File_envoy_api_v2_cds_proto = out.File - file_envoy_api_v2_cds_proto_rawDesc = nil - file_envoy_api_v2_cds_proto_goTypes = nil - file_envoy_api_v2_cds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ClusterDiscoveryServiceClient is the client API for ClusterDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ClusterDiscoveryServiceClient interface { - StreamClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_StreamClustersClient, error) - DeltaClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_DeltaClustersClient, error) - FetchClusters(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) -} - -type clusterDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewClusterDiscoveryServiceClient(cc grpc.ClientConnInterface) ClusterDiscoveryServiceClient { - return &clusterDiscoveryServiceClient{cc} -} - -func (c *clusterDiscoveryServiceClient) StreamClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_StreamClustersClient, error) { - stream, err := c.cc.NewStream(ctx, &_ClusterDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.ClusterDiscoveryService/StreamClusters", opts...) - if err != nil { - return nil, err - } - x := &clusterDiscoveryServiceStreamClustersClient{stream} - return x, nil -} - -type ClusterDiscoveryService_StreamClustersClient interface { - Send(*DiscoveryRequest) error - Recv() (*DiscoveryResponse, error) - grpc.ClientStream -} - -type clusterDiscoveryServiceStreamClustersClient struct { - grpc.ClientStream -} - -func (x *clusterDiscoveryServiceStreamClustersClient) Send(m *DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *clusterDiscoveryServiceStreamClustersClient) Recv() (*DiscoveryResponse, error) { - m := new(DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *clusterDiscoveryServiceClient) DeltaClusters(ctx context.Context, opts ...grpc.CallOption) (ClusterDiscoveryService_DeltaClustersClient, error) { - stream, err := c.cc.NewStream(ctx, &_ClusterDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.ClusterDiscoveryService/DeltaClusters", opts...) - if err != nil { - return nil, err - } - x := &clusterDiscoveryServiceDeltaClustersClient{stream} - return x, nil -} - -type ClusterDiscoveryService_DeltaClustersClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type clusterDiscoveryServiceDeltaClustersClient struct { - grpc.ClientStream -} - -func (x *clusterDiscoveryServiceDeltaClustersClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *clusterDiscoveryServiceDeltaClustersClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *clusterDiscoveryServiceClient) FetchClusters(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { - out := new(DiscoveryResponse) - err := c.cc.Invoke(ctx, "/envoy.api.v2.ClusterDiscoveryService/FetchClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ClusterDiscoveryServiceServer is the server API for ClusterDiscoveryService service. -type ClusterDiscoveryServiceServer interface { - StreamClusters(ClusterDiscoveryService_StreamClustersServer) error - DeltaClusters(ClusterDiscoveryService_DeltaClustersServer) error - FetchClusters(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) -} - -// UnimplementedClusterDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedClusterDiscoveryServiceServer struct { -} - -func (*UnimplementedClusterDiscoveryServiceServer) StreamClusters(ClusterDiscoveryService_StreamClustersServer) error { - return status.Errorf(codes.Unimplemented, "method StreamClusters not implemented") -} -func (*UnimplementedClusterDiscoveryServiceServer) DeltaClusters(ClusterDiscoveryService_DeltaClustersServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaClusters not implemented") -} -func (*UnimplementedClusterDiscoveryServiceServer) FetchClusters(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchClusters not implemented") -} - -func RegisterClusterDiscoveryServiceServer(s *grpc.Server, srv ClusterDiscoveryServiceServer) { - s.RegisterService(&_ClusterDiscoveryService_serviceDesc, srv) -} - -func _ClusterDiscoveryService_StreamClusters_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ClusterDiscoveryServiceServer).StreamClusters(&clusterDiscoveryServiceStreamClustersServer{stream}) -} - -type ClusterDiscoveryService_StreamClustersServer interface { - Send(*DiscoveryResponse) error - Recv() (*DiscoveryRequest, error) - grpc.ServerStream -} - -type clusterDiscoveryServiceStreamClustersServer struct { - grpc.ServerStream -} - -func (x *clusterDiscoveryServiceStreamClustersServer) Send(m *DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *clusterDiscoveryServiceStreamClustersServer) Recv() (*DiscoveryRequest, error) { - m := new(DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ClusterDiscoveryService_DeltaClusters_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ClusterDiscoveryServiceServer).DeltaClusters(&clusterDiscoveryServiceDeltaClustersServer{stream}) -} - -type ClusterDiscoveryService_DeltaClustersServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type clusterDiscoveryServiceDeltaClustersServer struct { - grpc.ServerStream -} - -func (x *clusterDiscoveryServiceDeltaClustersServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *clusterDiscoveryServiceDeltaClustersServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ClusterDiscoveryService_FetchClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterDiscoveryServiceServer).FetchClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.api.v2.ClusterDiscoveryService/FetchClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterDiscoveryServiceServer).FetchClusters(ctx, req.(*DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ClusterDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.api.v2.ClusterDiscoveryService", - HandlerType: (*ClusterDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchClusters", - Handler: _ClusterDiscoveryService_FetchClusters_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamClusters", - Handler: _ClusterDiscoveryService_StreamClusters_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaClusters", - Handler: _ClusterDiscoveryService_DeltaClusters_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/api/v2/cds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go deleted file mode 100644 index 9589430e41f8..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cds.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/cds.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on CdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CdsDummyMultiError, or nil -// if none found. -func (m *CdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *CdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return CdsDummyMultiError(errors) - } - - return nil -} - -// CdsDummyMultiError is an error wrapping multiple validation errors returned -// by CdsDummy.ValidateAll() if the designated constraints aren't met. -type CdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CdsDummyMultiError) AllErrors() []error { return m } - -// CdsDummyValidationError is the validation error returned by -// CdsDummy.Validate if the designated constraints aren't met. -type CdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CdsDummyValidationError) ErrorName() string { return "CdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e CdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go deleted file mode 100644 index 81bf5e0b92ad..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.go +++ /dev/null @@ -1,3364 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/cluster.proto - -package apiv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" - cluster "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _type "github.com/envoyproxy/go-control-plane/envoy/type" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - any1 "github.com/golang/protobuf/ptypes/any" - duration "github.com/golang/protobuf/ptypes/duration" - _struct "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Refer to :ref:`service discovery type ` -// for an explanation on each type. -type Cluster_DiscoveryType int32 - -const ( - // Refer to the :ref:`static discovery type` - // for an explanation. - Cluster_STATIC Cluster_DiscoveryType = 0 - // Refer to the :ref:`strict DNS discovery - // type` - // for an explanation. - Cluster_STRICT_DNS Cluster_DiscoveryType = 1 - // Refer to the :ref:`logical DNS discovery - // type` - // for an explanation. - Cluster_LOGICAL_DNS Cluster_DiscoveryType = 2 - // Refer to the :ref:`service discovery type` - // for an explanation. - Cluster_EDS Cluster_DiscoveryType = 3 - // Refer to the :ref:`original destination discovery - // type` - // for an explanation. - Cluster_ORIGINAL_DST Cluster_DiscoveryType = 4 -) - -// Enum value maps for Cluster_DiscoveryType. -var ( - Cluster_DiscoveryType_name = map[int32]string{ - 0: "STATIC", - 1: "STRICT_DNS", - 2: "LOGICAL_DNS", - 3: "EDS", - 4: "ORIGINAL_DST", - } - Cluster_DiscoveryType_value = map[string]int32{ - "STATIC": 0, - "STRICT_DNS": 1, - "LOGICAL_DNS": 2, - "EDS": 3, - "ORIGINAL_DST": 4, - } -) - -func (x Cluster_DiscoveryType) Enum() *Cluster_DiscoveryType { - p := new(Cluster_DiscoveryType) - *p = x - return p -} - -func (x Cluster_DiscoveryType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_DiscoveryType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_cluster_proto_enumTypes[0].Descriptor() -} - -func (Cluster_DiscoveryType) Type() protoreflect.EnumType { - return &file_envoy_api_v2_cluster_proto_enumTypes[0] -} - -func (x Cluster_DiscoveryType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_DiscoveryType.Descriptor instead. -func (Cluster_DiscoveryType) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 0} -} - -// Refer to :ref:`load balancer type ` architecture -// overview section for information on each type. -type Cluster_LbPolicy int32 - -const ( - // Refer to the :ref:`round robin load balancing - // policy` - // for an explanation. - Cluster_ROUND_ROBIN Cluster_LbPolicy = 0 - // Refer to the :ref:`least request load balancing - // policy` - // for an explanation. - Cluster_LEAST_REQUEST Cluster_LbPolicy = 1 - // Refer to the :ref:`ring hash load balancing - // policy` - // for an explanation. - Cluster_RING_HASH Cluster_LbPolicy = 2 - // Refer to the :ref:`random load balancing - // policy` - // for an explanation. - Cluster_RANDOM Cluster_LbPolicy = 3 - // Refer to the :ref:`original destination load balancing - // policy` - // for an explanation. - // - // .. attention:: - // - // **This load balancing policy is deprecated**. Use CLUSTER_PROVIDED instead. - // - // - // Deprecated: Do not use. - Cluster_ORIGINAL_DST_LB Cluster_LbPolicy = 4 - // Refer to the :ref:`Maglev load balancing policy` - // for an explanation. - Cluster_MAGLEV Cluster_LbPolicy = 5 - // This load balancer type must be specified if the configured cluster provides a cluster - // specific load balancer. Consult the configured cluster's documentation for whether to set - // this option or not. - Cluster_CLUSTER_PROVIDED Cluster_LbPolicy = 6 - // [#not-implemented-hide:] Use the new :ref:`load_balancing_policy - // ` field to determine the LB policy. - // [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field - // and instead using the new load_balancing_policy field as the one and only mechanism for - // configuring this.] - Cluster_LOAD_BALANCING_POLICY_CONFIG Cluster_LbPolicy = 7 -) - -// Enum value maps for Cluster_LbPolicy. -var ( - Cluster_LbPolicy_name = map[int32]string{ - 0: "ROUND_ROBIN", - 1: "LEAST_REQUEST", - 2: "RING_HASH", - 3: "RANDOM", - 4: "ORIGINAL_DST_LB", - 5: "MAGLEV", - 6: "CLUSTER_PROVIDED", - 7: "LOAD_BALANCING_POLICY_CONFIG", - } - Cluster_LbPolicy_value = map[string]int32{ - "ROUND_ROBIN": 0, - "LEAST_REQUEST": 1, - "RING_HASH": 2, - "RANDOM": 3, - "ORIGINAL_DST_LB": 4, - "MAGLEV": 5, - "CLUSTER_PROVIDED": 6, - "LOAD_BALANCING_POLICY_CONFIG": 7, - } -) - -func (x Cluster_LbPolicy) Enum() *Cluster_LbPolicy { - p := new(Cluster_LbPolicy) - *p = x - return p -} - -func (x Cluster_LbPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_LbPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_cluster_proto_enumTypes[1].Descriptor() -} - -func (Cluster_LbPolicy) Type() protoreflect.EnumType { - return &file_envoy_api_v2_cluster_proto_enumTypes[1] -} - -func (x Cluster_LbPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_LbPolicy.Descriptor instead. -func (Cluster_LbPolicy) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 1} -} - -// When V4_ONLY is selected, the DNS resolver will only perform a lookup for -// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will -// only perform a lookup for addresses in the IPv6 family. If AUTO is -// specified, the DNS resolver will first perform a lookup for addresses in -// the IPv6 family and fallback to a lookup for addresses in the IPv4 family. -// For cluster types other than -// :ref:`STRICT_DNS` and -// :ref:`LOGICAL_DNS`, -// this setting is -// ignored. -type Cluster_DnsLookupFamily int32 - -const ( - Cluster_AUTO Cluster_DnsLookupFamily = 0 - Cluster_V4_ONLY Cluster_DnsLookupFamily = 1 - Cluster_V6_ONLY Cluster_DnsLookupFamily = 2 -) - -// Enum value maps for Cluster_DnsLookupFamily. -var ( - Cluster_DnsLookupFamily_name = map[int32]string{ - 0: "AUTO", - 1: "V4_ONLY", - 2: "V6_ONLY", - } - Cluster_DnsLookupFamily_value = map[string]int32{ - "AUTO": 0, - "V4_ONLY": 1, - "V6_ONLY": 2, - } -) - -func (x Cluster_DnsLookupFamily) Enum() *Cluster_DnsLookupFamily { - p := new(Cluster_DnsLookupFamily) - *p = x - return p -} - -func (x Cluster_DnsLookupFamily) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_DnsLookupFamily) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_cluster_proto_enumTypes[2].Descriptor() -} - -func (Cluster_DnsLookupFamily) Type() protoreflect.EnumType { - return &file_envoy_api_v2_cluster_proto_enumTypes[2] -} - -func (x Cluster_DnsLookupFamily) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_DnsLookupFamily.Descriptor instead. -func (Cluster_DnsLookupFamily) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 2} -} - -type Cluster_ClusterProtocolSelection int32 - -const ( - // Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2). - // If :ref:`http2_protocol_options ` are - // present, HTTP2 will be used, otherwise HTTP1.1 will be used. - Cluster_USE_CONFIGURED_PROTOCOL Cluster_ClusterProtocolSelection = 0 - // Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection. - Cluster_USE_DOWNSTREAM_PROTOCOL Cluster_ClusterProtocolSelection = 1 -) - -// Enum value maps for Cluster_ClusterProtocolSelection. -var ( - Cluster_ClusterProtocolSelection_name = map[int32]string{ - 0: "USE_CONFIGURED_PROTOCOL", - 1: "USE_DOWNSTREAM_PROTOCOL", - } - Cluster_ClusterProtocolSelection_value = map[string]int32{ - "USE_CONFIGURED_PROTOCOL": 0, - "USE_DOWNSTREAM_PROTOCOL": 1, - } -) - -func (x Cluster_ClusterProtocolSelection) Enum() *Cluster_ClusterProtocolSelection { - p := new(Cluster_ClusterProtocolSelection) - *p = x - return p -} - -func (x Cluster_ClusterProtocolSelection) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_ClusterProtocolSelection) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_cluster_proto_enumTypes[3].Descriptor() -} - -func (Cluster_ClusterProtocolSelection) Type() protoreflect.EnumType { - return &file_envoy_api_v2_cluster_proto_enumTypes[3] -} - -func (x Cluster_ClusterProtocolSelection) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_ClusterProtocolSelection.Descriptor instead. -func (Cluster_ClusterProtocolSelection) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 3} -} - -// If NO_FALLBACK is selected, a result -// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected, -// any cluster endpoint may be returned (subject to policy, health checks, -// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the -// endpoints matching the values from the default_subset field. -type Cluster_LbSubsetConfig_LbSubsetFallbackPolicy int32 - -const ( - Cluster_LbSubsetConfig_NO_FALLBACK Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 0 - Cluster_LbSubsetConfig_ANY_ENDPOINT Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 1 - Cluster_LbSubsetConfig_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetFallbackPolicy = 2 -) - -// Enum value maps for Cluster_LbSubsetConfig_LbSubsetFallbackPolicy. -var ( - Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name = map[int32]string{ - 0: "NO_FALLBACK", - 1: "ANY_ENDPOINT", - 2: "DEFAULT_SUBSET", - } - Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_value = map[string]int32{ - "NO_FALLBACK": 0, - "ANY_ENDPOINT": 1, - "DEFAULT_SUBSET": 2, - } -) - -func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Enum() *Cluster_LbSubsetConfig_LbSubsetFallbackPolicy { - p := new(Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) - *p = x - return p -} - -func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_cluster_proto_enumTypes[4].Descriptor() -} - -func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Type() protoreflect.EnumType { - return &file_envoy_api_v2_cluster_proto_enumTypes[4] -} - -func (x Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig_LbSubsetFallbackPolicy.Descriptor instead. -func (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 3, 0} -} - -// Allows to override top level fallback policy per selector. -type Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy int32 - -const ( - // If NOT_DEFINED top level config fallback policy is used instead. - Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 0 - // If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. - Cluster_LbSubsetConfig_LbSubsetSelector_NO_FALLBACK Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 1 - // If ANY_ENDPOINT is selected, any cluster endpoint may be returned - // (subject to policy, health checks, etc). - Cluster_LbSubsetConfig_LbSubsetSelector_ANY_ENDPOINT Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 2 - // If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 3 - // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata - // keys reduced to - // :ref:`fallback_keys_subset`. - // It allows for a fallback to a different, less specific selector if some of the keys of - // the selector are considered optional. - Cluster_LbSubsetConfig_LbSubsetSelector_KEYS_SUBSET Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy = 4 -) - -// Enum value maps for Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy. -var ( - Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name = map[int32]string{ - 0: "NOT_DEFINED", - 1: "NO_FALLBACK", - 2: "ANY_ENDPOINT", - 3: "DEFAULT_SUBSET", - 4: "KEYS_SUBSET", - } - Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_value = map[string]int32{ - "NOT_DEFINED": 0, - "NO_FALLBACK": 1, - "ANY_ENDPOINT": 2, - "DEFAULT_SUBSET": 3, - "KEYS_SUBSET": 4, - } -) - -func (x Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) Enum() *Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy { - p := new(Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) - *p = x - return p -} - -func (x Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_cluster_proto_enumTypes[5].Descriptor() -} - -func (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) Type() protoreflect.EnumType { - return &file_envoy_api_v2_cluster_proto_enumTypes[5] -} - -func (x Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy.Descriptor instead. -func (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 3, 0, 0} -} - -// The hash function used to hash hosts onto the ketama ring. -type Cluster_RingHashLbConfig_HashFunction int32 - -const ( - // Use `xxHash `_, this is the default hash function. - Cluster_RingHashLbConfig_XX_HASH Cluster_RingHashLbConfig_HashFunction = 0 - // Use `MurmurHash2 `_, this is compatible with - // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled - // on Linux and not macOS. - Cluster_RingHashLbConfig_MURMUR_HASH_2 Cluster_RingHashLbConfig_HashFunction = 1 -) - -// Enum value maps for Cluster_RingHashLbConfig_HashFunction. -var ( - Cluster_RingHashLbConfig_HashFunction_name = map[int32]string{ - 0: "XX_HASH", - 1: "MURMUR_HASH_2", - } - Cluster_RingHashLbConfig_HashFunction_value = map[string]int32{ - "XX_HASH": 0, - "MURMUR_HASH_2": 1, - } -) - -func (x Cluster_RingHashLbConfig_HashFunction) Enum() *Cluster_RingHashLbConfig_HashFunction { - p := new(Cluster_RingHashLbConfig_HashFunction) - *p = x - return p -} - -func (x Cluster_RingHashLbConfig_HashFunction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Cluster_RingHashLbConfig_HashFunction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_cluster_proto_enumTypes[6].Descriptor() -} - -func (Cluster_RingHashLbConfig_HashFunction) Type() protoreflect.EnumType { - return &file_envoy_api_v2_cluster_proto_enumTypes[6] -} - -func (x Cluster_RingHashLbConfig_HashFunction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Cluster_RingHashLbConfig_HashFunction.Descriptor instead. -func (Cluster_RingHashLbConfig_HashFunction) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 5, 0} -} - -// Configuration for a single upstream cluster. -// [#next-free-field: 48] -type Cluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration to use different transport sockets for different endpoints. - // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` - // is used to match against the transport sockets as they appear in the list. The first - // :ref:`match ` is used. - // For example, with the following match - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "enableMTLS" - // match: - // acceptMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - name: "defaultToPlaintext" - // match: {} - // transport_socket: - // name: envoy.transport_sockets.raw_buffer - // - // Connections to the endpoints whose metadata value under *envoy.transport_socket_match* - // having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. - // - // If a :ref:`socket match ` with empty match - // criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" - // socket match in case above. - // - // If an endpoint metadata's value under *envoy.transport_socket_match* does not match any - // *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or - // *transport_socket* specified in this cluster. - // - // This field allows gradual and flexible transport socket configuration changes. - // - // The metadata of endpoints in EDS can indicate transport socket capabilities. For example, - // an endpoint's metadata can have two key value pairs as "acceptMTLS": "true", - // "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic - // has "acceptPlaintext": "true" metadata information. - // - // Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS - // traffic for endpoints with "acceptMTLS": "true", by adding a corresponding - // *TransportSocketMatch* in this field. Other client Envoys receive CDS without - // *transport_socket_match* set, and still send plain text traffic to the same cluster. - // - // [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] - TransportSocketMatches []*Cluster_TransportSocketMatch `protobuf:"bytes,43,rep,name=transport_socket_matches,json=transportSocketMatches,proto3" json:"transport_socket_matches,omitempty"` - // Supplies the name of the cluster which must be unique across all clusters. - // The cluster name is used when emitting - // :ref:`statistics ` if :ref:`alt_stat_name - // ` is not provided. - // Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An optional alternative to the cluster name to be used while emitting stats. - // Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be - // confused with :ref:`Router Filter Header - // `. - AltStatName string `protobuf:"bytes,28,opt,name=alt_stat_name,json=altStatName,proto3" json:"alt_stat_name,omitempty"` - // Types that are assignable to ClusterDiscoveryType: - // *Cluster_Type - // *Cluster_ClusterType - ClusterDiscoveryType isCluster_ClusterDiscoveryType `protobuf_oneof:"cluster_discovery_type"` - // Configuration to use for EDS updates for the Cluster. - EdsClusterConfig *Cluster_EdsClusterConfig `protobuf:"bytes,3,opt,name=eds_cluster_config,json=edsClusterConfig,proto3" json:"eds_cluster_config,omitempty"` - // The timeout for new network connections to hosts in the cluster. - ConnectTimeout *duration.Duration `protobuf:"bytes,4,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` - // Soft limit on size of the cluster’s connections read and write buffers. If - // unspecified, an implementation defined default is applied (1MiB). - PerConnectionBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes,proto3" json:"per_connection_buffer_limit_bytes,omitempty"` - // The :ref:`load balancer type ` to use - // when picking a host in the cluster. - LbPolicy Cluster_LbPolicy `protobuf:"varint,6,opt,name=lb_policy,json=lbPolicy,proto3,enum=envoy.api.v2.Cluster_LbPolicy" json:"lb_policy,omitempty"` - // If the service discovery type is - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS`, - // then hosts is required. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`load_assignment` field instead. - // - // - // Deprecated: Do not use. - Hosts []*core.Address `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"` - // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. - // This field supersedes the *hosts* field in the v2 API. - // - // .. attention:: - // - // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. - // - LoadAssignment *ClusterLoadAssignment `protobuf:"bytes,33,opt,name=load_assignment,json=loadAssignment,proto3" json:"load_assignment,omitempty"` - // Optional :ref:`active health checking ` - // configuration for the cluster. If no - // configuration is specified no health checking will be done and all cluster - // members will be considered healthy at all times. - HealthChecks []*core.HealthCheck `protobuf:"bytes,8,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` - // Optional maximum requests for a single upstream connection. This parameter - // is respected by both the HTTP/1.1 and HTTP/2 connection pool - // implementations. If not specified, there is no limit. Setting this - // parameter to 1 will effectively disable keep alive. - MaxRequestsPerConnection *wrappers.UInt32Value `protobuf:"bytes,9,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` - // Optional :ref:`circuit breaking ` for the cluster. - CircuitBreakers *cluster.CircuitBreakers `protobuf:"bytes,10,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` - // The TLS configuration for connections to the upstream cluster. - // - // .. attention:: - // - // **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are - // set, `transport_socket` takes priority. - // - // Deprecated: Do not use. - TlsContext *auth.UpstreamTlsContext `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` - // HTTP protocol options that are applied only to upstream HTTP connections. - // These options apply to all HTTP versions. - UpstreamHttpProtocolOptions *core.UpstreamHttpProtocolOptions `protobuf:"bytes,46,opt,name=upstream_http_protocol_options,json=upstreamHttpProtocolOptions,proto3" json:"upstream_http_protocol_options,omitempty"` - // Additional options when handling HTTP requests upstream. These options will be applicable to - // both HTTP1 and HTTP2 requests. - CommonHttpProtocolOptions *core.HttpProtocolOptions `protobuf:"bytes,29,opt,name=common_http_protocol_options,json=commonHttpProtocolOptions,proto3" json:"common_http_protocol_options,omitempty"` - // Additional options when handling HTTP1 requests. - HttpProtocolOptions *core.Http1ProtocolOptions `protobuf:"bytes,13,opt,name=http_protocol_options,json=httpProtocolOptions,proto3" json:"http_protocol_options,omitempty"` - // Even if default HTTP2 protocol options are desired, this field must be - // set so that Envoy will assume that the upstream supports HTTP/2 when - // making new HTTP connection pool connections. Currently, Envoy only - // supports prior knowledge for upstream connections. Even if TLS is used - // with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 - // connections to happen over plain text. - Http2ProtocolOptions *core.Http2ProtocolOptions `protobuf:"bytes,14,opt,name=http2_protocol_options,json=http2ProtocolOptions,proto3" json:"http2_protocol_options,omitempty"` - // The extension_protocol_options field is used to provide extension-specific protocol options - // for upstream connections. The key should match the extension filter name, such as - // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on - // specific options. - // - // Deprecated: Do not use. - ExtensionProtocolOptions map[string]*_struct.Struct `protobuf:"bytes,35,rep,name=extension_protocol_options,json=extensionProtocolOptions,proto3" json:"extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The extension_protocol_options field is used to provide extension-specific protocol options - // for upstream connections. The key should match the extension filter name, such as - // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on - // specific options. - TypedExtensionProtocolOptions map[string]*any1.Any `protobuf:"bytes,36,rep,name=typed_extension_protocol_options,json=typedExtensionProtocolOptions,proto3" json:"typed_extension_protocol_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // If the DNS refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used as the cluster’s DNS refresh - // rate. The value configured must be at least 1ms. If this setting is not specified, the - // value defaults to 5000ms. For cluster types other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - DnsRefreshRate *duration.Duration `protobuf:"bytes,16,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"` - // If the DNS failure refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types - // other than :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS` this setting is - // ignored. - DnsFailureRefreshRate *Cluster_RefreshRate `protobuf:"bytes,44,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"` - // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, - // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS - // resolution. - RespectDnsTtl bool `protobuf:"varint,39,opt,name=respect_dns_ttl,json=respectDnsTtl,proto3" json:"respect_dns_ttl,omitempty"` - // The DNS IP address resolution policy. If this setting is not specified, the - // value defaults to - // :ref:`AUTO`. - DnsLookupFamily Cluster_DnsLookupFamily `protobuf:"varint,17,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.api.v2.Cluster_DnsLookupFamily" json:"dns_lookup_family,omitempty"` - // If DNS resolvers are specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used to specify the cluster’s dns resolvers. - // If this setting is not specified, the value defaults to the default - // resolver, which uses /etc/resolv.conf for configuration. For cluster types - // other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple's API only allows overriding DNS resolvers via system settings. - DnsResolvers []*core.Address `protobuf:"bytes,18,rep,name=dns_resolvers,json=dnsResolvers,proto3" json:"dns_resolvers,omitempty"` - // [#next-major-version: Reconcile DNS options in a single message.] - // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - UseTcpForDnsLookups bool `protobuf:"varint,45,opt,name=use_tcp_for_dns_lookups,json=useTcpForDnsLookups,proto3" json:"use_tcp_for_dns_lookups,omitempty"` - // If specified, outlier detection will be enabled for this upstream cluster. - // Each of the configuration values can be overridden via - // :ref:`runtime values `. - OutlierDetection *cluster.OutlierDetection `protobuf:"bytes,19,opt,name=outlier_detection,json=outlierDetection,proto3" json:"outlier_detection,omitempty"` - // The interval for removing stale hosts from a cluster type - // :ref:`ORIGINAL_DST`. - // Hosts are considered stale if they have not been used - // as upstream destinations during this interval. New hosts are added - // to original destination clusters on demand as new connections are - // redirected to Envoy, causing the number of hosts in the cluster to - // grow over time. Hosts that are not stale (they are actively used as - // destinations) are kept in the cluster, which allows connections to - // them remain open, saving the latency that would otherwise be spent - // on opening new connections. If this setting is not specified, the - // value defaults to 5000ms. For cluster types other than - // :ref:`ORIGINAL_DST` - // this setting is ignored. - CleanupInterval *duration.Duration `protobuf:"bytes,20,opt,name=cleanup_interval,json=cleanupInterval,proto3" json:"cleanup_interval,omitempty"` - // Optional configuration used to bind newly established upstream connections. - // This overrides any bind_config specified in the bootstrap proto. - // If the address and port are empty, no bind will be performed. - UpstreamBindConfig *core.BindConfig `protobuf:"bytes,21,opt,name=upstream_bind_config,json=upstreamBindConfig,proto3" json:"upstream_bind_config,omitempty"` - // Configuration for load balancing subsetting. - LbSubsetConfig *Cluster_LbSubsetConfig `protobuf:"bytes,22,opt,name=lb_subset_config,json=lbSubsetConfig,proto3" json:"lb_subset_config,omitempty"` - // Optional configuration for the load balancing algorithm selected by - // LbPolicy. Currently only - // :ref:`RING_HASH` and - // :ref:`LEAST_REQUEST` - // has additional configuration options. - // Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding - // LbPolicy will generate an error at runtime. - // - // Types that are assignable to LbConfig: - // *Cluster_RingHashLbConfig_ - // *Cluster_OriginalDstLbConfig_ - // *Cluster_LeastRequestLbConfig_ - LbConfig isCluster_LbConfig `protobuf_oneof:"lb_config"` - // Common configuration for all load balancer implementations. - CommonLbConfig *Cluster_CommonLbConfig `protobuf:"bytes,27,opt,name=common_lb_config,json=commonLbConfig,proto3" json:"common_lb_config,omitempty"` - // Optional custom transport socket implementation to use for upstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`UpstreamTlsContexts ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - TransportSocket *core.TransportSocket `protobuf:"bytes,24,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` - // The Metadata field can be used to provide additional information about the - // cluster. It can be used for stats, logging, and varying filter behavior. - // Fields should use reverse DNS notation to denote which entity within Envoy - // will need the information. For instance, if the metadata is intended for - // the Router filter, the filter name should be specified as *envoy.filters.http.router*. - Metadata *core.Metadata `protobuf:"bytes,25,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Determines how Envoy selects the protocol used to speak to upstream hosts. - ProtocolSelection Cluster_ClusterProtocolSelection `protobuf:"varint,26,opt,name=protocol_selection,json=protocolSelection,proto3,enum=envoy.api.v2.Cluster_ClusterProtocolSelection" json:"protocol_selection,omitempty"` - // Optional options for upstream connections. - UpstreamConnectionOptions *UpstreamConnectionOptions `protobuf:"bytes,30,opt,name=upstream_connection_options,json=upstreamConnectionOptions,proto3" json:"upstream_connection_options,omitempty"` - // If an upstream host becomes unhealthy (as determined by the configured health checks - // or outlier detection), immediately close all connections to the failed host. - // - // .. note:: - // - // This is currently only supported for connections created by tcp_proxy. - // - // .. note:: - // - // The current implementation of this feature closes all connections immediately when - // the unhealthy status is detected. If there are a large number of connections open - // to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of - // time exclusively closing these connections, and not processing any other traffic. - CloseConnectionsOnHostHealthFailure bool `protobuf:"varint,31,opt,name=close_connections_on_host_health_failure,json=closeConnectionsOnHostHealthFailure,proto3" json:"close_connections_on_host_health_failure,omitempty"` - // If set to true, Envoy will ignore the health value of a host when processing its removal - // from service discovery. This means that if active health checking is used, Envoy will *not* - // wait for the endpoint to go unhealthy before removing it. - DrainConnectionsOnHostRemoval bool `protobuf:"varint,32,opt,name=drain_connections_on_host_removal,json=drainConnectionsOnHostRemoval,proto3" json:"drain_connections_on_host_removal,omitempty"` - // An (optional) network filter chain, listed in the order the filters should be applied. - // The chain will be applied to all outgoing connections that Envoy makes to the upstream - // servers of this cluster. - Filters []*cluster.Filter `protobuf:"bytes,40,rep,name=filters,proto3" json:"filters,omitempty"` - // [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the - // :ref:`lb_policy` field has the value - // :ref:`LOAD_BALANCING_POLICY_CONFIG`. - LoadBalancingPolicy *LoadBalancingPolicy `protobuf:"bytes,41,opt,name=load_balancing_policy,json=loadBalancingPolicy,proto3" json:"load_balancing_policy,omitempty"` - // [#not-implemented-hide:] - // If present, tells the client where to send load reports via LRS. If not present, the - // client will fall back to a client-side default, which may be either (a) don't send any - // load reports or (b) send load reports for all clusters to a single default server - // (which may be configured in the bootstrap file). - // - // Note that if multiple clusters point to the same LRS server, the client may choose to - // create a separate stream for each cluster or it may choose to coalesce the data for - // multiple clusters onto a single stream. Either way, the client must make sure to send - // the data for any given cluster on no more than one stream. - // - // [#next-major-version: In the v3 API, we should consider restructuring this somehow, - // maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation - // from the LRS stream here.] - LrsServer *core.ConfigSource `protobuf:"bytes,42,opt,name=lrs_server,json=lrsServer,proto3" json:"lrs_server,omitempty"` - // If track_timeout_budgets is true, the :ref:`timeout budget histograms - // ` will be published for each - // request. These show what percentage of a request's per try and global timeout was used. A value - // of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value - // of 100 would indicate that the request took the entirety of the timeout given to it. - TrackTimeoutBudgets bool `protobuf:"varint,47,opt,name=track_timeout_budgets,json=trackTimeoutBudgets,proto3" json:"track_timeout_budgets,omitempty"` -} - -func (x *Cluster) Reset() { - *x = Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster) ProtoMessage() {} - -func (x *Cluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster.ProtoReflect.Descriptor instead. -func (*Cluster) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0} -} - -func (x *Cluster) GetTransportSocketMatches() []*Cluster_TransportSocketMatch { - if x != nil { - return x.TransportSocketMatches - } - return nil -} - -func (x *Cluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Cluster) GetAltStatName() string { - if x != nil { - return x.AltStatName - } - return "" -} - -func (m *Cluster) GetClusterDiscoveryType() isCluster_ClusterDiscoveryType { - if m != nil { - return m.ClusterDiscoveryType - } - return nil -} - -func (x *Cluster) GetType() Cluster_DiscoveryType { - if x, ok := x.GetClusterDiscoveryType().(*Cluster_Type); ok { - return x.Type - } - return Cluster_STATIC -} - -func (x *Cluster) GetClusterType() *Cluster_CustomClusterType { - if x, ok := x.GetClusterDiscoveryType().(*Cluster_ClusterType); ok { - return x.ClusterType - } - return nil -} - -func (x *Cluster) GetEdsClusterConfig() *Cluster_EdsClusterConfig { - if x != nil { - return x.EdsClusterConfig - } - return nil -} - -func (x *Cluster) GetConnectTimeout() *duration.Duration { - if x != nil { - return x.ConnectTimeout - } - return nil -} - -func (x *Cluster) GetPerConnectionBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerConnectionBufferLimitBytes - } - return nil -} - -func (x *Cluster) GetLbPolicy() Cluster_LbPolicy { - if x != nil { - return x.LbPolicy - } - return Cluster_ROUND_ROBIN -} - -// Deprecated: Do not use. -func (x *Cluster) GetHosts() []*core.Address { - if x != nil { - return x.Hosts - } - return nil -} - -func (x *Cluster) GetLoadAssignment() *ClusterLoadAssignment { - if x != nil { - return x.LoadAssignment - } - return nil -} - -func (x *Cluster) GetHealthChecks() []*core.HealthCheck { - if x != nil { - return x.HealthChecks - } - return nil -} - -func (x *Cluster) GetMaxRequestsPerConnection() *wrappers.UInt32Value { - if x != nil { - return x.MaxRequestsPerConnection - } - return nil -} - -func (x *Cluster) GetCircuitBreakers() *cluster.CircuitBreakers { - if x != nil { - return x.CircuitBreakers - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetTlsContext() *auth.UpstreamTlsContext { - if x != nil { - return x.TlsContext - } - return nil -} - -func (x *Cluster) GetUpstreamHttpProtocolOptions() *core.UpstreamHttpProtocolOptions { - if x != nil { - return x.UpstreamHttpProtocolOptions - } - return nil -} - -func (x *Cluster) GetCommonHttpProtocolOptions() *core.HttpProtocolOptions { - if x != nil { - return x.CommonHttpProtocolOptions - } - return nil -} - -func (x *Cluster) GetHttpProtocolOptions() *core.Http1ProtocolOptions { - if x != nil { - return x.HttpProtocolOptions - } - return nil -} - -func (x *Cluster) GetHttp2ProtocolOptions() *core.Http2ProtocolOptions { - if x != nil { - return x.Http2ProtocolOptions - } - return nil -} - -// Deprecated: Do not use. -func (x *Cluster) GetExtensionProtocolOptions() map[string]*_struct.Struct { - if x != nil { - return x.ExtensionProtocolOptions - } - return nil -} - -func (x *Cluster) GetTypedExtensionProtocolOptions() map[string]*any1.Any { - if x != nil { - return x.TypedExtensionProtocolOptions - } - return nil -} - -func (x *Cluster) GetDnsRefreshRate() *duration.Duration { - if x != nil { - return x.DnsRefreshRate - } - return nil -} - -func (x *Cluster) GetDnsFailureRefreshRate() *Cluster_RefreshRate { - if x != nil { - return x.DnsFailureRefreshRate - } - return nil -} - -func (x *Cluster) GetRespectDnsTtl() bool { - if x != nil { - return x.RespectDnsTtl - } - return false -} - -func (x *Cluster) GetDnsLookupFamily() Cluster_DnsLookupFamily { - if x != nil { - return x.DnsLookupFamily - } - return Cluster_AUTO -} - -func (x *Cluster) GetDnsResolvers() []*core.Address { - if x != nil { - return x.DnsResolvers - } - return nil -} - -func (x *Cluster) GetUseTcpForDnsLookups() bool { - if x != nil { - return x.UseTcpForDnsLookups - } - return false -} - -func (x *Cluster) GetOutlierDetection() *cluster.OutlierDetection { - if x != nil { - return x.OutlierDetection - } - return nil -} - -func (x *Cluster) GetCleanupInterval() *duration.Duration { - if x != nil { - return x.CleanupInterval - } - return nil -} - -func (x *Cluster) GetUpstreamBindConfig() *core.BindConfig { - if x != nil { - return x.UpstreamBindConfig - } - return nil -} - -func (x *Cluster) GetLbSubsetConfig() *Cluster_LbSubsetConfig { - if x != nil { - return x.LbSubsetConfig - } - return nil -} - -func (m *Cluster) GetLbConfig() isCluster_LbConfig { - if m != nil { - return m.LbConfig - } - return nil -} - -func (x *Cluster) GetRingHashLbConfig() *Cluster_RingHashLbConfig { - if x, ok := x.GetLbConfig().(*Cluster_RingHashLbConfig_); ok { - return x.RingHashLbConfig - } - return nil -} - -func (x *Cluster) GetOriginalDstLbConfig() *Cluster_OriginalDstLbConfig { - if x, ok := x.GetLbConfig().(*Cluster_OriginalDstLbConfig_); ok { - return x.OriginalDstLbConfig - } - return nil -} - -func (x *Cluster) GetLeastRequestLbConfig() *Cluster_LeastRequestLbConfig { - if x, ok := x.GetLbConfig().(*Cluster_LeastRequestLbConfig_); ok { - return x.LeastRequestLbConfig - } - return nil -} - -func (x *Cluster) GetCommonLbConfig() *Cluster_CommonLbConfig { - if x != nil { - return x.CommonLbConfig - } - return nil -} - -func (x *Cluster) GetTransportSocket() *core.TransportSocket { - if x != nil { - return x.TransportSocket - } - return nil -} - -func (x *Cluster) GetMetadata() *core.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Cluster) GetProtocolSelection() Cluster_ClusterProtocolSelection { - if x != nil { - return x.ProtocolSelection - } - return Cluster_USE_CONFIGURED_PROTOCOL -} - -func (x *Cluster) GetUpstreamConnectionOptions() *UpstreamConnectionOptions { - if x != nil { - return x.UpstreamConnectionOptions - } - return nil -} - -func (x *Cluster) GetCloseConnectionsOnHostHealthFailure() bool { - if x != nil { - return x.CloseConnectionsOnHostHealthFailure - } - return false -} - -func (x *Cluster) GetDrainConnectionsOnHostRemoval() bool { - if x != nil { - return x.DrainConnectionsOnHostRemoval - } - return false -} - -func (x *Cluster) GetFilters() []*cluster.Filter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *Cluster) GetLoadBalancingPolicy() *LoadBalancingPolicy { - if x != nil { - return x.LoadBalancingPolicy - } - return nil -} - -func (x *Cluster) GetLrsServer() *core.ConfigSource { - if x != nil { - return x.LrsServer - } - return nil -} - -func (x *Cluster) GetTrackTimeoutBudgets() bool { - if x != nil { - return x.TrackTimeoutBudgets - } - return false -} - -type isCluster_ClusterDiscoveryType interface { - isCluster_ClusterDiscoveryType() -} - -type Cluster_Type struct { - // The :ref:`service discovery type ` - // to use for resolving the cluster. - Type Cluster_DiscoveryType `protobuf:"varint,2,opt,name=type,proto3,enum=envoy.api.v2.Cluster_DiscoveryType,oneof"` -} - -type Cluster_ClusterType struct { - // The custom cluster type. - ClusterType *Cluster_CustomClusterType `protobuf:"bytes,38,opt,name=cluster_type,json=clusterType,proto3,oneof"` -} - -func (*Cluster_Type) isCluster_ClusterDiscoveryType() {} - -func (*Cluster_ClusterType) isCluster_ClusterDiscoveryType() {} - -type isCluster_LbConfig interface { - isCluster_LbConfig() -} - -type Cluster_RingHashLbConfig_ struct { - // Optional configuration for the Ring Hash load balancing policy. - RingHashLbConfig *Cluster_RingHashLbConfig `protobuf:"bytes,23,opt,name=ring_hash_lb_config,json=ringHashLbConfig,proto3,oneof"` -} - -type Cluster_OriginalDstLbConfig_ struct { - // Optional configuration for the Original Destination load balancing policy. - OriginalDstLbConfig *Cluster_OriginalDstLbConfig `protobuf:"bytes,34,opt,name=original_dst_lb_config,json=originalDstLbConfig,proto3,oneof"` -} - -type Cluster_LeastRequestLbConfig_ struct { - // Optional configuration for the LeastRequest load balancing policy. - LeastRequestLbConfig *Cluster_LeastRequestLbConfig `protobuf:"bytes,37,opt,name=least_request_lb_config,json=leastRequestLbConfig,proto3,oneof"` -} - -func (*Cluster_RingHashLbConfig_) isCluster_LbConfig() {} - -func (*Cluster_OriginalDstLbConfig_) isCluster_LbConfig() {} - -func (*Cluster_LeastRequestLbConfig_) isCluster_LbConfig() {} - -// [#not-implemented-hide:] Extensible load balancing policy configuration. -// -// Every LB policy defined via this mechanism will be identified via a unique name using reverse -// DNS notation. If the policy needs configuration parameters, it must define a message for its -// own configuration, which will be stored in the config field. The name of the policy will tell -// clients which type of message they should expect to see in the config field. -// -// Note that there are cases where it is useful to be able to independently select LB policies -// for choosing a locality and for choosing an endpoint within that locality. For example, a -// given deployment may always use the same policy to choose the locality, but for choosing the -// endpoint within the locality, some clusters may use weighted-round-robin, while others may -// use some sort of session-based balancing. -// -// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a -// child LB policy for each locality. For each request, the parent chooses the locality and then -// delegates to the child policy for that locality to choose the endpoint within the locality. -// -// To facilitate this, the config message for the top-level LB policy may include a field of -// type LoadBalancingPolicy that specifies the child policy. -type LoadBalancingPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Each client will iterate over the list in order and stop at the first policy that it - // supports. This provides a mechanism for starting to use new LB policies that are not yet - // supported by all clients. - Policies []*LoadBalancingPolicy_Policy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` -} - -func (x *LoadBalancingPolicy) Reset() { - *x = LoadBalancingPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadBalancingPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadBalancingPolicy) ProtoMessage() {} - -func (x *LoadBalancingPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadBalancingPolicy.ProtoReflect.Descriptor instead. -func (*LoadBalancingPolicy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{1} -} - -func (x *LoadBalancingPolicy) GetPolicies() []*LoadBalancingPolicy_Policy { - if x != nil { - return x.Policies - } - return nil -} - -// An extensible structure containing the address Envoy should bind to when -// establishing upstream connections. -type UpstreamBindConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address Envoy should bind to when establishing upstream connections. - SourceAddress *core.Address `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` -} - -func (x *UpstreamBindConfig) Reset() { - *x = UpstreamBindConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamBindConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamBindConfig) ProtoMessage() {} - -func (x *UpstreamBindConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamBindConfig.ProtoReflect.Descriptor instead. -func (*UpstreamBindConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{2} -} - -func (x *UpstreamBindConfig) GetSourceAddress() *core.Address { - if x != nil { - return x.SourceAddress - } - return nil -} - -type UpstreamConnectionOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - TcpKeepalive *core.TcpKeepalive `protobuf:"bytes,1,opt,name=tcp_keepalive,json=tcpKeepalive,proto3" json:"tcp_keepalive,omitempty"` -} - -func (x *UpstreamConnectionOptions) Reset() { - *x = UpstreamConnectionOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamConnectionOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamConnectionOptions) ProtoMessage() {} - -func (x *UpstreamConnectionOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamConnectionOptions.ProtoReflect.Descriptor instead. -func (*UpstreamConnectionOptions) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{3} -} - -func (x *UpstreamConnectionOptions) GetTcpKeepalive() *core.TcpKeepalive { - if x != nil { - return x.TcpKeepalive - } - return nil -} - -// TransportSocketMatch specifies what transport socket config will be used -// when the match conditions are satisfied. -type Cluster_TransportSocketMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the match, used in stats generation. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional endpoint metadata match criteria. - // The connection to the endpoint with metadata matching what is set in this field - // will use the transport socket configuration specified here. - // The endpoint's metadata entry in *envoy.transport_socket_match* is used to match - // against the values specified in this field. - Match *_struct.Struct `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"` - // The configuration of the transport socket. - TransportSocket *core.TransportSocket `protobuf:"bytes,3,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` -} - -func (x *Cluster_TransportSocketMatch) Reset() { - *x = Cluster_TransportSocketMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_TransportSocketMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_TransportSocketMatch) ProtoMessage() {} - -func (x *Cluster_TransportSocketMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_TransportSocketMatch.ProtoReflect.Descriptor instead. -func (*Cluster_TransportSocketMatch) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Cluster_TransportSocketMatch) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Cluster_TransportSocketMatch) GetMatch() *_struct.Struct { - if x != nil { - return x.Match - } - return nil -} - -func (x *Cluster_TransportSocketMatch) GetTransportSocket() *core.TransportSocket { - if x != nil { - return x.TransportSocket - } - return nil -} - -// Extended cluster type. -type Cluster_CustomClusterType struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of the cluster to instantiate. The name must match a supported cluster type. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Cluster specific configuration which depends on the cluster being instantiated. - // See the supported cluster for further documentation. - TypedConfig *any1.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *Cluster_CustomClusterType) Reset() { - *x = Cluster_CustomClusterType{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CustomClusterType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CustomClusterType) ProtoMessage() {} - -func (x *Cluster_CustomClusterType) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CustomClusterType.ProtoReflect.Descriptor instead. -func (*Cluster_CustomClusterType) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *Cluster_CustomClusterType) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Cluster_CustomClusterType) GetTypedConfig() *any1.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -// Only valid when discovery type is EDS. -type Cluster_EdsClusterConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration for the source of EDS updates for this Cluster. - EdsConfig *core.ConfigSource `protobuf:"bytes,1,opt,name=eds_config,json=edsConfig,proto3" json:"eds_config,omitempty"` - // Optional alternative to cluster name to present to EDS. This does not - // have the same restrictions as cluster name, i.e. it may be arbitrary - // length. - ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` -} - -func (x *Cluster_EdsClusterConfig) Reset() { - *x = Cluster_EdsClusterConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_EdsClusterConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_EdsClusterConfig) ProtoMessage() {} - -func (x *Cluster_EdsClusterConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_EdsClusterConfig.ProtoReflect.Descriptor instead. -func (*Cluster_EdsClusterConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *Cluster_EdsClusterConfig) GetEdsConfig() *core.ConfigSource { - if x != nil { - return x.EdsConfig - } - return nil -} - -func (x *Cluster_EdsClusterConfig) GetServiceName() string { - if x != nil { - return x.ServiceName - } - return "" -} - -// Optionally divide the endpoints in this cluster into subsets defined by -// endpoint metadata and selected by route and weighted cluster metadata. -// [#next-free-field: 8] -type Cluster_LbSubsetConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The behavior used when no endpoint subset matches the selected route's - // metadata. The value defaults to - // :ref:`NO_FALLBACK`. - FallbackPolicy Cluster_LbSubsetConfig_LbSubsetFallbackPolicy `protobuf:"varint,1,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetFallbackPolicy" json:"fallback_policy,omitempty"` - // Specifies the default subset of endpoints used during fallback if - // fallback_policy is - // :ref:`DEFAULT_SUBSET`. - // Each field in default_subset is - // compared to the matching LbEndpoint.Metadata under the *envoy.lb* - // namespace. It is valid for no hosts to match, in which case the behavior - // is the same as a fallback_policy of - // :ref:`NO_FALLBACK`. - DefaultSubset *_struct.Struct `protobuf:"bytes,2,opt,name=default_subset,json=defaultSubset,proto3" json:"default_subset,omitempty"` - // For each entry, LbEndpoint.Metadata's - // *envoy.lb* namespace is traversed and a subset is created for each unique - // combination of key and value. For example: - // - // .. code-block:: json - // - // { "subset_selectors": [ - // { "keys": [ "version" ] }, - // { "keys": [ "stage", "hardware_type" ] } - // ]} - // - // A subset is matched when the metadata from the selected route and - // weighted cluster contains the same keys and values as the subset's - // metadata. The same host may appear in multiple subsets. - SubsetSelectors []*Cluster_LbSubsetConfig_LbSubsetSelector `protobuf:"bytes,3,rep,name=subset_selectors,json=subsetSelectors,proto3" json:"subset_selectors,omitempty"` - // If true, routing to subsets will take into account the localities and locality weights of the - // endpoints when making the routing decision. - // - // There are some potential pitfalls associated with enabling this feature, as the resulting - // traffic split after applying both a subset match and locality weights might be undesirable. - // - // Consider for example a situation in which you have 50/50 split across two localities X/Y - // which have 100 hosts each without subsetting. If the subset LB results in X having only 1 - // host selected but Y having 100, then a lot more load is being dumped on the single host in X - // than originally anticipated in the load balancing assignment delivered via EDS. - LocalityWeightAware bool `protobuf:"varint,4,opt,name=locality_weight_aware,json=localityWeightAware,proto3" json:"locality_weight_aware,omitempty"` - // When used with locality_weight_aware, scales the weight of each locality by the ratio - // of hosts in the subset vs hosts in the original subset. This aims to even out the load - // going to an individual locality if said locality is disproportionately affected by the - // subset predicate. - ScaleLocalityWeight bool `protobuf:"varint,5,opt,name=scale_locality_weight,json=scaleLocalityWeight,proto3" json:"scale_locality_weight,omitempty"` - // If true, when a fallback policy is configured and its corresponding subset fails to find - // a host this will cause any host to be selected instead. - // - // This is useful when using the default subset as the fallback policy, given the default - // subset might become empty. With this option enabled, if that happens the LB will attempt - // to select a host from the entire cluster. - PanicModeAny bool `protobuf:"varint,6,opt,name=panic_mode_any,json=panicModeAny,proto3" json:"panic_mode_any,omitempty"` - // If true, metadata specified for a metadata key will be matched against the corresponding - // endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value - // and any of the elements in the list matches the criteria. - ListAsAny bool `protobuf:"varint,7,opt,name=list_as_any,json=listAsAny,proto3" json:"list_as_any,omitempty"` -} - -func (x *Cluster_LbSubsetConfig) Reset() { - *x = Cluster_LbSubsetConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_LbSubsetConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_LbSubsetConfig) ProtoMessage() {} - -func (x *Cluster_LbSubsetConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig.ProtoReflect.Descriptor instead. -func (*Cluster_LbSubsetConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *Cluster_LbSubsetConfig) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetFallbackPolicy { - if x != nil { - return x.FallbackPolicy - } - return Cluster_LbSubsetConfig_NO_FALLBACK -} - -func (x *Cluster_LbSubsetConfig) GetDefaultSubset() *_struct.Struct { - if x != nil { - return x.DefaultSubset - } - return nil -} - -func (x *Cluster_LbSubsetConfig) GetSubsetSelectors() []*Cluster_LbSubsetConfig_LbSubsetSelector { - if x != nil { - return x.SubsetSelectors - } - return nil -} - -func (x *Cluster_LbSubsetConfig) GetLocalityWeightAware() bool { - if x != nil { - return x.LocalityWeightAware - } - return false -} - -func (x *Cluster_LbSubsetConfig) GetScaleLocalityWeight() bool { - if x != nil { - return x.ScaleLocalityWeight - } - return false -} - -func (x *Cluster_LbSubsetConfig) GetPanicModeAny() bool { - if x != nil { - return x.PanicModeAny - } - return false -} - -func (x *Cluster_LbSubsetConfig) GetListAsAny() bool { - if x != nil { - return x.ListAsAny - } - return false -} - -// Specific configuration for the LeastRequest load balancing policy. -type Cluster_LeastRequestLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of random healthy hosts from which the host with the fewest active requests will - // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. - ChoiceCount *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` -} - -func (x *Cluster_LeastRequestLbConfig) Reset() { - *x = Cluster_LeastRequestLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_LeastRequestLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_LeastRequestLbConfig) ProtoMessage() {} - -func (x *Cluster_LeastRequestLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_LeastRequestLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_LeastRequestLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 4} -} - -func (x *Cluster_LeastRequestLbConfig) GetChoiceCount() *wrappers.UInt32Value { - if x != nil { - return x.ChoiceCount - } - return nil -} - -// Specific configuration for the :ref:`RingHash` -// load balancing policy. -type Cluster_RingHashLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each - // provided host) the better the request distribution will reflect the desired weights. Defaults - // to 1024 entries, and limited to 8M entries. See also - // :ref:`maximum_ring_size`. - MinimumRingSize *wrappers.UInt64Value `protobuf:"bytes,1,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` - // The hash function used to hash hosts onto the ketama ring. The value defaults to - // :ref:`XX_HASH`. - HashFunction Cluster_RingHashLbConfig_HashFunction `protobuf:"varint,3,opt,name=hash_function,json=hashFunction,proto3,enum=envoy.api.v2.Cluster_RingHashLbConfig_HashFunction" json:"hash_function,omitempty"` - // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered - // to further constrain resource use. See also - // :ref:`minimum_ring_size`. - MaximumRingSize *wrappers.UInt64Value `protobuf:"bytes,4,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` -} - -func (x *Cluster_RingHashLbConfig) Reset() { - *x = Cluster_RingHashLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_RingHashLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_RingHashLbConfig) ProtoMessage() {} - -func (x *Cluster_RingHashLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_RingHashLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_RingHashLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 5} -} - -func (x *Cluster_RingHashLbConfig) GetMinimumRingSize() *wrappers.UInt64Value { - if x != nil { - return x.MinimumRingSize - } - return nil -} - -func (x *Cluster_RingHashLbConfig) GetHashFunction() Cluster_RingHashLbConfig_HashFunction { - if x != nil { - return x.HashFunction - } - return Cluster_RingHashLbConfig_XX_HASH -} - -func (x *Cluster_RingHashLbConfig) GetMaximumRingSize() *wrappers.UInt64Value { - if x != nil { - return x.MaximumRingSize - } - return nil -} - -// Specific configuration for the -// :ref:`Original Destination ` -// load balancing policy. -type Cluster_OriginalDstLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // When true, :ref:`x-envoy-original-dst-host - // ` can be used to override destination - // address. - // - // .. attention:: - // - // This header isn't sanitized by default, so enabling this feature allows HTTP clients to - // route traffic to arbitrary hosts and/or ports, which may have serious security - // consequences. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - UseHttpHeader bool `protobuf:"varint,1,opt,name=use_http_header,json=useHttpHeader,proto3" json:"use_http_header,omitempty"` -} - -func (x *Cluster_OriginalDstLbConfig) Reset() { - *x = Cluster_OriginalDstLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_OriginalDstLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_OriginalDstLbConfig) ProtoMessage() {} - -func (x *Cluster_OriginalDstLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_OriginalDstLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_OriginalDstLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 6} -} - -func (x *Cluster_OriginalDstLbConfig) GetUseHttpHeader() bool { - if x != nil { - return x.UseHttpHeader - } - return false -} - -// Common configuration for all load balancer implementations. -// [#next-free-field: 8] -type Cluster_CommonLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configures the :ref:`healthy panic threshold `. - // If not specified, the default is 50%. - // To disable panic mode, set to 0%. - // - // .. note:: - // The specified percent will be truncated to the nearest 1%. - HealthyPanicThreshold *_type.Percent `protobuf:"bytes,1,opt,name=healthy_panic_threshold,json=healthyPanicThreshold,proto3" json:"healthy_panic_threshold,omitempty"` - // Types that are assignable to LocalityConfigSpecifier: - // *Cluster_CommonLbConfig_ZoneAwareLbConfig_ - // *Cluster_CommonLbConfig_LocalityWeightedLbConfig_ - LocalityConfigSpecifier isCluster_CommonLbConfig_LocalityConfigSpecifier `protobuf_oneof:"locality_config_specifier"` - // If set, all health check/weight/metadata updates that happen within this duration will be - // merged and delivered in one shot when the duration expires. The start of the duration is when - // the first update happens. This is useful for big clusters, with potentially noisy deploys - // that might trigger excessive CPU usage due to a constant stream of healthcheck state changes - // or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new - // cluster). Please always keep in mind that the use of sandbox technologies may change this - // behavior. - // - // If this is not set, we default to a merge window of 1000ms. To disable it, set the merge - // window to 0. - // - // Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is - // because merging those updates isn't currently safe. See - // https://github.com/envoyproxy/envoy/pull/3941. - UpdateMergeWindow *duration.Duration `protobuf:"bytes,4,opt,name=update_merge_window,json=updateMergeWindow,proto3" json:"update_merge_window,omitempty"` - // If set to true, Envoy will not consider new hosts when computing load balancing weights until - // they have been health checked for the first time. This will have no effect unless - // active health checking is also configured. - // - // Ignoring a host means that for any load balancing calculations that adjust weights based - // on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and - // panic mode) Envoy will exclude these hosts in the denominator. - // - // For example, with hosts in two priorities P0 and P1, where P0 looks like - // {healthy, unhealthy (new), unhealthy (new)} - // and where P1 looks like - // {healthy, healthy} - // all traffic will still hit P0, as 1 / (3 - 2) = 1. - // - // Enabling this will allow scaling up the number of hosts for a given cluster without entering - // panic mode or triggering priority spillover, assuming the hosts pass the first health check. - // - // If panic mode is triggered, new hosts are still eligible for traffic; they simply do not - // contribute to the calculation when deciding whether panic mode is enabled or not. - IgnoreNewHostsUntilFirstHc bool `protobuf:"varint,5,opt,name=ignore_new_hosts_until_first_hc,json=ignoreNewHostsUntilFirstHc,proto3" json:"ignore_new_hosts_until_first_hc,omitempty"` - // If set to `true`, the cluster manager will drain all existing - // connections to upstream hosts whenever hosts are added or removed from the cluster. - CloseConnectionsOnHostSetChange bool `protobuf:"varint,6,opt,name=close_connections_on_host_set_change,json=closeConnectionsOnHostSetChange,proto3" json:"close_connections_on_host_set_change,omitempty"` - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - ConsistentHashingLbConfig *Cluster_CommonLbConfig_ConsistentHashingLbConfig `protobuf:"bytes,7,opt,name=consistent_hashing_lb_config,json=consistentHashingLbConfig,proto3" json:"consistent_hashing_lb_config,omitempty"` -} - -func (x *Cluster_CommonLbConfig) Reset() { - *x = Cluster_CommonLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 7} -} - -func (x *Cluster_CommonLbConfig) GetHealthyPanicThreshold() *_type.Percent { - if x != nil { - return x.HealthyPanicThreshold - } - return nil -} - -func (m *Cluster_CommonLbConfig) GetLocalityConfigSpecifier() isCluster_CommonLbConfig_LocalityConfigSpecifier { - if m != nil { - return m.LocalityConfigSpecifier - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetZoneAwareLbConfig() *Cluster_CommonLbConfig_ZoneAwareLbConfig { - if x, ok := x.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_ZoneAwareLbConfig_); ok { - return x.ZoneAwareLbConfig - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetLocalityWeightedLbConfig() *Cluster_CommonLbConfig_LocalityWeightedLbConfig { - if x, ok := x.GetLocalityConfigSpecifier().(*Cluster_CommonLbConfig_LocalityWeightedLbConfig_); ok { - return x.LocalityWeightedLbConfig - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetUpdateMergeWindow() *duration.Duration { - if x != nil { - return x.UpdateMergeWindow - } - return nil -} - -func (x *Cluster_CommonLbConfig) GetIgnoreNewHostsUntilFirstHc() bool { - if x != nil { - return x.IgnoreNewHostsUntilFirstHc - } - return false -} - -func (x *Cluster_CommonLbConfig) GetCloseConnectionsOnHostSetChange() bool { - if x != nil { - return x.CloseConnectionsOnHostSetChange - } - return false -} - -func (x *Cluster_CommonLbConfig) GetConsistentHashingLbConfig() *Cluster_CommonLbConfig_ConsistentHashingLbConfig { - if x != nil { - return x.ConsistentHashingLbConfig - } - return nil -} - -type isCluster_CommonLbConfig_LocalityConfigSpecifier interface { - isCluster_CommonLbConfig_LocalityConfigSpecifier() -} - -type Cluster_CommonLbConfig_ZoneAwareLbConfig_ struct { - ZoneAwareLbConfig *Cluster_CommonLbConfig_ZoneAwareLbConfig `protobuf:"bytes,2,opt,name=zone_aware_lb_config,json=zoneAwareLbConfig,proto3,oneof"` -} - -type Cluster_CommonLbConfig_LocalityWeightedLbConfig_ struct { - LocalityWeightedLbConfig *Cluster_CommonLbConfig_LocalityWeightedLbConfig `protobuf:"bytes,3,opt,name=locality_weighted_lb_config,json=localityWeightedLbConfig,proto3,oneof"` -} - -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig_) isCluster_CommonLbConfig_LocalityConfigSpecifier() { -} - -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_) isCluster_CommonLbConfig_LocalityConfigSpecifier() { -} - -type Cluster_RefreshRate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the base interval between refreshes. This parameter is required and must be greater - // than zero and less than - // :ref:`max_interval `. - BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` - // Specifies the maximum interval between refreshes. This parameter is optional, but must be - // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. - MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *Cluster_RefreshRate) Reset() { - *x = Cluster_RefreshRate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_RefreshRate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_RefreshRate) ProtoMessage() {} - -func (x *Cluster_RefreshRate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_RefreshRate.ProtoReflect.Descriptor instead. -func (*Cluster_RefreshRate) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 8} -} - -func (x *Cluster_RefreshRate) GetBaseInterval() *duration.Duration { - if x != nil { - return x.BaseInterval - } - return nil -} - -func (x *Cluster_RefreshRate) GetMaxInterval() *duration.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -// Specifications for subsets. -type Cluster_LbSubsetConfig_LbSubsetSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of keys to match with the weighted cluster metadata. - Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` - // The behavior used when no endpoint subset matches the selected route's - // metadata. - FallbackPolicy Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy `protobuf:"varint,2,opt,name=fallback_policy,json=fallbackPolicy,proto3,enum=envoy.api.v2.Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy" json:"fallback_policy,omitempty"` - // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` - // fallback policy. - // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. - // For any other fallback policy the parameter is not used and should not be set. - // Only values also present in - // :ref:`keys` are allowed, but - // `fallback_keys_subset` cannot be equal to `keys`. - FallbackKeysSubset []string `protobuf:"bytes,3,rep,name=fallback_keys_subset,json=fallbackKeysSubset,proto3" json:"fallback_keys_subset,omitempty"` -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) Reset() { - *x = Cluster_LbSubsetConfig_LbSubsetSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_LbSubsetConfig_LbSubsetSelector) ProtoMessage() {} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_LbSubsetConfig_LbSubsetSelector.ProtoReflect.Descriptor instead. -func (*Cluster_LbSubsetConfig_LbSubsetSelector) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 3, 0} -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) GetKeys() []string { - if x != nil { - return x.Keys - } - return nil -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) GetFallbackPolicy() Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy { - if x != nil { - return x.FallbackPolicy - } - return Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED -} - -func (x *Cluster_LbSubsetConfig_LbSubsetSelector) GetFallbackKeysSubset() []string { - if x != nil { - return x.FallbackKeysSubset - } - return nil -} - -// Configuration for :ref:`zone aware routing -// `. -type Cluster_CommonLbConfig_ZoneAwareLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configures percentage of requests that will be considered for zone aware routing - // if zone aware routing is configured. If not specified, the default is 100%. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - RoutingEnabled *_type.Percent `protobuf:"bytes,1,opt,name=routing_enabled,json=routingEnabled,proto3" json:"routing_enabled,omitempty"` - // Configures minimum upstream cluster size required for zone aware routing - // If upstream cluster size is less than specified, zone aware routing is not performed - // even if zone aware routing is configured. If not specified, the default is 6. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - MinClusterSize *wrappers.UInt64Value `protobuf:"bytes,2,opt,name=min_cluster_size,json=minClusterSize,proto3" json:"min_cluster_size,omitempty"` - // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic - // mode`. Instead, the cluster will fail all - // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a - // failing service. - FailTrafficOnPanic bool `protobuf:"varint,3,opt,name=fail_traffic_on_panic,json=failTrafficOnPanic,proto3" json:"fail_traffic_on_panic,omitempty"` -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) Reset() { - *x = Cluster_CommonLbConfig_ZoneAwareLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig_ZoneAwareLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig_ZoneAwareLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 7, 0} -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetRoutingEnabled() *_type.Percent { - if x != nil { - return x.RoutingEnabled - } - return nil -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetMinClusterSize() *wrappers.UInt64Value { - if x != nil { - return x.MinClusterSize - } - return nil -} - -func (x *Cluster_CommonLbConfig_ZoneAwareLbConfig) GetFailTrafficOnPanic() bool { - if x != nil { - return x.FailTrafficOnPanic - } - return false -} - -// Configuration for :ref:`locality weighted load balancing -// ` -type Cluster_CommonLbConfig_LocalityWeightedLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Reset() { - *x = Cluster_CommonLbConfig_LocalityWeightedLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig_LocalityWeightedLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig_LocalityWeightedLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig_LocalityWeightedLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 7, 1} -} - -// Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) -type Cluster_CommonLbConfig_ConsistentHashingLbConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If set to `true`, the cluster will use hostname instead of the resolved - // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. - UseHostnameForHashing bool `protobuf:"varint,1,opt,name=use_hostname_for_hashing,json=useHostnameForHashing,proto3" json:"use_hostname_for_hashing,omitempty"` -} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Reset() { - *x = Cluster_CommonLbConfig_ConsistentHashingLbConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoMessage() {} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cluster_CommonLbConfig_ConsistentHashingLbConfig.ProtoReflect.Descriptor instead. -func (*Cluster_CommonLbConfig_ConsistentHashingLbConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{0, 7, 2} -} - -func (x *Cluster_CommonLbConfig_ConsistentHashingLbConfig) GetUseHostnameForHashing() bool { - if x != nil { - return x.UseHostnameForHashing - } - return false -} - -type LoadBalancingPolicy_Policy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The name of the LB policy. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional config for the LB policy. - // No more than one of these two fields may be populated. - // - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` - TypedConfig *any1.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *LoadBalancingPolicy_Policy) Reset() { - *x = LoadBalancingPolicy_Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadBalancingPolicy_Policy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadBalancingPolicy_Policy) ProtoMessage() {} - -func (x *LoadBalancingPolicy_Policy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadBalancingPolicy_Policy.ProtoReflect.Descriptor instead. -func (*LoadBalancingPolicy_Policy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *LoadBalancingPolicy_Policy) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Deprecated: Do not use. -func (x *LoadBalancingPolicy_Policy) GetConfig() *_struct.Struct { - if x != nil { - return x.Config - } - return nil -} - -func (x *LoadBalancingPolicy_Policy) GetTypedConfig() *any1.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -var File_envoy_api_v2_cluster_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_cluster_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6c, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x69, - 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x75, 0x74, - 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xd8, 0x39, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x18, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x2b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, - 0x0a, 0x0d, 0x61, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, - 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x54, 0x0a, 0x12, 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x64, 0x73, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x65, 0x64, 0x73, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x0f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x66, 0x0a, 0x21, 0x70, 0x65, 0x72, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x75, 0x66, 0x66, - 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x1d, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x12, 0x45, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, - 0x6c, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x4c, - 0x0a, 0x0f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, - 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x6c, 0x6f, - 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x0d, - 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x12, 0x5b, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x73, 0x50, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, - 0x0a, 0x10, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, - 0x72, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x52, - 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, - 0x12, 0x50, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0x18, 0x01, - 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x73, 0x0a, 0x1e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, - 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x1b, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x48, 0x74, 0x74, - 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x5b, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, - 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7b, 0x0a, 0x1a, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, - 0x18, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x20, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x24, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1d, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x51, 0x0a, - 0x10, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, - 0x52, 0x0e, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, - 0x12, 0x5a, 0x0a, 0x18, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x2c, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x6e, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x0f, - 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x74, 0x6c, 0x18, - 0x27, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x44, 0x6e, - 0x73, 0x54, 0x74, 0x6c, 0x12, 0x5b, 0x0a, 0x11, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x0f, 0x64, 0x6e, 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, - 0x79, 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x72, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x0c, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x72, 0x73, 0x12, 0x34, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x5f, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x6f, - 0x72, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x2d, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x75, 0x73, 0x65, 0x54, 0x63, 0x70, 0x46, 0x6f, 0x72, 0x44, 0x6e, - 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x53, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x6c, - 0x69, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, - 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x6f, 0x75, 0x74, - 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, - 0x10, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, - 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0f, 0x63, 0x6c, - 0x65, 0x61, 0x6e, 0x75, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4f, 0x0a, - 0x14, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, - 0x0a, 0x10, 0x6c, 0x62, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, - 0x6c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x57, - 0x0a, 0x13, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6c, 0x62, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x10, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, - 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x16, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x48, 0x01, 0x52, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, - 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x63, 0x0a, 0x17, 0x6c, 0x65, 0x61, - 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x14, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4d, - 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x37, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x67, 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, - 0x0a, 0x28, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x23, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x6f, 0x0a, 0x21, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x25, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1f, 0x0a, 0x1d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x1d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x55, - 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, - 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, - 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3e, 0x0a, 0x0a, 0x6c, 0x72, 0x73, 0x5f, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x6c, 0x72, 0x73, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x18, 0x2f, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x73, 0x1a, 0xb1, 0x01, 0x0a, 0x14, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2d, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4d, - 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x69, 0x0a, - 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x75, 0x0a, 0x10, 0x45, 0x64, 0x73, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x0a, - 0x65, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x09, 0x65, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, - 0x81, 0x07, 0x0a, 0x0e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x6e, 0x0a, 0x0f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0e, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x3e, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x73, - 0x65, 0x74, 0x12, 0x60, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, - 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x41, 0x77, 0x61, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x63, 0x61, 0x6c, - 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x4c, 0x6f, - 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, 0x0e, - 0x70, 0x61, 0x6e, 0x69, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x6e, 0x79, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x41, - 0x6e, 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x73, 0x5f, 0x61, 0x6e, - 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x73, 0x41, - 0x6e, 0x79, 0x1a, 0xdd, 0x02, 0x0a, 0x10, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x0f, - 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x62, 0x53, - 0x75, 0x62, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x62, 0x53, 0x75, - 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x62, 0x53, - 0x75, 0x62, 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x12, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x4b, 0x65, 0x79, - 0x73, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x22, 0x79, 0x0a, 0x1e, 0x4c, 0x62, 0x53, 0x75, 0x62, - 0x73, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, - 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, - 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x41, - 0x4e, 0x59, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x12, 0x0a, - 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, 0x54, 0x10, - 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, 0x54, - 0x10, 0x04, 0x22, 0x4f, 0x0a, 0x16, 0x4c, 0x62, 0x53, 0x75, 0x62, 0x73, 0x65, 0x74, 0x46, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, - 0x4e, 0x4f, 0x5f, 0x46, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x00, 0x12, 0x10, 0x0a, - 0x0c, 0x41, 0x4e, 0x59, 0x5f, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x45, - 0x54, 0x10, 0x02, 0x1a, 0x60, 0x0a, 0x14, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x63, - 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x02, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xd8, 0x02, 0x0a, 0x10, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, - 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, - 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x62, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x52, - 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, - 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x2e, 0x0a, 0x0c, 0x48, 0x61, - 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x58, 0x58, - 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x55, 0x52, 0x4d, 0x55, - 0x52, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x32, 0x10, 0x01, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, - 0x1a, 0x3d, 0x0a, 0x13, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x4c, - 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x5f, 0x68, - 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x75, 0x73, 0x65, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, - 0x86, 0x08, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x17, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, 0x61, - 0x6e, 0x69, 0x63, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x15, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x79, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, - 0x69, 0x0a, 0x14, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x6c, 0x62, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x11, 0x7a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, - 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7e, 0x0a, 0x1b, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, - 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, - 0x52, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, - 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x57, - 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x43, 0x0a, 0x1f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, - 0x6e, 0x65, 0x77, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, - 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x68, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, - 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4e, 0x65, 0x77, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x55, 0x6e, - 0x74, 0x69, 0x6c, 0x46, 0x69, 0x72, 0x73, 0x74, 0x48, 0x63, 0x12, 0x4d, 0x0a, 0x24, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, - 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, - 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x7f, 0x0a, 0x1c, 0x63, 0x6f, 0x6e, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x5f, - 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, - 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xcc, 0x01, 0x0a, 0x11, 0x5a, - 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x3c, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, - 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x46, - 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, - 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x31, 0x0a, 0x15, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x74, - 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x6e, 0x69, 0x63, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x4f, 0x6e, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x1a, 0x1a, 0x0a, 0x18, 0x4c, 0x6f, 0x63, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x54, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x12, 0x37, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, - 0x65, 0x46, 0x6f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x42, 0x1b, 0x0a, 0x19, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0xa9, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, - 0x01, 0x08, 0x08, 0x01, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, - 0x06, 0x2a, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x1a, 0x64, 0x0a, 0x1d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x66, 0x0a, 0x22, 0x54, 0x79, - 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x57, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x00, 0x12, - 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x5f, 0x44, 0x4e, 0x53, 0x10, 0x01, 0x12, - 0x0f, 0x0a, 0x0b, 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x44, 0x4e, 0x53, 0x10, 0x02, - 0x12, 0x07, 0x0a, 0x03, 0x45, 0x44, 0x53, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x52, 0x49, - 0x47, 0x49, 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x53, 0x54, 0x10, 0x04, 0x22, 0xac, 0x01, 0x0a, 0x08, - 0x4c, 0x62, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x4e, - 0x44, 0x5f, 0x52, 0x4f, 0x42, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x45, 0x41, - 0x53, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, - 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x0f, 0x4f, 0x52, 0x49, 0x47, 0x49, - 0x4e, 0x41, 0x4c, 0x5f, 0x44, 0x53, 0x54, 0x5f, 0x4c, 0x42, 0x10, 0x04, 0x1a, 0x08, 0x08, 0x01, - 0xa8, 0xf7, 0xb4, 0x8b, 0x02, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x41, 0x47, 0x4c, 0x45, 0x56, - 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x50, 0x52, - 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x10, 0x06, 0x12, 0x20, 0x0a, 0x1c, 0x4c, 0x4f, 0x41, 0x44, - 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, - 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x07, 0x22, 0x35, 0x0a, 0x0f, 0x44, 0x6e, - 0x73, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x08, 0x0a, - 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x34, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x36, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, - 0x02, 0x22, 0x54, 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, - 0x17, 0x55, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x55, 0x52, 0x45, 0x44, 0x5f, - 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x53, - 0x45, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x5f, 0x50, 0x52, 0x4f, - 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, - 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x22, 0xe8, 0x01, 0x0a, 0x13, 0x4c, - 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, - 0x67, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x8a, 0x01, 0x0a, 0x06, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0c, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x57, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x42, 0x69, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x61, - 0x0a, 0x19, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x74, - 0x63, 0x70, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, - 0x69, 0x76, 0x65, 0x52, 0x0c, 0x74, 0x63, 0x70, 0x4b, 0x65, 0x65, 0x70, 0x61, 0x6c, 0x69, 0x76, - 0x65, 0x42, 0x8e, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_cluster_proto_rawDescOnce sync.Once - file_envoy_api_v2_cluster_proto_rawDescData = file_envoy_api_v2_cluster_proto_rawDesc -) - -func file_envoy_api_v2_cluster_proto_rawDescGZIP() []byte { - file_envoy_api_v2_cluster_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_cluster_proto_rawDescData) - }) - return file_envoy_api_v2_cluster_proto_rawDescData -} - -var file_envoy_api_v2_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_envoy_api_v2_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_envoy_api_v2_cluster_proto_goTypes = []interface{}{ - (Cluster_DiscoveryType)(0), // 0: envoy.api.v2.Cluster.DiscoveryType - (Cluster_LbPolicy)(0), // 1: envoy.api.v2.Cluster.LbPolicy - (Cluster_DnsLookupFamily)(0), // 2: envoy.api.v2.Cluster.DnsLookupFamily - (Cluster_ClusterProtocolSelection)(0), // 3: envoy.api.v2.Cluster.ClusterProtocolSelection - (Cluster_LbSubsetConfig_LbSubsetFallbackPolicy)(0), // 4: envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy - (Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy)(0), // 5: envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy - (Cluster_RingHashLbConfig_HashFunction)(0), // 6: envoy.api.v2.Cluster.RingHashLbConfig.HashFunction - (*Cluster)(nil), // 7: envoy.api.v2.Cluster - (*LoadBalancingPolicy)(nil), // 8: envoy.api.v2.LoadBalancingPolicy - (*UpstreamBindConfig)(nil), // 9: envoy.api.v2.UpstreamBindConfig - (*UpstreamConnectionOptions)(nil), // 10: envoy.api.v2.UpstreamConnectionOptions - (*Cluster_TransportSocketMatch)(nil), // 11: envoy.api.v2.Cluster.TransportSocketMatch - (*Cluster_CustomClusterType)(nil), // 12: envoy.api.v2.Cluster.CustomClusterType - (*Cluster_EdsClusterConfig)(nil), // 13: envoy.api.v2.Cluster.EdsClusterConfig - (*Cluster_LbSubsetConfig)(nil), // 14: envoy.api.v2.Cluster.LbSubsetConfig - (*Cluster_LeastRequestLbConfig)(nil), // 15: envoy.api.v2.Cluster.LeastRequestLbConfig - (*Cluster_RingHashLbConfig)(nil), // 16: envoy.api.v2.Cluster.RingHashLbConfig - (*Cluster_OriginalDstLbConfig)(nil), // 17: envoy.api.v2.Cluster.OriginalDstLbConfig - (*Cluster_CommonLbConfig)(nil), // 18: envoy.api.v2.Cluster.CommonLbConfig - (*Cluster_RefreshRate)(nil), // 19: envoy.api.v2.Cluster.RefreshRate - nil, // 20: envoy.api.v2.Cluster.ExtensionProtocolOptionsEntry - nil, // 21: envoy.api.v2.Cluster.TypedExtensionProtocolOptionsEntry - (*Cluster_LbSubsetConfig_LbSubsetSelector)(nil), // 22: envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector - (*Cluster_CommonLbConfig_ZoneAwareLbConfig)(nil), // 23: envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig - (*Cluster_CommonLbConfig_LocalityWeightedLbConfig)(nil), // 24: envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig - (*Cluster_CommonLbConfig_ConsistentHashingLbConfig)(nil), // 25: envoy.api.v2.Cluster.CommonLbConfig.ConsistentHashingLbConfig - (*LoadBalancingPolicy_Policy)(nil), // 26: envoy.api.v2.LoadBalancingPolicy.Policy - (*duration.Duration)(nil), // 27: google.protobuf.Duration - (*wrappers.UInt32Value)(nil), // 28: google.protobuf.UInt32Value - (*core.Address)(nil), // 29: envoy.api.v2.core.Address - (*ClusterLoadAssignment)(nil), // 30: envoy.api.v2.ClusterLoadAssignment - (*core.HealthCheck)(nil), // 31: envoy.api.v2.core.HealthCheck - (*cluster.CircuitBreakers)(nil), // 32: envoy.api.v2.cluster.CircuitBreakers - (*auth.UpstreamTlsContext)(nil), // 33: envoy.api.v2.auth.UpstreamTlsContext - (*core.UpstreamHttpProtocolOptions)(nil), // 34: envoy.api.v2.core.UpstreamHttpProtocolOptions - (*core.HttpProtocolOptions)(nil), // 35: envoy.api.v2.core.HttpProtocolOptions - (*core.Http1ProtocolOptions)(nil), // 36: envoy.api.v2.core.Http1ProtocolOptions - (*core.Http2ProtocolOptions)(nil), // 37: envoy.api.v2.core.Http2ProtocolOptions - (*cluster.OutlierDetection)(nil), // 38: envoy.api.v2.cluster.OutlierDetection - (*core.BindConfig)(nil), // 39: envoy.api.v2.core.BindConfig - (*core.TransportSocket)(nil), // 40: envoy.api.v2.core.TransportSocket - (*core.Metadata)(nil), // 41: envoy.api.v2.core.Metadata - (*cluster.Filter)(nil), // 42: envoy.api.v2.cluster.Filter - (*core.ConfigSource)(nil), // 43: envoy.api.v2.core.ConfigSource - (*core.TcpKeepalive)(nil), // 44: envoy.api.v2.core.TcpKeepalive - (*_struct.Struct)(nil), // 45: google.protobuf.Struct - (*any1.Any)(nil), // 46: google.protobuf.Any - (*wrappers.UInt64Value)(nil), // 47: google.protobuf.UInt64Value - (*_type.Percent)(nil), // 48: envoy.type.Percent -} -var file_envoy_api_v2_cluster_proto_depIdxs = []int32{ - 11, // 0: envoy.api.v2.Cluster.transport_socket_matches:type_name -> envoy.api.v2.Cluster.TransportSocketMatch - 0, // 1: envoy.api.v2.Cluster.type:type_name -> envoy.api.v2.Cluster.DiscoveryType - 12, // 2: envoy.api.v2.Cluster.cluster_type:type_name -> envoy.api.v2.Cluster.CustomClusterType - 13, // 3: envoy.api.v2.Cluster.eds_cluster_config:type_name -> envoy.api.v2.Cluster.EdsClusterConfig - 27, // 4: envoy.api.v2.Cluster.connect_timeout:type_name -> google.protobuf.Duration - 28, // 5: envoy.api.v2.Cluster.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 1, // 6: envoy.api.v2.Cluster.lb_policy:type_name -> envoy.api.v2.Cluster.LbPolicy - 29, // 7: envoy.api.v2.Cluster.hosts:type_name -> envoy.api.v2.core.Address - 30, // 8: envoy.api.v2.Cluster.load_assignment:type_name -> envoy.api.v2.ClusterLoadAssignment - 31, // 9: envoy.api.v2.Cluster.health_checks:type_name -> envoy.api.v2.core.HealthCheck - 28, // 10: envoy.api.v2.Cluster.max_requests_per_connection:type_name -> google.protobuf.UInt32Value - 32, // 11: envoy.api.v2.Cluster.circuit_breakers:type_name -> envoy.api.v2.cluster.CircuitBreakers - 33, // 12: envoy.api.v2.Cluster.tls_context:type_name -> envoy.api.v2.auth.UpstreamTlsContext - 34, // 13: envoy.api.v2.Cluster.upstream_http_protocol_options:type_name -> envoy.api.v2.core.UpstreamHttpProtocolOptions - 35, // 14: envoy.api.v2.Cluster.common_http_protocol_options:type_name -> envoy.api.v2.core.HttpProtocolOptions - 36, // 15: envoy.api.v2.Cluster.http_protocol_options:type_name -> envoy.api.v2.core.Http1ProtocolOptions - 37, // 16: envoy.api.v2.Cluster.http2_protocol_options:type_name -> envoy.api.v2.core.Http2ProtocolOptions - 20, // 17: envoy.api.v2.Cluster.extension_protocol_options:type_name -> envoy.api.v2.Cluster.ExtensionProtocolOptionsEntry - 21, // 18: envoy.api.v2.Cluster.typed_extension_protocol_options:type_name -> envoy.api.v2.Cluster.TypedExtensionProtocolOptionsEntry - 27, // 19: envoy.api.v2.Cluster.dns_refresh_rate:type_name -> google.protobuf.Duration - 19, // 20: envoy.api.v2.Cluster.dns_failure_refresh_rate:type_name -> envoy.api.v2.Cluster.RefreshRate - 2, // 21: envoy.api.v2.Cluster.dns_lookup_family:type_name -> envoy.api.v2.Cluster.DnsLookupFamily - 29, // 22: envoy.api.v2.Cluster.dns_resolvers:type_name -> envoy.api.v2.core.Address - 38, // 23: envoy.api.v2.Cluster.outlier_detection:type_name -> envoy.api.v2.cluster.OutlierDetection - 27, // 24: envoy.api.v2.Cluster.cleanup_interval:type_name -> google.protobuf.Duration - 39, // 25: envoy.api.v2.Cluster.upstream_bind_config:type_name -> envoy.api.v2.core.BindConfig - 14, // 26: envoy.api.v2.Cluster.lb_subset_config:type_name -> envoy.api.v2.Cluster.LbSubsetConfig - 16, // 27: envoy.api.v2.Cluster.ring_hash_lb_config:type_name -> envoy.api.v2.Cluster.RingHashLbConfig - 17, // 28: envoy.api.v2.Cluster.original_dst_lb_config:type_name -> envoy.api.v2.Cluster.OriginalDstLbConfig - 15, // 29: envoy.api.v2.Cluster.least_request_lb_config:type_name -> envoy.api.v2.Cluster.LeastRequestLbConfig - 18, // 30: envoy.api.v2.Cluster.common_lb_config:type_name -> envoy.api.v2.Cluster.CommonLbConfig - 40, // 31: envoy.api.v2.Cluster.transport_socket:type_name -> envoy.api.v2.core.TransportSocket - 41, // 32: envoy.api.v2.Cluster.metadata:type_name -> envoy.api.v2.core.Metadata - 3, // 33: envoy.api.v2.Cluster.protocol_selection:type_name -> envoy.api.v2.Cluster.ClusterProtocolSelection - 10, // 34: envoy.api.v2.Cluster.upstream_connection_options:type_name -> envoy.api.v2.UpstreamConnectionOptions - 42, // 35: envoy.api.v2.Cluster.filters:type_name -> envoy.api.v2.cluster.Filter - 8, // 36: envoy.api.v2.Cluster.load_balancing_policy:type_name -> envoy.api.v2.LoadBalancingPolicy - 43, // 37: envoy.api.v2.Cluster.lrs_server:type_name -> envoy.api.v2.core.ConfigSource - 26, // 38: envoy.api.v2.LoadBalancingPolicy.policies:type_name -> envoy.api.v2.LoadBalancingPolicy.Policy - 29, // 39: envoy.api.v2.UpstreamBindConfig.source_address:type_name -> envoy.api.v2.core.Address - 44, // 40: envoy.api.v2.UpstreamConnectionOptions.tcp_keepalive:type_name -> envoy.api.v2.core.TcpKeepalive - 45, // 41: envoy.api.v2.Cluster.TransportSocketMatch.match:type_name -> google.protobuf.Struct - 40, // 42: envoy.api.v2.Cluster.TransportSocketMatch.transport_socket:type_name -> envoy.api.v2.core.TransportSocket - 46, // 43: envoy.api.v2.Cluster.CustomClusterType.typed_config:type_name -> google.protobuf.Any - 43, // 44: envoy.api.v2.Cluster.EdsClusterConfig.eds_config:type_name -> envoy.api.v2.core.ConfigSource - 4, // 45: envoy.api.v2.Cluster.LbSubsetConfig.fallback_policy:type_name -> envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy - 45, // 46: envoy.api.v2.Cluster.LbSubsetConfig.default_subset:type_name -> google.protobuf.Struct - 22, // 47: envoy.api.v2.Cluster.LbSubsetConfig.subset_selectors:type_name -> envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector - 28, // 48: envoy.api.v2.Cluster.LeastRequestLbConfig.choice_count:type_name -> google.protobuf.UInt32Value - 47, // 49: envoy.api.v2.Cluster.RingHashLbConfig.minimum_ring_size:type_name -> google.protobuf.UInt64Value - 6, // 50: envoy.api.v2.Cluster.RingHashLbConfig.hash_function:type_name -> envoy.api.v2.Cluster.RingHashLbConfig.HashFunction - 47, // 51: envoy.api.v2.Cluster.RingHashLbConfig.maximum_ring_size:type_name -> google.protobuf.UInt64Value - 48, // 52: envoy.api.v2.Cluster.CommonLbConfig.healthy_panic_threshold:type_name -> envoy.type.Percent - 23, // 53: envoy.api.v2.Cluster.CommonLbConfig.zone_aware_lb_config:type_name -> envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig - 24, // 54: envoy.api.v2.Cluster.CommonLbConfig.locality_weighted_lb_config:type_name -> envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig - 27, // 55: envoy.api.v2.Cluster.CommonLbConfig.update_merge_window:type_name -> google.protobuf.Duration - 25, // 56: envoy.api.v2.Cluster.CommonLbConfig.consistent_hashing_lb_config:type_name -> envoy.api.v2.Cluster.CommonLbConfig.ConsistentHashingLbConfig - 27, // 57: envoy.api.v2.Cluster.RefreshRate.base_interval:type_name -> google.protobuf.Duration - 27, // 58: envoy.api.v2.Cluster.RefreshRate.max_interval:type_name -> google.protobuf.Duration - 45, // 59: envoy.api.v2.Cluster.ExtensionProtocolOptionsEntry.value:type_name -> google.protobuf.Struct - 46, // 60: envoy.api.v2.Cluster.TypedExtensionProtocolOptionsEntry.value:type_name -> google.protobuf.Any - 5, // 61: envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector.fallback_policy:type_name -> envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy - 48, // 62: envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig.routing_enabled:type_name -> envoy.type.Percent - 47, // 63: envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig.min_cluster_size:type_name -> google.protobuf.UInt64Value - 45, // 64: envoy.api.v2.LoadBalancingPolicy.Policy.config:type_name -> google.protobuf.Struct - 46, // 65: envoy.api.v2.LoadBalancingPolicy.Policy.typed_config:type_name -> google.protobuf.Any - 66, // [66:66] is the sub-list for method output_type - 66, // [66:66] is the sub-list for method input_type - 66, // [66:66] is the sub-list for extension type_name - 66, // [66:66] is the sub-list for extension extendee - 0, // [0:66] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_cluster_proto_init() } -func file_envoy_api_v2_cluster_proto_init() { - if File_envoy_api_v2_cluster_proto != nil { - return - } - file_envoy_api_v2_endpoint_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadBalancingPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamBindConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamConnectionOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_TransportSocketMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CustomClusterType); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_EdsClusterConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_LbSubsetConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_LeastRequestLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_RingHashLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_OriginalDstLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_RefreshRate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_LbSubsetConfig_LbSubsetSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig_ZoneAwareLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig_LocalityWeightedLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Cluster_CommonLbConfig_ConsistentHashingLbConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadBalancingPolicy_Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_cluster_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Cluster_Type)(nil), - (*Cluster_ClusterType)(nil), - (*Cluster_RingHashLbConfig_)(nil), - (*Cluster_OriginalDstLbConfig_)(nil), - (*Cluster_LeastRequestLbConfig_)(nil), - } - file_envoy_api_v2_cluster_proto_msgTypes[11].OneofWrappers = []interface{}{ - (*Cluster_CommonLbConfig_ZoneAwareLbConfig_)(nil), - (*Cluster_CommonLbConfig_LocalityWeightedLbConfig_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_cluster_proto_rawDesc, - NumEnums: 7, - NumMessages: 20, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_cluster_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_cluster_proto_depIdxs, - EnumInfos: file_envoy_api_v2_cluster_proto_enumTypes, - MessageInfos: file_envoy_api_v2_cluster_proto_msgTypes, - }.Build() - File_envoy_api_v2_cluster_proto = out.File - file_envoy_api_v2_cluster_proto_rawDesc = nil - file_envoy_api_v2_cluster_proto_goTypes = nil - file_envoy_api_v2_cluster_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go deleted file mode 100644 index ee96e05b6ad5..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go +++ /dev/null @@ -1,3828 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/cluster.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Cluster with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Cluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in ClusterMultiError, or nil if none found. -func (m *Cluster) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetTransportSocketMatches() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("TransportSocketMatches[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("TransportSocketMatches[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("TransportSocketMatches[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetName()) < 1 { - err := ClusterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for AltStatName - - if all { - switch v := interface{}(m.GetEdsClusterConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "EdsClusterConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "EdsClusterConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEdsClusterConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "EdsClusterConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetConnectTimeout(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = ClusterValidationError{ - field: "ConnectTimeout", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := ClusterValidationError{ - field: "ConnectTimeout", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if all { - switch v := interface{}(m.GetPerConnectionBufferLimitBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := Cluster_LbPolicy_name[int32(m.GetLbPolicy())]; !ok { - err := ClusterValidationError{ - field: "LbPolicy", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetHosts() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("Hosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("Hosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("Hosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetLoadAssignment()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LoadAssignment", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LoadAssignment", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLoadAssignment()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LoadAssignment", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHealthChecks() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetMaxRequestsPerConnection()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "MaxRequestsPerConnection", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "MaxRequestsPerConnection", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "MaxRequestsPerConnection", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCircuitBreakers()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "CircuitBreakers", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "CircuitBreakers", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "CircuitBreakers", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetUpstreamHttpProtocolOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "UpstreamHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "UpstreamHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpstreamHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "UpstreamHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCommonHttpProtocolOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "CommonHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "CommonHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "CommonHttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHttpProtocolOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "HttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "HttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "HttpProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "Http2ProtocolOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - { - sorted_keys := make([]string, len(m.GetExtensionProtocolOptions())) - i := 0 - for key := range m.GetExtensionProtocolOptions() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetExtensionProtocolOptions()[key] - _ = val - - // no validation rules for ExtensionProtocolOptions[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("ExtensionProtocolOptions[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("ExtensionProtocolOptions[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("ExtensionProtocolOptions[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetTypedExtensionProtocolOptions())) - i := 0 - for key := range m.GetTypedExtensionProtocolOptions() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedExtensionProtocolOptions()[key] - _ = val - - // no validation rules for TypedExtensionProtocolOptions[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("TypedExtensionProtocolOptions[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if d := m.GetDnsRefreshRate(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = ClusterValidationError{ - field: "DnsRefreshRate", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur <= gt { - err := ClusterValidationError{ - field: "DnsRefreshRate", - reason: "value must be greater than 1ms", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if all { - switch v := interface{}(m.GetDnsFailureRefreshRate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "DnsFailureRefreshRate", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "DnsFailureRefreshRate", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDnsFailureRefreshRate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "DnsFailureRefreshRate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for RespectDnsTtl - - if _, ok := Cluster_DnsLookupFamily_name[int32(m.GetDnsLookupFamily())]; !ok { - err := ClusterValidationError{ - field: "DnsLookupFamily", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetDnsResolvers() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("DnsResolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("DnsResolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("DnsResolvers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for UseTcpForDnsLookups - - if all { - switch v := interface{}(m.GetOutlierDetection()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "OutlierDetection", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "OutlierDetection", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOutlierDetection()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "OutlierDetection", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetCleanupInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = ClusterValidationError{ - field: "CleanupInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := ClusterValidationError{ - field: "CleanupInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if all { - switch v := interface{}(m.GetUpstreamBindConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "UpstreamBindConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "UpstreamBindConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpstreamBindConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "UpstreamBindConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetLbSubsetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LbSubsetConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LbSubsetConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLbSubsetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LbSubsetConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCommonLbConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "CommonLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "CommonLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCommonLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "CommonLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTransportSocket()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ProtocolSelection - - if all { - switch v := interface{}(m.GetUpstreamConnectionOptions()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "UpstreamConnectionOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "UpstreamConnectionOptions", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpstreamConnectionOptions()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "UpstreamConnectionOptions", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for CloseConnectionsOnHostHealthFailure - - // no validation rules for DrainConnectionsOnHostRemoval - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetLoadBalancingPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LoadBalancingPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LoadBalancingPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLoadBalancingPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LoadBalancingPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetLrsServer()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LrsServer", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LrsServer", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLrsServer()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LrsServer", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TrackTimeoutBudgets - - switch v := m.ClusterDiscoveryType.(type) { - case *Cluster_Type: - if v == nil { - err := ClusterValidationError{ - field: "ClusterDiscoveryType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if _, ok := Cluster_DiscoveryType_name[int32(m.GetType())]; !ok { - err := ClusterValidationError{ - field: "Type", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *Cluster_ClusterType: - if v == nil { - err := ClusterValidationError{ - field: "ClusterDiscoveryType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetClusterType()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "ClusterType", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "ClusterType", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetClusterType()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "ClusterType", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - switch v := m.LbConfig.(type) { - case *Cluster_RingHashLbConfig_: - if v == nil { - err := ClusterValidationError{ - field: "LbConfig", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRingHashLbConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "RingHashLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "RingHashLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRingHashLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "RingHashLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Cluster_OriginalDstLbConfig_: - if v == nil { - err := ClusterValidationError{ - field: "LbConfig", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetOriginalDstLbConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "OriginalDstLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "OriginalDstLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOriginalDstLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "OriginalDstLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Cluster_LeastRequestLbConfig_: - if v == nil { - err := ClusterValidationError{ - field: "LbConfig", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetLeastRequestLbConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LeastRequestLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterValidationError{ - field: "LeastRequestLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLeastRequestLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterValidationError{ - field: "LeastRequestLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return ClusterMultiError(errors) - } - - return nil -} - -// ClusterMultiError is an error wrapping multiple validation errors returned -// by Cluster.ValidateAll() if the designated constraints aren't met. -type ClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterMultiError) AllErrors() []error { return m } - -// ClusterValidationError is the validation error returned by Cluster.Validate -// if the designated constraints aren't met. -type ClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterValidationError) ErrorName() string { return "ClusterValidationError" } - -// Error satisfies the builtin error interface -func (e ClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterValidationError{} - -// Validate checks the field values on LoadBalancingPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *LoadBalancingPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LoadBalancingPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// LoadBalancingPolicyMultiError, or nil if none found. -func (m *LoadBalancingPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *LoadBalancingPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetPolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LoadBalancingPolicyValidationError{ - field: fmt.Sprintf("Policies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LoadBalancingPolicyValidationError{ - field: fmt.Sprintf("Policies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadBalancingPolicyValidationError{ - field: fmt.Sprintf("Policies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return LoadBalancingPolicyMultiError(errors) - } - - return nil -} - -// LoadBalancingPolicyMultiError is an error wrapping multiple validation -// errors returned by LoadBalancingPolicy.ValidateAll() if the designated -// constraints aren't met. -type LoadBalancingPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LoadBalancingPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LoadBalancingPolicyMultiError) AllErrors() []error { return m } - -// LoadBalancingPolicyValidationError is the validation error returned by -// LoadBalancingPolicy.Validate if the designated constraints aren't met. -type LoadBalancingPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LoadBalancingPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LoadBalancingPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LoadBalancingPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LoadBalancingPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LoadBalancingPolicyValidationError) ErrorName() string { - return "LoadBalancingPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e LoadBalancingPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLoadBalancingPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LoadBalancingPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LoadBalancingPolicyValidationError{} - -// Validate checks the field values on UpstreamBindConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpstreamBindConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpstreamBindConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpstreamBindConfigMultiError, or nil if none found. -func (m *UpstreamBindConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *UpstreamBindConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetSourceAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamBindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamBindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourceAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamBindConfigValidationError{ - field: "SourceAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpstreamBindConfigMultiError(errors) - } - - return nil -} - -// UpstreamBindConfigMultiError is an error wrapping multiple validation errors -// returned by UpstreamBindConfig.ValidateAll() if the designated constraints -// aren't met. -type UpstreamBindConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpstreamBindConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpstreamBindConfigMultiError) AllErrors() []error { return m } - -// UpstreamBindConfigValidationError is the validation error returned by -// UpstreamBindConfig.Validate if the designated constraints aren't met. -type UpstreamBindConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamBindConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamBindConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamBindConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamBindConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamBindConfigValidationError) ErrorName() string { - return "UpstreamBindConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamBindConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamBindConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamBindConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamBindConfigValidationError{} - -// Validate checks the field values on UpstreamConnectionOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpstreamConnectionOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpstreamConnectionOptions with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpstreamConnectionOptionsMultiError, or nil if none found. -func (m *UpstreamConnectionOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *UpstreamConnectionOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetTcpKeepalive()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamConnectionOptionsValidationError{ - field: "TcpKeepalive", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamConnectionOptionsValidationError{ - field: "TcpKeepalive", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTcpKeepalive()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamConnectionOptionsValidationError{ - field: "TcpKeepalive", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpstreamConnectionOptionsMultiError(errors) - } - - return nil -} - -// UpstreamConnectionOptionsMultiError is an error wrapping multiple validation -// errors returned by UpstreamConnectionOptions.ValidateAll() if the -// designated constraints aren't met. -type UpstreamConnectionOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpstreamConnectionOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpstreamConnectionOptionsMultiError) AllErrors() []error { return m } - -// UpstreamConnectionOptionsValidationError is the validation error returned by -// UpstreamConnectionOptions.Validate if the designated constraints aren't met. -type UpstreamConnectionOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamConnectionOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamConnectionOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamConnectionOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamConnectionOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamConnectionOptionsValidationError) ErrorName() string { - return "UpstreamConnectionOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamConnectionOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamConnectionOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamConnectionOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamConnectionOptionsValidationError{} - -// Validate checks the field values on Cluster_TransportSocketMatch with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_TransportSocketMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_TransportSocketMatch with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_TransportSocketMatchMultiError, or nil if none found. -func (m *Cluster_TransportSocketMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_TransportSocketMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetName()) < 1 { - err := Cluster_TransportSocketMatchValidationError{ - field: "Name", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_TransportSocketMatchValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_TransportSocketMatchValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_TransportSocketMatchValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTransportSocket()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_TransportSocketMatchValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_TransportSocketMatchValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_TransportSocketMatchValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Cluster_TransportSocketMatchMultiError(errors) - } - - return nil -} - -// Cluster_TransportSocketMatchMultiError is an error wrapping multiple -// validation errors returned by Cluster_TransportSocketMatch.ValidateAll() if -// the designated constraints aren't met. -type Cluster_TransportSocketMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_TransportSocketMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_TransportSocketMatchMultiError) AllErrors() []error { return m } - -// Cluster_TransportSocketMatchValidationError is the validation error returned -// by Cluster_TransportSocketMatch.Validate if the designated constraints -// aren't met. -type Cluster_TransportSocketMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_TransportSocketMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_TransportSocketMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_TransportSocketMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_TransportSocketMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_TransportSocketMatchValidationError) ErrorName() string { - return "Cluster_TransportSocketMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_TransportSocketMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_TransportSocketMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_TransportSocketMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_TransportSocketMatchValidationError{} - -// Validate checks the field values on Cluster_CustomClusterType with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_CustomClusterType) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_CustomClusterType with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_CustomClusterTypeMultiError, or nil if none found. -func (m *Cluster_CustomClusterType) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_CustomClusterType) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := Cluster_CustomClusterTypeValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CustomClusterTypeValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CustomClusterTypeValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CustomClusterTypeValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Cluster_CustomClusterTypeMultiError(errors) - } - - return nil -} - -// Cluster_CustomClusterTypeMultiError is an error wrapping multiple validation -// errors returned by Cluster_CustomClusterType.ValidateAll() if the -// designated constraints aren't met. -type Cluster_CustomClusterTypeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_CustomClusterTypeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_CustomClusterTypeMultiError) AllErrors() []error { return m } - -// Cluster_CustomClusterTypeValidationError is the validation error returned by -// Cluster_CustomClusterType.Validate if the designated constraints aren't met. -type Cluster_CustomClusterTypeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CustomClusterTypeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_CustomClusterTypeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_CustomClusterTypeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CustomClusterTypeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CustomClusterTypeValidationError) ErrorName() string { - return "Cluster_CustomClusterTypeValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CustomClusterTypeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CustomClusterType.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CustomClusterTypeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CustomClusterTypeValidationError{} - -// Validate checks the field values on Cluster_EdsClusterConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_EdsClusterConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_EdsClusterConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_EdsClusterConfigMultiError, or nil if none found. -func (m *Cluster_EdsClusterConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_EdsClusterConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetEdsConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_EdsClusterConfigValidationError{ - field: "EdsConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_EdsClusterConfigValidationError{ - field: "EdsConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEdsConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_EdsClusterConfigValidationError{ - field: "EdsConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ServiceName - - if len(errors) > 0 { - return Cluster_EdsClusterConfigMultiError(errors) - } - - return nil -} - -// Cluster_EdsClusterConfigMultiError is an error wrapping multiple validation -// errors returned by Cluster_EdsClusterConfig.ValidateAll() if the designated -// constraints aren't met. -type Cluster_EdsClusterConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_EdsClusterConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_EdsClusterConfigMultiError) AllErrors() []error { return m } - -// Cluster_EdsClusterConfigValidationError is the validation error returned by -// Cluster_EdsClusterConfig.Validate if the designated constraints aren't met. -type Cluster_EdsClusterConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_EdsClusterConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_EdsClusterConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_EdsClusterConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_EdsClusterConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_EdsClusterConfigValidationError) ErrorName() string { - return "Cluster_EdsClusterConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_EdsClusterConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_EdsClusterConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_EdsClusterConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_EdsClusterConfigValidationError{} - -// Validate checks the field values on Cluster_LbSubsetConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_LbSubsetConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_LbSubsetConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_LbSubsetConfigMultiError, or nil if none found. -func (m *Cluster_LbSubsetConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_LbSubsetConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := Cluster_LbSubsetConfig_LbSubsetFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { - err := Cluster_LbSubsetConfigValidationError{ - field: "FallbackPolicy", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetDefaultSubset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_LbSubsetConfigValidationError{ - field: "DefaultSubset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_LbSubsetConfigValidationError{ - field: "DefaultSubset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDefaultSubset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_LbSubsetConfigValidationError{ - field: "DefaultSubset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetSubsetSelectors() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_LbSubsetConfigValidationError{ - field: fmt.Sprintf("SubsetSelectors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_LbSubsetConfigValidationError{ - field: fmt.Sprintf("SubsetSelectors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_LbSubsetConfigValidationError{ - field: fmt.Sprintf("SubsetSelectors[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for LocalityWeightAware - - // no validation rules for ScaleLocalityWeight - - // no validation rules for PanicModeAny - - // no validation rules for ListAsAny - - if len(errors) > 0 { - return Cluster_LbSubsetConfigMultiError(errors) - } - - return nil -} - -// Cluster_LbSubsetConfigMultiError is an error wrapping multiple validation -// errors returned by Cluster_LbSubsetConfig.ValidateAll() if the designated -// constraints aren't met. -type Cluster_LbSubsetConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_LbSubsetConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_LbSubsetConfigMultiError) AllErrors() []error { return m } - -// Cluster_LbSubsetConfigValidationError is the validation error returned by -// Cluster_LbSubsetConfig.Validate if the designated constraints aren't met. -type Cluster_LbSubsetConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_LbSubsetConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_LbSubsetConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_LbSubsetConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_LbSubsetConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_LbSubsetConfigValidationError) ErrorName() string { - return "Cluster_LbSubsetConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_LbSubsetConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_LbSubsetConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_LbSubsetConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_LbSubsetConfigValidationError{} - -// Validate checks the field values on Cluster_LeastRequestLbConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_LeastRequestLbConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_LeastRequestLbConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_LeastRequestLbConfigMultiError, or nil if none found. -func (m *Cluster_LeastRequestLbConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_LeastRequestLbConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetChoiceCount(); wrapper != nil { - - if wrapper.GetValue() < 2 { - err := Cluster_LeastRequestLbConfigValidationError{ - field: "ChoiceCount", - reason: "value must be greater than or equal to 2", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return Cluster_LeastRequestLbConfigMultiError(errors) - } - - return nil -} - -// Cluster_LeastRequestLbConfigMultiError is an error wrapping multiple -// validation errors returned by Cluster_LeastRequestLbConfig.ValidateAll() if -// the designated constraints aren't met. -type Cluster_LeastRequestLbConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_LeastRequestLbConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_LeastRequestLbConfigMultiError) AllErrors() []error { return m } - -// Cluster_LeastRequestLbConfigValidationError is the validation error returned -// by Cluster_LeastRequestLbConfig.Validate if the designated constraints -// aren't met. -type Cluster_LeastRequestLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_LeastRequestLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_LeastRequestLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_LeastRequestLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_LeastRequestLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_LeastRequestLbConfigValidationError) ErrorName() string { - return "Cluster_LeastRequestLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_LeastRequestLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_LeastRequestLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_LeastRequestLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_LeastRequestLbConfigValidationError{} - -// Validate checks the field values on Cluster_RingHashLbConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_RingHashLbConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_RingHashLbConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_RingHashLbConfigMultiError, or nil if none found. -func (m *Cluster_RingHashLbConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_RingHashLbConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetMinimumRingSize(); wrapper != nil { - - if wrapper.GetValue() > 8388608 { - err := Cluster_RingHashLbConfigValidationError{ - field: "MinimumRingSize", - reason: "value must be less than or equal to 8388608", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if _, ok := Cluster_RingHashLbConfig_HashFunction_name[int32(m.GetHashFunction())]; !ok { - err := Cluster_RingHashLbConfigValidationError{ - field: "HashFunction", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if wrapper := m.GetMaximumRingSize(); wrapper != nil { - - if wrapper.GetValue() > 8388608 { - err := Cluster_RingHashLbConfigValidationError{ - field: "MaximumRingSize", - reason: "value must be less than or equal to 8388608", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return Cluster_RingHashLbConfigMultiError(errors) - } - - return nil -} - -// Cluster_RingHashLbConfigMultiError is an error wrapping multiple validation -// errors returned by Cluster_RingHashLbConfig.ValidateAll() if the designated -// constraints aren't met. -type Cluster_RingHashLbConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_RingHashLbConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_RingHashLbConfigMultiError) AllErrors() []error { return m } - -// Cluster_RingHashLbConfigValidationError is the validation error returned by -// Cluster_RingHashLbConfig.Validate if the designated constraints aren't met. -type Cluster_RingHashLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_RingHashLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_RingHashLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_RingHashLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_RingHashLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_RingHashLbConfigValidationError) ErrorName() string { - return "Cluster_RingHashLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_RingHashLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_RingHashLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_RingHashLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_RingHashLbConfigValidationError{} - -// Validate checks the field values on Cluster_OriginalDstLbConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_OriginalDstLbConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_OriginalDstLbConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_OriginalDstLbConfigMultiError, or nil if none found. -func (m *Cluster_OriginalDstLbConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_OriginalDstLbConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for UseHttpHeader - - if len(errors) > 0 { - return Cluster_OriginalDstLbConfigMultiError(errors) - } - - return nil -} - -// Cluster_OriginalDstLbConfigMultiError is an error wrapping multiple -// validation errors returned by Cluster_OriginalDstLbConfig.ValidateAll() if -// the designated constraints aren't met. -type Cluster_OriginalDstLbConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_OriginalDstLbConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_OriginalDstLbConfigMultiError) AllErrors() []error { return m } - -// Cluster_OriginalDstLbConfigValidationError is the validation error returned -// by Cluster_OriginalDstLbConfig.Validate if the designated constraints -// aren't met. -type Cluster_OriginalDstLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_OriginalDstLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_OriginalDstLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_OriginalDstLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_OriginalDstLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_OriginalDstLbConfigValidationError) ErrorName() string { - return "Cluster_OriginalDstLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_OriginalDstLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_OriginalDstLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_OriginalDstLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_OriginalDstLbConfigValidationError{} - -// Validate checks the field values on Cluster_CommonLbConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_CommonLbConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_CommonLbConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_CommonLbConfigMultiError, or nil if none found. -func (m *Cluster_CommonLbConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_CommonLbConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetHealthyPanicThreshold()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "HealthyPanicThreshold", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "HealthyPanicThreshold", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHealthyPanicThreshold()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "HealthyPanicThreshold", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetUpdateMergeWindow()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "UpdateMergeWindow", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "UpdateMergeWindow", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpdateMergeWindow()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "UpdateMergeWindow", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for IgnoreNewHostsUntilFirstHc - - // no validation rules for CloseConnectionsOnHostSetChange - - if all { - switch v := interface{}(m.GetConsistentHashingLbConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "ConsistentHashingLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "ConsistentHashingLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConsistentHashingLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "ConsistentHashingLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.LocalityConfigSpecifier.(type) { - case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: - if v == nil { - err := Cluster_CommonLbConfigValidationError{ - field: "LocalityConfigSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetZoneAwareLbConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "ZoneAwareLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "ZoneAwareLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetZoneAwareLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "ZoneAwareLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Cluster_CommonLbConfig_LocalityWeightedLbConfig_: - if v == nil { - err := Cluster_CommonLbConfigValidationError{ - field: "LocalityConfigSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetLocalityWeightedLbConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "LocalityWeightedLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CommonLbConfigValidationError{ - field: "LocalityWeightedLbConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfigValidationError{ - field: "LocalityWeightedLbConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return Cluster_CommonLbConfigMultiError(errors) - } - - return nil -} - -// Cluster_CommonLbConfigMultiError is an error wrapping multiple validation -// errors returned by Cluster_CommonLbConfig.ValidateAll() if the designated -// constraints aren't met. -type Cluster_CommonLbConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_CommonLbConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_CommonLbConfigMultiError) AllErrors() []error { return m } - -// Cluster_CommonLbConfigValidationError is the validation error returned by -// Cluster_CommonLbConfig.Validate if the designated constraints aren't met. -type Cluster_CommonLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CommonLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_CommonLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_CommonLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CommonLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CommonLbConfigValidationError) ErrorName() string { - return "Cluster_CommonLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CommonLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CommonLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CommonLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CommonLbConfigValidationError{} - -// Validate checks the field values on Cluster_RefreshRate with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Cluster_RefreshRate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Cluster_RefreshRate with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Cluster_RefreshRateMultiError, or nil if none found. -func (m *Cluster_RefreshRate) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_RefreshRate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetBaseInterval() == nil { - err := Cluster_RefreshRateValidationError{ - field: "BaseInterval", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetBaseInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = Cluster_RefreshRateValidationError{ - field: "BaseInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur <= gt { - err := Cluster_RefreshRateValidationError{ - field: "BaseInterval", - reason: "value must be greater than 1ms", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetMaxInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = Cluster_RefreshRateValidationError{ - field: "MaxInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 1000000*time.Nanosecond) - - if dur <= gt { - err := Cluster_RefreshRateValidationError{ - field: "MaxInterval", - reason: "value must be greater than 1ms", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return Cluster_RefreshRateMultiError(errors) - } - - return nil -} - -// Cluster_RefreshRateMultiError is an error wrapping multiple validation -// errors returned by Cluster_RefreshRate.ValidateAll() if the designated -// constraints aren't met. -type Cluster_RefreshRateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_RefreshRateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_RefreshRateMultiError) AllErrors() []error { return m } - -// Cluster_RefreshRateValidationError is the validation error returned by -// Cluster_RefreshRate.Validate if the designated constraints aren't met. -type Cluster_RefreshRateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_RefreshRateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_RefreshRateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_RefreshRateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_RefreshRateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_RefreshRateValidationError) ErrorName() string { - return "Cluster_RefreshRateValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_RefreshRateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_RefreshRate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_RefreshRateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_RefreshRateValidationError{} - -// Validate checks the field values on Cluster_LbSubsetConfig_LbSubsetSelector -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Cluster_LbSubsetConfig_LbSubsetSelector with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// Cluster_LbSubsetConfig_LbSubsetSelectorMultiError, or nil if none found. -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_LbSubsetConfig_LbSubsetSelector) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy_name[int32(m.GetFallbackPolicy())]; !ok { - err := Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{ - field: "FallbackPolicy", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return Cluster_LbSubsetConfig_LbSubsetSelectorMultiError(errors) - } - - return nil -} - -// Cluster_LbSubsetConfig_LbSubsetSelectorMultiError is an error wrapping -// multiple validation errors returned by -// Cluster_LbSubsetConfig_LbSubsetSelector.ValidateAll() if the designated -// constraints aren't met. -type Cluster_LbSubsetConfig_LbSubsetSelectorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_LbSubsetConfig_LbSubsetSelectorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_LbSubsetConfig_LbSubsetSelectorMultiError) AllErrors() []error { return m } - -// Cluster_LbSubsetConfig_LbSubsetSelectorValidationError is the validation -// error returned by Cluster_LbSubsetConfig_LbSubsetSelector.Validate if the -// designated constraints aren't met. -type Cluster_LbSubsetConfig_LbSubsetSelectorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) ErrorName() string { - return "Cluster_LbSubsetConfig_LbSubsetSelectorValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_LbSubsetConfig_LbSubsetSelectorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_LbSubsetConfig_LbSubsetSelector.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_LbSubsetConfig_LbSubsetSelectorValidationError{} - -// Validate checks the field values on Cluster_CommonLbConfig_ZoneAwareLbConfig -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Cluster_CommonLbConfig_ZoneAwareLbConfig with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError, or nil if none found. -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_CommonLbConfig_ZoneAwareLbConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetRoutingEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "RoutingEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "RoutingEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRoutingEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "RoutingEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMinClusterSize()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "MinClusterSize", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "MinClusterSize", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMinClusterSize()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{ - field: "MinClusterSize", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for FailTrafficOnPanic - - if len(errors) > 0 { - return Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError(errors) - } - - return nil -} - -// Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError is an error wrapping -// multiple validation errors returned by -// Cluster_CommonLbConfig_ZoneAwareLbConfig.ValidateAll() if the designated -// constraints aren't met. -type Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_CommonLbConfig_ZoneAwareLbConfigMultiError) AllErrors() []error { return m } - -// Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError is the validation -// error returned by Cluster_CommonLbConfig_ZoneAwareLbConfig.Validate if the -// designated constraints aren't met. -type Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) ErrorName() string { - return "Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CommonLbConfig_ZoneAwareLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CommonLbConfig_ZoneAwareLbConfigValidationError{} - -// Validate checks the field values on -// Cluster_CommonLbConfig_LocalityWeightedLbConfig with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Cluster_CommonLbConfig_LocalityWeightedLbConfig with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError, or nil if none found. -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_CommonLbConfig_LocalityWeightedLbConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError(errors) - } - - return nil -} - -// Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError is an error -// wrapping multiple validation errors returned by -// Cluster_CommonLbConfig_LocalityWeightedLbConfig.ValidateAll() if the -// designated constraints aren't met. -type Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_CommonLbConfig_LocalityWeightedLbConfigMultiError) AllErrors() []error { return m } - -// Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError is the -// validation error returned by -// Cluster_CommonLbConfig_LocalityWeightedLbConfig.Validate if the designated -// constraints aren't met. -type Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) ErrorName() string { - return "Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CommonLbConfig_LocalityWeightedLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CommonLbConfig_LocalityWeightedLbConfigValidationError{} - -// Validate checks the field values on -// Cluster_CommonLbConfig_ConsistentHashingLbConfig with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Cluster_CommonLbConfig_ConsistentHashingLbConfig with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in -// Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError, or nil if none found. -func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Cluster_CommonLbConfig_ConsistentHashingLbConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for UseHostnameForHashing - - if len(errors) > 0 { - return Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError(errors) - } - - return nil -} - -// Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError is an error -// wrapping multiple validation errors returned by -// Cluster_CommonLbConfig_ConsistentHashingLbConfig.ValidateAll() if the -// designated constraints aren't met. -type Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Cluster_CommonLbConfig_ConsistentHashingLbConfigMultiError) AllErrors() []error { return m } - -// Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError is the -// validation error returned by -// Cluster_CommonLbConfig_ConsistentHashingLbConfig.Validate if the designated -// constraints aren't met. -type Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Field() string { - return e.field -} - -// Reason function returns reason value. -func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Cause() error { - return e.cause -} - -// Key function returns key value. -func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) ErrorName() string { - return "Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCluster_CommonLbConfig_ConsistentHashingLbConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Cluster_CommonLbConfig_ConsistentHashingLbConfigValidationError{} - -// Validate checks the field values on LoadBalancingPolicy_Policy with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *LoadBalancingPolicy_Policy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LoadBalancingPolicy_Policy with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// LoadBalancingPolicy_PolicyMultiError, or nil if none found. -func (m *LoadBalancingPolicy_Policy) ValidateAll() error { - return m.validate(true) -} - -func (m *LoadBalancingPolicy_Policy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadBalancingPolicy_PolicyValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LoadBalancingPolicy_PolicyValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadBalancingPolicy_PolicyValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return LoadBalancingPolicy_PolicyMultiError(errors) - } - - return nil -} - -// LoadBalancingPolicy_PolicyMultiError is an error wrapping multiple -// validation errors returned by LoadBalancingPolicy_Policy.ValidateAll() if -// the designated constraints aren't met. -type LoadBalancingPolicy_PolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LoadBalancingPolicy_PolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LoadBalancingPolicy_PolicyMultiError) AllErrors() []error { return m } - -// LoadBalancingPolicy_PolicyValidationError is the validation error returned -// by LoadBalancingPolicy_Policy.Validate if the designated constraints aren't met. -type LoadBalancingPolicy_PolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LoadBalancingPolicy_PolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LoadBalancingPolicy_PolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LoadBalancingPolicy_PolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LoadBalancingPolicy_PolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LoadBalancingPolicy_PolicyValidationError) ErrorName() string { - return "LoadBalancingPolicy_PolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e LoadBalancingPolicy_PolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLoadBalancingPolicy_Policy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LoadBalancingPolicy_PolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LoadBalancingPolicy_PolicyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go deleted file mode 100644 index 1a1646ccddea..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.go +++ /dev/null @@ -1,469 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/cluster/circuit_breaker.proto - -package cluster - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _type "github.com/envoyproxy/go-control-plane/envoy/type" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// :ref:`Circuit breaking` settings can be -// specified individually for each defined priority. -type CircuitBreakers struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If multiple :ref:`Thresholds` - // are defined with the same :ref:`RoutingPriority`, - // the first one in the list is used. If no Thresholds is defined for a given - // :ref:`RoutingPriority`, the default values - // are used. - Thresholds []*CircuitBreakers_Thresholds `protobuf:"bytes,1,rep,name=thresholds,proto3" json:"thresholds,omitempty"` -} - -func (x *CircuitBreakers) Reset() { - *x = CircuitBreakers{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CircuitBreakers) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CircuitBreakers) ProtoMessage() {} - -func (x *CircuitBreakers) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CircuitBreakers.ProtoReflect.Descriptor instead. -func (*CircuitBreakers) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP(), []int{0} -} - -func (x *CircuitBreakers) GetThresholds() []*CircuitBreakers_Thresholds { - if x != nil { - return x.Thresholds - } - return nil -} - -// A Thresholds defines CircuitBreaker settings for a -// :ref:`RoutingPriority`. -// [#next-free-field: 9] -type CircuitBreakers_Thresholds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The :ref:`RoutingPriority` - // the specified CircuitBreaker settings apply to. - Priority core.RoutingPriority `protobuf:"varint,1,opt,name=priority,proto3,enum=envoy.api.v2.core.RoutingPriority" json:"priority,omitempty"` - // The maximum number of connections that Envoy will make to the upstream - // cluster. If not specified, the default is 1024. - MaxConnections *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"` - // The maximum number of pending requests that Envoy will allow to the - // upstream cluster. If not specified, the default is 1024. - MaxPendingRequests *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"` - // The maximum number of parallel requests that Envoy will make to the - // upstream cluster. If not specified, the default is 1024. - MaxRequests *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_requests,json=maxRequests,proto3" json:"max_requests,omitempty"` - // The maximum number of parallel retries that Envoy will allow to the - // upstream cluster. If not specified, the default is 3. - MaxRetries *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"` - // Specifies a limit on concurrent retries in relation to the number of active requests. This - // parameter is optional. - // - // .. note:: - // - // If this field is set, the retry budget will override any configured retry circuit - // breaker. - RetryBudget *CircuitBreakers_Thresholds_RetryBudget `protobuf:"bytes,8,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,omitempty"` - // If track_remaining is true, then stats will be published that expose - // the number of resources remaining until the circuit breakers open. If - // not specified, the default is false. - // - // .. note:: - // - // If a retry budget is used in lieu of the max_retries circuit breaker, - // the remaining retry resources remaining will not be tracked. - TrackRemaining bool `protobuf:"varint,6,opt,name=track_remaining,json=trackRemaining,proto3" json:"track_remaining,omitempty"` - // The maximum number of connection pools per cluster that Envoy will concurrently support at - // once. If not specified, the default is unlimited. Set this for clusters which create a - // large number of connection pools. See - // :ref:`Circuit Breaking ` for - // more details. - MaxConnectionPools *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=max_connection_pools,json=maxConnectionPools,proto3" json:"max_connection_pools,omitempty"` -} - -func (x *CircuitBreakers_Thresholds) Reset() { - *x = CircuitBreakers_Thresholds{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CircuitBreakers_Thresholds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CircuitBreakers_Thresholds) ProtoMessage() {} - -func (x *CircuitBreakers_Thresholds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CircuitBreakers_Thresholds.ProtoReflect.Descriptor instead. -func (*CircuitBreakers_Thresholds) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *CircuitBreakers_Thresholds) GetPriority() core.RoutingPriority { - if x != nil { - return x.Priority - } - return core.RoutingPriority(0) -} - -func (x *CircuitBreakers_Thresholds) GetMaxConnections() *wrappers.UInt32Value { - if x != nil { - return x.MaxConnections - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetMaxPendingRequests() *wrappers.UInt32Value { - if x != nil { - return x.MaxPendingRequests - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetMaxRequests() *wrappers.UInt32Value { - if x != nil { - return x.MaxRequests - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetMaxRetries() *wrappers.UInt32Value { - if x != nil { - return x.MaxRetries - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetRetryBudget() *CircuitBreakers_Thresholds_RetryBudget { - if x != nil { - return x.RetryBudget - } - return nil -} - -func (x *CircuitBreakers_Thresholds) GetTrackRemaining() bool { - if x != nil { - return x.TrackRemaining - } - return false -} - -func (x *CircuitBreakers_Thresholds) GetMaxConnectionPools() *wrappers.UInt32Value { - if x != nil { - return x.MaxConnectionPools - } - return nil -} - -type CircuitBreakers_Thresholds_RetryBudget struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the limit on concurrent retries as a percentage of the sum of active requests and - // active pending requests. For example, if there are 100 active requests and the - // budget_percent is set to 25, there may be 25 active retries. - // - // This parameter is optional. Defaults to 20%. - BudgetPercent *_type.Percent `protobuf:"bytes,1,opt,name=budget_percent,json=budgetPercent,proto3" json:"budget_percent,omitempty"` - // Specifies the minimum retry concurrency allowed for the retry budget. The limit on the - // number of active retries may never go below this number. - // - // This parameter is optional. Defaults to 3. - MinRetryConcurrency *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=min_retry_concurrency,json=minRetryConcurrency,proto3" json:"min_retry_concurrency,omitempty"` -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) Reset() { - *x = CircuitBreakers_Thresholds_RetryBudget{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CircuitBreakers_Thresholds_RetryBudget) ProtoMessage() {} - -func (x *CircuitBreakers_Thresholds_RetryBudget) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CircuitBreakers_Thresholds_RetryBudget.ProtoReflect.Descriptor instead. -func (*CircuitBreakers_Thresholds_RetryBudget) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) GetBudgetPercent() *_type.Percent { - if x != nil { - return x.BudgetPercent - } - return nil -} - -func (x *CircuitBreakers_Thresholds_RetryBudget) GetMinRetryConcurrency() *wrappers.UInt32Value { - if x != nil { - return x.MinRetryConcurrency - } - return nil -} - -var File_envoy_api_v2_cluster_circuit_breaker_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc = []byte{ - 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, - 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xcb, 0x06, 0x0a, 0x0f, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, - 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x50, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, - 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x52, 0x0a, 0x74, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x1a, 0xe5, 0x05, 0x0a, 0x0a, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x12, 0x48, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x6d, 0x61, - 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, - 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, - 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, - 0x61, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x73, - 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x0b, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, - 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, - 0x6e, 0x67, 0x12, 0x4e, 0x0a, 0x14, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, - 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, - 0x6c, 0x73, 0x1a, 0x9b, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x75, 0x64, 0x67, - 0x65, 0x74, 0x12, 0x3a, 0x0a, 0x0e, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0d, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x50, - 0x0a, 0x15, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x6d, 0x69, 0x6e, - 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x42, 0xd4, 0x01, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x13, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, - 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xaa, 0x02, 0x16, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x19, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, - 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescOnce sync.Once - file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescData = file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc -) - -func file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP() []byte { - file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescData) - }) - return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescData -} - -var file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_api_v2_cluster_circuit_breaker_proto_goTypes = []interface{}{ - (*CircuitBreakers)(nil), // 0: envoy.api.v2.cluster.CircuitBreakers - (*CircuitBreakers_Thresholds)(nil), // 1: envoy.api.v2.cluster.CircuitBreakers.Thresholds - (*CircuitBreakers_Thresholds_RetryBudget)(nil), // 2: envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget - (core.RoutingPriority)(0), // 3: envoy.api.v2.core.RoutingPriority - (*wrappers.UInt32Value)(nil), // 4: google.protobuf.UInt32Value - (*_type.Percent)(nil), // 5: envoy.type.Percent -} -var file_envoy_api_v2_cluster_circuit_breaker_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.cluster.CircuitBreakers.thresholds:type_name -> envoy.api.v2.cluster.CircuitBreakers.Thresholds - 3, // 1: envoy.api.v2.cluster.CircuitBreakers.Thresholds.priority:type_name -> envoy.api.v2.core.RoutingPriority - 4, // 2: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_connections:type_name -> google.protobuf.UInt32Value - 4, // 3: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_pending_requests:type_name -> google.protobuf.UInt32Value - 4, // 4: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_requests:type_name -> google.protobuf.UInt32Value - 4, // 5: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_retries:type_name -> google.protobuf.UInt32Value - 2, // 6: envoy.api.v2.cluster.CircuitBreakers.Thresholds.retry_budget:type_name -> envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget - 4, // 7: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_connection_pools:type_name -> google.protobuf.UInt32Value - 5, // 8: envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.budget_percent:type_name -> envoy.type.Percent - 4, // 9: envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.min_retry_concurrency:type_name -> google.protobuf.UInt32Value - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_cluster_circuit_breaker_proto_init() } -func file_envoy_api_v2_cluster_circuit_breaker_proto_init() { - if File_envoy_api_v2_cluster_circuit_breaker_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CircuitBreakers); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CircuitBreakers_Thresholds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CircuitBreakers_Thresholds_RetryBudget); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_cluster_circuit_breaker_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_cluster_circuit_breaker_proto_depIdxs, - MessageInfos: file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes, - }.Build() - File_envoy_api_v2_cluster_circuit_breaker_proto = out.File - file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc = nil - file_envoy_api_v2_cluster_circuit_breaker_proto_goTypes = nil - file_envoy_api_v2_cluster_circuit_breaker_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go deleted file mode 100644 index 85d02ee61b0e..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/circuit_breaker.pb.validate.go +++ /dev/null @@ -1,627 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/cluster/circuit_breaker.proto - -package cluster - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = core.RoutingPriority(0) -) - -// Validate checks the field values on CircuitBreakers with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CircuitBreakers) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CircuitBreakers with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CircuitBreakersMultiError, or nil if none found. -func (m *CircuitBreakers) ValidateAll() error { - return m.validate(true) -} - -func (m *CircuitBreakers) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetThresholds() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakersValidationError{ - field: fmt.Sprintf("Thresholds[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakersValidationError{ - field: fmt.Sprintf("Thresholds[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakersValidationError{ - field: fmt.Sprintf("Thresholds[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return CircuitBreakersMultiError(errors) - } - - return nil -} - -// CircuitBreakersMultiError is an error wrapping multiple validation errors -// returned by CircuitBreakers.ValidateAll() if the designated constraints -// aren't met. -type CircuitBreakersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CircuitBreakersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CircuitBreakersMultiError) AllErrors() []error { return m } - -// CircuitBreakersValidationError is the validation error returned by -// CircuitBreakers.Validate if the designated constraints aren't met. -type CircuitBreakersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CircuitBreakersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CircuitBreakersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CircuitBreakersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CircuitBreakersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CircuitBreakersValidationError) ErrorName() string { return "CircuitBreakersValidationError" } - -// Error satisfies the builtin error interface -func (e CircuitBreakersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCircuitBreakers.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CircuitBreakersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CircuitBreakersValidationError{} - -// Validate checks the field values on CircuitBreakers_Thresholds with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CircuitBreakers_Thresholds) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CircuitBreakers_Thresholds with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CircuitBreakers_ThresholdsMultiError, or nil if none found. -func (m *CircuitBreakers_Thresholds) ValidateAll() error { - return m.validate(true) -} - -func (m *CircuitBreakers_Thresholds) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := core.RoutingPriority_name[int32(m.GetPriority())]; !ok { - err := CircuitBreakers_ThresholdsValidationError{ - field: "Priority", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMaxConnections()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnections", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnections", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxConnections()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnections", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxPendingRequests()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxPendingRequests", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxPendingRequests", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxPendingRequests()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxPendingRequests", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxRequests()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxRequests", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxRequests", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxRequests()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxRequests", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxRetries()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxRetries()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxRetries", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryBudget()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "RetryBudget", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "RetryBudget", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryBudget()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "RetryBudget", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TrackRemaining - - if all { - switch v := interface{}(m.GetMaxConnectionPools()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnectionPools", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnectionPools", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxConnectionPools()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_ThresholdsValidationError{ - field: "MaxConnectionPools", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CircuitBreakers_ThresholdsMultiError(errors) - } - - return nil -} - -// CircuitBreakers_ThresholdsMultiError is an error wrapping multiple -// validation errors returned by CircuitBreakers_Thresholds.ValidateAll() if -// the designated constraints aren't met. -type CircuitBreakers_ThresholdsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CircuitBreakers_ThresholdsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CircuitBreakers_ThresholdsMultiError) AllErrors() []error { return m } - -// CircuitBreakers_ThresholdsValidationError is the validation error returned -// by CircuitBreakers_Thresholds.Validate if the designated constraints aren't met. -type CircuitBreakers_ThresholdsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CircuitBreakers_ThresholdsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CircuitBreakers_ThresholdsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CircuitBreakers_ThresholdsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CircuitBreakers_ThresholdsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CircuitBreakers_ThresholdsValidationError) ErrorName() string { - return "CircuitBreakers_ThresholdsValidationError" -} - -// Error satisfies the builtin error interface -func (e CircuitBreakers_ThresholdsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCircuitBreakers_Thresholds.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CircuitBreakers_ThresholdsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CircuitBreakers_ThresholdsValidationError{} - -// Validate checks the field values on CircuitBreakers_Thresholds_RetryBudget -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *CircuitBreakers_Thresholds_RetryBudget) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// CircuitBreakers_Thresholds_RetryBudget with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// CircuitBreakers_Thresholds_RetryBudgetMultiError, or nil if none found. -func (m *CircuitBreakers_Thresholds_RetryBudget) ValidateAll() error { - return m.validate(true) -} - -func (m *CircuitBreakers_Thresholds_RetryBudget) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetBudgetPercent()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ - field: "BudgetPercent", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ - field: "BudgetPercent", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBudgetPercent()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_Thresholds_RetryBudgetValidationError{ - field: "BudgetPercent", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMinRetryConcurrency()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ - field: "MinRetryConcurrency", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CircuitBreakers_Thresholds_RetryBudgetValidationError{ - field: "MinRetryConcurrency", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMinRetryConcurrency()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CircuitBreakers_Thresholds_RetryBudgetValidationError{ - field: "MinRetryConcurrency", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CircuitBreakers_Thresholds_RetryBudgetMultiError(errors) - } - - return nil -} - -// CircuitBreakers_Thresholds_RetryBudgetMultiError is an error wrapping -// multiple validation errors returned by -// CircuitBreakers_Thresholds_RetryBudget.ValidateAll() if the designated -// constraints aren't met. -type CircuitBreakers_Thresholds_RetryBudgetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CircuitBreakers_Thresholds_RetryBudgetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CircuitBreakers_Thresholds_RetryBudgetMultiError) AllErrors() []error { return m } - -// CircuitBreakers_Thresholds_RetryBudgetValidationError is the validation -// error returned by CircuitBreakers_Thresholds_RetryBudget.Validate if the -// designated constraints aren't met. -type CircuitBreakers_Thresholds_RetryBudgetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) ErrorName() string { - return "CircuitBreakers_Thresholds_RetryBudgetValidationError" -} - -// Error satisfies the builtin error interface -func (e CircuitBreakers_Thresholds_RetryBudgetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCircuitBreakers_Thresholds_RetryBudget.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CircuitBreakers_Thresholds_RetryBudgetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CircuitBreakers_Thresholds_RetryBudgetValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go deleted file mode 100644 index 6bdc69e3e733..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/cluster/filter.proto - -package cluster - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - any1 "github.com/golang/protobuf/ptypes/any" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - TypedConfig *any1.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` -} - -func (x *Filter) Reset() { - *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_filter_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Filter) ProtoMessage() {} - -func (x *Filter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_filter_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Filter.ProtoReflect.Descriptor instead. -func (*Filter) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_filter_proto_rawDescGZIP(), []int{0} -} - -func (x *Filter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Filter) GetTypedConfig() *any1.Any { - if x != nil { - return x.TypedConfig - } - return nil -} - -var File_envoy_api_v2_cluster_filter_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_cluster_filter_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x06, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xcc, 0x01, 0x0a, - 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x42, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xaa, - 0x02, 0x16, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x19, 0x45, 0x6e, 0x76, 0x6f, 0x79, - 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_cluster_filter_proto_rawDescOnce sync.Once - file_envoy_api_v2_cluster_filter_proto_rawDescData = file_envoy_api_v2_cluster_filter_proto_rawDesc -) - -func file_envoy_api_v2_cluster_filter_proto_rawDescGZIP() []byte { - file_envoy_api_v2_cluster_filter_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_cluster_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_cluster_filter_proto_rawDescData) - }) - return file_envoy_api_v2_cluster_filter_proto_rawDescData -} - -var file_envoy_api_v2_cluster_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_cluster_filter_proto_goTypes = []interface{}{ - (*Filter)(nil), // 0: envoy.api.v2.cluster.Filter - (*any1.Any)(nil), // 1: google.protobuf.Any -} -var file_envoy_api_v2_cluster_filter_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.cluster.Filter.typed_config:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_cluster_filter_proto_init() } -func file_envoy_api_v2_cluster_filter_proto_init() { - if File_envoy_api_v2_cluster_filter_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_cluster_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_cluster_filter_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_cluster_filter_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_cluster_filter_proto_depIdxs, - MessageInfos: file_envoy_api_v2_cluster_filter_proto_msgTypes, - }.Build() - File_envoy_api_v2_cluster_filter_proto = out.File - file_envoy_api_v2_cluster_filter_proto_rawDesc = nil - file_envoy_api_v2_cluster_filter_proto_goTypes = nil - file_envoy_api_v2_cluster_filter_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go deleted file mode 100644 index ad1e36a947f9..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/filter.pb.validate.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/cluster/filter.proto - -package cluster - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Filter with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Filter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Filter with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in FilterMultiError, or nil if none found. -func (m *Filter) ValidateAll() error { - return m.validate(true) -} - -func (m *Filter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := FilterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return FilterMultiError(errors) - } - - return nil -} - -// FilterMultiError is an error wrapping multiple validation errors returned by -// Filter.ValidateAll() if the designated constraints aren't met. -type FilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterMultiError) AllErrors() []error { return m } - -// FilterValidationError is the validation error returned by Filter.Validate if -// the designated constraints aren't met. -type FilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterValidationError) ErrorName() string { return "FilterValidationError" } - -// Error satisfies the builtin error interface -func (e FilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go deleted file mode 100644 index f845f2a491ee..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.go +++ /dev/null @@ -1,548 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/cluster/outlier_detection.proto - -package cluster - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - duration "github.com/golang/protobuf/ptypes/duration" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// See the :ref:`architecture overview ` for -// more information on outlier detection. -// [#next-free-field: 21] -type OutlierDetection struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of consecutive server-side error responses (for HTTP traffic, - // 5xx responses; for TCP traffic, connection failures; for Redis, failure to - // respond PONG; etc.) before a consecutive 5xx ejection occurs. Defaults to 5. - Consecutive_5Xx *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=consecutive_5xx,json=consecutive5xx,proto3" json:"consecutive_5xx,omitempty"` - // The time interval between ejection analysis sweeps. This can result in - // both new ejections as well as hosts being returned to service. Defaults - // to 10000ms or 10s. - Interval *duration.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` - // The base time that a host is ejected for. The real time is equal to the - // base time multiplied by the number of times the host has been ejected. - // Defaults to 30000ms or 30s. - BaseEjectionTime *duration.Duration `protobuf:"bytes,3,opt,name=base_ejection_time,json=baseEjectionTime,proto3" json:"base_ejection_time,omitempty"` - // The maximum % of an upstream cluster that can be ejected due to outlier - // detection. Defaults to 10% but will eject at least one host regardless of the value. - MaxEjectionPercent *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=max_ejection_percent,json=maxEjectionPercent,proto3" json:"max_ejection_percent,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive 5xx. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 100. - EnforcingConsecutive_5Xx *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=enforcing_consecutive_5xx,json=enforcingConsecutive5xx,proto3" json:"enforcing_consecutive_5xx,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics. This setting can be used to - // disable ejection or to ramp it up slowly. Defaults to 100. - EnforcingSuccessRate *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=enforcing_success_rate,json=enforcingSuccessRate,proto3" json:"enforcing_success_rate,omitempty"` - // The number of hosts in a cluster that must have enough request volume to - // detect success rate outliers. If the number of hosts is less than this - // setting, outlier detection via success rate statistics is not performed - // for any host in the cluster. Defaults to 5. - SuccessRateMinimumHosts *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=success_rate_minimum_hosts,json=successRateMinimumHosts,proto3" json:"success_rate_minimum_hosts,omitempty"` - // The minimum number of total requests that must be collected in one - // interval (as defined by the interval duration above) to include this host - // in success rate based outlier detection. If the volume is lower than this - // setting, outlier detection via success rate statistics is not performed - // for that host. Defaults to 100. - SuccessRateRequestVolume *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=success_rate_request_volume,json=successRateRequestVolume,proto3" json:"success_rate_request_volume,omitempty"` - // This factor is used to determine the ejection threshold for success rate - // outlier ejection. The ejection threshold is the difference between the - // mean success rate, and the product of this factor and the standard - // deviation of the mean success rate: mean - (stdev * - // success_rate_stdev_factor). This factor is divided by a thousand to get a - // double. That is, if the desired factor is 1.9, the runtime value should - // be 1900. Defaults to 1900. - SuccessRateStdevFactor *wrappers.UInt32Value `protobuf:"bytes,9,opt,name=success_rate_stdev_factor,json=successRateStdevFactor,proto3" json:"success_rate_stdev_factor,omitempty"` - // The number of consecutive gateway failures (502, 503, 504 status codes) - // before a consecutive gateway failure ejection occurs. Defaults to 5. - ConsecutiveGatewayFailure *wrappers.UInt32Value `protobuf:"bytes,10,opt,name=consecutive_gateway_failure,json=consecutiveGatewayFailure,proto3" json:"consecutive_gateway_failure,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive gateway failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 0. - EnforcingConsecutiveGatewayFailure *wrappers.UInt32Value `protobuf:"bytes,11,opt,name=enforcing_consecutive_gateway_failure,json=enforcingConsecutiveGatewayFailure,proto3" json:"enforcing_consecutive_gateway_failure,omitempty"` - // Determines whether to distinguish local origin failures from external errors. If set to true - // the following configuration parameters are taken into account: - // :ref:`consecutive_local_origin_failure`, - // :ref:`enforcing_consecutive_local_origin_failure` - // and - // :ref:`enforcing_local_origin_success_rate`. - // Defaults to false. - SplitExternalLocalOriginErrors bool `protobuf:"varint,12,opt,name=split_external_local_origin_errors,json=splitExternalLocalOriginErrors,proto3" json:"split_external_local_origin_errors,omitempty"` - // The number of consecutive locally originated failures before ejection - // occurs. Defaults to 5. Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - ConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=consecutive_local_origin_failure,json=consecutiveLocalOriginFailure,proto3" json:"consecutive_local_origin_failure,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive locally originated failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - EnforcingConsecutiveLocalOriginFailure *wrappers.UInt32Value `protobuf:"bytes,14,opt,name=enforcing_consecutive_local_origin_failure,json=enforcingConsecutiveLocalOriginFailure,proto3" json:"enforcing_consecutive_local_origin_failure,omitempty"` - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics for locally originated errors. - // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - EnforcingLocalOriginSuccessRate *wrappers.UInt32Value `protobuf:"bytes,15,opt,name=enforcing_local_origin_success_rate,json=enforcingLocalOriginSuccessRate,proto3" json:"enforcing_local_origin_success_rate,omitempty"` - // The failure percentage to use when determining failure percentage-based outlier detection. If - // the failure percentage of a given host is greater than or equal to this value, it will be - // ejected. Defaults to 85. - FailurePercentageThreshold *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=failure_percentage_threshold,json=failurePercentageThreshold,proto3" json:"failure_percentage_threshold,omitempty"` - // The % chance that a host will be actually ejected when an outlier status is detected through - // failure percentage statistics. This setting can be used to disable ejection or to ramp it up - // slowly. Defaults to 0. - // - // [#next-major-version: setting this without setting failure_percentage_threshold should be - // invalid in v4.] - EnforcingFailurePercentage *wrappers.UInt32Value `protobuf:"bytes,17,opt,name=enforcing_failure_percentage,json=enforcingFailurePercentage,proto3" json:"enforcing_failure_percentage,omitempty"` - // The % chance that a host will be actually ejected when an outlier status is detected through - // local-origin failure percentage statistics. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. - EnforcingFailurePercentageLocalOrigin *wrappers.UInt32Value `protobuf:"bytes,18,opt,name=enforcing_failure_percentage_local_origin,json=enforcingFailurePercentageLocalOrigin,proto3" json:"enforcing_failure_percentage_local_origin,omitempty"` - // The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. - // If the total number of hosts in the cluster is less than this value, failure percentage-based - // ejection will not be performed. Defaults to 5. - FailurePercentageMinimumHosts *wrappers.UInt32Value `protobuf:"bytes,19,opt,name=failure_percentage_minimum_hosts,json=failurePercentageMinimumHosts,proto3" json:"failure_percentage_minimum_hosts,omitempty"` - // The minimum number of total requests that must be collected in one interval (as defined by the - // interval duration above) to perform failure percentage-based ejection for this host. If the - // volume is lower than this setting, failure percentage-based ejection will not be performed for - // this host. Defaults to 50. - FailurePercentageRequestVolume *wrappers.UInt32Value `protobuf:"bytes,20,opt,name=failure_percentage_request_volume,json=failurePercentageRequestVolume,proto3" json:"failure_percentage_request_volume,omitempty"` -} - -func (x *OutlierDetection) Reset() { - *x = OutlierDetection{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_cluster_outlier_detection_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OutlierDetection) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OutlierDetection) ProtoMessage() {} - -func (x *OutlierDetection) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_cluster_outlier_detection_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OutlierDetection.ProtoReflect.Descriptor instead. -func (*OutlierDetection) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_cluster_outlier_detection_proto_rawDescGZIP(), []int{0} -} - -func (x *OutlierDetection) GetConsecutive_5Xx() *wrappers.UInt32Value { - if x != nil { - return x.Consecutive_5Xx - } - return nil -} - -func (x *OutlierDetection) GetInterval() *duration.Duration { - if x != nil { - return x.Interval - } - return nil -} - -func (x *OutlierDetection) GetBaseEjectionTime() *duration.Duration { - if x != nil { - return x.BaseEjectionTime - } - return nil -} - -func (x *OutlierDetection) GetMaxEjectionPercent() *wrappers.UInt32Value { - if x != nil { - return x.MaxEjectionPercent - } - return nil -} - -func (x *OutlierDetection) GetEnforcingConsecutive_5Xx() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingConsecutive_5Xx - } - return nil -} - -func (x *OutlierDetection) GetEnforcingSuccessRate() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingSuccessRate - } - return nil -} - -func (x *OutlierDetection) GetSuccessRateMinimumHosts() *wrappers.UInt32Value { - if x != nil { - return x.SuccessRateMinimumHosts - } - return nil -} - -func (x *OutlierDetection) GetSuccessRateRequestVolume() *wrappers.UInt32Value { - if x != nil { - return x.SuccessRateRequestVolume - } - return nil -} - -func (x *OutlierDetection) GetSuccessRateStdevFactor() *wrappers.UInt32Value { - if x != nil { - return x.SuccessRateStdevFactor - } - return nil -} - -func (x *OutlierDetection) GetConsecutiveGatewayFailure() *wrappers.UInt32Value { - if x != nil { - return x.ConsecutiveGatewayFailure - } - return nil -} - -func (x *OutlierDetection) GetEnforcingConsecutiveGatewayFailure() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingConsecutiveGatewayFailure - } - return nil -} - -func (x *OutlierDetection) GetSplitExternalLocalOriginErrors() bool { - if x != nil { - return x.SplitExternalLocalOriginErrors - } - return false -} - -func (x *OutlierDetection) GetConsecutiveLocalOriginFailure() *wrappers.UInt32Value { - if x != nil { - return x.ConsecutiveLocalOriginFailure - } - return nil -} - -func (x *OutlierDetection) GetEnforcingConsecutiveLocalOriginFailure() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingConsecutiveLocalOriginFailure - } - return nil -} - -func (x *OutlierDetection) GetEnforcingLocalOriginSuccessRate() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingLocalOriginSuccessRate - } - return nil -} - -func (x *OutlierDetection) GetFailurePercentageThreshold() *wrappers.UInt32Value { - if x != nil { - return x.FailurePercentageThreshold - } - return nil -} - -func (x *OutlierDetection) GetEnforcingFailurePercentage() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingFailurePercentage - } - return nil -} - -func (x *OutlierDetection) GetEnforcingFailurePercentageLocalOrigin() *wrappers.UInt32Value { - if x != nil { - return x.EnforcingFailurePercentageLocalOrigin - } - return nil -} - -func (x *OutlierDetection) GetFailurePercentageMinimumHosts() *wrappers.UInt32Value { - if x != nil { - return x.FailurePercentageMinimumHosts - } - return nil -} - -func (x *OutlierDetection) GetFailurePercentageRequestVolume() *wrappers.UInt32Value { - if x != nil { - return x.FailurePercentageRequestVolume - } - return nil -} - -var File_envoy_api_v2_cluster_outlier_detection_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_cluster_outlier_detection_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x64, - 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x0f, 0x0a, - 0x10, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x35, 0x78, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x76, 0x65, 0x35, 0x78, 0x78, 0x12, 0x3f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x51, 0x0a, 0x12, 0x62, 0x61, 0x73, - 0x65, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x10, 0x62, 0x61, 0x73, 0x65, - 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x14, - 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, - 0x63, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, - 0x64, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x19, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x35, - 0x78, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, - 0x17, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x76, 0x65, 0x35, 0x78, 0x78, 0x12, 0x5b, 0x0a, 0x16, 0x65, 0x6e, 0x66, 0x6f, - 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, - 0x14, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x1a, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x52, 0x61, 0x74, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x12, 0x5b, 0x0a, 0x1b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x18, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x57, 0x0a, - 0x19, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, - 0x64, 0x65, 0x76, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x53, 0x74, 0x64, 0x65, 0x76, - 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5c, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, - 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x66, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x12, 0x78, 0x0a, 0x25, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, - 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x22, 0x65, 0x6e, 0x66, 0x6f, - 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x4a, - 0x0a, 0x22, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x73, 0x70, 0x6c, 0x69, - 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x65, 0x0a, 0x20, 0x63, 0x6f, - 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x12, 0x81, 0x01, 0x0a, 0x2a, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x26, 0x65, - 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x76, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x46, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x73, 0x0a, 0x23, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, - 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x1f, 0x65, 0x6e, 0x66, 0x6f, 0x72, - 0x63, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x67, 0x0a, 0x1c, 0x66, 0x61, - 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x1a, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x12, 0x67, 0x0a, 0x1c, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, - 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x61, 0x67, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, - 0x52, 0x1a, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x69, 0x6c, 0x75, - 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x7f, 0x0a, 0x29, - 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, - 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x25, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, - 0x67, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x65, 0x0a, - 0x20, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x68, 0x6f, 0x73, 0x74, - 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x48, - 0x6f, 0x73, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x21, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, - 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1e, 0x66, - 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x42, 0xd6, 0x01, - 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x42, 0x15, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, - 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0xaa, 0x02, 0x16, 0x45, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4e, 0x53, 0xea, 0x02, 0x19, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, - 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x53, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_cluster_outlier_detection_proto_rawDescOnce sync.Once - file_envoy_api_v2_cluster_outlier_detection_proto_rawDescData = file_envoy_api_v2_cluster_outlier_detection_proto_rawDesc -) - -func file_envoy_api_v2_cluster_outlier_detection_proto_rawDescGZIP() []byte { - file_envoy_api_v2_cluster_outlier_detection_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_cluster_outlier_detection_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_cluster_outlier_detection_proto_rawDescData) - }) - return file_envoy_api_v2_cluster_outlier_detection_proto_rawDescData -} - -var file_envoy_api_v2_cluster_outlier_detection_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_cluster_outlier_detection_proto_goTypes = []interface{}{ - (*OutlierDetection)(nil), // 0: envoy.api.v2.cluster.OutlierDetection - (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 2: google.protobuf.Duration -} -var file_envoy_api_v2_cluster_outlier_detection_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.cluster.OutlierDetection.consecutive_5xx:type_name -> google.protobuf.UInt32Value - 2, // 1: envoy.api.v2.cluster.OutlierDetection.interval:type_name -> google.protobuf.Duration - 2, // 2: envoy.api.v2.cluster.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration - 1, // 3: envoy.api.v2.cluster.OutlierDetection.max_ejection_percent:type_name -> google.protobuf.UInt32Value - 1, // 4: envoy.api.v2.cluster.OutlierDetection.enforcing_consecutive_5xx:type_name -> google.protobuf.UInt32Value - 1, // 5: envoy.api.v2.cluster.OutlierDetection.enforcing_success_rate:type_name -> google.protobuf.UInt32Value - 1, // 6: envoy.api.v2.cluster.OutlierDetection.success_rate_minimum_hosts:type_name -> google.protobuf.UInt32Value - 1, // 7: envoy.api.v2.cluster.OutlierDetection.success_rate_request_volume:type_name -> google.protobuf.UInt32Value - 1, // 8: envoy.api.v2.cluster.OutlierDetection.success_rate_stdev_factor:type_name -> google.protobuf.UInt32Value - 1, // 9: envoy.api.v2.cluster.OutlierDetection.consecutive_gateway_failure:type_name -> google.protobuf.UInt32Value - 1, // 10: envoy.api.v2.cluster.OutlierDetection.enforcing_consecutive_gateway_failure:type_name -> google.protobuf.UInt32Value - 1, // 11: envoy.api.v2.cluster.OutlierDetection.consecutive_local_origin_failure:type_name -> google.protobuf.UInt32Value - 1, // 12: envoy.api.v2.cluster.OutlierDetection.enforcing_consecutive_local_origin_failure:type_name -> google.protobuf.UInt32Value - 1, // 13: envoy.api.v2.cluster.OutlierDetection.enforcing_local_origin_success_rate:type_name -> google.protobuf.UInt32Value - 1, // 14: envoy.api.v2.cluster.OutlierDetection.failure_percentage_threshold:type_name -> google.protobuf.UInt32Value - 1, // 15: envoy.api.v2.cluster.OutlierDetection.enforcing_failure_percentage:type_name -> google.protobuf.UInt32Value - 1, // 16: envoy.api.v2.cluster.OutlierDetection.enforcing_failure_percentage_local_origin:type_name -> google.protobuf.UInt32Value - 1, // 17: envoy.api.v2.cluster.OutlierDetection.failure_percentage_minimum_hosts:type_name -> google.protobuf.UInt32Value - 1, // 18: envoy.api.v2.cluster.OutlierDetection.failure_percentage_request_volume:type_name -> google.protobuf.UInt32Value - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_cluster_outlier_detection_proto_init() } -func file_envoy_api_v2_cluster_outlier_detection_proto_init() { - if File_envoy_api_v2_cluster_outlier_detection_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_cluster_outlier_detection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutlierDetection); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_cluster_outlier_detection_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_cluster_outlier_detection_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_cluster_outlier_detection_proto_depIdxs, - MessageInfos: file_envoy_api_v2_cluster_outlier_detection_proto_msgTypes, - }.Build() - File_envoy_api_v2_cluster_outlier_detection_proto = out.File - file_envoy_api_v2_cluster_outlier_detection_proto_rawDesc = nil - file_envoy_api_v2_cluster_outlier_detection_proto_goTypes = nil - file_envoy_api_v2_cluster_outlier_detection_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go deleted file mode 100644 index 39216b500c9b..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster/outlier_detection.pb.validate.go +++ /dev/null @@ -1,565 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/cluster/outlier_detection.proto - -package cluster - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on OutlierDetection with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *OutlierDetection) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on OutlierDetection with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// OutlierDetectionMultiError, or nil if none found. -func (m *OutlierDetection) ValidateAll() error { - return m.validate(true) -} - -func (m *OutlierDetection) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetConsecutive_5Xx()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "Consecutive_5Xx", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "Consecutive_5Xx", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConsecutive_5Xx()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "Consecutive_5Xx", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if d := m.GetInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = OutlierDetectionValidationError{ - field: "Interval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := OutlierDetectionValidationError{ - field: "Interval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetBaseEjectionTime(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = OutlierDetectionValidationError{ - field: "BaseEjectionTime", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := OutlierDetectionValidationError{ - field: "BaseEjectionTime", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if wrapper := m.GetMaxEjectionPercent(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "MaxEjectionPercent", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetEnforcingConsecutive_5Xx(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "EnforcingConsecutive_5Xx", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetEnforcingSuccessRate(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "EnforcingSuccessRate", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetSuccessRateMinimumHosts()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "SuccessRateMinimumHosts", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "SuccessRateMinimumHosts", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSuccessRateMinimumHosts()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "SuccessRateMinimumHosts", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSuccessRateRequestVolume()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "SuccessRateRequestVolume", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "SuccessRateRequestVolume", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSuccessRateRequestVolume()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "SuccessRateRequestVolume", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetSuccessRateStdevFactor()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "SuccessRateStdevFactor", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "SuccessRateStdevFactor", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSuccessRateStdevFactor()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "SuccessRateStdevFactor", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetConsecutiveGatewayFailure()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "ConsecutiveGatewayFailure", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "ConsecutiveGatewayFailure", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConsecutiveGatewayFailure()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "ConsecutiveGatewayFailure", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetEnforcingConsecutiveGatewayFailure(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "EnforcingConsecutiveGatewayFailure", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for SplitExternalLocalOriginErrors - - if all { - switch v := interface{}(m.GetConsecutiveLocalOriginFailure()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "ConsecutiveLocalOriginFailure", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "ConsecutiveLocalOriginFailure", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConsecutiveLocalOriginFailure()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "ConsecutiveLocalOriginFailure", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetEnforcingConsecutiveLocalOriginFailure(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "EnforcingConsecutiveLocalOriginFailure", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetEnforcingLocalOriginSuccessRate(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "EnforcingLocalOriginSuccessRate", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetFailurePercentageThreshold(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "FailurePercentageThreshold", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetEnforcingFailurePercentage(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "EnforcingFailurePercentage", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if wrapper := m.GetEnforcingFailurePercentageLocalOrigin(); wrapper != nil { - - if wrapper.GetValue() > 100 { - err := OutlierDetectionValidationError{ - field: "EnforcingFailurePercentageLocalOrigin", - reason: "value must be less than or equal to 100", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetFailurePercentageMinimumHosts()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "FailurePercentageMinimumHosts", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "FailurePercentageMinimumHosts", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFailurePercentageMinimumHosts()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "FailurePercentageMinimumHosts", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetFailurePercentageRequestVolume()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "FailurePercentageRequestVolume", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OutlierDetectionValidationError{ - field: "FailurePercentageRequestVolume", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFailurePercentageRequestVolume()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OutlierDetectionValidationError{ - field: "FailurePercentageRequestVolume", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return OutlierDetectionMultiError(errors) - } - - return nil -} - -// OutlierDetectionMultiError is an error wrapping multiple validation errors -// returned by OutlierDetection.ValidateAll() if the designated constraints -// aren't met. -type OutlierDetectionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OutlierDetectionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OutlierDetectionMultiError) AllErrors() []error { return m } - -// OutlierDetectionValidationError is the validation error returned by -// OutlierDetection.Validate if the designated constraints aren't met. -type OutlierDetectionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OutlierDetectionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OutlierDetectionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OutlierDetectionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OutlierDetectionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OutlierDetectionValidationError) ErrorName() string { return "OutlierDetectionValidationError" } - -// Error satisfies the builtin error interface -func (e OutlierDetectionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOutlierDetection.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OutlierDetectionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OutlierDetectionValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go deleted file mode 100644 index 3425cac690de..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.go +++ /dev/null @@ -1,834 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/discovery.proto - -package apiv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - any1 "github.com/golang/protobuf/ptypes/any" - status "google.golang.org/genproto/googleapis/rpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A DiscoveryRequest requests a set of versioned resources of the same type for -// a given Envoy node on some API. -// [#next-free-field: 7] -type DiscoveryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version_info provided in the request messages will be the version_info - // received with the most recent successfully processed response or empty on - // the first request. It is expected that no new request is sent after a - // response is received until the Envoy instance is ready to ACK/NACK the new - // configuration. ACK/NACK takes place by returning the new API config version - // as applied or the previous API config version respectively. Each type_url - // (see below) has an independent version associated with it. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The node making the request. - Node *core.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` - // List of resources to subscribe to, e.g. list of cluster names or a route - // configuration name. If this is empty, all resources for the API are - // returned. LDS/CDS may have empty resource_names, which will cause all - // resources for the Envoy instance to be returned. The LDS and CDS responses - // will then imply a number of resources that need to be fetched via EDS/RDS, - // which will be explicitly enumerated in resource_names. - ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"` - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit - // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is - // required for ADS. - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above - // discussion on version_info and the DiscoveryResponse nonce comment. This - // may be empty only if 1) this is a non-persistent-stream xDS such as HTTP, - // or 2) the client has not yet accepted an update in this xDS stream (unlike - // delta, where it is populated only for new explicit ACKs). - ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The *message* field in *error_details* provides the Envoy - // internal exception related to the failure. It is only intended for consumption during manual - // debugging, the string provided is not guaranteed to be stable across Envoy versions. - ErrorDetail *status.Status `protobuf:"bytes,6,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` -} - -func (x *DiscoveryRequest) Reset() { - *x = DiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DiscoveryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DiscoveryRequest) ProtoMessage() {} - -func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DiscoveryRequest.ProtoReflect.Descriptor instead. -func (*DiscoveryRequest) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_discovery_proto_rawDescGZIP(), []int{0} -} - -func (x *DiscoveryRequest) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *DiscoveryRequest) GetNode() *core.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *DiscoveryRequest) GetResourceNames() []string { - if x != nil { - return x.ResourceNames - } - return nil -} - -func (x *DiscoveryRequest) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DiscoveryRequest) GetResponseNonce() string { - if x != nil { - return x.ResponseNonce - } - return "" -} - -func (x *DiscoveryRequest) GetErrorDetail() *status.Status { - if x != nil { - return x.ErrorDetail - } - return nil -} - -// [#next-free-field: 7] -type DiscoveryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version of the response data. - VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` - // The response resources. These resources are typed and depend on the API being called. - Resources []*any1.Any `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` - // [#not-implemented-hide:] - // Canary is used to support two Envoy command line flags: - // - // * --terminate-on-canary-transition-failure. When set, Envoy is able to - // terminate if it detects that configuration is stuck at canary. Consider - // this example sequence of updates: - // - Management server applies a canary config successfully. - // - Management server rolls back to a production config. - // - Envoy rejects the new production config. - // Since there is no sensible way to continue receiving configuration - // updates, Envoy will then terminate and apply production config from a - // clean slate. - // * --dry-run-canary. When set, a canary response will never be applied, only - // validated via a dry run. - Canary bool `protobuf:"varint,3,opt,name=canary,proto3" json:"canary,omitempty"` - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the 'resources' repeated Any (if non-empty). - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // For gRPC based subscriptions, the nonce provides a way to explicitly ack a - // specific DiscoveryResponse in a following DiscoveryRequest. Additional - // messages may have been sent by Envoy to the management server for the - // previous version on the stream prior to this DiscoveryResponse, that were - // unprocessed at response send time. The nonce allows the management server - // to ignore any further DiscoveryRequests for the previous version until a - // DiscoveryRequest bearing the nonce. The nonce is optional and is not - // required for non-stream based xDS implementations. - Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` - // [#not-implemented-hide:] - // The control plane instance that sent the response. - ControlPlane *core.ControlPlane `protobuf:"bytes,6,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"` -} - -func (x *DiscoveryResponse) Reset() { - *x = DiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DiscoveryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DiscoveryResponse) ProtoMessage() {} - -func (x *DiscoveryResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DiscoveryResponse.ProtoReflect.Descriptor instead. -func (*DiscoveryResponse) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_discovery_proto_rawDescGZIP(), []int{1} -} - -func (x *DiscoveryResponse) GetVersionInfo() string { - if x != nil { - return x.VersionInfo - } - return "" -} - -func (x *DiscoveryResponse) GetResources() []*any1.Any { - if x != nil { - return x.Resources - } - return nil -} - -func (x *DiscoveryResponse) GetCanary() bool { - if x != nil { - return x.Canary - } - return false -} - -func (x *DiscoveryResponse) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DiscoveryResponse) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -func (x *DiscoveryResponse) GetControlPlane() *core.ControlPlane { - if x != nil { - return x.ControlPlane - } - return nil -} - -// DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC -// endpoint for Delta xDS. -// -// With Delta xDS, the DeltaDiscoveryResponses do not need to include a full -// snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a -// diff to the state of a xDS client. -// In Delta XDS there are per-resource versions, which allow tracking state at -// the resource granularity. -// An xDS Delta session is always in the context of a gRPC bidirectional -// stream. This allows the xDS server to keep track of the state of xDS clients -// connected to it. -// -// In Delta xDS the nonce field is required and used to pair -// DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK. -// Optionally, a response message level system_version_info is present for -// debugging purposes only. -// -// DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest -// can be either or both of: [1] informing the server of what resources the -// client has gained/lost interest in (using resource_names_subscribe and -// resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from -// the server (using response_nonce, with presence of error_detail making it a NACK). -// Additionally, the first message (for a given type_url) of a reconnected gRPC stream -// has a third role: informing the server of the resources (and their versions) -// that the client already possesses, using the initial_resource_versions field. -// -// As with state-of-the-world, when multiple resource types are multiplexed (ADS), -// all requests/acknowledgments/updates are logically walled off by type_url: -// a Cluster ACK exists in a completely separate world from a prior Route NACK. -// In particular, initial_resource_versions being sent at the "start" of every -// gRPC stream actually entails a message for each type_url, each with its own -// initial_resource_versions. -// [#next-free-field: 8] -type DeltaDiscoveryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The node making the request. - Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". - TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // DeltaDiscoveryRequests allow the client to add or remove individual - // resources to the set of tracked resources in the context of a stream. - // All resource names in the resource_names_subscribe list are added to the - // set of tracked resources and all resource names in the resource_names_unsubscribe - // list are removed from the set of tracked resources. - // - // *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or - // resource_names_unsubscribe list simply means that no resources are to be - // added or removed to the resource list. - // *Like* state-of-the-world xDS, the server must send updates for all tracked - // resources, but can also send updates for resources the client has not subscribed to. - // - // NOTE: the server must respond with all resources listed in resource_names_subscribe, - // even if it believes the client has the most recent version of them. The reason: - // the client may have dropped them, but then regained interest before it had a chance - // to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. - // - // These two fields can be set in any DeltaDiscoveryRequest, including ACKs - // and initial_resource_versions. - // - // A list of Resource names to add to the list of tracked resources. - ResourceNamesSubscribe []string `protobuf:"bytes,3,rep,name=resource_names_subscribe,json=resourceNamesSubscribe,proto3" json:"resource_names_subscribe,omitempty"` - // A list of Resource names to remove from the list of tracked resources. - ResourceNamesUnsubscribe []string `protobuf:"bytes,4,rep,name=resource_names_unsubscribe,json=resourceNamesUnsubscribe,proto3" json:"resource_names_unsubscribe,omitempty"` - // Informs the server of the versions of the resources the xDS client knows of, to enable the - // client to continue the same logical xDS session even in the face of gRPC stream reconnection. - // It will not be populated: [1] in the very first stream of a session, since the client will - // not yet have any resources, [2] in any message after the first in a stream (for a given - // type_url), since the server will already be correctly tracking the client's state. - // (In ADS, the first message *of each type_url* of a reconnected stream populates this map.) - // The map's keys are names of xDS resources known to the xDS client. - // The map's values are opaque resource versions. - InitialResourceVersions map[string]string `protobuf:"bytes,5,rep,name=initial_resource_versions,json=initialResourceVersions,proto3" json:"initial_resource_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // When the DeltaDiscoveryRequest is a ACK or NACK message in response - // to a previous DeltaDiscoveryResponse, the response_nonce must be the - // nonce in the DeltaDiscoveryResponse. - // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. - ResponseNonce string `protobuf:"bytes,6,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The *message* field in *error_details* - // provides the Envoy internal exception related to the failure. - ErrorDetail *status.Status `protobuf:"bytes,7,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` -} - -func (x *DeltaDiscoveryRequest) Reset() { - *x = DeltaDiscoveryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeltaDiscoveryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeltaDiscoveryRequest) ProtoMessage() {} - -func (x *DeltaDiscoveryRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeltaDiscoveryRequest.ProtoReflect.Descriptor instead. -func (*DeltaDiscoveryRequest) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_discovery_proto_rawDescGZIP(), []int{2} -} - -func (x *DeltaDiscoveryRequest) GetNode() *core.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DeltaDiscoveryRequest) GetResourceNamesSubscribe() []string { - if x != nil { - return x.ResourceNamesSubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResourceNamesUnsubscribe() []string { - if x != nil { - return x.ResourceNamesUnsubscribe - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetInitialResourceVersions() map[string]string { - if x != nil { - return x.InitialResourceVersions - } - return nil -} - -func (x *DeltaDiscoveryRequest) GetResponseNonce() string { - if x != nil { - return x.ResponseNonce - } - return "" -} - -func (x *DeltaDiscoveryRequest) GetErrorDetail() *status.Status { - if x != nil { - return x.ErrorDetail - } - return nil -} - -// [#next-free-field: 7] -type DeltaDiscoveryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version of the response data (used for debugging). - SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` - // The response resources. These are typed resources, whose types must match - // the type_url field. - Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty. - TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // Resources names of resources that have be deleted and to be removed from the xDS Client. - // Removed resources for missing resources can be ignored. - RemovedResources []string `protobuf:"bytes,6,rep,name=removed_resources,json=removedResources,proto3" json:"removed_resources,omitempty"` - // The nonce provides a way for DeltaDiscoveryRequests to uniquely - // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. - Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (x *DeltaDiscoveryResponse) Reset() { - *x = DeltaDiscoveryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeltaDiscoveryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeltaDiscoveryResponse) ProtoMessage() {} - -func (x *DeltaDiscoveryResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeltaDiscoveryResponse.ProtoReflect.Descriptor instead. -func (*DeltaDiscoveryResponse) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_discovery_proto_rawDescGZIP(), []int{3} -} - -func (x *DeltaDiscoveryResponse) GetSystemVersionInfo() string { - if x != nil { - return x.SystemVersionInfo - } - return "" -} - -func (x *DeltaDiscoveryResponse) GetResources() []*Resource { - if x != nil { - return x.Resources - } - return nil -} - -func (x *DeltaDiscoveryResponse) GetTypeUrl() string { - if x != nil { - return x.TypeUrl - } - return "" -} - -func (x *DeltaDiscoveryResponse) GetRemovedResources() []string { - if x != nil { - return x.RemovedResources - } - return nil -} - -func (x *DeltaDiscoveryResponse) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource's name, to distinguish it from others of the same type of resource. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // The aliases are a list of other names that this resource can go by. - Aliases []string `protobuf:"bytes,4,rep,name=aliases,proto3" json:"aliases,omitempty"` - // The resource level version. It allows xDS to track the state of individual - // resources. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // The resource being tracked. - Resource *any1.Any `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_discovery_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_discovery_proto_rawDescGZIP(), []int{4} -} - -func (x *Resource) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Resource) GetAliases() []string { - if x != nil { - return x.Aliases - } - return nil -} - -func (x *Resource) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *Resource) GetResource() *any1.Any { - if x != nil { - return x.Resource - } - return nil -} - -var File_envoy_api_v2_discovery_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_discovery_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, - 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, - 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x02, - 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, - 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, - 0x65, 0x55, 0x72, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x22, 0xf9, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x09, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, - 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, - 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, - 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x22, 0xff, - 0x03, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, - 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x75, 0x6e, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x18, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x55, 0x6e, 0x73, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x7c, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, - 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x1a, 0x4a, 0x0a, 0x1c, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xdc, 0x01, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x09, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2b, 0x0a, 0x11, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, - 0x84, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x93, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, - 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1c, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_discovery_proto_rawDescOnce sync.Once - file_envoy_api_v2_discovery_proto_rawDescData = file_envoy_api_v2_discovery_proto_rawDesc -) - -func file_envoy_api_v2_discovery_proto_rawDescGZIP() []byte { - file_envoy_api_v2_discovery_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_discovery_proto_rawDescData) - }) - return file_envoy_api_v2_discovery_proto_rawDescData -} - -var file_envoy_api_v2_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_envoy_api_v2_discovery_proto_goTypes = []interface{}{ - (*DiscoveryRequest)(nil), // 0: envoy.api.v2.DiscoveryRequest - (*DiscoveryResponse)(nil), // 1: envoy.api.v2.DiscoveryResponse - (*DeltaDiscoveryRequest)(nil), // 2: envoy.api.v2.DeltaDiscoveryRequest - (*DeltaDiscoveryResponse)(nil), // 3: envoy.api.v2.DeltaDiscoveryResponse - (*Resource)(nil), // 4: envoy.api.v2.Resource - nil, // 5: envoy.api.v2.DeltaDiscoveryRequest.InitialResourceVersionsEntry - (*core.Node)(nil), // 6: envoy.api.v2.core.Node - (*status.Status)(nil), // 7: google.rpc.Status - (*any1.Any)(nil), // 8: google.protobuf.Any - (*core.ControlPlane)(nil), // 9: envoy.api.v2.core.ControlPlane -} -var file_envoy_api_v2_discovery_proto_depIdxs = []int32{ - 6, // 0: envoy.api.v2.DiscoveryRequest.node:type_name -> envoy.api.v2.core.Node - 7, // 1: envoy.api.v2.DiscoveryRequest.error_detail:type_name -> google.rpc.Status - 8, // 2: envoy.api.v2.DiscoveryResponse.resources:type_name -> google.protobuf.Any - 9, // 3: envoy.api.v2.DiscoveryResponse.control_plane:type_name -> envoy.api.v2.core.ControlPlane - 6, // 4: envoy.api.v2.DeltaDiscoveryRequest.node:type_name -> envoy.api.v2.core.Node - 5, // 5: envoy.api.v2.DeltaDiscoveryRequest.initial_resource_versions:type_name -> envoy.api.v2.DeltaDiscoveryRequest.InitialResourceVersionsEntry - 7, // 6: envoy.api.v2.DeltaDiscoveryRequest.error_detail:type_name -> google.rpc.Status - 4, // 7: envoy.api.v2.DeltaDiscoveryResponse.resources:type_name -> envoy.api.v2.Resource - 8, // 8: envoy.api.v2.Resource.resource:type_name -> google.protobuf.Any - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_discovery_proto_init() } -func file_envoy_api_v2_discovery_proto_init() { - if File_envoy_api_v2_discovery_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeltaDiscoveryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_discovery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeltaDiscoveryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_discovery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_discovery_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_discovery_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_discovery_proto_depIdxs, - MessageInfos: file_envoy_api_v2_discovery_proto_msgTypes, - }.Build() - File_envoy_api_v2_discovery_proto = out.File - file_envoy_api_v2_discovery_proto_rawDesc = nil - file_envoy_api_v2_discovery_proto_goTypes = nil - file_envoy_api_v2_discovery_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go deleted file mode 100644 index ddf87860d4ba..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/discovery.pb.validate.go +++ /dev/null @@ -1,813 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/discovery.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on DiscoveryRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DiscoveryRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DiscoveryRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DiscoveryRequestMultiError, or nil if none found. -func (m *DiscoveryRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DiscoveryRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for VersionInfo - - if all { - switch v := interface{}(m.GetNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TypeUrl - - // no validation rules for ResponseNonce - - if all { - switch v := interface{}(m.GetErrorDetail()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DiscoveryRequestMultiError(errors) - } - - return nil -} - -// DiscoveryRequestMultiError is an error wrapping multiple validation errors -// returned by DiscoveryRequest.ValidateAll() if the designated constraints -// aren't met. -type DiscoveryRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DiscoveryRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DiscoveryRequestMultiError) AllErrors() []error { return m } - -// DiscoveryRequestValidationError is the validation error returned by -// DiscoveryRequest.Validate if the designated constraints aren't met. -type DiscoveryRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DiscoveryRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DiscoveryRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DiscoveryRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DiscoveryRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DiscoveryRequestValidationError) ErrorName() string { return "DiscoveryRequestValidationError" } - -// Error satisfies the builtin error interface -func (e DiscoveryRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDiscoveryRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DiscoveryRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DiscoveryRequestValidationError{} - -// Validate checks the field values on DiscoveryResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *DiscoveryResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DiscoveryResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DiscoveryResponseMultiError, or nil if none found. -func (m *DiscoveryResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DiscoveryResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for VersionInfo - - for idx, item := range m.GetResources() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for Canary - - // no validation rules for TypeUrl - - // no validation rules for Nonce - - if all { - switch v := interface{}(m.GetControlPlane()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DiscoveryResponseValidationError{ - field: "ControlPlane", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DiscoveryResponseMultiError(errors) - } - - return nil -} - -// DiscoveryResponseMultiError is an error wrapping multiple validation errors -// returned by DiscoveryResponse.ValidateAll() if the designated constraints -// aren't met. -type DiscoveryResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DiscoveryResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DiscoveryResponseMultiError) AllErrors() []error { return m } - -// DiscoveryResponseValidationError is the validation error returned by -// DiscoveryResponse.Validate if the designated constraints aren't met. -type DiscoveryResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DiscoveryResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DiscoveryResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DiscoveryResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DiscoveryResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DiscoveryResponseValidationError) ErrorName() string { - return "DiscoveryResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DiscoveryResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDiscoveryResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DiscoveryResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DiscoveryResponseValidationError{} - -// Validate checks the field values on DeltaDiscoveryRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeltaDiscoveryRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeltaDiscoveryRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeltaDiscoveryRequestMultiError, or nil if none found. -func (m *DeltaDiscoveryRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DeltaDiscoveryRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TypeUrl - - // no validation rules for InitialResourceVersions - - // no validation rules for ResponseNonce - - if all { - switch v := interface{}(m.GetErrorDetail()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryRequestValidationError{ - field: "ErrorDetail", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DeltaDiscoveryRequestMultiError(errors) - } - - return nil -} - -// DeltaDiscoveryRequestMultiError is an error wrapping multiple validation -// errors returned by DeltaDiscoveryRequest.ValidateAll() if the designated -// constraints aren't met. -type DeltaDiscoveryRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeltaDiscoveryRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeltaDiscoveryRequestMultiError) AllErrors() []error { return m } - -// DeltaDiscoveryRequestValidationError is the validation error returned by -// DeltaDiscoveryRequest.Validate if the designated constraints aren't met. -type DeltaDiscoveryRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeltaDiscoveryRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeltaDiscoveryRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeltaDiscoveryRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeltaDiscoveryRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeltaDiscoveryRequestValidationError) ErrorName() string { - return "DeltaDiscoveryRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DeltaDiscoveryRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeltaDiscoveryRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeltaDiscoveryRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeltaDiscoveryRequestValidationError{} - -// Validate checks the field values on DeltaDiscoveryResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeltaDiscoveryResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeltaDiscoveryResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeltaDiscoveryResponseMultiError, or nil if none found. -func (m *DeltaDiscoveryResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DeltaDiscoveryResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for SystemVersionInfo - - for idx, item := range m.GetResources() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DeltaDiscoveryResponseValidationError{ - field: fmt.Sprintf("Resources[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for TypeUrl - - // no validation rules for Nonce - - if len(errors) > 0 { - return DeltaDiscoveryResponseMultiError(errors) - } - - return nil -} - -// DeltaDiscoveryResponseMultiError is an error wrapping multiple validation -// errors returned by DeltaDiscoveryResponse.ValidateAll() if the designated -// constraints aren't met. -type DeltaDiscoveryResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeltaDiscoveryResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeltaDiscoveryResponseMultiError) AllErrors() []error { return m } - -// DeltaDiscoveryResponseValidationError is the validation error returned by -// DeltaDiscoveryResponse.Validate if the designated constraints aren't met. -type DeltaDiscoveryResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeltaDiscoveryResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeltaDiscoveryResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeltaDiscoveryResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeltaDiscoveryResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeltaDiscoveryResponseValidationError) ErrorName() string { - return "DeltaDiscoveryResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeltaDiscoveryResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeltaDiscoveryResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeltaDiscoveryResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeltaDiscoveryResponseValidationError{} - -// Validate checks the field values on Resource with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Resource) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Resource with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ResourceMultiError, or nil -// if none found. -func (m *Resource) ValidateAll() error { - return m.validate(true) -} - -func (m *Resource) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for Version - - if all { - switch v := interface{}(m.GetResource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ResourceValidationError{ - field: "Resource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ResourceMultiError(errors) - } - - return nil -} - -// ResourceMultiError is an error wrapping multiple validation errors returned -// by Resource.ValidateAll() if the designated constraints aren't met. -type ResourceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResourceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResourceMultiError) AllErrors() []error { return m } - -// ResourceValidationError is the validation error returned by -// Resource.Validate if the designated constraints aren't met. -type ResourceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResourceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResourceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResourceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResourceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" } - -// Error satisfies the builtin error interface -func (e ResourceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResource.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResourceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResourceValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go deleted file mode 100644 index dcd3f39df6af..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.go +++ /dev/null @@ -1,418 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/eds.proto - -package apiv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -type EdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *EdsDummy) Reset() { - *x = EdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_eds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EdsDummy) ProtoMessage() {} - -func (x *EdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_eds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EdsDummy.ProtoReflect.Descriptor instead. -func (*EdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_eds_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_api_v2_eds_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_eds_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, - 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x0a, 0x0a, 0x08, 0x45, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0x80, 0x03, 0x0a, - 0x18, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7b, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x19, 0x22, 0x17, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x3a, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, - 0x3a, 0x01, 0x2a, 0x1a, 0x2a, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, - 0x8f, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, - 0x45, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1b, 0x12, 0x19, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_eds_proto_rawDescOnce sync.Once - file_envoy_api_v2_eds_proto_rawDescData = file_envoy_api_v2_eds_proto_rawDesc -) - -func file_envoy_api_v2_eds_proto_rawDescGZIP() []byte { - file_envoy_api_v2_eds_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_eds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_eds_proto_rawDescData) - }) - return file_envoy_api_v2_eds_proto_rawDescData -} - -var file_envoy_api_v2_eds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_eds_proto_goTypes = []interface{}{ - (*EdsDummy)(nil), // 0: envoy.api.v2.EdsDummy - (*DiscoveryRequest)(nil), // 1: envoy.api.v2.DiscoveryRequest - (*DeltaDiscoveryRequest)(nil), // 2: envoy.api.v2.DeltaDiscoveryRequest - (*DiscoveryResponse)(nil), // 3: envoy.api.v2.DiscoveryResponse - (*DeltaDiscoveryResponse)(nil), // 4: envoy.api.v2.DeltaDiscoveryResponse -} -var file_envoy_api_v2_eds_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.EndpointDiscoveryService.StreamEndpoints:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 1: envoy.api.v2.EndpointDiscoveryService.DeltaEndpoints:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 1, // 2: envoy.api.v2.EndpointDiscoveryService.FetchEndpoints:input_type -> envoy.api.v2.DiscoveryRequest - 3, // 3: envoy.api.v2.EndpointDiscoveryService.StreamEndpoints:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 4: envoy.api.v2.EndpointDiscoveryService.DeltaEndpoints:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 3, // 5: envoy.api.v2.EndpointDiscoveryService.FetchEndpoints:output_type -> envoy.api.v2.DiscoveryResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_eds_proto_init() } -func file_envoy_api_v2_eds_proto_init() { - if File_envoy_api_v2_eds_proto != nil { - return - } - file_envoy_api_v2_discovery_proto_init() - file_envoy_api_v2_endpoint_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_eds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_eds_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_api_v2_eds_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_eds_proto_depIdxs, - MessageInfos: file_envoy_api_v2_eds_proto_msgTypes, - }.Build() - File_envoy_api_v2_eds_proto = out.File - file_envoy_api_v2_eds_proto_rawDesc = nil - file_envoy_api_v2_eds_proto_goTypes = nil - file_envoy_api_v2_eds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// EndpointDiscoveryServiceClient is the client API for EndpointDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EndpointDiscoveryServiceClient interface { - // The resource_names field in DiscoveryRequest specifies a list of clusters - // to subscribe to updates for. - StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) - DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) - FetchEndpoints(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) -} - -type endpointDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEndpointDiscoveryServiceClient(cc grpc.ClientConnInterface) EndpointDiscoveryServiceClient { - return &endpointDiscoveryServiceClient{cc} -} - -func (c *endpointDiscoveryServiceClient) StreamEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_StreamEndpointsClient, error) { - stream, err := c.cc.NewStream(ctx, &_EndpointDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints", opts...) - if err != nil { - return nil, err - } - x := &endpointDiscoveryServiceStreamEndpointsClient{stream} - return x, nil -} - -type EndpointDiscoveryService_StreamEndpointsClient interface { - Send(*DiscoveryRequest) error - Recv() (*DiscoveryResponse, error) - grpc.ClientStream -} - -type endpointDiscoveryServiceStreamEndpointsClient struct { - grpc.ClientStream -} - -func (x *endpointDiscoveryServiceStreamEndpointsClient) Send(m *DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *endpointDiscoveryServiceStreamEndpointsClient) Recv() (*DiscoveryResponse, error) { - m := new(DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *endpointDiscoveryServiceClient) DeltaEndpoints(ctx context.Context, opts ...grpc.CallOption) (EndpointDiscoveryService_DeltaEndpointsClient, error) { - stream, err := c.cc.NewStream(ctx, &_EndpointDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.EndpointDiscoveryService/DeltaEndpoints", opts...) - if err != nil { - return nil, err - } - x := &endpointDiscoveryServiceDeltaEndpointsClient{stream} - return x, nil -} - -type EndpointDiscoveryService_DeltaEndpointsClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type endpointDiscoveryServiceDeltaEndpointsClient struct { - grpc.ClientStream -} - -func (x *endpointDiscoveryServiceDeltaEndpointsClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *endpointDiscoveryServiceDeltaEndpointsClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *endpointDiscoveryServiceClient) FetchEndpoints(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { - out := new(DiscoveryResponse) - err := c.cc.Invoke(ctx, "/envoy.api.v2.EndpointDiscoveryService/FetchEndpoints", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EndpointDiscoveryServiceServer is the server API for EndpointDiscoveryService service. -type EndpointDiscoveryServiceServer interface { - // The resource_names field in DiscoveryRequest specifies a list of clusters - // to subscribe to updates for. - StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error - DeltaEndpoints(EndpointDiscoveryService_DeltaEndpointsServer) error - FetchEndpoints(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) -} - -// UnimplementedEndpointDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedEndpointDiscoveryServiceServer struct { -} - -func (*UnimplementedEndpointDiscoveryServiceServer) StreamEndpoints(EndpointDiscoveryService_StreamEndpointsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamEndpoints not implemented") -} -func (*UnimplementedEndpointDiscoveryServiceServer) DeltaEndpoints(EndpointDiscoveryService_DeltaEndpointsServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaEndpoints not implemented") -} -func (*UnimplementedEndpointDiscoveryServiceServer) FetchEndpoints(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchEndpoints not implemented") -} - -func RegisterEndpointDiscoveryServiceServer(s *grpc.Server, srv EndpointDiscoveryServiceServer) { - s.RegisterService(&_EndpointDiscoveryService_serviceDesc, srv) -} - -func _EndpointDiscoveryService_StreamEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(EndpointDiscoveryServiceServer).StreamEndpoints(&endpointDiscoveryServiceStreamEndpointsServer{stream}) -} - -type EndpointDiscoveryService_StreamEndpointsServer interface { - Send(*DiscoveryResponse) error - Recv() (*DiscoveryRequest, error) - grpc.ServerStream -} - -type endpointDiscoveryServiceStreamEndpointsServer struct { - grpc.ServerStream -} - -func (x *endpointDiscoveryServiceStreamEndpointsServer) Send(m *DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *endpointDiscoveryServiceStreamEndpointsServer) Recv() (*DiscoveryRequest, error) { - m := new(DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _EndpointDiscoveryService_DeltaEndpoints_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(EndpointDiscoveryServiceServer).DeltaEndpoints(&endpointDiscoveryServiceDeltaEndpointsServer{stream}) -} - -type EndpointDiscoveryService_DeltaEndpointsServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type endpointDiscoveryServiceDeltaEndpointsServer struct { - grpc.ServerStream -} - -func (x *endpointDiscoveryServiceDeltaEndpointsServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *endpointDiscoveryServiceDeltaEndpointsServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _EndpointDiscoveryService_FetchEndpoints_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.api.v2.EndpointDiscoveryService/FetchEndpoints", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EndpointDiscoveryServiceServer).FetchEndpoints(ctx, req.(*DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _EndpointDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.api.v2.EndpointDiscoveryService", - HandlerType: (*EndpointDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchEndpoints", - Handler: _EndpointDiscoveryService_FetchEndpoints_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamEndpoints", - Handler: _EndpointDiscoveryService_StreamEndpoints_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaEndpoints", - Handler: _EndpointDiscoveryService_DeltaEndpoints_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/api/v2/eds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go deleted file mode 100644 index 1f701fd911be..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/eds.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/eds.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on EdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *EdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on EdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in EdsDummyMultiError, or nil -// if none found. -func (m *EdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *EdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return EdsDummyMultiError(errors) - } - - return nil -} - -// EdsDummyMultiError is an error wrapping multiple validation errors returned -// by EdsDummy.ValidateAll() if the designated constraints aren't met. -type EdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m EdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m EdsDummyMultiError) AllErrors() []error { return m } - -// EdsDummyValidationError is the validation error returned by -// EdsDummy.Validate if the designated constraints aren't met. -type EdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EdsDummyValidationError) ErrorName() string { return "EdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e EdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go deleted file mode 100644 index 488e9f8f4ebe..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.go +++ /dev/null @@ -1,487 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/endpoint.proto - -package apiv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" - _type "github.com/envoyproxy/go-control-plane/envoy/type" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - duration "github.com/golang/protobuf/ptypes/duration" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -// [#next-free-field: 6] -type ClusterLoadAssignment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - // List of endpoints to load balance to. - Endpoints []*endpoint.LocalityLbEndpoints `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - // [#not-implemented-hide:] - NamedEndpoints map[string]*endpoint.Endpoint `protobuf:"bytes,5,rep,name=named_endpoints,json=namedEndpoints,proto3" json:"named_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Load balancing policy settings. - Policy *ClusterLoadAssignment_Policy `protobuf:"bytes,4,opt,name=policy,proto3" json:"policy,omitempty"` -} - -func (x *ClusterLoadAssignment) Reset() { - *x = ClusterLoadAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterLoadAssignment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterLoadAssignment) ProtoMessage() {} - -func (x *ClusterLoadAssignment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterLoadAssignment.ProtoReflect.Descriptor instead. -func (*ClusterLoadAssignment) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_proto_rawDescGZIP(), []int{0} -} - -func (x *ClusterLoadAssignment) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *ClusterLoadAssignment) GetEndpoints() []*endpoint.LocalityLbEndpoints { - if x != nil { - return x.Endpoints - } - return nil -} - -func (x *ClusterLoadAssignment) GetNamedEndpoints() map[string]*endpoint.Endpoint { - if x != nil { - return x.NamedEndpoints - } - return nil -} - -func (x *ClusterLoadAssignment) GetPolicy() *ClusterLoadAssignment_Policy { - if x != nil { - return x.Policy - } - return nil -} - -// Load balancing policy settings. -// [#next-free-field: 6] -type ClusterLoadAssignment_Policy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - // [#not-implemented-hide:] - DropOverloads []*ClusterLoadAssignment_Policy_DropOverload `protobuf:"bytes,2,rep,name=drop_overloads,json=dropOverloads,proto3" json:"drop_overloads,omitempty"` - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the percentage of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - OverprovisioningFactor *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=overprovisioning_factor,json=overprovisioningFactor,proto3" json:"overprovisioning_factor,omitempty"` - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - EndpointStaleAfter *duration.Duration `protobuf:"bytes,4,opt,name=endpoint_stale_after,json=endpointStaleAfter,proto3" json:"endpoint_stale_after,omitempty"` - // The flag to disable overprovisioning. If it is set to true, - // :ref:`overprovisioning factor - // ` will be ignored - // and Envoy will not perform graceful failover between priority levels or - // localities as endpoints become unhealthy. Otherwise Envoy will perform - // graceful failover as :ref:`overprovisioning factor - // ` suggests. - // [#not-implemented-hide:] - // - // Deprecated: Do not use. - DisableOverprovisioning bool `protobuf:"varint,5,opt,name=disable_overprovisioning,json=disableOverprovisioning,proto3" json:"disable_overprovisioning,omitempty"` -} - -func (x *ClusterLoadAssignment_Policy) Reset() { - *x = ClusterLoadAssignment_Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterLoadAssignment_Policy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterLoadAssignment_Policy) ProtoMessage() {} - -func (x *ClusterLoadAssignment_Policy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterLoadAssignment_Policy.ProtoReflect.Descriptor instead. -func (*ClusterLoadAssignment_Policy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *ClusterLoadAssignment_Policy) GetDropOverloads() []*ClusterLoadAssignment_Policy_DropOverload { - if x != nil { - return x.DropOverloads - } - return nil -} - -func (x *ClusterLoadAssignment_Policy) GetOverprovisioningFactor() *wrappers.UInt32Value { - if x != nil { - return x.OverprovisioningFactor - } - return nil -} - -func (x *ClusterLoadAssignment_Policy) GetEndpointStaleAfter() *duration.Duration { - if x != nil { - return x.EndpointStaleAfter - } - return nil -} - -// Deprecated: Do not use. -func (x *ClusterLoadAssignment_Policy) GetDisableOverprovisioning() bool { - if x != nil { - return x.DisableOverprovisioning - } - return false -} - -// [#not-implemented-hide:] -type ClusterLoadAssignment_Policy_DropOverload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier for the policy specifying the drop. - Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` - // Percentage of traffic that should be dropped for the category. - DropPercentage *_type.FractionalPercent `protobuf:"bytes,2,opt,name=drop_percentage,json=dropPercentage,proto3" json:"drop_percentage,omitempty"` -} - -func (x *ClusterLoadAssignment_Policy_DropOverload) Reset() { - *x = ClusterLoadAssignment_Policy_DropOverload{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterLoadAssignment_Policy_DropOverload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterLoadAssignment_Policy_DropOverload) ProtoMessage() {} - -func (x *ClusterLoadAssignment_Policy_DropOverload) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterLoadAssignment_Policy_DropOverload.ProtoReflect.Descriptor instead. -func (*ClusterLoadAssignment_Policy_DropOverload) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (x *ClusterLoadAssignment_Policy_DropOverload) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *ClusterLoadAssignment_Policy_DropOverload) GetDropPercentage() *_type.FractionalPercent { - if x != nil { - return x.DropPercentage - } - return nil -} - -var File_envoy_api_v2_endpoint_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_endpoint_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfb, - 0x06, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, - 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x60, - 0x0a, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, - 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x61, 0x6d, - 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0e, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x42, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xe1, 0x03, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x5e, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, - 0x61, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, - 0x52, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, - 0x5e, 0x0a, 0x17, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x16, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x55, 0x0a, 0x14, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6c, - 0x65, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, - 0x2a, 0x00, 0x52, 0x12, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x6c, - 0x65, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x17, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0x7b, 0x0a, 0x0c, 0x44, 0x72, 0x6f, 0x70, 0x4f, 0x76, 0x65, - 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, - 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x0f, 0x64, 0x72, - 0x6f, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x52, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x1a, 0x62, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, - 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x35, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x90, 0x01, 0x0a, - 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_endpoint_proto_rawDescOnce sync.Once - file_envoy_api_v2_endpoint_proto_rawDescData = file_envoy_api_v2_endpoint_proto_rawDesc -) - -func file_envoy_api_v2_endpoint_proto_rawDescGZIP() []byte { - file_envoy_api_v2_endpoint_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_endpoint_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_endpoint_proto_rawDescData) - }) - return file_envoy_api_v2_endpoint_proto_rawDescData -} - -var file_envoy_api_v2_endpoint_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_api_v2_endpoint_proto_goTypes = []interface{}{ - (*ClusterLoadAssignment)(nil), // 0: envoy.api.v2.ClusterLoadAssignment - (*ClusterLoadAssignment_Policy)(nil), // 1: envoy.api.v2.ClusterLoadAssignment.Policy - nil, // 2: envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry - (*ClusterLoadAssignment_Policy_DropOverload)(nil), // 3: envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload - (*endpoint.LocalityLbEndpoints)(nil), // 4: envoy.api.v2.endpoint.LocalityLbEndpoints - (*wrappers.UInt32Value)(nil), // 5: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 6: google.protobuf.Duration - (*endpoint.Endpoint)(nil), // 7: envoy.api.v2.endpoint.Endpoint - (*_type.FractionalPercent)(nil), // 8: envoy.type.FractionalPercent -} -var file_envoy_api_v2_endpoint_proto_depIdxs = []int32{ - 4, // 0: envoy.api.v2.ClusterLoadAssignment.endpoints:type_name -> envoy.api.v2.endpoint.LocalityLbEndpoints - 2, // 1: envoy.api.v2.ClusterLoadAssignment.named_endpoints:type_name -> envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry - 1, // 2: envoy.api.v2.ClusterLoadAssignment.policy:type_name -> envoy.api.v2.ClusterLoadAssignment.Policy - 3, // 3: envoy.api.v2.ClusterLoadAssignment.Policy.drop_overloads:type_name -> envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload - 5, // 4: envoy.api.v2.ClusterLoadAssignment.Policy.overprovisioning_factor:type_name -> google.protobuf.UInt32Value - 6, // 5: envoy.api.v2.ClusterLoadAssignment.Policy.endpoint_stale_after:type_name -> google.protobuf.Duration - 7, // 6: envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry.value:type_name -> envoy.api.v2.endpoint.Endpoint - 8, // 7: envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload.drop_percentage:type_name -> envoy.type.FractionalPercent - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_endpoint_proto_init() } -func file_envoy_api_v2_endpoint_proto_init() { - if File_envoy_api_v2_endpoint_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_endpoint_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterLoadAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterLoadAssignment_Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterLoadAssignment_Policy_DropOverload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_endpoint_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_endpoint_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_endpoint_proto_depIdxs, - MessageInfos: file_envoy_api_v2_endpoint_proto_msgTypes, - }.Build() - File_envoy_api_v2_endpoint_proto = out.File - file_envoy_api_v2_endpoint_proto_rawDesc = nil - file_envoy_api_v2_endpoint_proto_goTypes = nil - file_envoy_api_v2_endpoint_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go deleted file mode 100644 index 6164e74e87b8..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint.pb.validate.go +++ /dev/null @@ -1,588 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/endpoint.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ClusterLoadAssignment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ClusterLoadAssignment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ClusterLoadAssignment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ClusterLoadAssignmentMultiError, or nil if none found. -func (m *ClusterLoadAssignment) ValidateAll() error { - return m.validate(true) -} - -func (m *ClusterLoadAssignment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetClusterName()) < 1 { - err := ClusterLoadAssignmentValidationError{ - field: "ClusterName", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetEndpoints() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - { - sorted_keys := make([]string, len(m.GetNamedEndpoints())) - i := 0 - for key := range m.GetNamedEndpoints() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetNamedEndpoints()[key] - _ = val - - // no validation rules for NamedEndpoints[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("NamedEndpoints[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("NamedEndpoints[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterLoadAssignmentValidationError{ - field: fmt.Sprintf("NamedEndpoints[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if all { - switch v := interface{}(m.GetPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterLoadAssignmentValidationError{ - field: "Policy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterLoadAssignmentValidationError{ - field: "Policy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterLoadAssignmentValidationError{ - field: "Policy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ClusterLoadAssignmentMultiError(errors) - } - - return nil -} - -// ClusterLoadAssignmentMultiError is an error wrapping multiple validation -// errors returned by ClusterLoadAssignment.ValidateAll() if the designated -// constraints aren't met. -type ClusterLoadAssignmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterLoadAssignmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterLoadAssignmentMultiError) AllErrors() []error { return m } - -// ClusterLoadAssignmentValidationError is the validation error returned by -// ClusterLoadAssignment.Validate if the designated constraints aren't met. -type ClusterLoadAssignmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterLoadAssignmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterLoadAssignmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterLoadAssignmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterLoadAssignmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterLoadAssignmentValidationError) ErrorName() string { - return "ClusterLoadAssignmentValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterLoadAssignmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterLoadAssignment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterLoadAssignmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterLoadAssignmentValidationError{} - -// Validate checks the field values on ClusterLoadAssignment_Policy with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ClusterLoadAssignment_Policy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ClusterLoadAssignment_Policy with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ClusterLoadAssignment_PolicyMultiError, or nil if none found. -func (m *ClusterLoadAssignment_Policy) ValidateAll() error { - return m.validate(true) -} - -func (m *ClusterLoadAssignment_Policy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetDropOverloads() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterLoadAssignment_PolicyValidationError{ - field: fmt.Sprintf("DropOverloads[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterLoadAssignment_PolicyValidationError{ - field: fmt.Sprintf("DropOverloads[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterLoadAssignment_PolicyValidationError{ - field: fmt.Sprintf("DropOverloads[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if wrapper := m.GetOverprovisioningFactor(); wrapper != nil { - - if wrapper.GetValue() <= 0 { - err := ClusterLoadAssignment_PolicyValidationError{ - field: "OverprovisioningFactor", - reason: "value must be greater than 0", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if d := m.GetEndpointStaleAfter(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = ClusterLoadAssignment_PolicyValidationError{ - field: "EndpointStaleAfter", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := ClusterLoadAssignment_PolicyValidationError{ - field: "EndpointStaleAfter", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - // no validation rules for DisableOverprovisioning - - if len(errors) > 0 { - return ClusterLoadAssignment_PolicyMultiError(errors) - } - - return nil -} - -// ClusterLoadAssignment_PolicyMultiError is an error wrapping multiple -// validation errors returned by ClusterLoadAssignment_Policy.ValidateAll() if -// the designated constraints aren't met. -type ClusterLoadAssignment_PolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterLoadAssignment_PolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterLoadAssignment_PolicyMultiError) AllErrors() []error { return m } - -// ClusterLoadAssignment_PolicyValidationError is the validation error returned -// by ClusterLoadAssignment_Policy.Validate if the designated constraints -// aren't met. -type ClusterLoadAssignment_PolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterLoadAssignment_PolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterLoadAssignment_PolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterLoadAssignment_PolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterLoadAssignment_PolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterLoadAssignment_PolicyValidationError) ErrorName() string { - return "ClusterLoadAssignment_PolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterLoadAssignment_PolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterLoadAssignment_Policy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterLoadAssignment_PolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterLoadAssignment_PolicyValidationError{} - -// Validate checks the field values on -// ClusterLoadAssignment_Policy_DropOverload with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ClusterLoadAssignment_Policy_DropOverload) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// ClusterLoadAssignment_Policy_DropOverload with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// ClusterLoadAssignment_Policy_DropOverloadMultiError, or nil if none found. -func (m *ClusterLoadAssignment_Policy_DropOverload) ValidateAll() error { - return m.validate(true) -} - -func (m *ClusterLoadAssignment_Policy_DropOverload) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetCategory()) < 1 { - err := ClusterLoadAssignment_Policy_DropOverloadValidationError{ - field: "Category", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetDropPercentage()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterLoadAssignment_Policy_DropOverloadValidationError{ - field: "DropPercentage", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterLoadAssignment_Policy_DropOverloadValidationError{ - field: "DropPercentage", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDropPercentage()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterLoadAssignment_Policy_DropOverloadValidationError{ - field: "DropPercentage", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ClusterLoadAssignment_Policy_DropOverloadMultiError(errors) - } - - return nil -} - -// ClusterLoadAssignment_Policy_DropOverloadMultiError is an error wrapping -// multiple validation errors returned by -// ClusterLoadAssignment_Policy_DropOverload.ValidateAll() if the designated -// constraints aren't met. -type ClusterLoadAssignment_Policy_DropOverloadMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterLoadAssignment_Policy_DropOverloadMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterLoadAssignment_Policy_DropOverloadMultiError) AllErrors() []error { return m } - -// ClusterLoadAssignment_Policy_DropOverloadValidationError is the validation -// error returned by ClusterLoadAssignment_Policy_DropOverload.Validate if the -// designated constraints aren't met. -type ClusterLoadAssignment_Policy_DropOverloadValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) ErrorName() string { - return "ClusterLoadAssignment_Policy_DropOverloadValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterLoadAssignment_Policy_DropOverloadValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterLoadAssignment_Policy_DropOverload.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterLoadAssignment_Policy_DropOverloadValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterLoadAssignment_Policy_DropOverloadValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go deleted file mode 100644 index 9b7e3d72c54b..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/endpoint/endpoint.proto - -package endpoint - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_envoy_api_v2_endpoint_endpoint_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_endpoint_endpoint_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x74, - 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x0d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_envoy_api_v2_endpoint_endpoint_proto_goTypes = []interface{}{} -var file_envoy_api_v2_endpoint_endpoint_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_endpoint_endpoint_proto_init() } -func file_envoy_api_v2_endpoint_endpoint_proto_init() { - if File_envoy_api_v2_endpoint_endpoint_proto != nil { - return - } - file_envoy_api_v2_endpoint_endpoint_components_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_endpoint_endpoint_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_endpoint_endpoint_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_endpoint_endpoint_proto_depIdxs, - }.Build() - File_envoy_api_v2_endpoint_endpoint_proto = out.File - file_envoy_api_v2_endpoint_endpoint_proto_rawDesc = nil - file_envoy_api_v2_endpoint_endpoint_proto_goTypes = nil - file_envoy_api_v2_endpoint_endpoint_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go deleted file mode 100644 index fe8796113336..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/endpoint/endpoint.proto - -package endpoint - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go deleted file mode 100644 index 462682f28fdf..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.go +++ /dev/null @@ -1,631 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/endpoint/endpoint_components.proto - -package endpoint - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Upstream host identifier. -type Endpoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig *Endpoint_HealthCheckConfig `protobuf:"bytes,2,opt,name=health_check_config,json=healthCheckConfig,proto3" json:"health_check_config,omitempty"` - // The hostname associated with this endpoint. This hostname is not used for routing or address - // resolution. If provided, it will be associated with the endpoint, and can be used for features - // that require a hostname, like - // :ref:`auto_host_rewrite `. - Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` -} - -func (x *Endpoint) Reset() { - *x = Endpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Endpoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Endpoint) ProtoMessage() {} - -func (x *Endpoint) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Endpoint.ProtoReflect.Descriptor instead. -func (*Endpoint) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescGZIP(), []int{0} -} - -func (x *Endpoint) GetAddress() *core.Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *Endpoint) GetHealthCheckConfig() *Endpoint_HealthCheckConfig { - if x != nil { - return x.HealthCheckConfig - } - return nil -} - -func (x *Endpoint) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -// An Endpoint that Envoy can route traffic to. -// [#next-free-field: 6] -type LbEndpoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Upstream host identifier or a named reference. - // - // Types that are assignable to HostIdentifier: - // *LbEndpoint_Endpoint - // *LbEndpoint_EndpointName - HostIdentifier isLbEndpoint_HostIdentifier `protobuf_oneof:"host_identifier"` - // Optional health status when known and supplied by EDS server. - HealthStatus core.HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=envoy.api.v2.core.HealthStatus" json:"health_status,omitempty"` - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as *envoy.lb*. An example boolean key-value pair - // is *canary*, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - Metadata *core.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // The optional load balancing weight of the upstream host; at least 1. - // Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, each host is presumed to have equal - // weight in a locality. The sum of the weights of all endpoints in the - // endpoint's locality must not exceed uint32_t maximal value (4294967295). - LoadBalancingWeight *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"` -} - -func (x *LbEndpoint) Reset() { - *x = LbEndpoint{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LbEndpoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LbEndpoint) ProtoMessage() {} - -func (x *LbEndpoint) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LbEndpoint.ProtoReflect.Descriptor instead. -func (*LbEndpoint) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescGZIP(), []int{1} -} - -func (m *LbEndpoint) GetHostIdentifier() isLbEndpoint_HostIdentifier { - if m != nil { - return m.HostIdentifier - } - return nil -} - -func (x *LbEndpoint) GetEndpoint() *Endpoint { - if x, ok := x.GetHostIdentifier().(*LbEndpoint_Endpoint); ok { - return x.Endpoint - } - return nil -} - -func (x *LbEndpoint) GetEndpointName() string { - if x, ok := x.GetHostIdentifier().(*LbEndpoint_EndpointName); ok { - return x.EndpointName - } - return "" -} - -func (x *LbEndpoint) GetHealthStatus() core.HealthStatus { - if x != nil { - return x.HealthStatus - } - return core.HealthStatus(0) -} - -func (x *LbEndpoint) GetMetadata() *core.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *LbEndpoint) GetLoadBalancingWeight() *wrappers.UInt32Value { - if x != nil { - return x.LoadBalancingWeight - } - return nil -} - -type isLbEndpoint_HostIdentifier interface { - isLbEndpoint_HostIdentifier() -} - -type LbEndpoint_Endpoint struct { - Endpoint *Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3,oneof"` -} - -type LbEndpoint_EndpointName struct { - // [#not-implemented-hide:] - EndpointName string `protobuf:"bytes,5,opt,name=endpoint_name,json=endpointName,proto3,oneof"` -} - -func (*LbEndpoint_Endpoint) isLbEndpoint_HostIdentifier() {} - -func (*LbEndpoint_EndpointName) isLbEndpoint_HostIdentifier() {} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but this is -// generally only done if the different groups need to have different load -// balancing weights or different priorities. -// [#next-free-field: 7] -type LocalityLbEndpoints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifies location of where the upstream hosts run. - Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` - // The group of endpoints belonging to the locality specified. - LbEndpoints []*LbEndpoint `protobuf:"bytes,2,rep,name=lb_endpoints,json=lbEndpoints,proto3" json:"lb_endpoints,omitempty"` - // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. The sum of the weights of all localities at - // the same priority level must not exceed uint32_t maximal value (4294967295). - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - LoadBalancingWeight *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=load_balancing_weight,json=loadBalancingWeight,proto3" json:"load_balancing_weight,omitempty"` - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event all endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - Priority uint32 `protobuf:"varint,5,opt,name=priority,proto3" json:"priority,omitempty"` - // Optional: Per locality proximity value which indicates how close this - // locality is from the source locality. This value only provides ordering - // information (lower the value, closer it is to the source locality). - // This will be consumed by load balancing schemes that need proximity order - // to determine where to route the requests. - // [#not-implemented-hide:] - Proximity *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=proximity,proto3" json:"proximity,omitempty"` -} - -func (x *LocalityLbEndpoints) Reset() { - *x = LocalityLbEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LocalityLbEndpoints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalityLbEndpoints) ProtoMessage() {} - -func (x *LocalityLbEndpoints) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalityLbEndpoints.ProtoReflect.Descriptor instead. -func (*LocalityLbEndpoints) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescGZIP(), []int{2} -} - -func (x *LocalityLbEndpoints) GetLocality() *core.Locality { - if x != nil { - return x.Locality - } - return nil -} - -func (x *LocalityLbEndpoints) GetLbEndpoints() []*LbEndpoint { - if x != nil { - return x.LbEndpoints - } - return nil -} - -func (x *LocalityLbEndpoints) GetLoadBalancingWeight() *wrappers.UInt32Value { - if x != nil { - return x.LoadBalancingWeight - } - return nil -} - -func (x *LocalityLbEndpoints) GetPriority() uint32 { - if x != nil { - return x.Priority - } - return 0 -} - -func (x *LocalityLbEndpoints) GetProximity() *wrappers.UInt32Value { - if x != nil { - return x.Proximity - } - return nil -} - -// The optional health check configuration. -type Endpoint_HealthCheckConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - PortValue uint32 `protobuf:"varint,1,opt,name=port_value,json=portValue,proto3" json:"port_value,omitempty"` - // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this - // to a non-empty value allows overriding the cluster level configuration for a specific - // endpoint. - Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` -} - -func (x *Endpoint_HealthCheckConfig) Reset() { - *x = Endpoint_HealthCheckConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Endpoint_HealthCheckConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Endpoint_HealthCheckConfig) ProtoMessage() {} - -func (x *Endpoint_HealthCheckConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Endpoint_HealthCheckConfig.ProtoReflect.Descriptor instead. -func (*Endpoint_HealthCheckConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Endpoint_HealthCheckConfig) GetPortValue() uint32 { - if x != nil { - return x.PortValue - } - return 0 -} - -func (x *Endpoint_HealthCheckConfig) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -var File_envoy_api_v2_endpoint_endpoint_components_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_endpoint_endpoint_components_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, - 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x02, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x61, 0x0a, 0x13, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x68, - 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, - 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x59, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0a, - 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x52, 0x09, 0x70, 0x6f, 0x72, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0xdf, 0x02, 0x0a, 0x0a, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x3d, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x13, 0x6c, 0x6f, - 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x57, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x22, 0xd1, 0x02, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, - 0x79, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0c, 0x6c, 0x62, 0x5f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x2e, 0x4c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, - 0x6c, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x15, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, - 0x01, 0x52, 0x13, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, - 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, - 0x80, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x09, - 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, - 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x69, 0x74, 0x79, 0x42, 0xa6, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x42, 0x17, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, - 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, - 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescOnce sync.Once - file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescData = file_envoy_api_v2_endpoint_endpoint_components_proto_rawDesc -) - -func file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescGZIP() []byte { - file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescData) - }) - return file_envoy_api_v2_endpoint_endpoint_components_proto_rawDescData -} - -var file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_api_v2_endpoint_endpoint_components_proto_goTypes = []interface{}{ - (*Endpoint)(nil), // 0: envoy.api.v2.endpoint.Endpoint - (*LbEndpoint)(nil), // 1: envoy.api.v2.endpoint.LbEndpoint - (*LocalityLbEndpoints)(nil), // 2: envoy.api.v2.endpoint.LocalityLbEndpoints - (*Endpoint_HealthCheckConfig)(nil), // 3: envoy.api.v2.endpoint.Endpoint.HealthCheckConfig - (*core.Address)(nil), // 4: envoy.api.v2.core.Address - (core.HealthStatus)(0), // 5: envoy.api.v2.core.HealthStatus - (*core.Metadata)(nil), // 6: envoy.api.v2.core.Metadata - (*wrappers.UInt32Value)(nil), // 7: google.protobuf.UInt32Value - (*core.Locality)(nil), // 8: envoy.api.v2.core.Locality -} -var file_envoy_api_v2_endpoint_endpoint_components_proto_depIdxs = []int32{ - 4, // 0: envoy.api.v2.endpoint.Endpoint.address:type_name -> envoy.api.v2.core.Address - 3, // 1: envoy.api.v2.endpoint.Endpoint.health_check_config:type_name -> envoy.api.v2.endpoint.Endpoint.HealthCheckConfig - 0, // 2: envoy.api.v2.endpoint.LbEndpoint.endpoint:type_name -> envoy.api.v2.endpoint.Endpoint - 5, // 3: envoy.api.v2.endpoint.LbEndpoint.health_status:type_name -> envoy.api.v2.core.HealthStatus - 6, // 4: envoy.api.v2.endpoint.LbEndpoint.metadata:type_name -> envoy.api.v2.core.Metadata - 7, // 5: envoy.api.v2.endpoint.LbEndpoint.load_balancing_weight:type_name -> google.protobuf.UInt32Value - 8, // 6: envoy.api.v2.endpoint.LocalityLbEndpoints.locality:type_name -> envoy.api.v2.core.Locality - 1, // 7: envoy.api.v2.endpoint.LocalityLbEndpoints.lb_endpoints:type_name -> envoy.api.v2.endpoint.LbEndpoint - 7, // 8: envoy.api.v2.endpoint.LocalityLbEndpoints.load_balancing_weight:type_name -> google.protobuf.UInt32Value - 7, // 9: envoy.api.v2.endpoint.LocalityLbEndpoints.proximity:type_name -> google.protobuf.UInt32Value - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_endpoint_endpoint_components_proto_init() } -func file_envoy_api_v2_endpoint_endpoint_components_proto_init() { - if File_envoy_api_v2_endpoint_endpoint_components_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Endpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LbEndpoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalityLbEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Endpoint_HealthCheckConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*LbEndpoint_Endpoint)(nil), - (*LbEndpoint_EndpointName)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_endpoint_endpoint_components_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_endpoint_endpoint_components_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_endpoint_endpoint_components_proto_depIdxs, - MessageInfos: file_envoy_api_v2_endpoint_endpoint_components_proto_msgTypes, - }.Build() - File_envoy_api_v2_endpoint_endpoint_components_proto = out.File - file_envoy_api_v2_endpoint_endpoint_components_proto_rawDesc = nil - file_envoy_api_v2_endpoint_endpoint_components_proto_goTypes = nil - file_envoy_api_v2_endpoint_endpoint_components_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go deleted file mode 100644 index 2e45e85756ed..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go +++ /dev/null @@ -1,737 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/endpoint/endpoint_components.proto - -package endpoint - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = core.HealthStatus(0) -) - -// Validate checks the field values on Endpoint with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Endpoint) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Endpoint with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in EndpointMultiError, or nil -// if none found. -func (m *Endpoint) ValidateAll() error { - return m.validate(true) -} - -func (m *Endpoint) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, EndpointValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, EndpointValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHealthCheckConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, EndpointValidationError{ - field: "HealthCheckConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, EndpointValidationError{ - field: "HealthCheckConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHealthCheckConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointValidationError{ - field: "HealthCheckConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Hostname - - if len(errors) > 0 { - return EndpointMultiError(errors) - } - - return nil -} - -// EndpointMultiError is an error wrapping multiple validation errors returned -// by Endpoint.ValidateAll() if the designated constraints aren't met. -type EndpointMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m EndpointMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m EndpointMultiError) AllErrors() []error { return m } - -// EndpointValidationError is the validation error returned by -// Endpoint.Validate if the designated constraints aren't met. -type EndpointValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointValidationError) ErrorName() string { return "EndpointValidationError" } - -// Error satisfies the builtin error interface -func (e EndpointValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpoint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointValidationError{} - -// Validate checks the field values on LbEndpoint with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *LbEndpoint) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LbEndpoint with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in LbEndpointMultiError, or -// nil if none found. -func (m *LbEndpoint) ValidateAll() error { - return m.validate(true) -} - -func (m *LbEndpoint) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for HealthStatus - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LbEndpointValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LbEndpointValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LbEndpointValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := LbEndpointValidationError{ - field: "LoadBalancingWeight", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - switch v := m.HostIdentifier.(type) { - case *LbEndpoint_Endpoint: - if v == nil { - err := LbEndpointValidationError{ - field: "HostIdentifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetEndpoint()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LbEndpointValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LbEndpointValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LbEndpointValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *LbEndpoint_EndpointName: - if v == nil { - err := LbEndpointValidationError{ - field: "HostIdentifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for EndpointName - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return LbEndpointMultiError(errors) - } - - return nil -} - -// LbEndpointMultiError is an error wrapping multiple validation errors -// returned by LbEndpoint.ValidateAll() if the designated constraints aren't met. -type LbEndpointMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LbEndpointMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LbEndpointMultiError) AllErrors() []error { return m } - -// LbEndpointValidationError is the validation error returned by -// LbEndpoint.Validate if the designated constraints aren't met. -type LbEndpointValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LbEndpointValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LbEndpointValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LbEndpointValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LbEndpointValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LbEndpointValidationError) ErrorName() string { return "LbEndpointValidationError" } - -// Error satisfies the builtin error interface -func (e LbEndpointValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLbEndpoint.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LbEndpointValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LbEndpointValidationError{} - -// Validate checks the field values on LocalityLbEndpoints with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *LocalityLbEndpoints) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LocalityLbEndpoints with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// LocalityLbEndpointsMultiError, or nil if none found. -func (m *LocalityLbEndpoints) ValidateAll() error { - return m.validate(true) -} - -func (m *LocalityLbEndpoints) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetLocality()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LocalityLbEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LocalityLbEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalityLbEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetLbEndpoints() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LocalityLbEndpointsValidationError{ - field: fmt.Sprintf("LbEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LocalityLbEndpointsValidationError{ - field: fmt.Sprintf("LbEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalityLbEndpointsValidationError{ - field: fmt.Sprintf("LbEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if wrapper := m.GetLoadBalancingWeight(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := LocalityLbEndpointsValidationError{ - field: "LoadBalancingWeight", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if m.GetPriority() > 128 { - err := LocalityLbEndpointsValidationError{ - field: "Priority", - reason: "value must be less than or equal to 128", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetProximity()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LocalityLbEndpointsValidationError{ - field: "Proximity", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LocalityLbEndpointsValidationError{ - field: "Proximity", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetProximity()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalityLbEndpointsValidationError{ - field: "Proximity", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return LocalityLbEndpointsMultiError(errors) - } - - return nil -} - -// LocalityLbEndpointsMultiError is an error wrapping multiple validation -// errors returned by LocalityLbEndpoints.ValidateAll() if the designated -// constraints aren't met. -type LocalityLbEndpointsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LocalityLbEndpointsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LocalityLbEndpointsMultiError) AllErrors() []error { return m } - -// LocalityLbEndpointsValidationError is the validation error returned by -// LocalityLbEndpoints.Validate if the designated constraints aren't met. -type LocalityLbEndpointsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalityLbEndpointsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalityLbEndpointsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalityLbEndpointsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalityLbEndpointsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalityLbEndpointsValidationError) ErrorName() string { - return "LocalityLbEndpointsValidationError" -} - -// Error satisfies the builtin error interface -func (e LocalityLbEndpointsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocalityLbEndpoints.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalityLbEndpointsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalityLbEndpointsValidationError{} - -// Validate checks the field values on Endpoint_HealthCheckConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Endpoint_HealthCheckConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Endpoint_HealthCheckConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Endpoint_HealthCheckConfigMultiError, or nil if none found. -func (m *Endpoint_HealthCheckConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Endpoint_HealthCheckConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetPortValue() > 65535 { - err := Endpoint_HealthCheckConfigValidationError{ - field: "PortValue", - reason: "value must be less than or equal to 65535", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Hostname - - if len(errors) > 0 { - return Endpoint_HealthCheckConfigMultiError(errors) - } - - return nil -} - -// Endpoint_HealthCheckConfigMultiError is an error wrapping multiple -// validation errors returned by Endpoint_HealthCheckConfig.ValidateAll() if -// the designated constraints aren't met. -type Endpoint_HealthCheckConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Endpoint_HealthCheckConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Endpoint_HealthCheckConfigMultiError) AllErrors() []error { return m } - -// Endpoint_HealthCheckConfigValidationError is the validation error returned -// by Endpoint_HealthCheckConfig.Validate if the designated constraints aren't met. -type Endpoint_HealthCheckConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Endpoint_HealthCheckConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Endpoint_HealthCheckConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Endpoint_HealthCheckConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Endpoint_HealthCheckConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Endpoint_HealthCheckConfigValidationError) ErrorName() string { - return "Endpoint_HealthCheckConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Endpoint_HealthCheckConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpoint_HealthCheckConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Endpoint_HealthCheckConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Endpoint_HealthCheckConfigValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go deleted file mode 100644 index bca1888e028b..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.go +++ /dev/null @@ -1,772 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/endpoint/load_report.proto - -package endpoint - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - duration "github.com/golang/protobuf/ptypes/duration" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// These are stats Envoy reports to GLB every so often. Report frequency is -// defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -// [#next-free-field: 9] -type UpstreamLocalityStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` - // The total number of requests successfully completed by the endpoints in the - // locality. - TotalSuccessfulRequests uint64 `protobuf:"varint,2,opt,name=total_successful_requests,json=totalSuccessfulRequests,proto3" json:"total_successful_requests,omitempty"` - // The total number of unfinished requests - TotalRequestsInProgress uint64 `protobuf:"varint,3,opt,name=total_requests_in_progress,json=totalRequestsInProgress,proto3" json:"total_requests_in_progress,omitempty"` - // The total number of requests that failed due to errors at the endpoint, - // aggregated over all endpoints in the locality. - TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"` - // The total number of requests that were issued by this Envoy since - // the last report. This information is aggregated over all the - // upstream endpoints in the locality. - TotalIssuedRequests uint64 `protobuf:"varint,8,opt,name=total_issued_requests,json=totalIssuedRequests,proto3" json:"total_issued_requests,omitempty"` - // Stats for multi-dimensional load balancing. - LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"` - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - UpstreamEndpointStats []*UpstreamEndpointStats `protobuf:"bytes,7,rep,name=upstream_endpoint_stats,json=upstreamEndpointStats,proto3" json:"upstream_endpoint_stats,omitempty"` - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - Priority uint32 `protobuf:"varint,6,opt,name=priority,proto3" json:"priority,omitempty"` -} - -func (x *UpstreamLocalityStats) Reset() { - *x = UpstreamLocalityStats{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamLocalityStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamLocalityStats) ProtoMessage() {} - -func (x *UpstreamLocalityStats) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamLocalityStats.ProtoReflect.Descriptor instead. -func (*UpstreamLocalityStats) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_load_report_proto_rawDescGZIP(), []int{0} -} - -func (x *UpstreamLocalityStats) GetLocality() *core.Locality { - if x != nil { - return x.Locality - } - return nil -} - -func (x *UpstreamLocalityStats) GetTotalSuccessfulRequests() uint64 { - if x != nil { - return x.TotalSuccessfulRequests - } - return 0 -} - -func (x *UpstreamLocalityStats) GetTotalRequestsInProgress() uint64 { - if x != nil { - return x.TotalRequestsInProgress - } - return 0 -} - -func (x *UpstreamLocalityStats) GetTotalErrorRequests() uint64 { - if x != nil { - return x.TotalErrorRequests - } - return 0 -} - -func (x *UpstreamLocalityStats) GetTotalIssuedRequests() uint64 { - if x != nil { - return x.TotalIssuedRequests - } - return 0 -} - -func (x *UpstreamLocalityStats) GetLoadMetricStats() []*EndpointLoadMetricStats { - if x != nil { - return x.LoadMetricStats - } - return nil -} - -func (x *UpstreamLocalityStats) GetUpstreamEndpointStats() []*UpstreamEndpointStats { - if x != nil { - return x.UpstreamEndpointStats - } - return nil -} - -func (x *UpstreamLocalityStats) GetPriority() uint32 { - if x != nil { - return x.Priority - } - return 0 -} - -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -// [#next-free-field: 8] -type UpstreamEndpointStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Upstream host address. - Address *core.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - Metadata *_struct.Struct `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` - // The total number of requests successfully completed by the endpoints in the - // locality. These include non-5xx responses for HTTP, where errors - // originate at the client and the endpoint responded successfully. For gRPC, - // the grpc-status values are those not covered by total_error_requests below. - TotalSuccessfulRequests uint64 `protobuf:"varint,2,opt,name=total_successful_requests,json=totalSuccessfulRequests,proto3" json:"total_successful_requests,omitempty"` - // The total number of unfinished requests for this endpoint. - TotalRequestsInProgress uint64 `protobuf:"varint,3,opt,name=total_requests_in_progress,json=totalRequestsInProgress,proto3" json:"total_requests_in_progress,omitempty"` - // The total number of requests that failed due to errors at the endpoint. - // For HTTP these are responses with 5xx status codes and for gRPC the - // grpc-status values: - // - // - DeadlineExceeded - // - Unimplemented - // - Internal - // - Unavailable - // - Unknown - // - DataLoss - TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"` - // The total number of requests that were issued to this endpoint - // since the last report. A single TCP connection, HTTP or gRPC - // request or stream is counted as one request. - TotalIssuedRequests uint64 `protobuf:"varint,7,opt,name=total_issued_requests,json=totalIssuedRequests,proto3" json:"total_issued_requests,omitempty"` - // Stats for multi-dimensional load balancing. - LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"` -} - -func (x *UpstreamEndpointStats) Reset() { - *x = UpstreamEndpointStats{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpstreamEndpointStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpstreamEndpointStats) ProtoMessage() {} - -func (x *UpstreamEndpointStats) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpstreamEndpointStats.ProtoReflect.Descriptor instead. -func (*UpstreamEndpointStats) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_load_report_proto_rawDescGZIP(), []int{1} -} - -func (x *UpstreamEndpointStats) GetAddress() *core.Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *UpstreamEndpointStats) GetMetadata() *_struct.Struct { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *UpstreamEndpointStats) GetTotalSuccessfulRequests() uint64 { - if x != nil { - return x.TotalSuccessfulRequests - } - return 0 -} - -func (x *UpstreamEndpointStats) GetTotalRequestsInProgress() uint64 { - if x != nil { - return x.TotalRequestsInProgress - } - return 0 -} - -func (x *UpstreamEndpointStats) GetTotalErrorRequests() uint64 { - if x != nil { - return x.TotalErrorRequests - } - return 0 -} - -func (x *UpstreamEndpointStats) GetTotalIssuedRequests() uint64 { - if x != nil { - return x.TotalIssuedRequests - } - return 0 -} - -func (x *UpstreamEndpointStats) GetLoadMetricStats() []*EndpointLoadMetricStats { - if x != nil { - return x.LoadMetricStats - } - return nil -} - -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -type EndpointLoadMetricStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the metric; may be empty. - MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"` - // Number of calls that finished and included this metric. - NumRequestsFinishedWithMetric uint64 `protobuf:"varint,2,opt,name=num_requests_finished_with_metric,json=numRequestsFinishedWithMetric,proto3" json:"num_requests_finished_with_metric,omitempty"` - // Sum of metric values across all calls that finished with this metric for - // load_reporting_interval. - TotalMetricValue float64 `protobuf:"fixed64,3,opt,name=total_metric_value,json=totalMetricValue,proto3" json:"total_metric_value,omitempty"` -} - -func (x *EndpointLoadMetricStats) Reset() { - *x = EndpointLoadMetricStats{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointLoadMetricStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointLoadMetricStats) ProtoMessage() {} - -func (x *EndpointLoadMetricStats) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointLoadMetricStats.ProtoReflect.Descriptor instead. -func (*EndpointLoadMetricStats) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_load_report_proto_rawDescGZIP(), []int{2} -} - -func (x *EndpointLoadMetricStats) GetMetricName() string { - if x != nil { - return x.MetricName - } - return "" -} - -func (x *EndpointLoadMetricStats) GetNumRequestsFinishedWithMetric() uint64 { - if x != nil { - return x.NumRequestsFinishedWithMetric - } - return 0 -} - -func (x *EndpointLoadMetricStats) GetTotalMetricValue() float64 { - if x != nil { - return x.TotalMetricValue - } - return 0 -} - -// Per cluster load stats. Envoy reports these stats a management server in a -// :ref:`LoadStatsRequest` -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -// Next ID: 7 -// [#next-free-field: 7] -type ClusterStats struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the cluster. - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - ClusterServiceName string `protobuf:"bytes,6,opt,name=cluster_service_name,json=clusterServiceName,proto3" json:"cluster_service_name,omitempty"` - // Need at least one. - UpstreamLocalityStats []*UpstreamLocalityStats `protobuf:"bytes,2,rep,name=upstream_locality_stats,json=upstreamLocalityStats,proto3" json:"upstream_locality_stats,omitempty"` - // Cluster-level stats such as total_successful_requests may be computed by - // summing upstream_locality_stats. In addition, below there are additional - // cluster-wide stats. - // - // The total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - TotalDroppedRequests uint64 `protobuf:"varint,3,opt,name=total_dropped_requests,json=totalDroppedRequests,proto3" json:"total_dropped_requests,omitempty"` - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - DroppedRequests []*ClusterStats_DroppedRequests `protobuf:"bytes,5,rep,name=dropped_requests,json=droppedRequests,proto3" json:"dropped_requests,omitempty"` - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - // and the *LoadStatsResponse* message sent from the management server, this may be longer than - // the requested load reporting interval in the *LoadStatsResponse*. - LoadReportInterval *duration.Duration `protobuf:"bytes,4,opt,name=load_report_interval,json=loadReportInterval,proto3" json:"load_report_interval,omitempty"` -} - -func (x *ClusterStats) Reset() { - *x = ClusterStats{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterStats) ProtoMessage() {} - -func (x *ClusterStats) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterStats.ProtoReflect.Descriptor instead. -func (*ClusterStats) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_load_report_proto_rawDescGZIP(), []int{3} -} - -func (x *ClusterStats) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *ClusterStats) GetClusterServiceName() string { - if x != nil { - return x.ClusterServiceName - } - return "" -} - -func (x *ClusterStats) GetUpstreamLocalityStats() []*UpstreamLocalityStats { - if x != nil { - return x.UpstreamLocalityStats - } - return nil -} - -func (x *ClusterStats) GetTotalDroppedRequests() uint64 { - if x != nil { - return x.TotalDroppedRequests - } - return 0 -} - -func (x *ClusterStats) GetDroppedRequests() []*ClusterStats_DroppedRequests { - if x != nil { - return x.DroppedRequests - } - return nil -} - -func (x *ClusterStats) GetLoadReportInterval() *duration.Duration { - if x != nil { - return x.LoadReportInterval - } - return nil -} - -type ClusterStats_DroppedRequests struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Identifier for the policy specifying the drop. - Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` - // Total number of deliberately dropped requests for the category. - DroppedCount uint64 `protobuf:"varint,2,opt,name=dropped_count,json=droppedCount,proto3" json:"dropped_count,omitempty"` -} - -func (x *ClusterStats_DroppedRequests) Reset() { - *x = ClusterStats_DroppedRequests{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterStats_DroppedRequests) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterStats_DroppedRequests) ProtoMessage() {} - -func (x *ClusterStats_DroppedRequests) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_endpoint_load_report_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterStats_DroppedRequests.ProtoReflect.Descriptor instead. -func (*ClusterStats_DroppedRequests) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_endpoint_load_report_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *ClusterStats_DroppedRequests) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *ClusterStats_DroppedRequests) GetDroppedCount() uint64 { - if x != nil { - return x.DroppedCount - } - return 0 -} - -var File_envoy_api_v2_endpoint_load_report_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_endpoint_load_report_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, - 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x04, 0x0a, 0x15, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, - 0x37, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x73, 0x73, 0x75, 0x65, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x0f, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x17, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, - 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x55, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xbd, 0x03, 0x0a, 0x15, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, - 0x34, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x19, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x0f, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x17, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, - 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1d, 0x6e, - 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, - 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x2c, 0x0a, 0x12, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9c, 0x04, 0x0a, 0x0c, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x0c, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6e, 0x0a, 0x17, 0x75, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x69, 0x74, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, - 0x5e, 0x0a, 0x10, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x44, - 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x0f, - 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, - 0x4b, 0x0a, 0x14, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x1a, 0x5b, 0x0a, 0x0f, - 0x44, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, - 0x23, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x64, 0x72, 0x6f, - 0x70, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x9e, 0x01, 0x0a, 0x23, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x42, 0x0f, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_endpoint_load_report_proto_rawDescOnce sync.Once - file_envoy_api_v2_endpoint_load_report_proto_rawDescData = file_envoy_api_v2_endpoint_load_report_proto_rawDesc -) - -func file_envoy_api_v2_endpoint_load_report_proto_rawDescGZIP() []byte { - file_envoy_api_v2_endpoint_load_report_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_endpoint_load_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_endpoint_load_report_proto_rawDescData) - }) - return file_envoy_api_v2_endpoint_load_report_proto_rawDescData -} - -var file_envoy_api_v2_endpoint_load_report_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_api_v2_endpoint_load_report_proto_goTypes = []interface{}{ - (*UpstreamLocalityStats)(nil), // 0: envoy.api.v2.endpoint.UpstreamLocalityStats - (*UpstreamEndpointStats)(nil), // 1: envoy.api.v2.endpoint.UpstreamEndpointStats - (*EndpointLoadMetricStats)(nil), // 2: envoy.api.v2.endpoint.EndpointLoadMetricStats - (*ClusterStats)(nil), // 3: envoy.api.v2.endpoint.ClusterStats - (*ClusterStats_DroppedRequests)(nil), // 4: envoy.api.v2.endpoint.ClusterStats.DroppedRequests - (*core.Locality)(nil), // 5: envoy.api.v2.core.Locality - (*core.Address)(nil), // 6: envoy.api.v2.core.Address - (*_struct.Struct)(nil), // 7: google.protobuf.Struct - (*duration.Duration)(nil), // 8: google.protobuf.Duration -} -var file_envoy_api_v2_endpoint_load_report_proto_depIdxs = []int32{ - 5, // 0: envoy.api.v2.endpoint.UpstreamLocalityStats.locality:type_name -> envoy.api.v2.core.Locality - 2, // 1: envoy.api.v2.endpoint.UpstreamLocalityStats.load_metric_stats:type_name -> envoy.api.v2.endpoint.EndpointLoadMetricStats - 1, // 2: envoy.api.v2.endpoint.UpstreamLocalityStats.upstream_endpoint_stats:type_name -> envoy.api.v2.endpoint.UpstreamEndpointStats - 6, // 3: envoy.api.v2.endpoint.UpstreamEndpointStats.address:type_name -> envoy.api.v2.core.Address - 7, // 4: envoy.api.v2.endpoint.UpstreamEndpointStats.metadata:type_name -> google.protobuf.Struct - 2, // 5: envoy.api.v2.endpoint.UpstreamEndpointStats.load_metric_stats:type_name -> envoy.api.v2.endpoint.EndpointLoadMetricStats - 0, // 6: envoy.api.v2.endpoint.ClusterStats.upstream_locality_stats:type_name -> envoy.api.v2.endpoint.UpstreamLocalityStats - 4, // 7: envoy.api.v2.endpoint.ClusterStats.dropped_requests:type_name -> envoy.api.v2.endpoint.ClusterStats.DroppedRequests - 8, // 8: envoy.api.v2.endpoint.ClusterStats.load_report_interval:type_name -> google.protobuf.Duration - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_endpoint_load_report_proto_init() } -func file_envoy_api_v2_endpoint_load_report_proto_init() { - if File_envoy_api_v2_endpoint_load_report_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_endpoint_load_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamLocalityStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_load_report_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpstreamEndpointStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_load_report_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointLoadMetricStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_load_report_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterStats); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_endpoint_load_report_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterStats_DroppedRequests); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_endpoint_load_report_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_endpoint_load_report_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_endpoint_load_report_proto_depIdxs, - MessageInfos: file_envoy_api_v2_endpoint_load_report_proto_msgTypes, - }.Build() - File_envoy_api_v2_endpoint_load_report_proto = out.File - file_envoy_api_v2_endpoint_load_report_proto_rawDesc = nil - file_envoy_api_v2_endpoint_load_report_proto_goTypes = nil - file_envoy_api_v2_endpoint_load_report_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go deleted file mode 100644 index 8023c3941fdb..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/load_report.pb.validate.go +++ /dev/null @@ -1,893 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/endpoint/load_report.proto - -package endpoint - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on UpstreamLocalityStats with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpstreamLocalityStats) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpstreamLocalityStats with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpstreamLocalityStatsMultiError, or nil if none found. -func (m *UpstreamLocalityStats) ValidateAll() error { - return m.validate(true) -} - -func (m *UpstreamLocalityStats) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetLocality()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamLocalityStatsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamLocalityStatsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamLocalityStatsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TotalSuccessfulRequests - - // no validation rules for TotalRequestsInProgress - - // no validation rules for TotalErrorRequests - - // no validation rules for TotalIssuedRequests - - for idx, item := range m.GetLoadMetricStats() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetUpstreamEndpointStats() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamLocalityStatsValidationError{ - field: fmt.Sprintf("UpstreamEndpointStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for Priority - - if len(errors) > 0 { - return UpstreamLocalityStatsMultiError(errors) - } - - return nil -} - -// UpstreamLocalityStatsMultiError is an error wrapping multiple validation -// errors returned by UpstreamLocalityStats.ValidateAll() if the designated -// constraints aren't met. -type UpstreamLocalityStatsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpstreamLocalityStatsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpstreamLocalityStatsMultiError) AllErrors() []error { return m } - -// UpstreamLocalityStatsValidationError is the validation error returned by -// UpstreamLocalityStats.Validate if the designated constraints aren't met. -type UpstreamLocalityStatsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamLocalityStatsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamLocalityStatsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamLocalityStatsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamLocalityStatsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamLocalityStatsValidationError) ErrorName() string { - return "UpstreamLocalityStatsValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamLocalityStatsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamLocalityStats.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamLocalityStatsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamLocalityStatsValidationError{} - -// Validate checks the field values on UpstreamEndpointStats with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpstreamEndpointStats) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpstreamEndpointStats with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpstreamEndpointStatsMultiError, or nil if none found. -func (m *UpstreamEndpointStats) ValidateAll() error { - return m.validate(true) -} - -func (m *UpstreamEndpointStats) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamEndpointStatsValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamEndpointStatsValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamEndpointStatsValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamEndpointStatsValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamEndpointStatsValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamEndpointStatsValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TotalSuccessfulRequests - - // no validation rules for TotalRequestsInProgress - - // no validation rules for TotalErrorRequests - - // no validation rules for TotalIssuedRequests - - for idx, item := range m.GetLoadMetricStats() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpstreamEndpointStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpstreamEndpointStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpstreamEndpointStatsValidationError{ - field: fmt.Sprintf("LoadMetricStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return UpstreamEndpointStatsMultiError(errors) - } - - return nil -} - -// UpstreamEndpointStatsMultiError is an error wrapping multiple validation -// errors returned by UpstreamEndpointStats.ValidateAll() if the designated -// constraints aren't met. -type UpstreamEndpointStatsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpstreamEndpointStatsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpstreamEndpointStatsMultiError) AllErrors() []error { return m } - -// UpstreamEndpointStatsValidationError is the validation error returned by -// UpstreamEndpointStats.Validate if the designated constraints aren't met. -type UpstreamEndpointStatsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpstreamEndpointStatsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpstreamEndpointStatsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpstreamEndpointStatsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpstreamEndpointStatsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpstreamEndpointStatsValidationError) ErrorName() string { - return "UpstreamEndpointStatsValidationError" -} - -// Error satisfies the builtin error interface -func (e UpstreamEndpointStatsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpstreamEndpointStats.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpstreamEndpointStatsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpstreamEndpointStatsValidationError{} - -// Validate checks the field values on EndpointLoadMetricStats with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *EndpointLoadMetricStats) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on EndpointLoadMetricStats with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// EndpointLoadMetricStatsMultiError, or nil if none found. -func (m *EndpointLoadMetricStats) ValidateAll() error { - return m.validate(true) -} - -func (m *EndpointLoadMetricStats) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for MetricName - - // no validation rules for NumRequestsFinishedWithMetric - - // no validation rules for TotalMetricValue - - if len(errors) > 0 { - return EndpointLoadMetricStatsMultiError(errors) - } - - return nil -} - -// EndpointLoadMetricStatsMultiError is an error wrapping multiple validation -// errors returned by EndpointLoadMetricStats.ValidateAll() if the designated -// constraints aren't met. -type EndpointLoadMetricStatsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m EndpointLoadMetricStatsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m EndpointLoadMetricStatsMultiError) AllErrors() []error { return m } - -// EndpointLoadMetricStatsValidationError is the validation error returned by -// EndpointLoadMetricStats.Validate if the designated constraints aren't met. -type EndpointLoadMetricStatsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointLoadMetricStatsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointLoadMetricStatsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointLoadMetricStatsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointLoadMetricStatsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointLoadMetricStatsValidationError) ErrorName() string { - return "EndpointLoadMetricStatsValidationError" -} - -// Error satisfies the builtin error interface -func (e EndpointLoadMetricStatsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointLoadMetricStats.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointLoadMetricStatsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointLoadMetricStatsValidationError{} - -// Validate checks the field values on ClusterStats with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ClusterStats) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ClusterStats with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ClusterStatsMultiError, or -// nil if none found. -func (m *ClusterStats) ValidateAll() error { - return m.validate(true) -} - -func (m *ClusterStats) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetClusterName()) < 1 { - err := ClusterStatsValidationError{ - field: "ClusterName", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for ClusterServiceName - - if len(m.GetUpstreamLocalityStats()) < 1 { - err := ClusterStatsValidationError{ - field: "UpstreamLocalityStats", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetUpstreamLocalityStats() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterStatsValidationError{ - field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterStatsValidationError{ - field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterStatsValidationError{ - field: fmt.Sprintf("UpstreamLocalityStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for TotalDroppedRequests - - for idx, item := range m.GetDroppedRequests() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterStatsValidationError{ - field: fmt.Sprintf("DroppedRequests[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterStatsValidationError{ - field: fmt.Sprintf("DroppedRequests[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterStatsValidationError{ - field: fmt.Sprintf("DroppedRequests[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetLoadReportInterval()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterStatsValidationError{ - field: "LoadReportInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterStatsValidationError{ - field: "LoadReportInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLoadReportInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterStatsValidationError{ - field: "LoadReportInterval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ClusterStatsMultiError(errors) - } - - return nil -} - -// ClusterStatsMultiError is an error wrapping multiple validation errors -// returned by ClusterStats.ValidateAll() if the designated constraints aren't met. -type ClusterStatsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterStatsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterStatsMultiError) AllErrors() []error { return m } - -// ClusterStatsValidationError is the validation error returned by -// ClusterStats.Validate if the designated constraints aren't met. -type ClusterStatsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterStatsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterStatsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterStatsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterStatsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterStatsValidationError) ErrorName() string { return "ClusterStatsValidationError" } - -// Error satisfies the builtin error interface -func (e ClusterStatsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterStats.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterStatsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterStatsValidationError{} - -// Validate checks the field values on ClusterStats_DroppedRequests with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ClusterStats_DroppedRequests) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ClusterStats_DroppedRequests with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ClusterStats_DroppedRequestsMultiError, or nil if none found. -func (m *ClusterStats_DroppedRequests) ValidateAll() error { - return m.validate(true) -} - -func (m *ClusterStats_DroppedRequests) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetCategory()) < 1 { - err := ClusterStats_DroppedRequestsValidationError{ - field: "Category", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DroppedCount - - if len(errors) > 0 { - return ClusterStats_DroppedRequestsMultiError(errors) - } - - return nil -} - -// ClusterStats_DroppedRequestsMultiError is an error wrapping multiple -// validation errors returned by ClusterStats_DroppedRequests.ValidateAll() if -// the designated constraints aren't met. -type ClusterStats_DroppedRequestsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterStats_DroppedRequestsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterStats_DroppedRequestsMultiError) AllErrors() []error { return m } - -// ClusterStats_DroppedRequestsValidationError is the validation error returned -// by ClusterStats_DroppedRequests.Validate if the designated constraints -// aren't met. -type ClusterStats_DroppedRequestsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterStats_DroppedRequestsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterStats_DroppedRequestsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterStats_DroppedRequestsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterStats_DroppedRequestsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterStats_DroppedRequestsValidationError) ErrorName() string { - return "ClusterStats_DroppedRequestsValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterStats_DroppedRequestsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterStats_DroppedRequests.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterStats_DroppedRequestsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterStats_DroppedRequestsValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go deleted file mode 100644 index 72e58374e7fa..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.go +++ /dev/null @@ -1,413 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/lds.proto - -package apiv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -type LdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *LdsDummy) Reset() { - *x = LdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_lds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LdsDummy) ProtoMessage() {} - -func (x *LdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_lds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LdsDummy.ProtoReflect.Descriptor instead. -func (*LdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_lds_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_api_v2_lds_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_lds_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, - 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x0a, 0x0a, 0x08, 0x4c, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xf3, 0x02, 0x0a, - 0x18, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x0f, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, - 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7b, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x19, 0x22, 0x17, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x3a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, - 0x3a, 0x01, 0x2a, 0x1a, 0x1d, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x42, 0x8f, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x42, 0x08, 0x4c, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, - 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, - 0x1b, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_lds_proto_rawDescOnce sync.Once - file_envoy_api_v2_lds_proto_rawDescData = file_envoy_api_v2_lds_proto_rawDesc -) - -func file_envoy_api_v2_lds_proto_rawDescGZIP() []byte { - file_envoy_api_v2_lds_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_lds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_lds_proto_rawDescData) - }) - return file_envoy_api_v2_lds_proto_rawDescData -} - -var file_envoy_api_v2_lds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_lds_proto_goTypes = []interface{}{ - (*LdsDummy)(nil), // 0: envoy.api.v2.LdsDummy - (*DeltaDiscoveryRequest)(nil), // 1: envoy.api.v2.DeltaDiscoveryRequest - (*DiscoveryRequest)(nil), // 2: envoy.api.v2.DiscoveryRequest - (*DeltaDiscoveryResponse)(nil), // 3: envoy.api.v2.DeltaDiscoveryResponse - (*DiscoveryResponse)(nil), // 4: envoy.api.v2.DiscoveryResponse -} -var file_envoy_api_v2_lds_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.ListenerDiscoveryService.DeltaListeners:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 2, // 1: envoy.api.v2.ListenerDiscoveryService.StreamListeners:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 2: envoy.api.v2.ListenerDiscoveryService.FetchListeners:input_type -> envoy.api.v2.DiscoveryRequest - 3, // 3: envoy.api.v2.ListenerDiscoveryService.DeltaListeners:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 4, // 4: envoy.api.v2.ListenerDiscoveryService.StreamListeners:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 5: envoy.api.v2.ListenerDiscoveryService.FetchListeners:output_type -> envoy.api.v2.DiscoveryResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_lds_proto_init() } -func file_envoy_api_v2_lds_proto_init() { - if File_envoy_api_v2_lds_proto != nil { - return - } - file_envoy_api_v2_discovery_proto_init() - file_envoy_api_v2_listener_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_lds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_lds_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_api_v2_lds_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_lds_proto_depIdxs, - MessageInfos: file_envoy_api_v2_lds_proto_msgTypes, - }.Build() - File_envoy_api_v2_lds_proto = out.File - file_envoy_api_v2_lds_proto_rawDesc = nil - file_envoy_api_v2_lds_proto_goTypes = nil - file_envoy_api_v2_lds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ListenerDiscoveryServiceClient is the client API for ListenerDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ListenerDiscoveryServiceClient interface { - DeltaListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_DeltaListenersClient, error) - StreamListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_StreamListenersClient, error) - FetchListeners(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) -} - -type listenerDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewListenerDiscoveryServiceClient(cc grpc.ClientConnInterface) ListenerDiscoveryServiceClient { - return &listenerDiscoveryServiceClient{cc} -} - -func (c *listenerDiscoveryServiceClient) DeltaListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_DeltaListenersClient, error) { - stream, err := c.cc.NewStream(ctx, &_ListenerDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.ListenerDiscoveryService/DeltaListeners", opts...) - if err != nil { - return nil, err - } - x := &listenerDiscoveryServiceDeltaListenersClient{stream} - return x, nil -} - -type ListenerDiscoveryService_DeltaListenersClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type listenerDiscoveryServiceDeltaListenersClient struct { - grpc.ClientStream -} - -func (x *listenerDiscoveryServiceDeltaListenersClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *listenerDiscoveryServiceDeltaListenersClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *listenerDiscoveryServiceClient) StreamListeners(ctx context.Context, opts ...grpc.CallOption) (ListenerDiscoveryService_StreamListenersClient, error) { - stream, err := c.cc.NewStream(ctx, &_ListenerDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.ListenerDiscoveryService/StreamListeners", opts...) - if err != nil { - return nil, err - } - x := &listenerDiscoveryServiceStreamListenersClient{stream} - return x, nil -} - -type ListenerDiscoveryService_StreamListenersClient interface { - Send(*DiscoveryRequest) error - Recv() (*DiscoveryResponse, error) - grpc.ClientStream -} - -type listenerDiscoveryServiceStreamListenersClient struct { - grpc.ClientStream -} - -func (x *listenerDiscoveryServiceStreamListenersClient) Send(m *DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *listenerDiscoveryServiceStreamListenersClient) Recv() (*DiscoveryResponse, error) { - m := new(DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *listenerDiscoveryServiceClient) FetchListeners(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { - out := new(DiscoveryResponse) - err := c.cc.Invoke(ctx, "/envoy.api.v2.ListenerDiscoveryService/FetchListeners", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ListenerDiscoveryServiceServer is the server API for ListenerDiscoveryService service. -type ListenerDiscoveryServiceServer interface { - DeltaListeners(ListenerDiscoveryService_DeltaListenersServer) error - StreamListeners(ListenerDiscoveryService_StreamListenersServer) error - FetchListeners(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) -} - -// UnimplementedListenerDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedListenerDiscoveryServiceServer struct { -} - -func (*UnimplementedListenerDiscoveryServiceServer) DeltaListeners(ListenerDiscoveryService_DeltaListenersServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaListeners not implemented") -} -func (*UnimplementedListenerDiscoveryServiceServer) StreamListeners(ListenerDiscoveryService_StreamListenersServer) error { - return status.Errorf(codes.Unimplemented, "method StreamListeners not implemented") -} -func (*UnimplementedListenerDiscoveryServiceServer) FetchListeners(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchListeners not implemented") -} - -func RegisterListenerDiscoveryServiceServer(s *grpc.Server, srv ListenerDiscoveryServiceServer) { - s.RegisterService(&_ListenerDiscoveryService_serviceDesc, srv) -} - -func _ListenerDiscoveryService_DeltaListeners_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ListenerDiscoveryServiceServer).DeltaListeners(&listenerDiscoveryServiceDeltaListenersServer{stream}) -} - -type ListenerDiscoveryService_DeltaListenersServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type listenerDiscoveryServiceDeltaListenersServer struct { - grpc.ServerStream -} - -func (x *listenerDiscoveryServiceDeltaListenersServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *listenerDiscoveryServiceDeltaListenersServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ListenerDiscoveryService_StreamListeners_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ListenerDiscoveryServiceServer).StreamListeners(&listenerDiscoveryServiceStreamListenersServer{stream}) -} - -type ListenerDiscoveryService_StreamListenersServer interface { - Send(*DiscoveryResponse) error - Recv() (*DiscoveryRequest, error) - grpc.ServerStream -} - -type listenerDiscoveryServiceStreamListenersServer struct { - grpc.ServerStream -} - -func (x *listenerDiscoveryServiceStreamListenersServer) Send(m *DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *listenerDiscoveryServiceStreamListenersServer) Recv() (*DiscoveryRequest, error) { - m := new(DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ListenerDiscoveryService_FetchListeners_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerDiscoveryServiceServer).FetchListeners(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.api.v2.ListenerDiscoveryService/FetchListeners", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerDiscoveryServiceServer).FetchListeners(ctx, req.(*DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ListenerDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.api.v2.ListenerDiscoveryService", - HandlerType: (*ListenerDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchListeners", - Handler: _ListenerDiscoveryService_FetchListeners_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "DeltaListeners", - Handler: _ListenerDiscoveryService_DeltaListeners_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "StreamListeners", - Handler: _ListenerDiscoveryService_StreamListeners_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/api/v2/lds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go deleted file mode 100644 index 64fa51146eb9..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/lds.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/lds.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on LdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *LdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in LdsDummyMultiError, or nil -// if none found. -func (m *LdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *LdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return LdsDummyMultiError(errors) - } - - return nil -} - -// LdsDummyMultiError is an error wrapping multiple validation errors returned -// by LdsDummy.ValidateAll() if the designated constraints aren't met. -type LdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LdsDummyMultiError) AllErrors() []error { return m } - -// LdsDummyValidationError is the validation error returned by -// LdsDummy.Validate if the designated constraints aren't met. -type LdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LdsDummyValidationError) ErrorName() string { return "LdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e LdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go deleted file mode 100644 index 0dc0cc0f2e93..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.go +++ /dev/null @@ -1,891 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/listener.proto - -package apiv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - listener "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener" - v21 "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2" - v2 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v2" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - duration "github.com/golang/protobuf/ptypes/duration" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Listener_DrainType int32 - -const ( - // Drain in response to calling /healthcheck/fail admin endpoint (along with the health check - // filter), listener removal/modification, and hot restart. - Listener_DEFAULT Listener_DrainType = 0 - // Drain in response to listener removal/modification and hot restart. This setting does not - // include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress - // and egress listeners. - Listener_MODIFY_ONLY Listener_DrainType = 1 -) - -// Enum value maps for Listener_DrainType. -var ( - Listener_DrainType_name = map[int32]string{ - 0: "DEFAULT", - 1: "MODIFY_ONLY", - } - Listener_DrainType_value = map[string]int32{ - "DEFAULT": 0, - "MODIFY_ONLY": 1, - } -) - -func (x Listener_DrainType) Enum() *Listener_DrainType { - p := new(Listener_DrainType) - *p = x - return p -} - -func (x Listener_DrainType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Listener_DrainType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_listener_proto_enumTypes[0].Descriptor() -} - -func (Listener_DrainType) Type() protoreflect.EnumType { - return &file_envoy_api_v2_listener_proto_enumTypes[0] -} - -func (x Listener_DrainType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Listener_DrainType.Descriptor instead. -func (Listener_DrainType) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_proto_rawDescGZIP(), []int{0, 0} -} - -// [#next-free-field: 23] -type Listener struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique name by which this listener is known. If no name is provided, - // Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically - // updated or removed via :ref:`LDS ` a unique name must be provided. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The address that the listener should listen on. In general, the address must be unique, though - // that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on - // Linux as the actual port will be allocated by the OS. - Address *core.Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // A list of filter chains to consider for this listener. The - // :ref:`FilterChain ` with the most specific - // :ref:`FilterChainMatch ` criteria is used on a - // connection. - // - // Example using SNI for filter chain selection can be found in the - // :ref:`FAQ entry `. - FilterChains []*listener.FilterChain `protobuf:"bytes,3,rep,name=filter_chains,json=filterChains,proto3" json:"filter_chains,omitempty"` - // If a connection is redirected using *iptables*, the port on which the proxy - // receives it might be different from the original destination address. When this flag is set to - // true, the listener hands off redirected connections to the listener associated with the - // original destination address. If there is no listener associated with the original destination - // address, the connection is handled by the listener that receives it. Defaults to false. - // - // .. attention:: - // - // This field is deprecated. Use :ref:`an original_dst ` - // :ref:`listener filter ` instead. - // - // Note that hand off to another listener is *NOT* performed without this flag. Once - // :ref:`FilterChainMatch ` is implemented this flag - // will be removed, as filter chain matching can be used to select a filter chain based on the - // restored destination address. - // - // Deprecated: Do not use. - UseOriginalDst *wrappers.BoolValue `protobuf:"bytes,4,opt,name=use_original_dst,json=useOriginalDst,proto3" json:"use_original_dst,omitempty"` - // Soft limit on size of the listener’s new connection read and write buffers. - // If unspecified, an implementation defined default is applied (1MiB). - PerConnectionBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=per_connection_buffer_limit_bytes,json=perConnectionBufferLimitBytes,proto3" json:"per_connection_buffer_limit_bytes,omitempty"` - // Listener metadata. - Metadata *core.Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` - // [#not-implemented-hide:] - DeprecatedV1 *Listener_DeprecatedV1 `protobuf:"bytes,7,opt,name=deprecated_v1,json=deprecatedV1,proto3" json:"deprecated_v1,omitempty"` - // The type of draining to perform at a listener-wide level. - DrainType Listener_DrainType `protobuf:"varint,8,opt,name=drain_type,json=drainType,proto3,enum=envoy.api.v2.Listener_DrainType" json:"drain_type,omitempty"` - // Listener filters have the opportunity to manipulate and augment the connection metadata that - // is used in connection filter chain matching, for example. These filters are run before any in - // :ref:`filter_chains `. Order matters as the - // filters are processed sequentially right after a socket has been accepted by the listener, and - // before a connection is created. - // UDP Listener filters can be specified when the protocol in the listener socket address in - // :ref:`protocol ` is :ref:`UDP - // `. - // UDP listeners currently support a single filter. - ListenerFilters []*listener.ListenerFilter `protobuf:"bytes,9,rep,name=listener_filters,json=listenerFilters,proto3" json:"listener_filters,omitempty"` - // The timeout to wait for all listener filters to complete operation. If the timeout is reached, - // the accepted socket is closed without a connection being created unless - // `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the - // timeout. If not specified, a default timeout of 15s is used. - ListenerFiltersTimeout *duration.Duration `protobuf:"bytes,15,opt,name=listener_filters_timeout,json=listenerFiltersTimeout,proto3" json:"listener_filters_timeout,omitempty"` - // Whether a connection should be created when listener filters timeout. Default is false. - // - // .. attention:: - // - // Some listener filters, such as :ref:`Proxy Protocol filter - // `, should not be used with this option. It will cause - // unexpected behavior when a connection is created. - ContinueOnListenerFiltersTimeout bool `protobuf:"varint,17,opt,name=continue_on_listener_filters_timeout,json=continueOnListenerFiltersTimeout,proto3" json:"continue_on_listener_filters_timeout,omitempty"` - // Whether the listener should be set as a transparent socket. - // When this flag is set to true, connections can be redirected to the listener using an - // *iptables* *TPROXY* target, in which case the original source and destination addresses and - // ports are preserved on accepted connections. This flag should be used in combination with - // :ref:`an original_dst ` :ref:`listener filter - // ` to mark the connections' local addresses as - // "restored." This can be used to hand off each redirected connection to another listener - // associated with the connection's destination address. Direct connections to the socket without - // using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are - // therefore treated as if they were redirected. - // When this flag is set to false, the listener's socket is explicitly reset as non-transparent. - // Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. - // When this flag is not set (default), the socket is not modified, i.e. the transparent option - // is neither set nor reset. - Transparent *wrappers.BoolValue `protobuf:"bytes,10,opt,name=transparent,proto3" json:"transparent,omitempty"` - // Whether the listener should set the *IP_FREEBIND* socket option. When this - // flag is set to true, listeners can be bound to an IP address that is not - // configured on the system running Envoy. When this flag is set to false, the - // option *IP_FREEBIND* is disabled on the socket. When this flag is not set - // (default), the socket is not modified, i.e. the option is neither enabled - // nor disabled. - Freebind *wrappers.BoolValue `protobuf:"bytes,11,opt,name=freebind,proto3" json:"freebind,omitempty"` - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - SocketOptions []*core.SocketOption `protobuf:"bytes,13,rep,name=socket_options,json=socketOptions,proto3" json:"socket_options,omitempty"` - // Whether the listener should accept TCP Fast Open (TFO) connections. - // When this flag is set to a value greater than 0, the option TCP_FASTOPEN is enabled on - // the socket, with a queue length of the specified size - // (see `details in RFC7413 `_). - // When this flag is set to 0, the option TCP_FASTOPEN is disabled on the socket. - // When this flag is not set (default), the socket is not modified, - // i.e. the option is neither enabled nor disabled. - // - // On Linux, the net.ipv4.tcp_fastopen kernel parameter must include flag 0x2 to enable - // TCP_FASTOPEN. - // See `ip-sysctl.txt `_. - // - // On macOS, only values of 0, 1, and unset are valid; other values may result in an error. - // To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. - TcpFastOpenQueueLength *wrappers.UInt32Value `protobuf:"bytes,12,opt,name=tcp_fast_open_queue_length,json=tcpFastOpenQueueLength,proto3" json:"tcp_fast_open_queue_length,omitempty"` - // Specifies the intended direction of the traffic relative to the local Envoy. - // This property is required on Windows for listeners using the original destination filter, - // see :ref:`Original Destination `. - TrafficDirection core.TrafficDirection `protobuf:"varint,16,opt,name=traffic_direction,json=trafficDirection,proto3,enum=envoy.api.v2.core.TrafficDirection" json:"traffic_direction,omitempty"` - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // listener to create, i.e. :ref:`udp_listener_name - // ` = "raw_udp_listener" for - // creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". - UdpListenerConfig *listener.UdpListenerConfig `protobuf:"bytes,18,opt,name=udp_listener_config,json=udpListenerConfig,proto3" json:"udp_listener_config,omitempty"` - // Used to represent an API listener, which is used in non-proxy clients. The type of API - // exposed to the non-proxy application depends on the type of API listener. - // When this field is set, no other field except for :ref:`name` - // should be set. - // - // .. note:: - // - // Currently only one ApiListener can be installed; and it can only be done via bootstrap config, - // not LDS. - // - // [#next-major-version: In the v3 API, instead of this messy approach where the socket - // listener fields are directly in the top-level Listener message and the API listener types - // are in the ApiListener message, the socket listener messages should be in their own message, - // and the top-level Listener should essentially be a oneof that selects between the - // socket listener and the various types of API listener. That way, a given Listener message - // can structurally only contain the fields of the relevant type.] - ApiListener *v2.ApiListener `protobuf:"bytes,19,opt,name=api_listener,json=apiListener,proto3" json:"api_listener,omitempty"` - // The listener's connection balancer configuration, currently only applicable to TCP listeners. - // If no configuration is specified, Envoy will not attempt to balance active connections between - // worker threads. - ConnectionBalanceConfig *Listener_ConnectionBalanceConfig `protobuf:"bytes,20,opt,name=connection_balance_config,json=connectionBalanceConfig,proto3" json:"connection_balance_config,omitempty"` - // When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and - // create one socket for each worker thread. This makes inbound connections - // distribute among worker threads roughly evenly in cases where there are a high number - // of connections. When this flag is set to false, all worker threads share one socket. - // - // Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart - // (see `3rd paragraph in 'soreuseport' commit message - // `_). - // This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket - // `_. - ReusePort bool `protobuf:"varint,21,opt,name=reuse_port,json=reusePort,proto3" json:"reuse_port,omitempty"` - // Configuration for :ref:`access logs ` - // emitted by this listener. - AccessLog []*v21.AccessLog `protobuf:"bytes,22,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` -} - -func (x *Listener) Reset() { - *x = Listener{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener) ProtoMessage() {} - -func (x *Listener) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener.ProtoReflect.Descriptor instead. -func (*Listener) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_proto_rawDescGZIP(), []int{0} -} - -func (x *Listener) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Listener) GetAddress() *core.Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *Listener) GetFilterChains() []*listener.FilterChain { - if x != nil { - return x.FilterChains - } - return nil -} - -// Deprecated: Do not use. -func (x *Listener) GetUseOriginalDst() *wrappers.BoolValue { - if x != nil { - return x.UseOriginalDst - } - return nil -} - -func (x *Listener) GetPerConnectionBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerConnectionBufferLimitBytes - } - return nil -} - -func (x *Listener) GetMetadata() *core.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Listener) GetDeprecatedV1() *Listener_DeprecatedV1 { - if x != nil { - return x.DeprecatedV1 - } - return nil -} - -func (x *Listener) GetDrainType() Listener_DrainType { - if x != nil { - return x.DrainType - } - return Listener_DEFAULT -} - -func (x *Listener) GetListenerFilters() []*listener.ListenerFilter { - if x != nil { - return x.ListenerFilters - } - return nil -} - -func (x *Listener) GetListenerFiltersTimeout() *duration.Duration { - if x != nil { - return x.ListenerFiltersTimeout - } - return nil -} - -func (x *Listener) GetContinueOnListenerFiltersTimeout() bool { - if x != nil { - return x.ContinueOnListenerFiltersTimeout - } - return false -} - -func (x *Listener) GetTransparent() *wrappers.BoolValue { - if x != nil { - return x.Transparent - } - return nil -} - -func (x *Listener) GetFreebind() *wrappers.BoolValue { - if x != nil { - return x.Freebind - } - return nil -} - -func (x *Listener) GetSocketOptions() []*core.SocketOption { - if x != nil { - return x.SocketOptions - } - return nil -} - -func (x *Listener) GetTcpFastOpenQueueLength() *wrappers.UInt32Value { - if x != nil { - return x.TcpFastOpenQueueLength - } - return nil -} - -func (x *Listener) GetTrafficDirection() core.TrafficDirection { - if x != nil { - return x.TrafficDirection - } - return core.TrafficDirection(0) -} - -func (x *Listener) GetUdpListenerConfig() *listener.UdpListenerConfig { - if x != nil { - return x.UdpListenerConfig - } - return nil -} - -func (x *Listener) GetApiListener() *v2.ApiListener { - if x != nil { - return x.ApiListener - } - return nil -} - -func (x *Listener) GetConnectionBalanceConfig() *Listener_ConnectionBalanceConfig { - if x != nil { - return x.ConnectionBalanceConfig - } - return nil -} - -func (x *Listener) GetReusePort() bool { - if x != nil { - return x.ReusePort - } - return false -} - -func (x *Listener) GetAccessLog() []*v21.AccessLog { - if x != nil { - return x.AccessLog - } - return nil -} - -// [#not-implemented-hide:] -type Listener_DeprecatedV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether the listener should bind to the port. A listener that doesn't - // bind can only receive connections redirected from other listeners that - // set use_original_dst parameter to true. Default is true. - // - // This is deprecated in v2, all Listeners will bind to their port. An - // additional filter chain must be created for every original destination - // port this listener may redirect to in v2, with the original port - // specified in the FilterChainMatch destination_port field. - // - // [#comment:TODO(PiotrSikora): Remove this once verified that we no longer need it.] - BindToPort *wrappers.BoolValue `protobuf:"bytes,1,opt,name=bind_to_port,json=bindToPort,proto3" json:"bind_to_port,omitempty"` -} - -func (x *Listener_DeprecatedV1) Reset() { - *x = Listener_DeprecatedV1{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener_DeprecatedV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener_DeprecatedV1) ProtoMessage() {} - -func (x *Listener_DeprecatedV1) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener_DeprecatedV1.ProtoReflect.Descriptor instead. -func (*Listener_DeprecatedV1) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Listener_DeprecatedV1) GetBindToPort() *wrappers.BoolValue { - if x != nil { - return x.BindToPort - } - return nil -} - -// Configuration for listener connection balancing. -type Listener_ConnectionBalanceConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to BalanceType: - // *Listener_ConnectionBalanceConfig_ExactBalance_ - BalanceType isListener_ConnectionBalanceConfig_BalanceType `protobuf_oneof:"balance_type"` -} - -func (x *Listener_ConnectionBalanceConfig) Reset() { - *x = Listener_ConnectionBalanceConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener_ConnectionBalanceConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener_ConnectionBalanceConfig) ProtoMessage() {} - -func (x *Listener_ConnectionBalanceConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener_ConnectionBalanceConfig.ProtoReflect.Descriptor instead. -func (*Listener_ConnectionBalanceConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_proto_rawDescGZIP(), []int{0, 1} -} - -func (m *Listener_ConnectionBalanceConfig) GetBalanceType() isListener_ConnectionBalanceConfig_BalanceType { - if m != nil { - return m.BalanceType - } - return nil -} - -func (x *Listener_ConnectionBalanceConfig) GetExactBalance() *Listener_ConnectionBalanceConfig_ExactBalance { - if x, ok := x.GetBalanceType().(*Listener_ConnectionBalanceConfig_ExactBalance_); ok { - return x.ExactBalance - } - return nil -} - -type isListener_ConnectionBalanceConfig_BalanceType interface { - isListener_ConnectionBalanceConfig_BalanceType() -} - -type Listener_ConnectionBalanceConfig_ExactBalance_ struct { - // If specified, the listener will use the exact connection balancer. - ExactBalance *Listener_ConnectionBalanceConfig_ExactBalance `protobuf:"bytes,1,opt,name=exact_balance,json=exactBalance,proto3,oneof"` -} - -func (*Listener_ConnectionBalanceConfig_ExactBalance_) isListener_ConnectionBalanceConfig_BalanceType() { -} - -// A connection balancer implementation that does exact balancing. This means that a lock is -// held during balancing so that connection counts are nearly exactly balanced between worker -// threads. This is "nearly" exact in the sense that a connection might close in parallel thus -// making the counts incorrect, but this should be rectified on the next accept. This balancer -// sacrifices accept throughput for accuracy and should be used when there are a small number of -// connections that rarely cycle (e.g., service mesh gRPC egress). -type Listener_ConnectionBalanceConfig_ExactBalance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Listener_ConnectionBalanceConfig_ExactBalance) Reset() { - *x = Listener_ConnectionBalanceConfig_ExactBalance{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Listener_ConnectionBalanceConfig_ExactBalance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Listener_ConnectionBalanceConfig_ExactBalance) ProtoMessage() {} - -func (x *Listener_ConnectionBalanceConfig_ExactBalance) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Listener_ConnectionBalanceConfig_ExactBalance.ProtoReflect.Descriptor instead. -func (*Listener_ConnectionBalanceConfig_ExactBalance) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_proto_rawDescGZIP(), []int{0, 1, 0} -} - -var File_envoy_api_v2_listener_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_listener_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, - 0x6f, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, - 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x0e, 0x0a, 0x08, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x0d, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, - 0x75, 0x73, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x12, 0x66, - 0x0a, 0x21, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x70, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x48, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x31, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x52, 0x0c, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x3f, 0x0a, 0x0a, 0x64, 0x72, 0x61, - 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x09, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x18, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x4e, 0x0a, 0x24, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x5f, 0x6f, 0x6e, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x4f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, - 0x36, 0x0a, 0x08, 0x66, 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x66, - 0x72, 0x65, 0x65, 0x62, 0x69, 0x6e, 0x64, 0x12, 0x46, 0x0a, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x58, 0x0a, 0x1a, 0x74, 0x63, 0x70, 0x5f, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x6e, - 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x16, 0x74, 0x63, 0x70, 0x46, 0x61, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x51, 0x75, - 0x65, 0x75, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x50, 0x0a, 0x11, 0x74, 0x72, 0x61, - 0x66, 0x66, 0x69, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, - 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x72, 0x61, 0x66, 0x66, - 0x69, 0x63, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x13, 0x75, - 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x11, 0x75, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x52, 0x0b, 0x61, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, - 0x6a, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x72, - 0x65, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x72, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x4a, 0x0a, 0x0a, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, - 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x1a, 0x4c, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x56, 0x31, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x74, - 0x6f, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x62, 0x69, 0x6e, 0x64, 0x54, 0x6f, - 0x50, 0x6f, 0x72, 0x74, 0x1a, 0xa2, 0x01, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x62, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x0e, 0x0a, 0x0c, 0x45, 0x78, 0x61, 0x63, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x42, 0x13, 0x0a, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x29, 0x0a, 0x09, 0x44, 0x72, 0x61, - 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, - 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x59, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x01, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x42, 0x90, 0x01, 0x0a, 0x1a, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, - 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_listener_proto_rawDescOnce sync.Once - file_envoy_api_v2_listener_proto_rawDescData = file_envoy_api_v2_listener_proto_rawDesc -) - -func file_envoy_api_v2_listener_proto_rawDescGZIP() []byte { - file_envoy_api_v2_listener_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_listener_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_listener_proto_rawDescData) - }) - return file_envoy_api_v2_listener_proto_rawDescData -} - -var file_envoy_api_v2_listener_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_api_v2_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_envoy_api_v2_listener_proto_goTypes = []interface{}{ - (Listener_DrainType)(0), // 0: envoy.api.v2.Listener.DrainType - (*Listener)(nil), // 1: envoy.api.v2.Listener - (*Listener_DeprecatedV1)(nil), // 2: envoy.api.v2.Listener.DeprecatedV1 - (*Listener_ConnectionBalanceConfig)(nil), // 3: envoy.api.v2.Listener.ConnectionBalanceConfig - (*Listener_ConnectionBalanceConfig_ExactBalance)(nil), // 4: envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance - (*core.Address)(nil), // 5: envoy.api.v2.core.Address - (*listener.FilterChain)(nil), // 6: envoy.api.v2.listener.FilterChain - (*wrappers.BoolValue)(nil), // 7: google.protobuf.BoolValue - (*wrappers.UInt32Value)(nil), // 8: google.protobuf.UInt32Value - (*core.Metadata)(nil), // 9: envoy.api.v2.core.Metadata - (*listener.ListenerFilter)(nil), // 10: envoy.api.v2.listener.ListenerFilter - (*duration.Duration)(nil), // 11: google.protobuf.Duration - (*core.SocketOption)(nil), // 12: envoy.api.v2.core.SocketOption - (core.TrafficDirection)(0), // 13: envoy.api.v2.core.TrafficDirection - (*listener.UdpListenerConfig)(nil), // 14: envoy.api.v2.listener.UdpListenerConfig - (*v2.ApiListener)(nil), // 15: envoy.config.listener.v2.ApiListener - (*v21.AccessLog)(nil), // 16: envoy.config.filter.accesslog.v2.AccessLog -} -var file_envoy_api_v2_listener_proto_depIdxs = []int32{ - 5, // 0: envoy.api.v2.Listener.address:type_name -> envoy.api.v2.core.Address - 6, // 1: envoy.api.v2.Listener.filter_chains:type_name -> envoy.api.v2.listener.FilterChain - 7, // 2: envoy.api.v2.Listener.use_original_dst:type_name -> google.protobuf.BoolValue - 8, // 3: envoy.api.v2.Listener.per_connection_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 9, // 4: envoy.api.v2.Listener.metadata:type_name -> envoy.api.v2.core.Metadata - 2, // 5: envoy.api.v2.Listener.deprecated_v1:type_name -> envoy.api.v2.Listener.DeprecatedV1 - 0, // 6: envoy.api.v2.Listener.drain_type:type_name -> envoy.api.v2.Listener.DrainType - 10, // 7: envoy.api.v2.Listener.listener_filters:type_name -> envoy.api.v2.listener.ListenerFilter - 11, // 8: envoy.api.v2.Listener.listener_filters_timeout:type_name -> google.protobuf.Duration - 7, // 9: envoy.api.v2.Listener.transparent:type_name -> google.protobuf.BoolValue - 7, // 10: envoy.api.v2.Listener.freebind:type_name -> google.protobuf.BoolValue - 12, // 11: envoy.api.v2.Listener.socket_options:type_name -> envoy.api.v2.core.SocketOption - 8, // 12: envoy.api.v2.Listener.tcp_fast_open_queue_length:type_name -> google.protobuf.UInt32Value - 13, // 13: envoy.api.v2.Listener.traffic_direction:type_name -> envoy.api.v2.core.TrafficDirection - 14, // 14: envoy.api.v2.Listener.udp_listener_config:type_name -> envoy.api.v2.listener.UdpListenerConfig - 15, // 15: envoy.api.v2.Listener.api_listener:type_name -> envoy.config.listener.v2.ApiListener - 3, // 16: envoy.api.v2.Listener.connection_balance_config:type_name -> envoy.api.v2.Listener.ConnectionBalanceConfig - 16, // 17: envoy.api.v2.Listener.access_log:type_name -> envoy.config.filter.accesslog.v2.AccessLog - 7, // 18: envoy.api.v2.Listener.DeprecatedV1.bind_to_port:type_name -> google.protobuf.BoolValue - 4, // 19: envoy.api.v2.Listener.ConnectionBalanceConfig.exact_balance:type_name -> envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_listener_proto_init() } -func file_envoy_api_v2_listener_proto_init() { - if File_envoy_api_v2_listener_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_listener_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener_DeprecatedV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener_ConnectionBalanceConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener_ConnectionBalanceConfig_ExactBalance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_listener_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Listener_ConnectionBalanceConfig_ExactBalance_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_listener_proto_rawDesc, - NumEnums: 1, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_listener_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_listener_proto_depIdxs, - EnumInfos: file_envoy_api_v2_listener_proto_enumTypes, - MessageInfos: file_envoy_api_v2_listener_proto_msgTypes, - }.Build() - File_envoy_api_v2_listener_proto = out.File - file_envoy_api_v2_listener_proto_rawDesc = nil - file_envoy_api_v2_listener_proto_goTypes = nil - file_envoy_api_v2_listener_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go deleted file mode 100644 index b881630d801e..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go +++ /dev/null @@ -1,1047 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/listener.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = core.TrafficDirection(0) -) - -// Validate checks the field values on Listener with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Listener) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Listener with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ListenerMultiError, or nil -// if none found. -func (m *Listener) ValidateAll() error { - return m.validate(true) -} - -func (m *Listener) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if m.GetAddress() == nil { - err := ListenerValidationError{ - field: "Address", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Address", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetFilterChains() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("FilterChains[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("FilterChains[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: fmt.Sprintf("FilterChains[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetUseOriginalDst()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "UseOriginalDst", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "UseOriginalDst", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUseOriginalDst()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "UseOriginalDst", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerConnectionBufferLimitBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerConnectionBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "PerConnectionBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetDeprecatedV1()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "DeprecatedV1", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "DeprecatedV1", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDeprecatedV1()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "DeprecatedV1", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DrainType - - for idx, item := range m.GetListenerFilters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("ListenerFilters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("ListenerFilters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: fmt.Sprintf("ListenerFilters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetListenerFiltersTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "ListenerFiltersTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "ListenerFiltersTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetListenerFiltersTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "ListenerFiltersTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ContinueOnListenerFiltersTimeout - - if all { - switch v := interface{}(m.GetTransparent()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Transparent", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Transparent", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTransparent()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Transparent", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetFreebind()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFreebind()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "Freebind", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetSocketOptions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: fmt.Sprintf("SocketOptions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetTcpFastOpenQueueLength()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "TcpFastOpenQueueLength", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "TcpFastOpenQueueLength", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTcpFastOpenQueueLength()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "TcpFastOpenQueueLength", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for TrafficDirection - - if all { - switch v := interface{}(m.GetUdpListenerConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "UdpListenerConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "UdpListenerConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUdpListenerConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "UdpListenerConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetApiListener()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "ApiListener", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "ApiListener", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "ApiListener", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetConnectionBalanceConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "ConnectionBalanceConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: "ConnectionBalanceConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectionBalanceConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: "ConnectionBalanceConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ReusePort - - for idx, item := range m.GetAccessLog() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("AccessLog[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerValidationError{ - field: fmt.Sprintf("AccessLog[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerValidationError{ - field: fmt.Sprintf("AccessLog[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListenerMultiError(errors) - } - - return nil -} - -// ListenerMultiError is an error wrapping multiple validation errors returned -// by Listener.ValidateAll() if the designated constraints aren't met. -type ListenerMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListenerMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListenerMultiError) AllErrors() []error { return m } - -// ListenerValidationError is the validation error returned by -// Listener.Validate if the designated constraints aren't met. -type ListenerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenerValidationError) ErrorName() string { return "ListenerValidationError" } - -// Error satisfies the builtin error interface -func (e ListenerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListener.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenerValidationError{} - -// Validate checks the field values on Listener_DeprecatedV1 with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *Listener_DeprecatedV1) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Listener_DeprecatedV1 with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// Listener_DeprecatedV1MultiError, or nil if none found. -func (m *Listener_DeprecatedV1) ValidateAll() error { - return m.validate(true) -} - -func (m *Listener_DeprecatedV1) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetBindToPort()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Listener_DeprecatedV1ValidationError{ - field: "BindToPort", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Listener_DeprecatedV1ValidationError{ - field: "BindToPort", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBindToPort()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Listener_DeprecatedV1ValidationError{ - field: "BindToPort", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return Listener_DeprecatedV1MultiError(errors) - } - - return nil -} - -// Listener_DeprecatedV1MultiError is an error wrapping multiple validation -// errors returned by Listener_DeprecatedV1.ValidateAll() if the designated -// constraints aren't met. -type Listener_DeprecatedV1MultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Listener_DeprecatedV1MultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Listener_DeprecatedV1MultiError) AllErrors() []error { return m } - -// Listener_DeprecatedV1ValidationError is the validation error returned by -// Listener_DeprecatedV1.Validate if the designated constraints aren't met. -type Listener_DeprecatedV1ValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Listener_DeprecatedV1ValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Listener_DeprecatedV1ValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Listener_DeprecatedV1ValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Listener_DeprecatedV1ValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Listener_DeprecatedV1ValidationError) ErrorName() string { - return "Listener_DeprecatedV1ValidationError" -} - -// Error satisfies the builtin error interface -func (e Listener_DeprecatedV1ValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListener_DeprecatedV1.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Listener_DeprecatedV1ValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Listener_DeprecatedV1ValidationError{} - -// Validate checks the field values on Listener_ConnectionBalanceConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *Listener_ConnectionBalanceConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Listener_ConnectionBalanceConfig with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// Listener_ConnectionBalanceConfigMultiError, or nil if none found. -func (m *Listener_ConnectionBalanceConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *Listener_ConnectionBalanceConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofBalanceTypePresent := false - switch v := m.BalanceType.(type) { - case *Listener_ConnectionBalanceConfig_ExactBalance_: - if v == nil { - err := Listener_ConnectionBalanceConfigValidationError{ - field: "BalanceType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofBalanceTypePresent = true - - if all { - switch v := interface{}(m.GetExactBalance()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, Listener_ConnectionBalanceConfigValidationError{ - field: "ExactBalance", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, Listener_ConnectionBalanceConfigValidationError{ - field: "ExactBalance", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExactBalance()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return Listener_ConnectionBalanceConfigValidationError{ - field: "ExactBalance", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofBalanceTypePresent { - err := Listener_ConnectionBalanceConfigValidationError{ - field: "BalanceType", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return Listener_ConnectionBalanceConfigMultiError(errors) - } - - return nil -} - -// Listener_ConnectionBalanceConfigMultiError is an error wrapping multiple -// validation errors returned by -// Listener_ConnectionBalanceConfig.ValidateAll() if the designated -// constraints aren't met. -type Listener_ConnectionBalanceConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Listener_ConnectionBalanceConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Listener_ConnectionBalanceConfigMultiError) AllErrors() []error { return m } - -// Listener_ConnectionBalanceConfigValidationError is the validation error -// returned by Listener_ConnectionBalanceConfig.Validate if the designated -// constraints aren't met. -type Listener_ConnectionBalanceConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Listener_ConnectionBalanceConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Listener_ConnectionBalanceConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e Listener_ConnectionBalanceConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Listener_ConnectionBalanceConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Listener_ConnectionBalanceConfigValidationError) ErrorName() string { - return "Listener_ConnectionBalanceConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e Listener_ConnectionBalanceConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListener_ConnectionBalanceConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Listener_ConnectionBalanceConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Listener_ConnectionBalanceConfigValidationError{} - -// Validate checks the field values on -// Listener_ConnectionBalanceConfig_ExactBalance with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Listener_ConnectionBalanceConfig_ExactBalance) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// Listener_ConnectionBalanceConfig_ExactBalance with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// Listener_ConnectionBalanceConfig_ExactBalanceMultiError, or nil if none found. -func (m *Listener_ConnectionBalanceConfig_ExactBalance) ValidateAll() error { - return m.validate(true) -} - -func (m *Listener_ConnectionBalanceConfig_ExactBalance) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return Listener_ConnectionBalanceConfig_ExactBalanceMultiError(errors) - } - - return nil -} - -// Listener_ConnectionBalanceConfig_ExactBalanceMultiError is an error wrapping -// multiple validation errors returned by -// Listener_ConnectionBalanceConfig_ExactBalance.ValidateAll() if the -// designated constraints aren't met. -type Listener_ConnectionBalanceConfig_ExactBalanceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m Listener_ConnectionBalanceConfig_ExactBalanceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m Listener_ConnectionBalanceConfig_ExactBalanceMultiError) AllErrors() []error { return m } - -// Listener_ConnectionBalanceConfig_ExactBalanceValidationError is the -// validation error returned by -// Listener_ConnectionBalanceConfig_ExactBalance.Validate if the designated -// constraints aren't met. -type Listener_ConnectionBalanceConfig_ExactBalanceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Reason() string { - return e.reason -} - -// Cause function returns cause value. -func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) ErrorName() string { - return "Listener_ConnectionBalanceConfig_ExactBalanceValidationError" -} - -// Error satisfies the builtin error interface -func (e Listener_ConnectionBalanceConfig_ExactBalanceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListener_ConnectionBalanceConfig_ExactBalance.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = Listener_ConnectionBalanceConfig_ExactBalanceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = Listener_ConnectionBalanceConfig_ExactBalanceValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go deleted file mode 100644 index cdbfc0a38a77..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/listener/listener.proto - -package listener - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_envoy_api_v2_listener_listener_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_listener_listener_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0xab, - 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, - 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, - 0x02, 0x1a, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, - 0x3a, 0x3a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0x50, 0x00, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_envoy_api_v2_listener_listener_proto_goTypes = []interface{}{} -var file_envoy_api_v2_listener_listener_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_listener_listener_proto_init() } -func file_envoy_api_v2_listener_listener_proto_init() { - if File_envoy_api_v2_listener_listener_proto != nil { - return - } - file_envoy_api_v2_listener_listener_components_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_listener_listener_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_listener_listener_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_listener_listener_proto_depIdxs, - }.Build() - File_envoy_api_v2_listener_listener_proto = out.File - file_envoy_api_v2_listener_listener_proto_rawDesc = nil - file_envoy_api_v2_listener_listener_proto_goTypes = nil - file_envoy_api_v2_listener_listener_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go deleted file mode 100644 index 69bcff355ce0..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/listener/listener.proto - -package listener - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go deleted file mode 100644 index 611edb861dd4..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.go +++ /dev/null @@ -1,1178 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/listener/listener_components.proto - -package listener - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _type "github.com/envoyproxy/go-control-plane/envoy/type" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - any1 "github.com/golang/protobuf/ptypes/any" - _struct "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FilterChainMatch_ConnectionSourceType int32 - -const ( - // Any connection source matches. - FilterChainMatch_ANY FilterChainMatch_ConnectionSourceType = 0 - // Match a connection originating from the same host. - FilterChainMatch_LOCAL FilterChainMatch_ConnectionSourceType = 1 - // Match a connection originating from a different host. - FilterChainMatch_EXTERNAL FilterChainMatch_ConnectionSourceType = 2 -) - -// Enum value maps for FilterChainMatch_ConnectionSourceType. -var ( - FilterChainMatch_ConnectionSourceType_name = map[int32]string{ - 0: "ANY", - 1: "LOCAL", - 2: "EXTERNAL", - } - FilterChainMatch_ConnectionSourceType_value = map[string]int32{ - "ANY": 0, - "LOCAL": 1, - "EXTERNAL": 2, - } -) - -func (x FilterChainMatch_ConnectionSourceType) Enum() *FilterChainMatch_ConnectionSourceType { - p := new(FilterChainMatch_ConnectionSourceType) - *p = x - return p -} - -func (x FilterChainMatch_ConnectionSourceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FilterChainMatch_ConnectionSourceType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_listener_listener_components_proto_enumTypes[0].Descriptor() -} - -func (FilterChainMatch_ConnectionSourceType) Type() protoreflect.EnumType { - return &file_envoy_api_v2_listener_listener_components_proto_enumTypes[0] -} - -func (x FilterChainMatch_ConnectionSourceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FilterChainMatch_ConnectionSourceType.Descriptor instead. -func (FilterChainMatch_ConnectionSourceType) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP(), []int{1, 0} -} - -type Filter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - // - // Types that are assignable to ConfigType: - // *Filter_Config - // *Filter_TypedConfig - ConfigType isFilter_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *Filter) Reset() { - *x = Filter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Filter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Filter) ProtoMessage() {} - -func (x *Filter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Filter.ProtoReflect.Descriptor instead. -func (*Filter) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP(), []int{0} -} - -func (x *Filter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *Filter) GetConfigType() isFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *Filter) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*Filter_Config); ok { - return x.Config - } - return nil -} - -func (x *Filter) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*Filter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isFilter_ConfigType interface { - isFilter_ConfigType() -} - -type Filter_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} - -type Filter_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*Filter_Config) isFilter_ConfigType() {} - -func (*Filter_TypedConfig) isFilter_ConfigType() {} - -// Specifies the match criteria for selecting a specific filter chain for a -// listener. -// -// In order for a filter chain to be selected, *ALL* of its criteria must be -// fulfilled by the incoming connection, properties of which are set by the -// networking stack and/or listener filters. -// -// The following order applies: -// -// 1. Destination port. -// 2. Destination IP address. -// 3. Server name (e.g. SNI for TLS protocol), -// 4. Transport protocol. -// 5. Application protocols (e.g. ALPN for TLS protocol). -// 6. Source type (e.g. any, local or external network). -// 7. Source IP address. -// 8. Source port. -// -// For criteria that allow ranges or wildcards, the most specific value in any -// of the configured filter chains that matches the incoming connection is going -// to be used (e.g. for SNI ``www.example.com`` the most specific match would be -// ``www.example.com``, then ``*.example.com``, then ``*.com``, then any filter -// chain without ``server_names`` requirements). -// -// [#comment: Implemented rules are kept in the preference order, with deprecated fields -// listed at the end, because that's how we want to list them in the docs. -// -// [#comment:TODO(PiotrSikora): Add support for configurable precedence of the rules] -// [#next-free-field: 13] -type FilterChainMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional destination port to consider when use_original_dst is set on the - // listener in determining a filter chain match. - DestinationPort *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=destination_port,json=destinationPort,proto3" json:"destination_port,omitempty"` - // If non-empty, an IP address and prefix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - PrefixRanges []*core.CidrRange `protobuf:"bytes,3,rep,name=prefix_ranges,json=prefixRanges,proto3" json:"prefix_ranges,omitempty"` - // If non-empty, an IP address and suffix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - // [#not-implemented-hide:] - AddressSuffix string `protobuf:"bytes,4,opt,name=address_suffix,json=addressSuffix,proto3" json:"address_suffix,omitempty"` - // [#not-implemented-hide:] - SuffixLen *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=suffix_len,json=suffixLen,proto3" json:"suffix_len,omitempty"` - // Specifies the connection source IP match type. Can be any, local or external network. - SourceType FilterChainMatch_ConnectionSourceType `protobuf:"varint,12,opt,name=source_type,json=sourceType,proto3,enum=envoy.api.v2.listener.FilterChainMatch_ConnectionSourceType" json:"source_type,omitempty"` - // The criteria is satisfied if the source IP address of the downstream - // connection is contained in at least one of the specified subnets. If the - // parameter is not specified or the list is empty, the source IP address is - // ignored. - SourcePrefixRanges []*core.CidrRange `protobuf:"bytes,6,rep,name=source_prefix_ranges,json=sourcePrefixRanges,proto3" json:"source_prefix_ranges,omitempty"` - // The criteria is satisfied if the source port of the downstream connection - // is contained in at least one of the specified ports. If the parameter is - // not specified, the source port is ignored. - SourcePorts []uint32 `protobuf:"varint,7,rep,packed,name=source_ports,json=sourcePorts,proto3" json:"source_ports,omitempty"` - // If non-empty, a list of server names (e.g. SNI for TLS protocol) to consider when determining - // a filter chain match. Those values will be compared against the server names of a new - // connection, when detected by one of the listener filters. - // - // The server name will be matched against all wildcard domains, i.e. ``www.example.com`` - // will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. - // - // Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. - // - // .. attention:: - // - // See the :ref:`FAQ entry ` on how to configure SNI for more - // information. - ServerNames []string `protobuf:"bytes,11,rep,name=server_names,json=serverNames,proto3" json:"server_names,omitempty"` - // If non-empty, a transport protocol to consider when determining a filter chain match. - // This value will be compared against the transport protocol of a new connection, when - // it's detected by one of the listener filters. - // - // Suggested values include: - // - // * ``raw_buffer`` - default, used when no transport protocol is detected, - // * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` - // when TLS protocol is detected. - TransportProtocol string `protobuf:"bytes,9,opt,name=transport_protocol,json=transportProtocol,proto3" json:"transport_protocol,omitempty"` - // If non-empty, a list of application protocols (e.g. ALPN for TLS protocol) to consider when - // determining a filter chain match. Those values will be compared against the application - // protocols of a new connection, when detected by one of the listener filters. - // - // Suggested values include: - // - // * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector - // `, - // * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` - // - // .. attention:: - // - // Currently, only :ref:`TLS Inspector ` provides - // application protocol detection based on the requested - // `ALPN `_ values. - // - // However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, - // and matching on values other than ``h2`` is going to lead to a lot of false negatives, - // unless all connecting clients are known to use ALPN. - ApplicationProtocols []string `protobuf:"bytes,10,rep,name=application_protocols,json=applicationProtocols,proto3" json:"application_protocols,omitempty"` -} - -func (x *FilterChainMatch) Reset() { - *x = FilterChainMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterChainMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterChainMatch) ProtoMessage() {} - -func (x *FilterChainMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterChainMatch.ProtoReflect.Descriptor instead. -func (*FilterChainMatch) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP(), []int{1} -} - -func (x *FilterChainMatch) GetDestinationPort() *wrappers.UInt32Value { - if x != nil { - return x.DestinationPort - } - return nil -} - -func (x *FilterChainMatch) GetPrefixRanges() []*core.CidrRange { - if x != nil { - return x.PrefixRanges - } - return nil -} - -func (x *FilterChainMatch) GetAddressSuffix() string { - if x != nil { - return x.AddressSuffix - } - return "" -} - -func (x *FilterChainMatch) GetSuffixLen() *wrappers.UInt32Value { - if x != nil { - return x.SuffixLen - } - return nil -} - -func (x *FilterChainMatch) GetSourceType() FilterChainMatch_ConnectionSourceType { - if x != nil { - return x.SourceType - } - return FilterChainMatch_ANY -} - -func (x *FilterChainMatch) GetSourcePrefixRanges() []*core.CidrRange { - if x != nil { - return x.SourcePrefixRanges - } - return nil -} - -func (x *FilterChainMatch) GetSourcePorts() []uint32 { - if x != nil { - return x.SourcePorts - } - return nil -} - -func (x *FilterChainMatch) GetServerNames() []string { - if x != nil { - return x.ServerNames - } - return nil -} - -func (x *FilterChainMatch) GetTransportProtocol() string { - if x != nil { - return x.TransportProtocol - } - return "" -} - -func (x *FilterChainMatch) GetApplicationProtocols() []string { - if x != nil { - return x.ApplicationProtocols - } - return nil -} - -// A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and -// various other parameters. -// [#next-free-field: 8] -type FilterChain struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The criteria to use when matching a connection to this filter chain. - FilterChainMatch *FilterChainMatch `protobuf:"bytes,1,opt,name=filter_chain_match,json=filterChainMatch,proto3" json:"filter_chain_match,omitempty"` - // The TLS context for this filter chain. - // - // .. attention:: - // - // **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are - // set, `transport_socket` takes priority. - // - // Deprecated: Do not use. - TlsContext *auth.DownstreamTlsContext `protobuf:"bytes,2,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` - // A list of individual network filters that make up the filter chain for - // connections established with the listener. Order matters as the filters are - // processed sequentially as connection events happen. Note: If the filter - // list is empty, the connection will close by default. - Filters []*Filter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` - // Whether the listener should expect a PROXY protocol V1 header on new - // connections. If this option is enabled, the listener will assume that that - // remote address of the connection is the one specified in the header. Some - // load balancers including the AWS ELB support this option. If the option is - // absent or set to false, Envoy will use the physical peer address of the - // connection as the remote address. - UseProxyProto *wrappers.BoolValue `protobuf:"bytes,4,opt,name=use_proxy_proto,json=useProxyProto,proto3" json:"use_proxy_proto,omitempty"` - // [#not-implemented-hide:] filter chain metadata. - Metadata *core.Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Optional custom transport socket implementation to use for downstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`DownstreamTlsContext ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - TransportSocket *core.TransportSocket `protobuf:"bytes,6,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` - // [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - // name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - // chain is to be dynamically updated or removed via FCDS a unique name must be provided. - Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *FilterChain) Reset() { - *x = FilterChain{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterChain) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterChain) ProtoMessage() {} - -func (x *FilterChain) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterChain.ProtoReflect.Descriptor instead. -func (*FilterChain) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP(), []int{2} -} - -func (x *FilterChain) GetFilterChainMatch() *FilterChainMatch { - if x != nil { - return x.FilterChainMatch - } - return nil -} - -// Deprecated: Do not use. -func (x *FilterChain) GetTlsContext() *auth.DownstreamTlsContext { - if x != nil { - return x.TlsContext - } - return nil -} - -func (x *FilterChain) GetFilters() []*Filter { - if x != nil { - return x.Filters - } - return nil -} - -func (x *FilterChain) GetUseProxyProto() *wrappers.BoolValue { - if x != nil { - return x.UseProxyProto - } - return nil -} - -func (x *FilterChain) GetMetadata() *core.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *FilterChain) GetTransportSocket() *core.TransportSocket { - if x != nil { - return x.TransportSocket - } - return nil -} - -func (x *FilterChain) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Listener filter chain match configuration. This is a recursive structure which allows complex -// nested match configurations to be built using various logical operators. -// -// Examples: -// -// * Matches if the destination port is 3306. -// -// .. code-block:: yaml -// -// destination_port_range: -// start: 3306 -// end: 3307 -// -// * Matches if the destination port is 3306 or 15000. -// -// .. code-block:: yaml -// -// or_match: -// rules: -// - destination_port_range: -// start: 3306 -// end: 3307 -// - destination_port_range: -// start: 15000 -// end: 15001 -// -// [#next-free-field: 6] -type ListenerFilterChainMatchPredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Rule: - // *ListenerFilterChainMatchPredicate_OrMatch - // *ListenerFilterChainMatchPredicate_AndMatch - // *ListenerFilterChainMatchPredicate_NotMatch - // *ListenerFilterChainMatchPredicate_AnyMatch - // *ListenerFilterChainMatchPredicate_DestinationPortRange - Rule isListenerFilterChainMatchPredicate_Rule `protobuf_oneof:"rule"` -} - -func (x *ListenerFilterChainMatchPredicate) Reset() { - *x = ListenerFilterChainMatchPredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerFilterChainMatchPredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerFilterChainMatchPredicate) ProtoMessage() {} - -func (x *ListenerFilterChainMatchPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerFilterChainMatchPredicate.ProtoReflect.Descriptor instead. -func (*ListenerFilterChainMatchPredicate) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP(), []int{3} -} - -func (m *ListenerFilterChainMatchPredicate) GetRule() isListenerFilterChainMatchPredicate_Rule { - if m != nil { - return m.Rule - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetOrMatch() *ListenerFilterChainMatchPredicate_MatchSet { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_OrMatch); ok { - return x.OrMatch - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetAndMatch() *ListenerFilterChainMatchPredicate_MatchSet { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_AndMatch); ok { - return x.AndMatch - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetNotMatch() *ListenerFilterChainMatchPredicate { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_NotMatch); ok { - return x.NotMatch - } - return nil -} - -func (x *ListenerFilterChainMatchPredicate) GetAnyMatch() bool { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_AnyMatch); ok { - return x.AnyMatch - } - return false -} - -func (x *ListenerFilterChainMatchPredicate) GetDestinationPortRange() *_type.Int32Range { - if x, ok := x.GetRule().(*ListenerFilterChainMatchPredicate_DestinationPortRange); ok { - return x.DestinationPortRange - } - return nil -} - -type isListenerFilterChainMatchPredicate_Rule interface { - isListenerFilterChainMatchPredicate_Rule() -} - -type ListenerFilterChainMatchPredicate_OrMatch struct { - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - OrMatch *ListenerFilterChainMatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_AndMatch struct { - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - AndMatch *ListenerFilterChainMatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_NotMatch struct { - // A negation match. The match configuration will match if the negated match condition matches. - NotMatch *ListenerFilterChainMatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_AnyMatch struct { - // The match configuration will always match. - AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"` -} - -type ListenerFilterChainMatchPredicate_DestinationPortRange struct { - // Match destination port. Particularly, the match evaluation must use the recovered local port if - // the owning listener filter is after :ref:`an original_dst listener filter `. - DestinationPortRange *_type.Int32Range `protobuf:"bytes,5,opt,name=destination_port_range,json=destinationPortRange,proto3,oneof"` -} - -func (*ListenerFilterChainMatchPredicate_OrMatch) isListenerFilterChainMatchPredicate_Rule() {} - -func (*ListenerFilterChainMatchPredicate_AndMatch) isListenerFilterChainMatchPredicate_Rule() {} - -func (*ListenerFilterChainMatchPredicate_NotMatch) isListenerFilterChainMatchPredicate_Rule() {} - -func (*ListenerFilterChainMatchPredicate_AnyMatch) isListenerFilterChainMatchPredicate_Rule() {} - -func (*ListenerFilterChainMatchPredicate_DestinationPortRange) isListenerFilterChainMatchPredicate_Rule() { -} - -type ListenerFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter specific configuration which depends on the filter being instantiated. - // See the supported filters for further documentation. - // - // Types that are assignable to ConfigType: - // *ListenerFilter_Config - // *ListenerFilter_TypedConfig - ConfigType isListenerFilter_ConfigType `protobuf_oneof:"config_type"` - // Optional match predicate used to disable the filter. The filter is enabled when this field is empty. - // See :ref:`ListenerFilterChainMatchPredicate ` - // for further examples. - FilterDisabled *ListenerFilterChainMatchPredicate `protobuf:"bytes,4,opt,name=filter_disabled,json=filterDisabled,proto3" json:"filter_disabled,omitempty"` -} - -func (x *ListenerFilter) Reset() { - *x = ListenerFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerFilter) ProtoMessage() {} - -func (x *ListenerFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerFilter.ProtoReflect.Descriptor instead. -func (*ListenerFilter) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP(), []int{4} -} - -func (x *ListenerFilter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *ListenerFilter) GetConfigType() isListenerFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *ListenerFilter) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*ListenerFilter_Config); ok { - return x.Config - } - return nil -} - -func (x *ListenerFilter) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*ListenerFilter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -func (x *ListenerFilter) GetFilterDisabled() *ListenerFilterChainMatchPredicate { - if x != nil { - return x.FilterDisabled - } - return nil -} - -type isListenerFilter_ConfigType interface { - isListenerFilter_ConfigType() -} - -type ListenerFilter_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} - -type ListenerFilter_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*ListenerFilter_Config) isListenerFilter_ConfigType() {} - -func (*ListenerFilter_TypedConfig) isListenerFilter_ConfigType() {} - -// A set of match configurations used for logical operations. -type ListenerFilterChainMatchPredicate_MatchSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of rules that make up the set. - Rules []*ListenerFilterChainMatchPredicate `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) Reset() { - *x = ListenerFilterChainMatchPredicate_MatchSet{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenerFilterChainMatchPredicate_MatchSet) ProtoMessage() {} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_listener_components_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListenerFilterChainMatchPredicate_MatchSet.ProtoReflect.Descriptor instead. -func (*ListenerFilterChainMatchPredicate_MatchSet) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *ListenerFilterChainMatchPredicate_MatchSet) GetRules() []*ListenerFilterChainMatchPredicate { - if x != nil { - return x.Rules - } - return nil -} - -var File_envoy_api_v2_listener_listener_components_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_listener_listener_components_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6c, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, - 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, - 0x18, 0x01, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x0c, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xe1, 0x05, 0x0a, - 0x10, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x54, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, - 0x18, 0xff, 0xff, 0x03, 0x28, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, - 0x78, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x67, - 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4e, 0x0a, 0x14, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x12, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x10, 0xfa, - 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x2a, 0x06, 0x18, 0xff, 0xff, 0x03, 0x28, 0x01, 0x52, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x2d, 0x0a, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x33, - 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x22, 0x55, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, - 0x4e, 0x59, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x05, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x01, 0x1a, - 0x1b, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x15, 0x0a, 0x13, 0x53, 0x41, 0x4d, 0x45, 0x5f, 0x49, 0x50, - 0x5f, 0x4f, 0x52, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, 0x12, 0x0c, 0x0a, 0x08, - 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, - 0x22, 0xcb, 0x03, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x55, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4c, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x42, - 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x10, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa9, - 0x04, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x5e, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x60, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, - 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x57, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, - 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4e, 0x0a, 0x16, 0x64, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, - 0x00, 0x52, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, - 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x1a, 0x64, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x53, 0x65, 0x74, 0x12, 0x58, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x0b, 0x0a, - 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x91, 0x02, 0x0a, 0x0e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, - 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, 0x0f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, - 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, - 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0xdd, - 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0xaa, - 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x1a, 0x45, 0x6e, 0x76, 0x6f, - 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_listener_listener_components_proto_rawDescOnce sync.Once - file_envoy_api_v2_listener_listener_components_proto_rawDescData = file_envoy_api_v2_listener_listener_components_proto_rawDesc -) - -func file_envoy_api_v2_listener_listener_components_proto_rawDescGZIP() []byte { - file_envoy_api_v2_listener_listener_components_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_listener_listener_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_listener_listener_components_proto_rawDescData) - }) - return file_envoy_api_v2_listener_listener_components_proto_rawDescData -} - -var file_envoy_api_v2_listener_listener_components_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_api_v2_listener_listener_components_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_envoy_api_v2_listener_listener_components_proto_goTypes = []interface{}{ - (FilterChainMatch_ConnectionSourceType)(0), // 0: envoy.api.v2.listener.FilterChainMatch.ConnectionSourceType - (*Filter)(nil), // 1: envoy.api.v2.listener.Filter - (*FilterChainMatch)(nil), // 2: envoy.api.v2.listener.FilterChainMatch - (*FilterChain)(nil), // 3: envoy.api.v2.listener.FilterChain - (*ListenerFilterChainMatchPredicate)(nil), // 4: envoy.api.v2.listener.ListenerFilterChainMatchPredicate - (*ListenerFilter)(nil), // 5: envoy.api.v2.listener.ListenerFilter - (*ListenerFilterChainMatchPredicate_MatchSet)(nil), // 6: envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet - (*_struct.Struct)(nil), // 7: google.protobuf.Struct - (*any1.Any)(nil), // 8: google.protobuf.Any - (*wrappers.UInt32Value)(nil), // 9: google.protobuf.UInt32Value - (*core.CidrRange)(nil), // 10: envoy.api.v2.core.CidrRange - (*auth.DownstreamTlsContext)(nil), // 11: envoy.api.v2.auth.DownstreamTlsContext - (*wrappers.BoolValue)(nil), // 12: google.protobuf.BoolValue - (*core.Metadata)(nil), // 13: envoy.api.v2.core.Metadata - (*core.TransportSocket)(nil), // 14: envoy.api.v2.core.TransportSocket - (*_type.Int32Range)(nil), // 15: envoy.type.Int32Range -} -var file_envoy_api_v2_listener_listener_components_proto_depIdxs = []int32{ - 7, // 0: envoy.api.v2.listener.Filter.config:type_name -> google.protobuf.Struct - 8, // 1: envoy.api.v2.listener.Filter.typed_config:type_name -> google.protobuf.Any - 9, // 2: envoy.api.v2.listener.FilterChainMatch.destination_port:type_name -> google.protobuf.UInt32Value - 10, // 3: envoy.api.v2.listener.FilterChainMatch.prefix_ranges:type_name -> envoy.api.v2.core.CidrRange - 9, // 4: envoy.api.v2.listener.FilterChainMatch.suffix_len:type_name -> google.protobuf.UInt32Value - 0, // 5: envoy.api.v2.listener.FilterChainMatch.source_type:type_name -> envoy.api.v2.listener.FilterChainMatch.ConnectionSourceType - 10, // 6: envoy.api.v2.listener.FilterChainMatch.source_prefix_ranges:type_name -> envoy.api.v2.core.CidrRange - 2, // 7: envoy.api.v2.listener.FilterChain.filter_chain_match:type_name -> envoy.api.v2.listener.FilterChainMatch - 11, // 8: envoy.api.v2.listener.FilterChain.tls_context:type_name -> envoy.api.v2.auth.DownstreamTlsContext - 1, // 9: envoy.api.v2.listener.FilterChain.filters:type_name -> envoy.api.v2.listener.Filter - 12, // 10: envoy.api.v2.listener.FilterChain.use_proxy_proto:type_name -> google.protobuf.BoolValue - 13, // 11: envoy.api.v2.listener.FilterChain.metadata:type_name -> envoy.api.v2.core.Metadata - 14, // 12: envoy.api.v2.listener.FilterChain.transport_socket:type_name -> envoy.api.v2.core.TransportSocket - 6, // 13: envoy.api.v2.listener.ListenerFilterChainMatchPredicate.or_match:type_name -> envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet - 6, // 14: envoy.api.v2.listener.ListenerFilterChainMatchPredicate.and_match:type_name -> envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet - 4, // 15: envoy.api.v2.listener.ListenerFilterChainMatchPredicate.not_match:type_name -> envoy.api.v2.listener.ListenerFilterChainMatchPredicate - 15, // 16: envoy.api.v2.listener.ListenerFilterChainMatchPredicate.destination_port_range:type_name -> envoy.type.Int32Range - 7, // 17: envoy.api.v2.listener.ListenerFilter.config:type_name -> google.protobuf.Struct - 8, // 18: envoy.api.v2.listener.ListenerFilter.typed_config:type_name -> google.protobuf.Any - 4, // 19: envoy.api.v2.listener.ListenerFilter.filter_disabled:type_name -> envoy.api.v2.listener.ListenerFilterChainMatchPredicate - 4, // 20: envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet.rules:type_name -> envoy.api.v2.listener.ListenerFilterChainMatchPredicate - 21, // [21:21] is the sub-list for method output_type - 21, // [21:21] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_listener_listener_components_proto_init() } -func file_envoy_api_v2_listener_listener_components_proto_init() { - if File_envoy_api_v2_listener_listener_components_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_listener_listener_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterChainMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterChain); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerFilterChainMatchPredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenerFilterChainMatchPredicate_MatchSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*Filter_Config)(nil), - (*Filter_TypedConfig)(nil), - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*ListenerFilterChainMatchPredicate_OrMatch)(nil), - (*ListenerFilterChainMatchPredicate_AndMatch)(nil), - (*ListenerFilterChainMatchPredicate_NotMatch)(nil), - (*ListenerFilterChainMatchPredicate_AnyMatch)(nil), - (*ListenerFilterChainMatchPredicate_DestinationPortRange)(nil), - } - file_envoy_api_v2_listener_listener_components_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*ListenerFilter_Config)(nil), - (*ListenerFilter_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_listener_listener_components_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_listener_listener_components_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_listener_listener_components_proto_depIdxs, - EnumInfos: file_envoy_api_v2_listener_listener_components_proto_enumTypes, - MessageInfos: file_envoy_api_v2_listener_listener_components_proto_msgTypes, - }.Build() - File_envoy_api_v2_listener_listener_components_proto = out.File - file_envoy_api_v2_listener_listener_components_proto_rawDesc = nil - file_envoy_api_v2_listener_listener_components_proto_goTypes = nil - file_envoy_api_v2_listener_listener_components_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go deleted file mode 100644 index e95a404792c1..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go +++ /dev/null @@ -1,1446 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/listener/listener_components.proto - -package listener - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Filter with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Filter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Filter with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in FilterMultiError, or nil if none found. -func (m *Filter) ValidateAll() error { - return m.validate(true) -} - -func (m *Filter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := FilterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *Filter_Config: - if v == nil { - err := FilterValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Filter_TypedConfig: - if v == nil { - err := FilterValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return FilterMultiError(errors) - } - - return nil -} - -// FilterMultiError is an error wrapping multiple validation errors returned by -// Filter.ValidateAll() if the designated constraints aren't met. -type FilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterMultiError) AllErrors() []error { return m } - -// FilterValidationError is the validation error returned by Filter.Validate if -// the designated constraints aren't met. -type FilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterValidationError) ErrorName() string { return "FilterValidationError" } - -// Error satisfies the builtin error interface -func (e FilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterValidationError{} - -// Validate checks the field values on FilterChainMatch with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *FilterChainMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FilterChainMatch with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// FilterChainMatchMultiError, or nil if none found. -func (m *FilterChainMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *FilterChainMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetDestinationPort(); wrapper != nil { - - if val := wrapper.GetValue(); val < 1 || val > 65535 { - err := FilterChainMatchValidationError{ - field: "DestinationPort", - reason: "value must be inside range [1, 65535]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - for idx, item := range m.GetPrefixRanges() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainMatchValidationError{ - field: fmt.Sprintf("PrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainMatchValidationError{ - field: fmt.Sprintf("PrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainMatchValidationError{ - field: fmt.Sprintf("PrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for AddressSuffix - - if all { - switch v := interface{}(m.GetSuffixLen()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainMatchValidationError{ - field: "SuffixLen", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainMatchValidationError{ - field: "SuffixLen", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSuffixLen()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainMatchValidationError{ - field: "SuffixLen", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if _, ok := FilterChainMatch_ConnectionSourceType_name[int32(m.GetSourceType())]; !ok { - err := FilterChainMatchValidationError{ - field: "SourceType", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetSourcePrefixRanges() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainMatchValidationError{ - field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainMatchValidationError{ - field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainMatchValidationError{ - field: fmt.Sprintf("SourcePrefixRanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetSourcePorts() { - _, _ = idx, item - - if val := item; val < 1 || val > 65535 { - err := FilterChainMatchValidationError{ - field: fmt.Sprintf("SourcePorts[%v]", idx), - reason: "value must be inside range [1, 65535]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for TransportProtocol - - if len(errors) > 0 { - return FilterChainMatchMultiError(errors) - } - - return nil -} - -// FilterChainMatchMultiError is an error wrapping multiple validation errors -// returned by FilterChainMatch.ValidateAll() if the designated constraints -// aren't met. -type FilterChainMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterChainMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterChainMatchMultiError) AllErrors() []error { return m } - -// FilterChainMatchValidationError is the validation error returned by -// FilterChainMatch.Validate if the designated constraints aren't met. -type FilterChainMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterChainMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterChainMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterChainMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterChainMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterChainMatchValidationError) ErrorName() string { return "FilterChainMatchValidationError" } - -// Error satisfies the builtin error interface -func (e FilterChainMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterChainMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterChainMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterChainMatchValidationError{} - -// Validate checks the field values on FilterChain with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FilterChain) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FilterChain with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FilterChainMultiError, or -// nil if none found. -func (m *FilterChain) ValidateAll() error { - return m.validate(true) -} - -func (m *FilterChain) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetFilterChainMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "FilterChainMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "FilterChainMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterChainMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "FilterChainMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetUseProxyProto()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "UseProxyProto", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "UseProxyProto", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUseProxyProto()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "UseProxyProto", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTransportSocket()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterChainValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterChainValidationError{ - field: "TransportSocket", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Name - - if len(errors) > 0 { - return FilterChainMultiError(errors) - } - - return nil -} - -// FilterChainMultiError is an error wrapping multiple validation errors -// returned by FilterChain.ValidateAll() if the designated constraints aren't met. -type FilterChainMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterChainMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterChainMultiError) AllErrors() []error { return m } - -// FilterChainValidationError is the validation error returned by -// FilterChain.Validate if the designated constraints aren't met. -type FilterChainValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterChainValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterChainValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterChainValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterChainValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterChainValidationError) ErrorName() string { return "FilterChainValidationError" } - -// Error satisfies the builtin error interface -func (e FilterChainValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterChain.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterChainValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterChainValidationError{} - -// Validate checks the field values on ListenerFilterChainMatchPredicate with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *ListenerFilterChainMatchPredicate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListenerFilterChainMatchPredicate -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// ListenerFilterChainMatchPredicateMultiError, or nil if none found. -func (m *ListenerFilterChainMatchPredicate) ValidateAll() error { - return m.validate(true) -} - -func (m *ListenerFilterChainMatchPredicate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofRulePresent := false - switch v := m.Rule.(type) { - case *ListenerFilterChainMatchPredicate_OrMatch: - if v == nil { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "Rule", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRulePresent = true - - if all { - switch v := interface{}(m.GetOrMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "OrMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "OrMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterChainMatchPredicateValidationError{ - field: "OrMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ListenerFilterChainMatchPredicate_AndMatch: - if v == nil { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "Rule", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRulePresent = true - - if all { - switch v := interface{}(m.GetAndMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "AndMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "AndMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterChainMatchPredicateValidationError{ - field: "AndMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ListenerFilterChainMatchPredicate_NotMatch: - if v == nil { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "Rule", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRulePresent = true - - if all { - switch v := interface{}(m.GetNotMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "NotMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "NotMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterChainMatchPredicateValidationError{ - field: "NotMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ListenerFilterChainMatchPredicate_AnyMatch: - if v == nil { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "Rule", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRulePresent = true - - if m.GetAnyMatch() != true { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "AnyMatch", - reason: "value must equal true", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *ListenerFilterChainMatchPredicate_DestinationPortRange: - if v == nil { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "Rule", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofRulePresent = true - - if all { - switch v := interface{}(m.GetDestinationPortRange()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "DestinationPortRange", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicateValidationError{ - field: "DestinationPortRange", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterChainMatchPredicateValidationError{ - field: "DestinationPortRange", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofRulePresent { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "Rule", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ListenerFilterChainMatchPredicateMultiError(errors) - } - - return nil -} - -// ListenerFilterChainMatchPredicateMultiError is an error wrapping multiple -// validation errors returned by -// ListenerFilterChainMatchPredicate.ValidateAll() if the designated -// constraints aren't met. -type ListenerFilterChainMatchPredicateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListenerFilterChainMatchPredicateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListenerFilterChainMatchPredicateMultiError) AllErrors() []error { return m } - -// ListenerFilterChainMatchPredicateValidationError is the validation error -// returned by ListenerFilterChainMatchPredicate.Validate if the designated -// constraints aren't met. -type ListenerFilterChainMatchPredicateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenerFilterChainMatchPredicateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenerFilterChainMatchPredicateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenerFilterChainMatchPredicateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenerFilterChainMatchPredicateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenerFilterChainMatchPredicateValidationError) ErrorName() string { - return "ListenerFilterChainMatchPredicateValidationError" -} - -// Error satisfies the builtin error interface -func (e ListenerFilterChainMatchPredicateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenerFilterChainMatchPredicate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenerFilterChainMatchPredicateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenerFilterChainMatchPredicateValidationError{} - -// Validate checks the field values on ListenerFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ListenerFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListenerFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ListenerFilterMultiError, -// or nil if none found. -func (m *ListenerFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *ListenerFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := ListenerFilterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetFilterDisabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterValidationError{ - field: "FilterDisabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterValidationError{ - field: "FilterDisabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterDisabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterValidationError{ - field: "FilterDisabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.ConfigType.(type) { - case *ListenerFilter_Config: - if v == nil { - err := ListenerFilterValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ListenerFilter_TypedConfig: - if v == nil { - err := ListenerFilterValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return ListenerFilterMultiError(errors) - } - - return nil -} - -// ListenerFilterMultiError is an error wrapping multiple validation errors -// returned by ListenerFilter.ValidateAll() if the designated constraints -// aren't met. -type ListenerFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListenerFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListenerFilterMultiError) AllErrors() []error { return m } - -// ListenerFilterValidationError is the validation error returned by -// ListenerFilter.Validate if the designated constraints aren't met. -type ListenerFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenerFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenerFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenerFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenerFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenerFilterValidationError) ErrorName() string { return "ListenerFilterValidationError" } - -// Error satisfies the builtin error interface -func (e ListenerFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenerFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenerFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenerFilterValidationError{} - -// Validate checks the field values on -// ListenerFilterChainMatchPredicate_MatchSet with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ListenerFilterChainMatchPredicate_MatchSet) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// ListenerFilterChainMatchPredicate_MatchSet with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// ListenerFilterChainMatchPredicate_MatchSetMultiError, or nil if none found. -func (m *ListenerFilterChainMatchPredicate_MatchSet) ValidateAll() error { - return m.validate(true) -} - -func (m *ListenerFilterChainMatchPredicate_MatchSet) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRules()) < 2 { - err := ListenerFilterChainMatchPredicate_MatchSetValidationError{ - field: "Rules", - reason: "value must contain at least 2 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicate_MatchSetValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListenerFilterChainMatchPredicate_MatchSetValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListenerFilterChainMatchPredicate_MatchSetValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListenerFilterChainMatchPredicate_MatchSetMultiError(errors) - } - - return nil -} - -// ListenerFilterChainMatchPredicate_MatchSetMultiError is an error wrapping -// multiple validation errors returned by -// ListenerFilterChainMatchPredicate_MatchSet.ValidateAll() if the designated -// constraints aren't met. -type ListenerFilterChainMatchPredicate_MatchSetMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListenerFilterChainMatchPredicate_MatchSetMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListenerFilterChainMatchPredicate_MatchSetMultiError) AllErrors() []error { return m } - -// ListenerFilterChainMatchPredicate_MatchSetValidationError is the validation -// error returned by ListenerFilterChainMatchPredicate_MatchSet.Validate if -// the designated constraints aren't met. -type ListenerFilterChainMatchPredicate_MatchSetValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) ErrorName() string { - return "ListenerFilterChainMatchPredicate_MatchSetValidationError" -} - -// Error satisfies the builtin error interface -func (e ListenerFilterChainMatchPredicate_MatchSetValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListenerFilterChainMatchPredicate_MatchSet.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListenerFilterChainMatchPredicate_MatchSetValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListenerFilterChainMatchPredicate_MatchSetValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go deleted file mode 100644 index 6a13da380ef9..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/listener/quic_config.proto - -package listener - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - duration "github.com/golang/protobuf/ptypes/duration" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Configuration specific to the QUIC protocol. -// Next id: 4 -type QuicProtocolOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Maximum number of streams that the client can negotiate per connection. 100 - // if not specified. - MaxConcurrentStreams *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=max_concurrent_streams,json=maxConcurrentStreams,proto3" json:"max_concurrent_streams,omitempty"` - // Maximum number of milliseconds that connection will be alive when there is - // no network activity. 300000ms if not specified. - IdleTimeout *duration.Duration `protobuf:"bytes,2,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` - // Connection timeout in milliseconds before the crypto handshake is finished. - // 20000ms if not specified. - CryptoHandshakeTimeout *duration.Duration `protobuf:"bytes,3,opt,name=crypto_handshake_timeout,json=cryptoHandshakeTimeout,proto3" json:"crypto_handshake_timeout,omitempty"` -} - -func (x *QuicProtocolOptions) Reset() { - *x = QuicProtocolOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_quic_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuicProtocolOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuicProtocolOptions) ProtoMessage() {} - -func (x *QuicProtocolOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_quic_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuicProtocolOptions.ProtoReflect.Descriptor instead. -func (*QuicProtocolOptions) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_quic_config_proto_rawDescGZIP(), []int{0} -} - -func (x *QuicProtocolOptions) GetMaxConcurrentStreams() *wrappers.UInt32Value { - if x != nil { - return x.MaxConcurrentStreams - } - return nil -} - -func (x *QuicProtocolOptions) GetIdleTimeout() *duration.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *QuicProtocolOptions) GetCryptoHandshakeTimeout() *duration.Duration { - if x != nil { - return x.CryptoHandshakeTimeout - } - return nil -} - -var File_envoy_api_v2_listener_quic_config_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_listener_quic_config_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xfc, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x52, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x63, - 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x69, - 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, - 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x18, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x6f, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x48, 0x61, - 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0xd5, - 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x0f, 0x51, 0x75, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, - 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, - 0x53, 0xea, 0x02, 0x1a, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, - 0x56, 0x32, 0x3a, 0x3a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, - 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, - 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_listener_quic_config_proto_rawDescOnce sync.Once - file_envoy_api_v2_listener_quic_config_proto_rawDescData = file_envoy_api_v2_listener_quic_config_proto_rawDesc -) - -func file_envoy_api_v2_listener_quic_config_proto_rawDescGZIP() []byte { - file_envoy_api_v2_listener_quic_config_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_listener_quic_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_listener_quic_config_proto_rawDescData) - }) - return file_envoy_api_v2_listener_quic_config_proto_rawDescData -} - -var file_envoy_api_v2_listener_quic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_listener_quic_config_proto_goTypes = []interface{}{ - (*QuicProtocolOptions)(nil), // 0: envoy.api.v2.listener.QuicProtocolOptions - (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value - (*duration.Duration)(nil), // 2: google.protobuf.Duration -} -var file_envoy_api_v2_listener_quic_config_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.listener.QuicProtocolOptions.max_concurrent_streams:type_name -> google.protobuf.UInt32Value - 2, // 1: envoy.api.v2.listener.QuicProtocolOptions.idle_timeout:type_name -> google.protobuf.Duration - 2, // 2: envoy.api.v2.listener.QuicProtocolOptions.crypto_handshake_timeout:type_name -> google.protobuf.Duration - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_listener_quic_config_proto_init() } -func file_envoy_api_v2_listener_quic_config_proto_init() { - if File_envoy_api_v2_listener_quic_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_listener_quic_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuicProtocolOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_listener_quic_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_listener_quic_config_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_listener_quic_config_proto_depIdxs, - MessageInfos: file_envoy_api_v2_listener_quic_config_proto_msgTypes, - }.Build() - File_envoy_api_v2_listener_quic_config_proto = out.File - file_envoy_api_v2_listener_quic_config_proto_rawDesc = nil - file_envoy_api_v2_listener_quic_config_proto_goTypes = nil - file_envoy_api_v2_listener_quic_config_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go deleted file mode 100644 index e88fe3fe670b..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/quic_config.pb.validate.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/listener/quic_config.proto - -package listener - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on QuicProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *QuicProtocolOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on QuicProtocolOptions with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// QuicProtocolOptionsMultiError, or nil if none found. -func (m *QuicProtocolOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *QuicProtocolOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetMaxConcurrentStreams()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxConcurrentStreams()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QuicProtocolOptionsValidationError{ - field: "MaxConcurrentStreams", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetIdleTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QuicProtocolOptionsValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCryptoHandshakeTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "CryptoHandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, QuicProtocolOptionsValidationError{ - field: "CryptoHandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCryptoHandshakeTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QuicProtocolOptionsValidationError{ - field: "CryptoHandshakeTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return QuicProtocolOptionsMultiError(errors) - } - - return nil -} - -// QuicProtocolOptionsMultiError is an error wrapping multiple validation -// errors returned by QuicProtocolOptions.ValidateAll() if the designated -// constraints aren't met. -type QuicProtocolOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m QuicProtocolOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m QuicProtocolOptionsMultiError) AllErrors() []error { return m } - -// QuicProtocolOptionsValidationError is the validation error returned by -// QuicProtocolOptions.Validate if the designated constraints aren't met. -type QuicProtocolOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QuicProtocolOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QuicProtocolOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QuicProtocolOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QuicProtocolOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QuicProtocolOptionsValidationError) ErrorName() string { - return "QuicProtocolOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e QuicProtocolOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQuicProtocolOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QuicProtocolOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QuicProtocolOptionsValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go deleted file mode 100644 index 84e69fbcc8b6..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.go +++ /dev/null @@ -1,288 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/listener/udp_listener_config.proto - -package listener - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - any1 "github.com/golang/protobuf/ptypes/any" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type UdpListenerConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Used to look up UDP listener factory, matches "raw_udp_listener" or - // "quic_listener" to create a specific udp listener. - // If not specified, treat as "raw_udp_listener". - UdpListenerName string `protobuf:"bytes,1,opt,name=udp_listener_name,json=udpListenerName,proto3" json:"udp_listener_name,omitempty"` - // Used to create a specific listener factory. To some factory, e.g. - // "raw_udp_listener", config is not needed. - // - // Types that are assignable to ConfigType: - // *UdpListenerConfig_Config - // *UdpListenerConfig_TypedConfig - ConfigType isUdpListenerConfig_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *UdpListenerConfig) Reset() { - *x = UdpListenerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UdpListenerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UdpListenerConfig) ProtoMessage() {} - -func (x *UdpListenerConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UdpListenerConfig.ProtoReflect.Descriptor instead. -func (*UdpListenerConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_udp_listener_config_proto_rawDescGZIP(), []int{0} -} - -func (x *UdpListenerConfig) GetUdpListenerName() string { - if x != nil { - return x.UdpListenerName - } - return "" -} - -func (m *UdpListenerConfig) GetConfigType() isUdpListenerConfig_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *UdpListenerConfig) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*UdpListenerConfig_Config); ok { - return x.Config - } - return nil -} - -func (x *UdpListenerConfig) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*UdpListenerConfig_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isUdpListenerConfig_ConfigType interface { - isUdpListenerConfig_ConfigType() -} - -type UdpListenerConfig_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} - -type UdpListenerConfig_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*UdpListenerConfig_Config) isUdpListenerConfig_ConfigType() {} - -func (*UdpListenerConfig_TypedConfig) isUdpListenerConfig_ConfigType() {} - -type ActiveRawUdpListenerConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ActiveRawUdpListenerConfig) Reset() { - *x = ActiveRawUdpListenerConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ActiveRawUdpListenerConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActiveRawUdpListenerConfig) ProtoMessage() {} - -func (x *ActiveRawUdpListenerConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActiveRawUdpListenerConfig.ProtoReflect.Descriptor instead. -func (*ActiveRawUdpListenerConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_listener_udp_listener_config_proto_rawDescGZIP(), []int{1} -} - -var File_envoy_api_v2_listener_udp_listener_config_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_listener_udp_listener_config_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xc0, 0x01, 0x0a, 0x11, 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x75, 0x64, 0x70, 0x5f, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x75, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x61, 0x77, - 0x55, 0x64, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0xdc, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0x16, 0x55, 0x64, 0x70, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0xaa, 0x02, 0x17, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xea, 0x02, 0x1a, 0x45, 0x6e, - 0x76, 0x6f, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x3a, 0x3a, 0x4c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x53, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_listener_udp_listener_config_proto_rawDescOnce sync.Once - file_envoy_api_v2_listener_udp_listener_config_proto_rawDescData = file_envoy_api_v2_listener_udp_listener_config_proto_rawDesc -) - -func file_envoy_api_v2_listener_udp_listener_config_proto_rawDescGZIP() []byte { - file_envoy_api_v2_listener_udp_listener_config_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_listener_udp_listener_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_listener_udp_listener_config_proto_rawDescData) - }) - return file_envoy_api_v2_listener_udp_listener_config_proto_rawDescData -} - -var file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_api_v2_listener_udp_listener_config_proto_goTypes = []interface{}{ - (*UdpListenerConfig)(nil), // 0: envoy.api.v2.listener.UdpListenerConfig - (*ActiveRawUdpListenerConfig)(nil), // 1: envoy.api.v2.listener.ActiveRawUdpListenerConfig - (*_struct.Struct)(nil), // 2: google.protobuf.Struct - (*any1.Any)(nil), // 3: google.protobuf.Any -} -var file_envoy_api_v2_listener_udp_listener_config_proto_depIdxs = []int32{ - 2, // 0: envoy.api.v2.listener.UdpListenerConfig.config:type_name -> google.protobuf.Struct - 3, // 1: envoy.api.v2.listener.UdpListenerConfig.typed_config:type_name -> google.protobuf.Any - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_listener_udp_listener_config_proto_init() } -func file_envoy_api_v2_listener_udp_listener_config_proto_init() { - if File_envoy_api_v2_listener_udp_listener_config_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UdpListenerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActiveRawUdpListenerConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*UdpListenerConfig_Config)(nil), - (*UdpListenerConfig_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_listener_udp_listener_config_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_listener_udp_listener_config_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_listener_udp_listener_config_proto_depIdxs, - MessageInfos: file_envoy_api_v2_listener_udp_listener_config_proto_msgTypes, - }.Build() - File_envoy_api_v2_listener_udp_listener_config_proto = out.File - file_envoy_api_v2_listener_udp_listener_config_proto_rawDesc = nil - file_envoy_api_v2_listener_udp_listener_config_proto_goTypes = nil - file_envoy_api_v2_listener_udp_listener_config_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go deleted file mode 100644 index 532b51307625..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go +++ /dev/null @@ -1,329 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/listener/udp_listener_config.proto - -package listener - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on UdpListenerConfig with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *UdpListenerConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UdpListenerConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UdpListenerConfigMultiError, or nil if none found. -func (m *UdpListenerConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *UdpListenerConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for UdpListenerName - - switch v := m.ConfigType.(type) { - case *UdpListenerConfig_Config: - if v == nil { - err := UdpListenerConfigValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UdpListenerConfigValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UdpListenerConfigValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UdpListenerConfigValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *UdpListenerConfig_TypedConfig: - if v == nil { - err := UdpListenerConfigValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UdpListenerConfigValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UdpListenerConfigValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UdpListenerConfigValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return UdpListenerConfigMultiError(errors) - } - - return nil -} - -// UdpListenerConfigMultiError is an error wrapping multiple validation errors -// returned by UdpListenerConfig.ValidateAll() if the designated constraints -// aren't met. -type UdpListenerConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UdpListenerConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UdpListenerConfigMultiError) AllErrors() []error { return m } - -// UdpListenerConfigValidationError is the validation error returned by -// UdpListenerConfig.Validate if the designated constraints aren't met. -type UdpListenerConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UdpListenerConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UdpListenerConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UdpListenerConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UdpListenerConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UdpListenerConfigValidationError) ErrorName() string { - return "UdpListenerConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e UdpListenerConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUdpListenerConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UdpListenerConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UdpListenerConfigValidationError{} - -// Validate checks the field values on ActiveRawUdpListenerConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ActiveRawUdpListenerConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ActiveRawUdpListenerConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ActiveRawUdpListenerConfigMultiError, or nil if none found. -func (m *ActiveRawUdpListenerConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *ActiveRawUdpListenerConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ActiveRawUdpListenerConfigMultiError(errors) - } - - return nil -} - -// ActiveRawUdpListenerConfigMultiError is an error wrapping multiple -// validation errors returned by ActiveRawUdpListenerConfig.ValidateAll() if -// the designated constraints aren't met. -type ActiveRawUdpListenerConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ActiveRawUdpListenerConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ActiveRawUdpListenerConfigMultiError) AllErrors() []error { return m } - -// ActiveRawUdpListenerConfigValidationError is the validation error returned -// by ActiveRawUdpListenerConfig.Validate if the designated constraints aren't met. -type ActiveRawUdpListenerConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ActiveRawUdpListenerConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ActiveRawUdpListenerConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ActiveRawUdpListenerConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ActiveRawUdpListenerConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ActiveRawUdpListenerConfigValidationError) ErrorName() string { - return "ActiveRawUdpListenerConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e ActiveRawUdpListenerConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sActiveRawUdpListenerConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ActiveRawUdpListenerConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ActiveRawUdpListenerConfigValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go deleted file mode 100644 index 58bd59052381..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.go +++ /dev/null @@ -1,530 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/rds.proto - -package apiv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -type RdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RdsDummy) Reset() { - *x = RdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_rds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RdsDummy) ProtoMessage() {} - -func (x *RdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_rds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RdsDummy.ProtoReflect.Descriptor instead. -func (*RdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_rds_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_api_v2_rds_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_rds_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, - 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x0a, - 0x08, 0x52, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xee, 0x02, 0x0a, 0x15, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x5e, 0x0a, 0x0b, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x75, 0x0a, 0x0b, 0x46, 0x65, - 0x74, 0x63, 0x68, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x16, 0x22, 0x14, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x3a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, - 0x2a, 0x1a, 0x27, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xab, 0x01, 0x0a, 0x1b, 0x56, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, - 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x1a, 0x26, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, - 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x8c, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x52, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0x88, 0x01, - 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_api_v2_rds_proto_rawDescOnce sync.Once - file_envoy_api_v2_rds_proto_rawDescData = file_envoy_api_v2_rds_proto_rawDesc -) - -func file_envoy_api_v2_rds_proto_rawDescGZIP() []byte { - file_envoy_api_v2_rds_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_rds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_rds_proto_rawDescData) - }) - return file_envoy_api_v2_rds_proto_rawDescData -} - -var file_envoy_api_v2_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_rds_proto_goTypes = []interface{}{ - (*RdsDummy)(nil), // 0: envoy.api.v2.RdsDummy - (*DiscoveryRequest)(nil), // 1: envoy.api.v2.DiscoveryRequest - (*DeltaDiscoveryRequest)(nil), // 2: envoy.api.v2.DeltaDiscoveryRequest - (*DiscoveryResponse)(nil), // 3: envoy.api.v2.DiscoveryResponse - (*DeltaDiscoveryResponse)(nil), // 4: envoy.api.v2.DeltaDiscoveryResponse -} -var file_envoy_api_v2_rds_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.RouteDiscoveryService.StreamRoutes:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 1: envoy.api.v2.RouteDiscoveryService.DeltaRoutes:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 1, // 2: envoy.api.v2.RouteDiscoveryService.FetchRoutes:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 3: envoy.api.v2.VirtualHostDiscoveryService.DeltaVirtualHosts:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 3, // 4: envoy.api.v2.RouteDiscoveryService.StreamRoutes:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 5: envoy.api.v2.RouteDiscoveryService.DeltaRoutes:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 3, // 6: envoy.api.v2.RouteDiscoveryService.FetchRoutes:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 7: envoy.api.v2.VirtualHostDiscoveryService.DeltaVirtualHosts:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 4, // [4:8] is the sub-list for method output_type - 0, // [0:4] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_rds_proto_init() } -func file_envoy_api_v2_rds_proto_init() { - if File_envoy_api_v2_rds_proto != nil { - return - } - file_envoy_api_v2_discovery_proto_init() - file_envoy_api_v2_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_rds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_rds_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_envoy_api_v2_rds_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_rds_proto_depIdxs, - MessageInfos: file_envoy_api_v2_rds_proto_msgTypes, - }.Build() - File_envoy_api_v2_rds_proto = out.File - file_envoy_api_v2_rds_proto_rawDesc = nil - file_envoy_api_v2_rds_proto_goTypes = nil - file_envoy_api_v2_rds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RouteDiscoveryServiceClient is the client API for RouteDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RouteDiscoveryServiceClient interface { - StreamRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_StreamRoutesClient, error) - DeltaRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_DeltaRoutesClient, error) - FetchRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) -} - -type routeDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRouteDiscoveryServiceClient(cc grpc.ClientConnInterface) RouteDiscoveryServiceClient { - return &routeDiscoveryServiceClient{cc} -} - -func (c *routeDiscoveryServiceClient) StreamRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_StreamRoutesClient, error) { - stream, err := c.cc.NewStream(ctx, &_RouteDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.RouteDiscoveryService/StreamRoutes", opts...) - if err != nil { - return nil, err - } - x := &routeDiscoveryServiceStreamRoutesClient{stream} - return x, nil -} - -type RouteDiscoveryService_StreamRoutesClient interface { - Send(*DiscoveryRequest) error - Recv() (*DiscoveryResponse, error) - grpc.ClientStream -} - -type routeDiscoveryServiceStreamRoutesClient struct { - grpc.ClientStream -} - -func (x *routeDiscoveryServiceStreamRoutesClient) Send(m *DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *routeDiscoveryServiceStreamRoutesClient) Recv() (*DiscoveryResponse, error) { - m := new(DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *routeDiscoveryServiceClient) DeltaRoutes(ctx context.Context, opts ...grpc.CallOption) (RouteDiscoveryService_DeltaRoutesClient, error) { - stream, err := c.cc.NewStream(ctx, &_RouteDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.RouteDiscoveryService/DeltaRoutes", opts...) - if err != nil { - return nil, err - } - x := &routeDiscoveryServiceDeltaRoutesClient{stream} - return x, nil -} - -type RouteDiscoveryService_DeltaRoutesClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type routeDiscoveryServiceDeltaRoutesClient struct { - grpc.ClientStream -} - -func (x *routeDiscoveryServiceDeltaRoutesClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *routeDiscoveryServiceDeltaRoutesClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *routeDiscoveryServiceClient) FetchRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { - out := new(DiscoveryResponse) - err := c.cc.Invoke(ctx, "/envoy.api.v2.RouteDiscoveryService/FetchRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RouteDiscoveryServiceServer is the server API for RouteDiscoveryService service. -type RouteDiscoveryServiceServer interface { - StreamRoutes(RouteDiscoveryService_StreamRoutesServer) error - DeltaRoutes(RouteDiscoveryService_DeltaRoutesServer) error - FetchRoutes(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) -} - -// UnimplementedRouteDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRouteDiscoveryServiceServer struct { -} - -func (*UnimplementedRouteDiscoveryServiceServer) StreamRoutes(RouteDiscoveryService_StreamRoutesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamRoutes not implemented") -} -func (*UnimplementedRouteDiscoveryServiceServer) DeltaRoutes(RouteDiscoveryService_DeltaRoutesServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaRoutes not implemented") -} -func (*UnimplementedRouteDiscoveryServiceServer) FetchRoutes(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchRoutes not implemented") -} - -func RegisterRouteDiscoveryServiceServer(s *grpc.Server, srv RouteDiscoveryServiceServer) { - s.RegisterService(&_RouteDiscoveryService_serviceDesc, srv) -} - -func _RouteDiscoveryService_StreamRoutes_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RouteDiscoveryServiceServer).StreamRoutes(&routeDiscoveryServiceStreamRoutesServer{stream}) -} - -type RouteDiscoveryService_StreamRoutesServer interface { - Send(*DiscoveryResponse) error - Recv() (*DiscoveryRequest, error) - grpc.ServerStream -} - -type routeDiscoveryServiceStreamRoutesServer struct { - grpc.ServerStream -} - -func (x *routeDiscoveryServiceStreamRoutesServer) Send(m *DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *routeDiscoveryServiceStreamRoutesServer) Recv() (*DiscoveryRequest, error) { - m := new(DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _RouteDiscoveryService_DeltaRoutes_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RouteDiscoveryServiceServer).DeltaRoutes(&routeDiscoveryServiceDeltaRoutesServer{stream}) -} - -type RouteDiscoveryService_DeltaRoutesServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type routeDiscoveryServiceDeltaRoutesServer struct { - grpc.ServerStream -} - -func (x *routeDiscoveryServiceDeltaRoutesServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *routeDiscoveryServiceDeltaRoutesServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _RouteDiscoveryService_FetchRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteDiscoveryServiceServer).FetchRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.api.v2.RouteDiscoveryService/FetchRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteDiscoveryServiceServer).FetchRoutes(ctx, req.(*DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RouteDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.api.v2.RouteDiscoveryService", - HandlerType: (*RouteDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchRoutes", - Handler: _RouteDiscoveryService_FetchRoutes_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamRoutes", - Handler: _RouteDiscoveryService_StreamRoutes_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaRoutes", - Handler: _RouteDiscoveryService_DeltaRoutes_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/api/v2/rds.proto", -} - -// VirtualHostDiscoveryServiceClient is the client API for VirtualHostDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type VirtualHostDiscoveryServiceClient interface { - DeltaVirtualHosts(ctx context.Context, opts ...grpc.CallOption) (VirtualHostDiscoveryService_DeltaVirtualHostsClient, error) -} - -type virtualHostDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewVirtualHostDiscoveryServiceClient(cc grpc.ClientConnInterface) VirtualHostDiscoveryServiceClient { - return &virtualHostDiscoveryServiceClient{cc} -} - -func (c *virtualHostDiscoveryServiceClient) DeltaVirtualHosts(ctx context.Context, opts ...grpc.CallOption) (VirtualHostDiscoveryService_DeltaVirtualHostsClient, error) { - stream, err := c.cc.NewStream(ctx, &_VirtualHostDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.VirtualHostDiscoveryService/DeltaVirtualHosts", opts...) - if err != nil { - return nil, err - } - x := &virtualHostDiscoveryServiceDeltaVirtualHostsClient{stream} - return x, nil -} - -type VirtualHostDiscoveryService_DeltaVirtualHostsClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type virtualHostDiscoveryServiceDeltaVirtualHostsClient struct { - grpc.ClientStream -} - -func (x *virtualHostDiscoveryServiceDeltaVirtualHostsClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *virtualHostDiscoveryServiceDeltaVirtualHostsClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// VirtualHostDiscoveryServiceServer is the server API for VirtualHostDiscoveryService service. -type VirtualHostDiscoveryServiceServer interface { - DeltaVirtualHosts(VirtualHostDiscoveryService_DeltaVirtualHostsServer) error -} - -// UnimplementedVirtualHostDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedVirtualHostDiscoveryServiceServer struct { -} - -func (*UnimplementedVirtualHostDiscoveryServiceServer) DeltaVirtualHosts(VirtualHostDiscoveryService_DeltaVirtualHostsServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaVirtualHosts not implemented") -} - -func RegisterVirtualHostDiscoveryServiceServer(s *grpc.Server, srv VirtualHostDiscoveryServiceServer) { - s.RegisterService(&_VirtualHostDiscoveryService_serviceDesc, srv) -} - -func _VirtualHostDiscoveryService_DeltaVirtualHosts_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(VirtualHostDiscoveryServiceServer).DeltaVirtualHosts(&virtualHostDiscoveryServiceDeltaVirtualHostsServer{stream}) -} - -type VirtualHostDiscoveryService_DeltaVirtualHostsServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type virtualHostDiscoveryServiceDeltaVirtualHostsServer struct { - grpc.ServerStream -} - -func (x *virtualHostDiscoveryServiceDeltaVirtualHostsServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *virtualHostDiscoveryServiceDeltaVirtualHostsServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _VirtualHostDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.api.v2.VirtualHostDiscoveryService", - HandlerType: (*VirtualHostDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "DeltaVirtualHosts", - Handler: _VirtualHostDiscoveryService_DeltaVirtualHosts_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/api/v2/rds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go deleted file mode 100644 index 02644be4afd0..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/rds.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/rds.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RdsDummyMultiError, or nil -// if none found. -func (m *RdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *RdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RdsDummyMultiError(errors) - } - - return nil -} - -// RdsDummyMultiError is an error wrapping multiple validation errors returned -// by RdsDummy.ValidateAll() if the designated constraints aren't met. -type RdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RdsDummyMultiError) AllErrors() []error { return m } - -// RdsDummyValidationError is the validation error returned by -// RdsDummy.Validate if the designated constraints aren't met. -type RdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RdsDummyValidationError) ErrorName() string { return "RdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e RdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go deleted file mode 100644 index 77c77a5aeb77..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.go +++ /dev/null @@ -1,417 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/route.proto - -package apiv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#next-free-field: 11] -type RouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the route configuration. For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An array of virtual hosts that make up the route table. - VirtualHosts []*route.VirtualHost `protobuf:"bytes,2,rep,name=virtual_hosts,json=virtualHosts,proto3" json:"virtual_hosts,omitempty"` - // An array of virtual hosts will be dynamically loaded via the VHDS API. - // Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used - // for a base routing table or for infrequently changing virtual hosts. *vhds* is used for - // on-demand discovery of virtual hosts. The contents of these two fields will be merged to - // generate a routing table for a given RouteConfiguration, with *vhds* derived configuration - // taking precedence. - Vhds *Vhds `protobuf:"bytes,9,opt,name=vhds,proto3" json:"vhds,omitempty"` - // Optionally specifies a list of HTTP headers that the connection manager - // will consider to be internal only. If they are found on external requests they will be cleaned - // prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information. - InternalOnlyHeaders []string `protobuf:"bytes,3,rep,name=internal_only_headers,json=internalOnlyHeaders,proto3" json:"internal_only_headers,omitempty"` - // Specifies a list of HTTP headers that should be added to each response that - // the connection manager encodes. Headers specified at this level are applied - // after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or - // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each response - // that the connection manager encodes. - ResponseHeadersToRemove []string `protobuf:"bytes,5,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // Specifies a list of HTTP headers that should be added to each request - // routed by the HTTP connection manager. Headers specified at this level are - // applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or - // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request - // routed by the HTTP connection manager. - RequestHeadersToRemove []string `protobuf:"bytes,8,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // By default, headers that should be added/removed are evaluated from most to least specific: - // - // * route level - // * virtual host level - // * connection manager level - // - // To allow setting overrides at the route or virtual host level, this order can be reversed - // by setting this option to true. Defaults to false. - // - // [#next-major-version: In the v3 API, this will default to true.] - MostSpecificHeaderMutationsWins bool `protobuf:"varint,10,opt,name=most_specific_header_mutations_wins,json=mostSpecificHeaderMutationsWins,proto3" json:"most_specific_header_mutations_wins,omitempty"` - // An optional boolean that specifies whether the clusters that the route - // table refers to will be validated by the cluster manager. If set to true - // and a route refers to a non-existent cluster, the route table will not - // load. If set to false and a route refers to a non-existent cluster, the - // route table will load and the router filter will return a 404 if the route - // is selected at runtime. This setting defaults to true if the route table - // is statically defined via the :ref:`route_config - // ` - // option. This setting default to false if the route table is loaded dynamically via the - // :ref:`rds - // ` - // option. Users may wish to override the default behavior in certain cases (for example when - // using CDS with a static route table). - ValidateClusters *wrappers.BoolValue `protobuf:"bytes,7,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"` -} - -func (x *RouteConfiguration) Reset() { - *x = RouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteConfiguration) ProtoMessage() {} - -func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. -func (*RouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_proto_rawDescGZIP(), []int{0} -} - -func (x *RouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteConfiguration) GetVirtualHosts() []*route.VirtualHost { - if x != nil { - return x.VirtualHosts - } - return nil -} - -func (x *RouteConfiguration) GetVhds() *Vhds { - if x != nil { - return x.Vhds - } - return nil -} - -func (x *RouteConfiguration) GetInternalOnlyHeaders() []string { - if x != nil { - return x.InternalOnlyHeaders - } - return nil -} - -func (x *RouteConfiguration) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *RouteConfiguration) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *RouteConfiguration) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *RouteConfiguration) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *RouteConfiguration) GetMostSpecificHeaderMutationsWins() bool { - if x != nil { - return x.MostSpecificHeaderMutationsWins - } - return false -} - -func (x *RouteConfiguration) GetValidateClusters() *wrappers.BoolValue { - if x != nil { - return x.ValidateClusters - } - return nil -} - -type Vhds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Configuration source specifier for VHDS. - ConfigSource *core.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` -} - -func (x *Vhds) Reset() { - *x = Vhds{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Vhds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Vhds) ProtoMessage() {} - -func (x *Vhds) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Vhds.ProtoReflect.Descriptor instead. -func (*Vhds) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_proto_rawDescGZIP(), []int{1} -} - -func (x *Vhds) GetConfigSource() *core.ConfigSource { - if x != nil { - return x.ConfigSource - } - return nil -} - -var File_envoy_api_v2_route_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_route_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, - 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xdd, 0x05, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x0d, 0x76, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, - 0x6f, 0x73, 0x74, 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, - 0x73, 0x12, 0x26, 0x0a, 0x04, 0x76, 0x68, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, - 0x68, 0x64, 0x73, 0x52, 0x04, 0x76, 0x68, 0x64, 0x73, 0x12, 0x44, 0x0a, 0x15, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, - 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x13, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x4f, 0x6e, 0x6c, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x66, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, - 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4d, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x10, 0xfa, 0x42, 0x0d, - 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x17, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x64, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, - 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x4b, 0x0a, 0x19, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x10, 0xfa, 0x42, 0x0d, 0x92, 0x01, 0x0a, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, - 0x00, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x6d, 0x6f, 0x73, - 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x77, 0x69, 0x6e, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x6d, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x57, 0x69, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x22, 0x56, 0x0a, 0x04, 0x56, 0x68, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x8a, 0x01, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_route_proto_rawDescOnce sync.Once - file_envoy_api_v2_route_proto_rawDescData = file_envoy_api_v2_route_proto_rawDesc -) - -func file_envoy_api_v2_route_proto_rawDescGZIP() []byte { - file_envoy_api_v2_route_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_route_proto_rawDescData) - }) - return file_envoy_api_v2_route_proto_rawDescData -} - -var file_envoy_api_v2_route_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_api_v2_route_proto_goTypes = []interface{}{ - (*RouteConfiguration)(nil), // 0: envoy.api.v2.RouteConfiguration - (*Vhds)(nil), // 1: envoy.api.v2.Vhds - (*route.VirtualHost)(nil), // 2: envoy.api.v2.route.VirtualHost - (*core.HeaderValueOption)(nil), // 3: envoy.api.v2.core.HeaderValueOption - (*wrappers.BoolValue)(nil), // 4: google.protobuf.BoolValue - (*core.ConfigSource)(nil), // 5: envoy.api.v2.core.ConfigSource -} -var file_envoy_api_v2_route_proto_depIdxs = []int32{ - 2, // 0: envoy.api.v2.RouteConfiguration.virtual_hosts:type_name -> envoy.api.v2.route.VirtualHost - 1, // 1: envoy.api.v2.RouteConfiguration.vhds:type_name -> envoy.api.v2.Vhds - 3, // 2: envoy.api.v2.RouteConfiguration.response_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 3, // 3: envoy.api.v2.RouteConfiguration.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 4, // 4: envoy.api.v2.RouteConfiguration.validate_clusters:type_name -> google.protobuf.BoolValue - 5, // 5: envoy.api.v2.Vhds.config_source:type_name -> envoy.api.v2.core.ConfigSource - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_route_proto_init() } -func file_envoy_api_v2_route_proto_init() { - if File_envoy_api_v2_route_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Vhds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_route_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_route_proto_depIdxs, - MessageInfos: file_envoy_api_v2_route_proto_msgTypes, - }.Build() - File_envoy_api_v2_route_proto = out.File - file_envoy_api_v2_route_proto_rawDesc = nil - file_envoy_api_v2_route_proto_goTypes = nil - file_envoy_api_v2_route_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go deleted file mode 100644 index 444ab92de517..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route.pb.validate.go +++ /dev/null @@ -1,516 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/route.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RouteConfiguration with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteConfiguration) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteConfiguration with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RouteConfigurationMultiError, or nil if none found. -func (m *RouteConfiguration) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteConfiguration) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - for idx, item := range m.GetVirtualHosts() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("VirtualHosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("VirtualHosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("VirtualHosts[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetVhds()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "Vhds", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "Vhds", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetVhds()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: "Vhds", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetInternalOnlyHeaders() { - _, _ = idx, item - - if !_RouteConfiguration_InternalOnlyHeaders_Pattern.MatchString(item) { - err := RouteConfigurationValidationError{ - field: fmt.Sprintf("InternalOnlyHeaders[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := RouteConfigurationValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetResponseHeadersToRemove() { - _, _ = idx, item - - if !_RouteConfiguration_ResponseHeadersToRemove_Pattern.MatchString(item) { - err := RouteConfigurationValidationError{ - field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := RouteConfigurationValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRequestHeadersToRemove() { - _, _ = idx, item - - if !_RouteConfiguration_RequestHeadersToRemove_Pattern.MatchString(item) { - err := RouteConfigurationValidationError{ - field: fmt.Sprintf("RequestHeadersToRemove[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for MostSpecificHeaderMutationsWins - - if all { - switch v := interface{}(m.GetValidateClusters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "ValidateClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteConfigurationValidationError{ - field: "ValidateClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidateClusters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteConfigurationValidationError{ - field: "ValidateClusters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteConfigurationMultiError(errors) - } - - return nil -} - -// RouteConfigurationMultiError is an error wrapping multiple validation errors -// returned by RouteConfiguration.ValidateAll() if the designated constraints -// aren't met. -type RouteConfigurationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteConfigurationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteConfigurationMultiError) AllErrors() []error { return m } - -// RouteConfigurationValidationError is the validation error returned by -// RouteConfiguration.Validate if the designated constraints aren't met. -type RouteConfigurationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteConfigurationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteConfigurationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteConfigurationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteConfigurationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteConfigurationValidationError) ErrorName() string { - return "RouteConfigurationValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteConfigurationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteConfiguration.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteConfigurationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteConfigurationValidationError{} - -var _RouteConfiguration_InternalOnlyHeaders_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteConfiguration_ResponseHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteConfiguration_RequestHeadersToRemove_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on Vhds with the rules defined in the proto -// definition for this message. If any rules are violated, the first error -// encountered is returned, or nil if there are no violations. -func (m *Vhds) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Vhds with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in VhdsMultiError, or nil if none found. -func (m *Vhds) ValidateAll() error { - return m.validate(true) -} - -func (m *Vhds) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetConfigSource() == nil { - err := VhdsValidationError{ - field: "ConfigSource", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfigSource()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VhdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VhdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VhdsValidationError{ - field: "ConfigSource", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return VhdsMultiError(errors) - } - - return nil -} - -// VhdsMultiError is an error wrapping multiple validation errors returned by -// Vhds.ValidateAll() if the designated constraints aren't met. -type VhdsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VhdsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VhdsMultiError) AllErrors() []error { return m } - -// VhdsValidationError is the validation error returned by Vhds.Validate if the -// designated constraints aren't met. -type VhdsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VhdsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VhdsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VhdsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VhdsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VhdsValidationError) ErrorName() string { return "VhdsValidationError" } - -// Error satisfies the builtin error interface -func (e VhdsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVhds.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VhdsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VhdsValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go deleted file mode 100644 index 7fc36226034d..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/route/route.proto - -package route - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_envoy_api_v2_route_route_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_route_route_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, - 0x6b, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x00, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_envoy_api_v2_route_route_proto_goTypes = []interface{}{} -var file_envoy_api_v2_route_route_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_route_route_proto_init() } -func file_envoy_api_v2_route_route_proto_init() { - if File_envoy_api_v2_route_route_proto != nil { - return - } - file_envoy_api_v2_route_route_components_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_route_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_route_route_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_route_route_proto_depIdxs, - }.Build() - File_envoy_api_v2_route_route_proto = out.File - file_envoy_api_v2_route_route_proto_rawDesc = nil - file_envoy_api_v2_route_route_proto_goTypes = nil - file_envoy_api_v2_route_route_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go deleted file mode 100644 index baf7bd122337..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/route/route.proto - -package route - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go deleted file mode 100644 index e38721b5f430..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go +++ /dev/null @@ -1,6405 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/route/route_components.proto - -package route - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - _type "github.com/envoyproxy/go-control-plane/envoy/type" - matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher" - v2 "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - any1 "github.com/golang/protobuf/ptypes/any" - duration "github.com/golang/protobuf/ptypes/duration" - _struct "github.com/golang/protobuf/ptypes/struct" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type VirtualHost_TlsRequirementType int32 - -const ( - // No TLS requirement for the virtual host. - VirtualHost_NONE VirtualHost_TlsRequirementType = 0 - // External requests must use TLS. If a request is external and it is not - // using TLS, a 301 redirect will be sent telling the client to use HTTPS. - VirtualHost_EXTERNAL_ONLY VirtualHost_TlsRequirementType = 1 - // All requests must use TLS. If a request is not using TLS, a 301 redirect - // will be sent telling the client to use HTTPS. - VirtualHost_ALL VirtualHost_TlsRequirementType = 2 -) - -// Enum value maps for VirtualHost_TlsRequirementType. -var ( - VirtualHost_TlsRequirementType_name = map[int32]string{ - 0: "NONE", - 1: "EXTERNAL_ONLY", - 2: "ALL", - } - VirtualHost_TlsRequirementType_value = map[string]int32{ - "NONE": 0, - "EXTERNAL_ONLY": 1, - "ALL": 2, - } -) - -func (x VirtualHost_TlsRequirementType) Enum() *VirtualHost_TlsRequirementType { - p := new(VirtualHost_TlsRequirementType) - *p = x - return p -} - -func (x VirtualHost_TlsRequirementType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VirtualHost_TlsRequirementType) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_route_route_components_proto_enumTypes[0].Descriptor() -} - -func (VirtualHost_TlsRequirementType) Type() protoreflect.EnumType { - return &file_envoy_api_v2_route_route_components_proto_enumTypes[0] -} - -func (x VirtualHost_TlsRequirementType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VirtualHost_TlsRequirementType.Descriptor instead. -func (VirtualHost_TlsRequirementType) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{0, 0} -} - -type RouteAction_ClusterNotFoundResponseCode int32 - -const ( - // HTTP status code - 503 Service Unavailable. - RouteAction_SERVICE_UNAVAILABLE RouteAction_ClusterNotFoundResponseCode = 0 - // HTTP status code - 404 Not Found. - RouteAction_NOT_FOUND RouteAction_ClusterNotFoundResponseCode = 1 -) - -// Enum value maps for RouteAction_ClusterNotFoundResponseCode. -var ( - RouteAction_ClusterNotFoundResponseCode_name = map[int32]string{ - 0: "SERVICE_UNAVAILABLE", - 1: "NOT_FOUND", - } - RouteAction_ClusterNotFoundResponseCode_value = map[string]int32{ - "SERVICE_UNAVAILABLE": 0, - "NOT_FOUND": 1, - } -) - -func (x RouteAction_ClusterNotFoundResponseCode) Enum() *RouteAction_ClusterNotFoundResponseCode { - p := new(RouteAction_ClusterNotFoundResponseCode) - *p = x - return p -} - -func (x RouteAction_ClusterNotFoundResponseCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RouteAction_ClusterNotFoundResponseCode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_route_route_components_proto_enumTypes[1].Descriptor() -} - -func (RouteAction_ClusterNotFoundResponseCode) Type() protoreflect.EnumType { - return &file_envoy_api_v2_route_route_components_proto_enumTypes[1] -} - -func (x RouteAction_ClusterNotFoundResponseCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RouteAction_ClusterNotFoundResponseCode.Descriptor instead. -func (RouteAction_ClusterNotFoundResponseCode) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 0} -} - -// Configures :ref:`internal redirect ` behavior. -type RouteAction_InternalRedirectAction int32 - -const ( - RouteAction_PASS_THROUGH_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 0 - RouteAction_HANDLE_INTERNAL_REDIRECT RouteAction_InternalRedirectAction = 1 -) - -// Enum value maps for RouteAction_InternalRedirectAction. -var ( - RouteAction_InternalRedirectAction_name = map[int32]string{ - 0: "PASS_THROUGH_INTERNAL_REDIRECT", - 1: "HANDLE_INTERNAL_REDIRECT", - } - RouteAction_InternalRedirectAction_value = map[string]int32{ - "PASS_THROUGH_INTERNAL_REDIRECT": 0, - "HANDLE_INTERNAL_REDIRECT": 1, - } -) - -func (x RouteAction_InternalRedirectAction) Enum() *RouteAction_InternalRedirectAction { - p := new(RouteAction_InternalRedirectAction) - *p = x - return p -} - -func (x RouteAction_InternalRedirectAction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RouteAction_InternalRedirectAction) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_route_route_components_proto_enumTypes[2].Descriptor() -} - -func (RouteAction_InternalRedirectAction) Type() protoreflect.EnumType { - return &file_envoy_api_v2_route_route_components_proto_enumTypes[2] -} - -func (x RouteAction_InternalRedirectAction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RouteAction_InternalRedirectAction.Descriptor instead. -func (RouteAction_InternalRedirectAction) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 1} -} - -type RedirectAction_RedirectResponseCode int32 - -const ( - // Moved Permanently HTTP Status Code - 301. - RedirectAction_MOVED_PERMANENTLY RedirectAction_RedirectResponseCode = 0 - // Found HTTP Status Code - 302. - RedirectAction_FOUND RedirectAction_RedirectResponseCode = 1 - // See Other HTTP Status Code - 303. - RedirectAction_SEE_OTHER RedirectAction_RedirectResponseCode = 2 - // Temporary Redirect HTTP Status Code - 307. - RedirectAction_TEMPORARY_REDIRECT RedirectAction_RedirectResponseCode = 3 - // Permanent Redirect HTTP Status Code - 308. - RedirectAction_PERMANENT_REDIRECT RedirectAction_RedirectResponseCode = 4 -) - -// Enum value maps for RedirectAction_RedirectResponseCode. -var ( - RedirectAction_RedirectResponseCode_name = map[int32]string{ - 0: "MOVED_PERMANENTLY", - 1: "FOUND", - 2: "SEE_OTHER", - 3: "TEMPORARY_REDIRECT", - 4: "PERMANENT_REDIRECT", - } - RedirectAction_RedirectResponseCode_value = map[string]int32{ - "MOVED_PERMANENTLY": 0, - "FOUND": 1, - "SEE_OTHER": 2, - "TEMPORARY_REDIRECT": 3, - "PERMANENT_REDIRECT": 4, - } -) - -func (x RedirectAction_RedirectResponseCode) Enum() *RedirectAction_RedirectResponseCode { - p := new(RedirectAction_RedirectResponseCode) - *p = x - return p -} - -func (x RedirectAction_RedirectResponseCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RedirectAction_RedirectResponseCode) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_api_v2_route_route_components_proto_enumTypes[3].Descriptor() -} - -func (RedirectAction_RedirectResponseCode) Type() protoreflect.EnumType { - return &file_envoy_api_v2_route_route_components_proto_enumTypes[3] -} - -func (x RedirectAction_RedirectResponseCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RedirectAction_RedirectResponseCode.Descriptor instead. -func (RedirectAction_RedirectResponseCode) EnumDescriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{9, 0} -} - -// The top level element in the routing configuration is a virtual host. Each virtual host has -// a logical name as well as a set of domains that get routed to it based on the incoming request's -// host header. This allows a single listener to service multiple top level domain path trees. Once -// a virtual host is selected based on the domain, the routes are processed in order to see which -// upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 21] -type VirtualHost struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The logical name of the virtual host. This is used when emitting certain - // statistics but is not relevant for routing. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A list of domains (host/authority header) that will be matched to this - // virtual host. Wildcard hosts are supported in the suffix or prefix form. - // - // Domain search order: - // 1. Exact domain names: ``www.foo.com``. - // 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``. - // 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``. - // 4. Special wildcard ``*`` matching any domain. - // - // .. note:: - // - // The wildcard will not match the empty string. - // e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. - // The longest wildcards match first. - // Only a single virtual host in the entire route configuration can match on ``*``. A domain - // must be unique across all virtual hosts or the config will fail to load. - // - // Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. - Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` - // The list of routes that will be matched, in order, for incoming requests. - // The first route that matches will be used. - Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` - // Specifies the type of TLS enforcement the virtual host expects. If this option is not - // specified, there is no TLS requirement for the virtual host. - RequireTls VirtualHost_TlsRequirementType `protobuf:"varint,4,opt,name=require_tls,json=requireTls,proto3,enum=envoy.api.v2.route.VirtualHost_TlsRequirementType" json:"require_tls,omitempty"` - // A list of virtual clusters defined for this virtual host. Virtual clusters - // are used for additional statistics gathering. - VirtualClusters []*VirtualCluster `protobuf:"bytes,5,rep,name=virtual_clusters,json=virtualClusters,proto3" json:"virtual_clusters,omitempty"` - // Specifies a set of rate limit configurations that will be applied to the - // virtual host. - RateLimits []*RateLimit `protobuf:"bytes,6,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` - // Specifies a list of HTTP headers that should be added to each request - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,7,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request - // handled by this virtual host. - RequestHeadersToRemove []string `protobuf:"bytes,13,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a list of HTTP headers that should be added to each response - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each response - // handled by this virtual host. - ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // Indicates that the virtual host has a CORS policy. - Cors *CorsPolicy `protobuf:"bytes,8,opt,name=cors,proto3" json:"cors,omitempty"` - // The per_filter_config field can be used to provide virtual host-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - // - // Deprecated: Do not use. - PerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,12,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The per_filter_config field can be used to provide virtual host-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - TypedPerFilterConfig map[string]*any1.Any `protobuf:"bytes,15,rep,name=typed_per_filter_config,json=typedPerFilterConfig,proto3" json:"typed_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the upstream request. Setting this option will cause it to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the upstream - // will see the attempt count as perceived by the second Envoy. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - // - // [#next-major-version: rename to include_attempt_count_in_request.] - IncludeRequestAttemptCount bool `protobuf:"varint,14,opt,name=include_request_attempt_count,json=includeRequestAttemptCount,proto3" json:"include_request_attempt_count,omitempty"` - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the downstream response. Setting this option will cause the router to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the downstream - // will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - IncludeAttemptCountInResponse bool `protobuf:"varint,19,opt,name=include_attempt_count_in_response,json=includeAttemptCountInResponse,proto3" json:"include_attempt_count_in_response,omitempty"` - // Indicates the retry policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - RetryPolicy *RetryPolicy `protobuf:"bytes,16,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that setting a route level entry - // will take precedence over this config and it'll be treated independently (e.g.: values are not - // inherited). :ref:`Retry policy ` should not be - // set if this field is used. - RetryPolicyTypedConfig *any1.Any `protobuf:"bytes,20,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` - // Indicates the hedge policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - HedgePolicy *HedgePolicy `protobuf:"bytes,17,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` - // The maximum bytes which will be buffered for retries and shadowing. - // If set and a route-specific limit is not set, the bytes actually buffered will be the minimum - // value of this and the listener per_connection_buffer_limit_bytes. - PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,18,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` -} - -func (x *VirtualHost) Reset() { - *x = VirtualHost{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VirtualHost) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualHost) ProtoMessage() {} - -func (x *VirtualHost) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualHost.ProtoReflect.Descriptor instead. -func (*VirtualHost) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{0} -} - -func (x *VirtualHost) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *VirtualHost) GetDomains() []string { - if x != nil { - return x.Domains - } - return nil -} - -func (x *VirtualHost) GetRoutes() []*Route { - if x != nil { - return x.Routes - } - return nil -} - -func (x *VirtualHost) GetRequireTls() VirtualHost_TlsRequirementType { - if x != nil { - return x.RequireTls - } - return VirtualHost_NONE -} - -func (x *VirtualHost) GetVirtualClusters() []*VirtualCluster { - if x != nil { - return x.VirtualClusters - } - return nil -} - -func (x *VirtualHost) GetRateLimits() []*RateLimit { - if x != nil { - return x.RateLimits - } - return nil -} - -func (x *VirtualHost) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *VirtualHost) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *VirtualHost) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *VirtualHost) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *VirtualHost) GetCors() *CorsPolicy { - if x != nil { - return x.Cors - } - return nil -} - -// Deprecated: Do not use. -func (x *VirtualHost) GetPerFilterConfig() map[string]*_struct.Struct { - if x != nil { - return x.PerFilterConfig - } - return nil -} - -func (x *VirtualHost) GetTypedPerFilterConfig() map[string]*any1.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -func (x *VirtualHost) GetIncludeRequestAttemptCount() bool { - if x != nil { - return x.IncludeRequestAttemptCount - } - return false -} - -func (x *VirtualHost) GetIncludeAttemptCountInResponse() bool { - if x != nil { - return x.IncludeAttemptCountInResponse - } - return false -} - -func (x *VirtualHost) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -func (x *VirtualHost) GetRetryPolicyTypedConfig() *any1.Any { - if x != nil { - return x.RetryPolicyTypedConfig - } - return nil -} - -func (x *VirtualHost) GetHedgePolicy() *HedgePolicy { - if x != nil { - return x.HedgePolicy - } - return nil -} - -func (x *VirtualHost) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerRequestBufferLimitBytes - } - return nil -} - -// A filter-defined action type. -type FilterAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Action *any1.Any `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` -} - -func (x *FilterAction) Reset() { - *x = FilterAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FilterAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FilterAction) ProtoMessage() {} - -func (x *FilterAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FilterAction.ProtoReflect.Descriptor instead. -func (*FilterAction) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{1} -} - -func (x *FilterAction) GetAction() *any1.Any { - if x != nil { - return x.Action - } - return nil -} - -// A route is both a specification of how to match a request as well as an indication of what to do -// next (e.g., redirect, forward, rewrite, etc.). -// -// .. attention:: -// -// Envoy supports routing on HTTP method via :ref:`header matching -// `. -// [#next-free-field: 18] -type Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name for the route. - Name string `protobuf:"bytes,14,opt,name=name,proto3" json:"name,omitempty"` - // Route matching parameters. - Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // Types that are assignable to Action: - // *Route_Route - // *Route_Redirect - // *Route_DirectResponse - // *Route_FilterAction - Action isRoute_Action `protobuf_oneof:"action"` - // The Metadata field can be used to provide additional information - // about the route. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as *envoy.filters.http.router*. - Metadata *core.Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Decorator for the matched route. - Decorator *Decorator `protobuf:"bytes,5,opt,name=decorator,proto3" json:"decorator,omitempty"` - // The per_filter_config field can be used to provide route-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` for - // if and how it is utilized. - // - // Deprecated: Do not use. - PerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,8,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The typed_per_filter_config field can be used to provide route-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` for - // if and how it is utilized. - TypedPerFilterConfig map[string]*any1.Any `protobuf:"bytes,13,rep,name=typed_per_filter_config,json=typedPerFilterConfig,proto3" json:"typed_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Specifies a set of headers that will be added to requests matching this - // route. Headers specified at this level are applied before headers from the - // enclosing :ref:`envoy_api_msg_route.VirtualHost` and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,9,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request - // matching this route. - RequestHeadersToRemove []string `protobuf:"bytes,12,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a set of headers that will be added to responses to requests - // matching this route. Headers specified at this level are applied before - // headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on - // :ref:`custom request headers `. - ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,10,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each response - // to requests matching this route. - ResponseHeadersToRemove []string `protobuf:"bytes,11,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // Presence of the object defines whether the connection manager's tracing configuration - // is overridden by this route specific instance. - Tracing *Tracing `protobuf:"bytes,15,opt,name=tracing,proto3" json:"tracing,omitempty"` - // The maximum bytes which will be buffered for retries and shadowing. - // If set, the bytes actually buffered will be the minimum value of this and the - // listener per_connection_buffer_limit_bytes. - PerRequestBufferLimitBytes *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=per_request_buffer_limit_bytes,json=perRequestBufferLimitBytes,proto3" json:"per_request_buffer_limit_bytes,omitempty"` -} - -func (x *Route) Reset() { - *x = Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Route) ProtoMessage() {} - -func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Route.ProtoReflect.Descriptor instead. -func (*Route) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{2} -} - -func (x *Route) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Route) GetMatch() *RouteMatch { - if x != nil { - return x.Match - } - return nil -} - -func (m *Route) GetAction() isRoute_Action { - if m != nil { - return m.Action - } - return nil -} - -func (x *Route) GetRoute() *RouteAction { - if x, ok := x.GetAction().(*Route_Route); ok { - return x.Route - } - return nil -} - -func (x *Route) GetRedirect() *RedirectAction { - if x, ok := x.GetAction().(*Route_Redirect); ok { - return x.Redirect - } - return nil -} - -func (x *Route) GetDirectResponse() *DirectResponseAction { - if x, ok := x.GetAction().(*Route_DirectResponse); ok { - return x.DirectResponse - } - return nil -} - -func (x *Route) GetFilterAction() *FilterAction { - if x, ok := x.GetAction().(*Route_FilterAction); ok { - return x.FilterAction - } - return nil -} - -func (x *Route) GetMetadata() *core.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Route) GetDecorator() *Decorator { - if x != nil { - return x.Decorator - } - return nil -} - -// Deprecated: Do not use. -func (x *Route) GetPerFilterConfig() map[string]*_struct.Struct { - if x != nil { - return x.PerFilterConfig - } - return nil -} - -func (x *Route) GetTypedPerFilterConfig() map[string]*any1.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -func (x *Route) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *Route) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *Route) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *Route) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -func (x *Route) GetTracing() *Tracing { - if x != nil { - return x.Tracing - } - return nil -} - -func (x *Route) GetPerRequestBufferLimitBytes() *wrappers.UInt32Value { - if x != nil { - return x.PerRequestBufferLimitBytes - } - return nil -} - -type isRoute_Action interface { - isRoute_Action() -} - -type Route_Route struct { - // Route request to some upstream cluster. - Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3,oneof"` -} - -type Route_Redirect struct { - // Return a redirect. - Redirect *RedirectAction `protobuf:"bytes,3,opt,name=redirect,proto3,oneof"` -} - -type Route_DirectResponse struct { - // Return an arbitrary HTTP response directly, without proxying. - DirectResponse *DirectResponseAction `protobuf:"bytes,7,opt,name=direct_response,json=directResponse,proto3,oneof"` -} - -type Route_FilterAction struct { - // [#not-implemented-hide:] - // If true, a filter will define the action (e.g., it could dynamically generate the - // RouteAction). - FilterAction *FilterAction `protobuf:"bytes,17,opt,name=filter_action,json=filterAction,proto3,oneof"` -} - -func (*Route_Route) isRoute_Action() {} - -func (*Route_Redirect) isRoute_Action() {} - -func (*Route_DirectResponse) isRoute_Action() {} - -func (*Route_FilterAction) isRoute_Action() {} - -// Compared to the :ref:`cluster ` field that specifies a -// single upstream cluster as the target of a request, the :ref:`weighted_clusters -// ` option allows for specification of -// multiple upstream clusters along with weights that indicate the percentage of -// traffic to be forwarded to each cluster. The router selects an upstream cluster based on the -// weights. -type WeightedCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies one or more upstream clusters associated with the route. - Clusters []*WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` - // Specifies the total weight across all clusters. The sum of all cluster weights must equal this - // value, which must be greater than 0. Defaults to 100. - TotalWeight *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=total_weight,json=totalWeight,proto3" json:"total_weight,omitempty"` - // Specifies the runtime key prefix that should be used to construct the - // runtime keys associated with each cluster. When the *runtime_key_prefix* is - // specified, the router will look for weights associated with each upstream - // cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where - // *cluster[i]* denotes an entry in the clusters array field. If the runtime - // key for the cluster does not exist, the value specified in the - // configuration file will be used as the default weight. See the :ref:`runtime documentation - // ` for how key names map to the underlying implementation. - RuntimeKeyPrefix string `protobuf:"bytes,2,opt,name=runtime_key_prefix,json=runtimeKeyPrefix,proto3" json:"runtime_key_prefix,omitempty"` -} - -func (x *WeightedCluster) Reset() { - *x = WeightedCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster) ProtoMessage() {} - -func (x *WeightedCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster.ProtoReflect.Descriptor instead. -func (*WeightedCluster) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{3} -} - -func (x *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { - if x != nil { - return x.Clusters - } - return nil -} - -func (x *WeightedCluster) GetTotalWeight() *wrappers.UInt32Value { - if x != nil { - return x.TotalWeight - } - return nil -} - -func (x *WeightedCluster) GetRuntimeKeyPrefix() string { - if x != nil { - return x.RuntimeKeyPrefix - } - return "" -} - -// [#next-free-field: 12] -type RouteMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PathSpecifier: - // *RouteMatch_Prefix - // *RouteMatch_Path - // *RouteMatch_Regex - // *RouteMatch_SafeRegex - PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"` - // Indicates that prefix/path matching should be case sensitive. The default - // is true. - CaseSensitive *wrappers.BoolValue `protobuf:"bytes,4,opt,name=case_sensitive,json=caseSensitive,proto3" json:"case_sensitive,omitempty"` - // Indicates that the route should additionally match on a runtime key. Every time the route - // is considered for a match, it must also fall under the percentage of matches indicated by - // this field. For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the router continues to evaluate the remaining match criteria. A runtime_fraction - // route configuration can be used to roll out route changes in a gradual manner without full - // code/config deploys. Refer to the :ref:`traffic shifting - // ` docs for additional documentation. - // - // .. note:: - // - // Parsing this field is implemented such that the runtime key's data may be represented - // as a FractionalPercent proto represented as JSON/YAML and may also be represented as an - // integer with the assumption that the value is an integral percentage out of 100. For - // instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent - // whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics. - RuntimeFraction *core.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` - // Specifies a set of headers that the route should match on. The router will - // check the request’s headers against all the specified headers in the route - // config. A match will happen if all the headers in the route are present in - // the request with the same values (or based on presence if the value field - // is not in the config). - Headers []*HeaderMatcher `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty"` - // Specifies a set of URL query parameters on which the route should - // match. The router will check the query string from the *path* header - // against all the specified query parameters. If the number of specified - // query parameters is nonzero, they all must match the *path* header's - // query string for a match to occur. - QueryParameters []*QueryParameterMatcher `protobuf:"bytes,7,rep,name=query_parameters,json=queryParameters,proto3" json:"query_parameters,omitempty"` - // If specified, only gRPC requests will be matched. The router will check - // that the content-type header has a application/grpc or one of the various - // application/grpc+ values. - Grpc *RouteMatch_GrpcRouteMatchOptions `protobuf:"bytes,8,opt,name=grpc,proto3" json:"grpc,omitempty"` - // If specified, the client tls context will be matched against the defined - // match options. - // - // [#next-major-version: unify with RBAC] - TlsContext *RouteMatch_TlsContextMatchOptions `protobuf:"bytes,11,opt,name=tls_context,json=tlsContext,proto3" json:"tls_context,omitempty"` -} - -func (x *RouteMatch) Reset() { - *x = RouteMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch) ProtoMessage() {} - -func (x *RouteMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. -func (*RouteMatch) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{4} -} - -func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier { - if m != nil { - return m.PathSpecifier - } - return nil -} - -func (x *RouteMatch) GetPrefix() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (x *RouteMatch) GetPath() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_Path); ok { - return x.Path - } - return "" -} - -// Deprecated: Do not use. -func (x *RouteMatch) GetRegex() string { - if x, ok := x.GetPathSpecifier().(*RouteMatch_Regex); ok { - return x.Regex - } - return "" -} - -func (x *RouteMatch) GetSafeRegex() *matcher.RegexMatcher { - if x, ok := x.GetPathSpecifier().(*RouteMatch_SafeRegex); ok { - return x.SafeRegex - } - return nil -} - -func (x *RouteMatch) GetCaseSensitive() *wrappers.BoolValue { - if x != nil { - return x.CaseSensitive - } - return nil -} - -func (x *RouteMatch) GetRuntimeFraction() *core.RuntimeFractionalPercent { - if x != nil { - return x.RuntimeFraction - } - return nil -} - -func (x *RouteMatch) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *RouteMatch) GetQueryParameters() []*QueryParameterMatcher { - if x != nil { - return x.QueryParameters - } - return nil -} - -func (x *RouteMatch) GetGrpc() *RouteMatch_GrpcRouteMatchOptions { - if x != nil { - return x.Grpc - } - return nil -} - -func (x *RouteMatch) GetTlsContext() *RouteMatch_TlsContextMatchOptions { - if x != nil { - return x.TlsContext - } - return nil -} - -type isRouteMatch_PathSpecifier interface { - isRouteMatch_PathSpecifier() -} - -type RouteMatch_Prefix struct { - // If specified, the route is a prefix rule meaning that the prefix must - // match the beginning of the *:path* header. - Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof"` -} - -type RouteMatch_Path struct { - // If specified, the route is an exact path rule meaning that the path must - // exactly match the *:path* header once the query string is removed. - Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"` -} - -type RouteMatch_Regex struct { - // If specified, the route is a regular expression rule meaning that the - // regex must match the *:path* header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the *:path* header matches the regex. The regex grammar is defined `here - // `_. - // - // Examples: - // - // * The regex ``/b[io]t`` matches the path */bit* - // * The regex ``/b[io]t`` matches the path */bot* - // * The regex ``/b[io]t`` does not match the path */bite* - // * The regex ``/b[io]t`` does not match the path */bit/bot* - // - // .. attention:: - // This field has been deprecated in favor of `safe_regex` as it is not safe for use with - // untrusted input in all cases. - // - // Deprecated: Do not use. - Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof"` -} - -type RouteMatch_SafeRegex struct { - // If specified, the route is a regular expression rule meaning that the - // regex must match the *:path* header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the *:path* header matches the regex. - // - // [#next-major-version: In the v3 API we should redo how path specification works such - // that we utilize StringMatcher, and additionally have consistent options around whether we - // strip query strings, do a case sensitive match, etc. In the interim it will be too disruptive - // to deprecate the existing options. We should even consider whether we want to do away with - // path_specifier entirely and just rely on a set of header matchers which can already match - // on :path, etc. The issue with that is it is unclear how to generically deal with query string - // stripping. This needs more thought.] - SafeRegex *matcher.RegexMatcher `protobuf:"bytes,10,opt,name=safe_regex,json=safeRegex,proto3,oneof"` -} - -func (*RouteMatch_Prefix) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_Path) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_Regex) isRouteMatch_PathSpecifier() {} - -func (*RouteMatch_SafeRegex) isRouteMatch_PathSpecifier() {} - -// [#next-free-field: 12] -type CorsPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the origins that will be allowed to do CORS requests. - // - // An origin is allowed if either allow_origin or allow_origin_regex match. - // - // .. attention:: - // This field has been deprecated in favor of `allow_origin_string_match`. - // - // Deprecated: Do not use. - AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin,json=allowOrigin,proto3" json:"allow_origin,omitempty"` - // Specifies regex patterns that match allowed origins. - // - // An origin is allowed if either allow_origin or allow_origin_regex match. - // - // .. attention:: - // This field has been deprecated in favor of `allow_origin_string_match` as it is not safe for - // use with untrusted input in all cases. - // - // Deprecated: Do not use. - AllowOriginRegex []string `protobuf:"bytes,8,rep,name=allow_origin_regex,json=allowOriginRegex,proto3" json:"allow_origin_regex,omitempty"` - // Specifies string patterns that match allowed origins. An origin is allowed if any of the - // string matchers match. - AllowOriginStringMatch []*matcher.StringMatcher `protobuf:"bytes,11,rep,name=allow_origin_string_match,json=allowOriginStringMatch,proto3" json:"allow_origin_string_match,omitempty"` - // Specifies the content for the *access-control-allow-methods* header. - AllowMethods string `protobuf:"bytes,2,opt,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"` - // Specifies the content for the *access-control-allow-headers* header. - AllowHeaders string `protobuf:"bytes,3,opt,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"` - // Specifies the content for the *access-control-expose-headers* header. - ExposeHeaders string `protobuf:"bytes,4,opt,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"` - // Specifies the content for the *access-control-max-age* header. - MaxAge string `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` - // Specifies whether the resource allows credentials. - AllowCredentials *wrappers.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` - // Types that are assignable to EnabledSpecifier: - // *CorsPolicy_Enabled - // *CorsPolicy_FilterEnabled - EnabledSpecifier isCorsPolicy_EnabledSpecifier `protobuf_oneof:"enabled_specifier"` - // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not - // enforced. - // - // This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those - // fields have to explicitly disable the filter in order for this setting to take effect. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's *Origin* to determine if it's valid but will not enforce any policies. - ShadowEnabled *core.RuntimeFractionalPercent `protobuf:"bytes,10,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` -} - -func (x *CorsPolicy) Reset() { - *x = CorsPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CorsPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CorsPolicy) ProtoMessage() {} - -func (x *CorsPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CorsPolicy.ProtoReflect.Descriptor instead. -func (*CorsPolicy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{5} -} - -// Deprecated: Do not use. -func (x *CorsPolicy) GetAllowOrigin() []string { - if x != nil { - return x.AllowOrigin - } - return nil -} - -// Deprecated: Do not use. -func (x *CorsPolicy) GetAllowOriginRegex() []string { - if x != nil { - return x.AllowOriginRegex - } - return nil -} - -func (x *CorsPolicy) GetAllowOriginStringMatch() []*matcher.StringMatcher { - if x != nil { - return x.AllowOriginStringMatch - } - return nil -} - -func (x *CorsPolicy) GetAllowMethods() string { - if x != nil { - return x.AllowMethods - } - return "" -} - -func (x *CorsPolicy) GetAllowHeaders() string { - if x != nil { - return x.AllowHeaders - } - return "" -} - -func (x *CorsPolicy) GetExposeHeaders() string { - if x != nil { - return x.ExposeHeaders - } - return "" -} - -func (x *CorsPolicy) GetMaxAge() string { - if x != nil { - return x.MaxAge - } - return "" -} - -func (x *CorsPolicy) GetAllowCredentials() *wrappers.BoolValue { - if x != nil { - return x.AllowCredentials - } - return nil -} - -func (m *CorsPolicy) GetEnabledSpecifier() isCorsPolicy_EnabledSpecifier { - if m != nil { - return m.EnabledSpecifier - } - return nil -} - -// Deprecated: Do not use. -func (x *CorsPolicy) GetEnabled() *wrappers.BoolValue { - if x, ok := x.GetEnabledSpecifier().(*CorsPolicy_Enabled); ok { - return x.Enabled - } - return nil -} - -func (x *CorsPolicy) GetFilterEnabled() *core.RuntimeFractionalPercent { - if x, ok := x.GetEnabledSpecifier().(*CorsPolicy_FilterEnabled); ok { - return x.FilterEnabled - } - return nil -} - -func (x *CorsPolicy) GetShadowEnabled() *core.RuntimeFractionalPercent { - if x != nil { - return x.ShadowEnabled - } - return nil -} - -type isCorsPolicy_EnabledSpecifier interface { - isCorsPolicy_EnabledSpecifier() -} - -type CorsPolicy_Enabled struct { - // Specifies if the CORS filter is enabled. Defaults to true. Only effective on route. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`filter_enabled` field instead. - // - // Deprecated: Do not use. - Enabled *wrappers.BoolValue `protobuf:"bytes,7,opt,name=enabled,proto3,oneof"` -} - -type CorsPolicy_FilterEnabled struct { - // Specifies the % of requests for which the CORS filter is enabled. - // - // If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS - // filter will be enabled for 100% of the requests. - // - // If :ref:`runtime_key ` is - // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - FilterEnabled *core.RuntimeFractionalPercent `protobuf:"bytes,9,opt,name=filter_enabled,json=filterEnabled,proto3,oneof"` -} - -func (*CorsPolicy_Enabled) isCorsPolicy_EnabledSpecifier() {} - -func (*CorsPolicy_FilterEnabled) isCorsPolicy_EnabledSpecifier() {} - -// [#next-free-field: 34] -type RouteAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ClusterSpecifier: - // *RouteAction_Cluster - // *RouteAction_ClusterHeader - // *RouteAction_WeightedClusters - ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` - // The HTTP status code to use when configured cluster is not found. - // The default response code is 503 Service Unavailable. - ClusterNotFoundResponseCode RouteAction_ClusterNotFoundResponseCode `protobuf:"varint,20,opt,name=cluster_not_found_response_code,json=clusterNotFoundResponseCode,proto3,enum=envoy.api.v2.route.RouteAction_ClusterNotFoundResponseCode" json:"cluster_not_found_response_code,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints - // in the upstream cluster with metadata matching what's set in this field will be considered - // for load balancing. If using :ref:`weighted_clusters - // `, metadata will be merged, with values - // provided there taking precedence. The filter name should be specified as *envoy.lb*. - MetadataMatch *core.Metadata `protobuf:"bytes,4,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` - // Indicates that during forwarding, the matched prefix (or path) should be - // swapped with this value. This option allows application URLs to be rooted - // at a different path from those exposed at the reverse proxy layer. The router filter will - // place the original path before rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of *prefix_rewrite* or - // :ref:`regex_rewrite ` - // may be specified. - // - // .. attention:: - // - // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. - // Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - // rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single - // :ref:`Route `, as shown by the below config entries: - // - // .. code-block:: yaml - // - // - match: - // prefix: "/prefix/" - // route: - // prefix_rewrite: "/" - // - match: - // prefix: "/prefix" - // route: - // prefix_rewrite: "/" - // - // Having above entries in the config, requests to */prefix* will be stripped to */*, while - // requests to */prefix/etc* will be stripped to */etc*. - PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3" json:"prefix_rewrite,omitempty"` - // Indicates that during forwarding, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. The router filter will place the original path as it was - // before the rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`prefix_rewrite ` - // or *regex_rewrite* may be specified. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - RegexRewrite *matcher.RegexMatchAndSubstitute `protobuf:"bytes,32,opt,name=regex_rewrite,json=regexRewrite,proto3" json:"regex_rewrite,omitempty"` - // Types that are assignable to HostRewriteSpecifier: - // *RouteAction_HostRewrite - // *RouteAction_AutoHostRewrite - // *RouteAction_AutoHostRewriteHeader - HostRewriteSpecifier isRouteAction_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"` - // Specifies the upstream timeout for the route. If not specified, the default is 15s. This - // spans between the point at which the entire downstream request (i.e. end-of-stream) has been - // processed and when the upstream response has been completely processed. A value of 0 will - // disable the route's timeout. - // - // .. note:: - // - // This timeout includes all retries. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - Timeout *duration.Duration `protobuf:"bytes,8,opt,name=timeout,proto3" json:"timeout,omitempty"` - // Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, - // although the connection manager wide :ref:`stream_idle_timeout - // ` - // will still apply. A value of 0 will completely disable the route's idle timeout, even if a - // connection manager stream idle timeout is configured. - // - // The idle timeout is distinct to :ref:`timeout - // `, which provides an upper bound - // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount - // of time the request's stream may be idle. - // - // After header decoding, the idle timeout will apply on downstream and - // upstream request events. Each time an encode/decode event for headers or - // data is processed for the stream, the timer will be reset. If the timeout - // fires, the stream is terminated with a 408 Request Timeout error code if no - // upstream response header has been received, otherwise a stream reset - // occurs. - IdleTimeout *duration.Duration `protobuf:"bytes,24,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` - // Indicates that the route has a retry policy. Note that if this is set, - // it'll take precedence over the virtual host level retry policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - RetryPolicy *RetryPolicy `protobuf:"bytes,9,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that if this is set, it'll take - // precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, - // most internal one becomes the enforced policy). :ref:`Retry policy ` - // should not be set if this field is used. - RetryPolicyTypedConfig *any1.Any `protobuf:"bytes,33,opt,name=retry_policy_typed_config,json=retryPolicyTypedConfig,proto3" json:"retry_policy_typed_config,omitempty"` - // Indicates that the route has a request mirroring policy. - // - // .. attention:: - // This field has been deprecated in favor of `request_mirror_policies` which supports one or - // more mirroring policies. - // - // Deprecated: Do not use. - RequestMirrorPolicy *RouteAction_RequestMirrorPolicy `protobuf:"bytes,10,opt,name=request_mirror_policy,json=requestMirrorPolicy,proto3" json:"request_mirror_policy,omitempty"` - // Indicates that the route has request mirroring policies. - RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,30,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` - // Optionally specifies the :ref:`routing priority `. - Priority core.RoutingPriority `protobuf:"varint,11,opt,name=priority,proto3,enum=envoy.api.v2.core.RoutingPriority" json:"priority,omitempty"` - // Specifies a set of rate limit configurations that could be applied to the - // route. - RateLimits []*RateLimit `protobuf:"bytes,13,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` - // Specifies if the rate limit filter should include the virtual host rate - // limits. By default, if the route configured rate limits, the virtual host - // :ref:`rate_limits ` are not applied to the - // request. - IncludeVhRateLimits *wrappers.BoolValue `protobuf:"bytes,14,opt,name=include_vh_rate_limits,json=includeVhRateLimits,proto3" json:"include_vh_rate_limits,omitempty"` - // Specifies a list of hash policies to use for ring hash load balancing. Each - // hash policy is evaluated individually and the combined result is used to - // route the request. The method of combination is deterministic such that - // identical lists of hash policies will produce the same hash. Since a hash - // policy examines specific parts of a request, it can fail to produce a hash - // (i.e. if the hashed header is not present). If (and only if) all configured - // hash policies fail to generate a hash, no hash will be produced for - // the route. In this case, the behavior is the same as if no hash policies - // were specified (i.e. the ring hash load balancer will choose a random - // backend). If a hash policy has the "terminal" attribute set to true, and - // there is already a hash generated, the hash is returned immediately, - // ignoring the rest of the hash policy list. - HashPolicy []*RouteAction_HashPolicy `protobuf:"bytes,15,rep,name=hash_policy,json=hashPolicy,proto3" json:"hash_policy,omitempty"` - // Indicates that the route has a CORS policy. - Cors *CorsPolicy `protobuf:"bytes,17,opt,name=cors,proto3" json:"cors,omitempty"` - // If present, and the request is a gRPC request, use the - // `grpc-timeout header `_, - // or its default value (infinity) instead of - // :ref:`timeout `, but limit the applied timeout - // to the maximum value specified here. If configured as 0, the maximum allowed timeout for - // gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used - // and gRPC requests time out like any other requests using - // :ref:`timeout ` or its default. - // This can be used to prevent unexpected upstream request timeouts due to potentially long - // time gaps between gRPC request and response in gRPC streaming mode. - // - // .. note:: - // - // If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes - // precedence over `grpc-timeout header `_, when - // both are present. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - MaxGrpcTimeout *duration.Duration `protobuf:"bytes,23,opt,name=max_grpc_timeout,json=maxGrpcTimeout,proto3" json:"max_grpc_timeout,omitempty"` - // If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting - // the provided duration from the header. This is useful in allowing Envoy to set its global - // timeout to be less than that of the deadline imposed by the calling client, which makes it more - // likely that Envoy will handle the timeout instead of having the call canceled by the client. - // The offset will only be applied if the provided grpc_timeout is greater than the offset. This - // ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning - // infinity). - GrpcTimeoutOffset *duration.Duration `protobuf:"bytes,28,opt,name=grpc_timeout_offset,json=grpcTimeoutOffset,proto3" json:"grpc_timeout_offset,omitempty"` - UpgradeConfigs []*RouteAction_UpgradeConfig `protobuf:"bytes,25,rep,name=upgrade_configs,json=upgradeConfigs,proto3" json:"upgrade_configs,omitempty"` - InternalRedirectAction RouteAction_InternalRedirectAction `protobuf:"varint,26,opt,name=internal_redirect_action,json=internalRedirectAction,proto3,enum=envoy.api.v2.route.RouteAction_InternalRedirectAction" json:"internal_redirect_action,omitempty"` - // An internal redirect is handled, iff the number of previous internal redirects that a - // downstream request has encountered is lower than this value, and - // :ref:`internal_redirect_action ` - // is set to :ref:`HANDLE_INTERNAL_REDIRECT - // ` - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or has - // :ref:`internal_redirect_action ` - // set to - // :ref:`PASS_THROUGH_INTERNAL_REDIRECT - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - MaxInternalRedirects *wrappers.UInt32Value `protobuf:"bytes,31,opt,name=max_internal_redirects,json=maxInternalRedirects,proto3" json:"max_internal_redirects,omitempty"` - // Indicates that the route has a hedge policy. Note that if this is set, - // it'll take precedence over the virtual host level hedge policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - HedgePolicy *HedgePolicy `protobuf:"bytes,27,opt,name=hedge_policy,json=hedgePolicy,proto3" json:"hedge_policy,omitempty"` -} - -func (x *RouteAction) Reset() { - *x = RouteAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction) ProtoMessage() {} - -func (x *RouteAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. -func (*RouteAction) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6} -} - -func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { - if m != nil { - return m.ClusterSpecifier - } - return nil -} - -func (x *RouteAction) GetCluster() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { - return x.Cluster - } - return "" -} - -func (x *RouteAction) GetClusterHeader() string { - if x, ok := x.GetClusterSpecifier().(*RouteAction_ClusterHeader); ok { - return x.ClusterHeader - } - return "" -} - -func (x *RouteAction) GetWeightedClusters() *WeightedCluster { - if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { - return x.WeightedClusters - } - return nil -} - -func (x *RouteAction) GetClusterNotFoundResponseCode() RouteAction_ClusterNotFoundResponseCode { - if x != nil { - return x.ClusterNotFoundResponseCode - } - return RouteAction_SERVICE_UNAVAILABLE -} - -func (x *RouteAction) GetMetadataMatch() *core.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *RouteAction) GetPrefixRewrite() string { - if x != nil { - return x.PrefixRewrite - } - return "" -} - -func (x *RouteAction) GetRegexRewrite() *matcher.RegexMatchAndSubstitute { - if x != nil { - return x.RegexRewrite - } - return nil -} - -func (m *RouteAction) GetHostRewriteSpecifier() isRouteAction_HostRewriteSpecifier { - if m != nil { - return m.HostRewriteSpecifier - } - return nil -} - -func (x *RouteAction) GetHostRewrite() string { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_HostRewrite); ok { - return x.HostRewrite - } - return "" -} - -func (x *RouteAction) GetAutoHostRewrite() *wrappers.BoolValue { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_AutoHostRewrite); ok { - return x.AutoHostRewrite - } - return nil -} - -func (x *RouteAction) GetAutoHostRewriteHeader() string { - if x, ok := x.GetHostRewriteSpecifier().(*RouteAction_AutoHostRewriteHeader); ok { - return x.AutoHostRewriteHeader - } - return "" -} - -func (x *RouteAction) GetTimeout() *duration.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *RouteAction) GetIdleTimeout() *duration.Duration { - if x != nil { - return x.IdleTimeout - } - return nil -} - -func (x *RouteAction) GetRetryPolicy() *RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -func (x *RouteAction) GetRetryPolicyTypedConfig() *any1.Any { - if x != nil { - return x.RetryPolicyTypedConfig - } - return nil -} - -// Deprecated: Do not use. -func (x *RouteAction) GetRequestMirrorPolicy() *RouteAction_RequestMirrorPolicy { - if x != nil { - return x.RequestMirrorPolicy - } - return nil -} - -func (x *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { - if x != nil { - return x.RequestMirrorPolicies - } - return nil -} - -func (x *RouteAction) GetPriority() core.RoutingPriority { - if x != nil { - return x.Priority - } - return core.RoutingPriority(0) -} - -func (x *RouteAction) GetRateLimits() []*RateLimit { - if x != nil { - return x.RateLimits - } - return nil -} - -func (x *RouteAction) GetIncludeVhRateLimits() *wrappers.BoolValue { - if x != nil { - return x.IncludeVhRateLimits - } - return nil -} - -func (x *RouteAction) GetHashPolicy() []*RouteAction_HashPolicy { - if x != nil { - return x.HashPolicy - } - return nil -} - -func (x *RouteAction) GetCors() *CorsPolicy { - if x != nil { - return x.Cors - } - return nil -} - -func (x *RouteAction) GetMaxGrpcTimeout() *duration.Duration { - if x != nil { - return x.MaxGrpcTimeout - } - return nil -} - -func (x *RouteAction) GetGrpcTimeoutOffset() *duration.Duration { - if x != nil { - return x.GrpcTimeoutOffset - } - return nil -} - -func (x *RouteAction) GetUpgradeConfigs() []*RouteAction_UpgradeConfig { - if x != nil { - return x.UpgradeConfigs - } - return nil -} - -func (x *RouteAction) GetInternalRedirectAction() RouteAction_InternalRedirectAction { - if x != nil { - return x.InternalRedirectAction - } - return RouteAction_PASS_THROUGH_INTERNAL_REDIRECT -} - -func (x *RouteAction) GetMaxInternalRedirects() *wrappers.UInt32Value { - if x != nil { - return x.MaxInternalRedirects - } - return nil -} - -func (x *RouteAction) GetHedgePolicy() *HedgePolicy { - if x != nil { - return x.HedgePolicy - } - return nil -} - -type isRouteAction_ClusterSpecifier interface { - isRouteAction_ClusterSpecifier() -} - -type RouteAction_Cluster struct { - // Indicates the upstream cluster to which the request should be routed - // to. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` -} - -type RouteAction_ClusterHeader struct { - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - // *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - ClusterHeader string `protobuf:"bytes,2,opt,name=cluster_header,json=clusterHeader,proto3,oneof"` -} - -type RouteAction_WeightedClusters struct { - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. See - // :ref:`traffic splitting ` - // for additional documentation. - WeightedClusters *WeightedCluster `protobuf:"bytes,3,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` -} - -func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} - -func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} - -type isRouteAction_HostRewriteSpecifier interface { - isRouteAction_HostRewriteSpecifier() -} - -type RouteAction_HostRewrite struct { - // Indicates that during forwarding, the host header will be swapped with - // this value. - HostRewrite string `protobuf:"bytes,6,opt,name=host_rewrite,json=hostRewrite,proto3,oneof"` -} - -type RouteAction_AutoHostRewrite struct { - // Indicates that during forwarding, the host header will be swapped with - // the hostname of the upstream host chosen by the cluster manager. This - // option is applicable only when the destination cluster for a route is of - // type ``STRICT_DNS``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the - // hostname attribute of the endpoint must be configured. Setting this to true - // with other cluster types has no effect. - AutoHostRewrite *wrappers.BoolValue `protobuf:"bytes,7,opt,name=auto_host_rewrite,json=autoHostRewrite,proto3,oneof"` -} - -type RouteAction_AutoHostRewriteHeader struct { - // Indicates that during forwarding, the host header will be swapped with the content of given - // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. - // - // .. attention:: - // - // Pay attention to the potential security implications of using this option. Provided header - // must come from trusted source. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - AutoHostRewriteHeader string `protobuf:"bytes,29,opt,name=auto_host_rewrite_header,json=autoHostRewriteHeader,proto3,oneof"` -} - -func (*RouteAction_HostRewrite) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_AutoHostRewrite) isRouteAction_HostRewriteSpecifier() {} - -func (*RouteAction_AutoHostRewriteHeader) isRouteAction_HostRewriteSpecifier() {} - -// HTTP retry :ref:`architecture overview `. -// [#next-free-field: 11] -type RetryPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the conditions under which retry takes place. These are the same - // conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and - // :ref:`config_http_filters_router_x-envoy-retry-grpc-on`. - RetryOn string `protobuf:"bytes,1,opt,name=retry_on,json=retryOn,proto3" json:"retry_on,omitempty"` - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. These are the same conditions documented for - // :ref:`config_http_filters_router_x-envoy-max-retries`. - NumRetries *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=num_retries,json=numRetries,proto3" json:"num_retries,omitempty"` - // Specifies a non-zero upstream timeout per retry attempt. This parameter is optional. The - // same conditions documented for - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. - // - // .. note:: - // - // If left unspecified, Envoy will use the global - // :ref:`route timeout ` for the request. - // Consequently, when using a :ref:`5xx ` based - // retry policy, a request that times out will not be retried as the total timeout budget - // would have been exhausted. - PerTryTimeout *duration.Duration `protobuf:"bytes,3,opt,name=per_try_timeout,json=perTryTimeout,proto3" json:"per_try_timeout,omitempty"` - // Specifies an implementation of a RetryPriority which is used to determine the - // distribution of load across priorities used for retries. Refer to - // :ref:`retry plugin configuration ` for more details. - RetryPriority *RetryPolicy_RetryPriority `protobuf:"bytes,4,opt,name=retry_priority,json=retryPriority,proto3" json:"retry_priority,omitempty"` - // Specifies a collection of RetryHostPredicates that will be consulted when selecting a host - // for retries. If any of the predicates reject the host, host selection will be reattempted. - // Refer to :ref:`retry plugin configuration ` for more - // details. - RetryHostPredicate []*RetryPolicy_RetryHostPredicate `protobuf:"bytes,5,rep,name=retry_host_predicate,json=retryHostPredicate,proto3" json:"retry_host_predicate,omitempty"` - // The maximum number of times host selection will be reattempted before giving up, at which - // point the host that was last selected will be routed to. If unspecified, this will default to - // retrying once. - HostSelectionRetryMaxAttempts int64 `protobuf:"varint,6,opt,name=host_selection_retry_max_attempts,json=hostSelectionRetryMaxAttempts,proto3" json:"host_selection_retry_max_attempts,omitempty"` - // HTTP status codes that should trigger a retry in addition to those specified by retry_on. - RetriableStatusCodes []uint32 `protobuf:"varint,7,rep,packed,name=retriable_status_codes,json=retriableStatusCodes,proto3" json:"retriable_status_codes,omitempty"` - // Specifies parameters that control retry back off. This parameter is optional, in which case the - // default base interval is 25 milliseconds or, if set, the current value of the - // `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times - // the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` - // describes Envoy's back-off algorithm. - RetryBackOff *RetryPolicy_RetryBackOff `protobuf:"bytes,8,opt,name=retry_back_off,json=retryBackOff,proto3" json:"retry_back_off,omitempty"` - // HTTP response headers that trigger a retry if present in the response. A retry will be - // triggered if any of the header matches match the upstream response headers. - // The field is only consulted if 'retriable-headers' retry policy is active. - RetriableHeaders []*HeaderMatcher `protobuf:"bytes,9,rep,name=retriable_headers,json=retriableHeaders,proto3" json:"retriable_headers,omitempty"` - // HTTP headers which must be present in the request for retries to be attempted. - RetriableRequestHeaders []*HeaderMatcher `protobuf:"bytes,10,rep,name=retriable_request_headers,json=retriableRequestHeaders,proto3" json:"retriable_request_headers,omitempty"` -} - -func (x *RetryPolicy) Reset() { - *x = RetryPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy) ProtoMessage() {} - -func (x *RetryPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead. -func (*RetryPolicy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{7} -} - -func (x *RetryPolicy) GetRetryOn() string { - if x != nil { - return x.RetryOn - } - return "" -} - -func (x *RetryPolicy) GetNumRetries() *wrappers.UInt32Value { - if x != nil { - return x.NumRetries - } - return nil -} - -func (x *RetryPolicy) GetPerTryTimeout() *duration.Duration { - if x != nil { - return x.PerTryTimeout - } - return nil -} - -func (x *RetryPolicy) GetRetryPriority() *RetryPolicy_RetryPriority { - if x != nil { - return x.RetryPriority - } - return nil -} - -func (x *RetryPolicy) GetRetryHostPredicate() []*RetryPolicy_RetryHostPredicate { - if x != nil { - return x.RetryHostPredicate - } - return nil -} - -func (x *RetryPolicy) GetHostSelectionRetryMaxAttempts() int64 { - if x != nil { - return x.HostSelectionRetryMaxAttempts - } - return 0 -} - -func (x *RetryPolicy) GetRetriableStatusCodes() []uint32 { - if x != nil { - return x.RetriableStatusCodes - } - return nil -} - -func (x *RetryPolicy) GetRetryBackOff() *RetryPolicy_RetryBackOff { - if x != nil { - return x.RetryBackOff - } - return nil -} - -func (x *RetryPolicy) GetRetriableHeaders() []*HeaderMatcher { - if x != nil { - return x.RetriableHeaders - } - return nil -} - -func (x *RetryPolicy) GetRetriableRequestHeaders() []*HeaderMatcher { - if x != nil { - return x.RetriableRequestHeaders - } - return nil -} - -// HTTP request hedging :ref:`architecture overview `. -type HedgePolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the number of initial requests that should be sent upstream. - // Must be at least 1. - // Defaults to 1. - // [#not-implemented-hide:] - InitialRequests *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=initial_requests,json=initialRequests,proto3" json:"initial_requests,omitempty"` - // Specifies a probability that an additional upstream request should be sent - // on top of what is specified by initial_requests. - // Defaults to 0. - // [#not-implemented-hide:] - AdditionalRequestChance *_type.FractionalPercent `protobuf:"bytes,2,opt,name=additional_request_chance,json=additionalRequestChance,proto3" json:"additional_request_chance,omitempty"` - // Indicates that a hedged request should be sent when the per-try timeout is hit. - // This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight. - // The first request to complete successfully will be the one returned to the caller. - // - // * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client. - // * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client - // if there are no more retries left. - // * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. - // - // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least - // one error code and specifies a maximum number of retries. - // - // Defaults to false. - HedgeOnPerTryTimeout bool `protobuf:"varint,3,opt,name=hedge_on_per_try_timeout,json=hedgeOnPerTryTimeout,proto3" json:"hedge_on_per_try_timeout,omitempty"` -} - -func (x *HedgePolicy) Reset() { - *x = HedgePolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HedgePolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HedgePolicy) ProtoMessage() {} - -func (x *HedgePolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HedgePolicy.ProtoReflect.Descriptor instead. -func (*HedgePolicy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{8} -} - -func (x *HedgePolicy) GetInitialRequests() *wrappers.UInt32Value { - if x != nil { - return x.InitialRequests - } - return nil -} - -func (x *HedgePolicy) GetAdditionalRequestChance() *_type.FractionalPercent { - if x != nil { - return x.AdditionalRequestChance - } - return nil -} - -func (x *HedgePolicy) GetHedgeOnPerTryTimeout() bool { - if x != nil { - return x.HedgeOnPerTryTimeout - } - return false -} - -// [#next-free-field: 9] -type RedirectAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // When the scheme redirection take place, the following rules apply: - // 1. If the source URI scheme is `http` and the port is explicitly - // set to `:80`, the port will be removed after the redirection - // 2. If the source URI scheme is `https` and the port is explicitly - // set to `:443`, the port will be removed after the redirection - // - // Types that are assignable to SchemeRewriteSpecifier: - // *RedirectAction_HttpsRedirect - // *RedirectAction_SchemeRedirect - SchemeRewriteSpecifier isRedirectAction_SchemeRewriteSpecifier `protobuf_oneof:"scheme_rewrite_specifier"` - // The host portion of the URL will be swapped with this value. - HostRedirect string `protobuf:"bytes,1,opt,name=host_redirect,json=hostRedirect,proto3" json:"host_redirect,omitempty"` - // The port value of the URL will be swapped with this value. - PortRedirect uint32 `protobuf:"varint,8,opt,name=port_redirect,json=portRedirect,proto3" json:"port_redirect,omitempty"` - // Types that are assignable to PathRewriteSpecifier: - // *RedirectAction_PathRedirect - // *RedirectAction_PrefixRewrite - PathRewriteSpecifier isRedirectAction_PathRewriteSpecifier `protobuf_oneof:"path_rewrite_specifier"` - // The HTTP status code to use in the redirect response. The default response - // code is MOVED_PERMANENTLY (301). - ResponseCode RedirectAction_RedirectResponseCode `protobuf:"varint,3,opt,name=response_code,json=responseCode,proto3,enum=envoy.api.v2.route.RedirectAction_RedirectResponseCode" json:"response_code,omitempty"` - // Indicates that during redirection, the query portion of the URL will - // be removed. Default value is false. - StripQuery bool `protobuf:"varint,6,opt,name=strip_query,json=stripQuery,proto3" json:"strip_query,omitempty"` -} - -func (x *RedirectAction) Reset() { - *x = RedirectAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedirectAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedirectAction) ProtoMessage() {} - -func (x *RedirectAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedirectAction.ProtoReflect.Descriptor instead. -func (*RedirectAction) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{9} -} - -func (m *RedirectAction) GetSchemeRewriteSpecifier() isRedirectAction_SchemeRewriteSpecifier { - if m != nil { - return m.SchemeRewriteSpecifier - } - return nil -} - -func (x *RedirectAction) GetHttpsRedirect() bool { - if x, ok := x.GetSchemeRewriteSpecifier().(*RedirectAction_HttpsRedirect); ok { - return x.HttpsRedirect - } - return false -} - -func (x *RedirectAction) GetSchemeRedirect() string { - if x, ok := x.GetSchemeRewriteSpecifier().(*RedirectAction_SchemeRedirect); ok { - return x.SchemeRedirect - } - return "" -} - -func (x *RedirectAction) GetHostRedirect() string { - if x != nil { - return x.HostRedirect - } - return "" -} - -func (x *RedirectAction) GetPortRedirect() uint32 { - if x != nil { - return x.PortRedirect - } - return 0 -} - -func (m *RedirectAction) GetPathRewriteSpecifier() isRedirectAction_PathRewriteSpecifier { - if m != nil { - return m.PathRewriteSpecifier - } - return nil -} - -func (x *RedirectAction) GetPathRedirect() string { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_PathRedirect); ok { - return x.PathRedirect - } - return "" -} - -func (x *RedirectAction) GetPrefixRewrite() string { - if x, ok := x.GetPathRewriteSpecifier().(*RedirectAction_PrefixRewrite); ok { - return x.PrefixRewrite - } - return "" -} - -func (x *RedirectAction) GetResponseCode() RedirectAction_RedirectResponseCode { - if x != nil { - return x.ResponseCode - } - return RedirectAction_MOVED_PERMANENTLY -} - -func (x *RedirectAction) GetStripQuery() bool { - if x != nil { - return x.StripQuery - } - return false -} - -type isRedirectAction_SchemeRewriteSpecifier interface { - isRedirectAction_SchemeRewriteSpecifier() -} - -type RedirectAction_HttpsRedirect struct { - // The scheme portion of the URL will be swapped with "https". - HttpsRedirect bool `protobuf:"varint,4,opt,name=https_redirect,json=httpsRedirect,proto3,oneof"` -} - -type RedirectAction_SchemeRedirect struct { - // The scheme portion of the URL will be swapped with this value. - SchemeRedirect string `protobuf:"bytes,7,opt,name=scheme_redirect,json=schemeRedirect,proto3,oneof"` -} - -func (*RedirectAction_HttpsRedirect) isRedirectAction_SchemeRewriteSpecifier() {} - -func (*RedirectAction_SchemeRedirect) isRedirectAction_SchemeRewriteSpecifier() {} - -type isRedirectAction_PathRewriteSpecifier interface { - isRedirectAction_PathRewriteSpecifier() -} - -type RedirectAction_PathRedirect struct { - // The path portion of the URL will be swapped with this value. - // Please note that query string in path_redirect will override the - // request's query string and will not be stripped. - // - // For example, let's say we have the following routes: - // - // - match: { path: "/old-path-1" } - // redirect: { path_redirect: "/new-path-1" } - // - match: { path: "/old-path-2" } - // redirect: { path_redirect: "/new-path-2", strip-query: "true" } - // - match: { path: "/old-path-3" } - // redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } - // - // 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" - // 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" - // 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1" - PathRedirect string `protobuf:"bytes,2,opt,name=path_redirect,json=pathRedirect,proto3,oneof"` -} - -type RedirectAction_PrefixRewrite struct { - // Indicates that during redirection, the matched prefix (or path) - // should be swapped with this value. This option allows redirect URLs be dynamically created - // based on the request. - // - // .. attention:: - // - // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. - PrefixRewrite string `protobuf:"bytes,5,opt,name=prefix_rewrite,json=prefixRewrite,proto3,oneof"` -} - -func (*RedirectAction_PathRedirect) isRedirectAction_PathRewriteSpecifier() {} - -func (*RedirectAction_PrefixRewrite) isRedirectAction_PathRewriteSpecifier() {} - -type DirectResponseAction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the HTTP response status to be returned. - Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` - // Specifies the content of the response body. If this setting is omitted, - // no body is included in the generated response. - // - // .. note:: - // - // Headers can be specified using *response_headers_to_add* in the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_RouteConfiguration` or - // :ref:`envoy_api_msg_route.VirtualHost`. - Body *core.DataSource `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` -} - -func (x *DirectResponseAction) Reset() { - *x = DirectResponseAction{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DirectResponseAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DirectResponseAction) ProtoMessage() {} - -func (x *DirectResponseAction) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DirectResponseAction.ProtoReflect.Descriptor instead. -func (*DirectResponseAction) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{10} -} - -func (x *DirectResponseAction) GetStatus() uint32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *DirectResponseAction) GetBody() *core.DataSource { - if x != nil { - return x.Body - } - return nil -} - -type Decorator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The operation name associated with the request matched to this route. If tracing is - // enabled, this information will be used as the span name reported for this request. - // - // .. note:: - // - // For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden - // by the :ref:`x-envoy-decorator-operation - // ` header. - Operation string `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` - // Whether the decorated details should be propagated to the other party. The default is true. - Propagate *wrappers.BoolValue `protobuf:"bytes,2,opt,name=propagate,proto3" json:"propagate,omitempty"` -} - -func (x *Decorator) Reset() { - *x = Decorator{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Decorator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Decorator) ProtoMessage() {} - -func (x *Decorator) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Decorator.ProtoReflect.Descriptor instead. -func (*Decorator) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{11} -} - -func (x *Decorator) GetOperation() string { - if x != nil { - return x.Operation - } - return "" -} - -func (x *Decorator) GetPropagate() *wrappers.BoolValue { - if x != nil { - return x.Propagate - } - return nil -} - -type Tracing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_sampling' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - ClientSampling *_type.FractionalPercent `protobuf:"bytes,1,opt,name=client_sampling,json=clientSampling,proto3" json:"client_sampling,omitempty"` - // Target percentage of requests managed by this HTTP connection manager that will be randomly - // selected for trace generation, if not requested by the client or not forced. This field is - // a direct analog for the runtime variable 'tracing.random_sampling' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - RandomSampling *_type.FractionalPercent `protobuf:"bytes,2,opt,name=random_sampling,json=randomSampling,proto3" json:"random_sampling,omitempty"` - // Target percentage of requests managed by this HTTP connection manager that will be traced - // after all other sampling checks have been applied (client-directed, force tracing, random - // sampling). This field functions as an upper limit on the total configured sampling rate. For - // instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% - // of client requests with the appropriate headers to be force traced. This field is a direct - // analog for the runtime variable 'tracing.global_enabled' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - OverallSampling *_type.FractionalPercent `protobuf:"bytes,3,opt,name=overall_sampling,json=overallSampling,proto3" json:"overall_sampling,omitempty"` - // A list of custom tags with unique tag name to create tags for the active span. - // It will take effect after merging with the :ref:`corresponding configuration - // ` - // configured in the HTTP connection manager. If two tags with the same name are configured - // each in the HTTP connection manager and the route level, the one configured here takes - // priority. - CustomTags []*v2.CustomTag `protobuf:"bytes,4,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` -} - -func (x *Tracing) Reset() { - *x = Tracing{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Tracing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Tracing) ProtoMessage() {} - -func (x *Tracing) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Tracing.ProtoReflect.Descriptor instead. -func (*Tracing) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{12} -} - -func (x *Tracing) GetClientSampling() *_type.FractionalPercent { - if x != nil { - return x.ClientSampling - } - return nil -} - -func (x *Tracing) GetRandomSampling() *_type.FractionalPercent { - if x != nil { - return x.RandomSampling - } - return nil -} - -func (x *Tracing) GetOverallSampling() *_type.FractionalPercent { - if x != nil { - return x.OverallSampling - } - return nil -} - -func (x *Tracing) GetCustomTags() []*v2.CustomTag { - if x != nil { - return x.CustomTags - } - return nil -} - -// A virtual cluster is a way of specifying a regex matching rule against -// certain important endpoints such that statistics are generated explicitly for -// the matched requests. The reason this is useful is that when doing -// prefix/path matching Envoy does not always know what the application -// considers to be an endpoint. Thus, it’s impossible for Envoy to generically -// emit per endpoint statistics. However, often systems have highly critical -// endpoints that they wish to get “perfect” statistics on. Virtual cluster -// statistics are perfect in the sense that they are emitted on the downstream -// side such that they include network level failures. -// -// Documentation for :ref:`virtual cluster statistics `. -// -// .. note:: -// -// Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for -// every application endpoint. This is both not easily maintainable and as well the matching and -// statistics output are not free. -type VirtualCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies a regex pattern to use for matching requests. The entire path of the request - // must match the regex. The regex grammar used is defined `here - // `_. - // - // Examples: - // - // * The regex ``/rides/\d+`` matches the path */rides/0* - // * The regex ``/rides/\d+`` matches the path */rides/123* - // * The regex ``/rides/\d+`` does not match the path */rides/123/456* - // - // .. attention:: - // This field has been deprecated in favor of `headers` as it is not safe for use with - // untrusted input in all cases. - // - // Deprecated: Do not use. - Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` - // Specifies a list of header matchers to use for matching requests. Each specified header must - // match. The pseudo-headers `:path` and `:method` can be used to match the request path and - // method, respectively. - Headers []*HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` - // Specifies the name of the virtual cluster. The virtual cluster name as well - // as the virtual host name are used when emitting statistics. The statistics are emitted by the - // router filter and are documented :ref:`here `. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Optionally specifies the HTTP method to match on. For example GET, PUT, - // etc. - // - // .. attention:: - // This field has been deprecated in favor of `headers`. - // - // Deprecated: Do not use. - Method core.RequestMethod `protobuf:"varint,3,opt,name=method,proto3,enum=envoy.api.v2.core.RequestMethod" json:"method,omitempty"` -} - -func (x *VirtualCluster) Reset() { - *x = VirtualCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VirtualCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VirtualCluster) ProtoMessage() {} - -func (x *VirtualCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VirtualCluster.ProtoReflect.Descriptor instead. -func (*VirtualCluster) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{13} -} - -// Deprecated: Do not use. -func (x *VirtualCluster) GetPattern() string { - if x != nil { - return x.Pattern - } - return "" -} - -func (x *VirtualCluster) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -func (x *VirtualCluster) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Deprecated: Do not use. -func (x *VirtualCluster) GetMethod() core.RequestMethod { - if x != nil { - return x.Method - } - return core.RequestMethod(0) -} - -// Global rate limiting :ref:`architecture overview `. -type RateLimit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Refers to the stage set in the filter. The rate limit configuration only - // applies to filters with the same stage number. The default stage number is - // 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - Stage *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=stage,proto3" json:"stage,omitempty"` - // The key to be set in runtime to disable this rate limit configuration. - DisableKey string `protobuf:"bytes,2,opt,name=disable_key,json=disableKey,proto3" json:"disable_key,omitempty"` - // A list of actions that are to be applied for this rate limit configuration. - // Order matters as the actions are processed sequentially and the descriptor - // is composed by appending descriptor entries in that sequence. If an action - // cannot append a descriptor entry, no descriptor is generated for the - // configuration. See :ref:`composing actions - // ` for additional documentation. - Actions []*RateLimit_Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` -} - -func (x *RateLimit) Reset() { - *x = RateLimit{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit) ProtoMessage() {} - -func (x *RateLimit) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. -func (*RateLimit) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14} -} - -func (x *RateLimit) GetStage() *wrappers.UInt32Value { - if x != nil { - return x.Stage - } - return nil -} - -func (x *RateLimit) GetDisableKey() string { - if x != nil { - return x.DisableKey - } - return "" -} - -func (x *RateLimit) GetActions() []*RateLimit_Action { - if x != nil { - return x.Actions - } - return nil -} - -// .. attention:: -// -// Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* -// header. Thus, if attempting to match on *Host*, match on *:authority* instead. -// -// .. attention:: -// -// To route on HTTP method, use the special HTTP/2 *:method* header. This works for both -// HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., -// -// .. code-block:: json -// -// { -// "name": ":method", -// "exact_match": "POST" -// } -// -// .. attention:: -// In the absence of any header match specifier, match will default to :ref:`present_match -// `. i.e, a request that has the :ref:`name -// ` header will match, regardless of the header's -// value. -// -// [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// [#next-free-field: 12] -type HeaderMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the name of the header in the request. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Specifies how the header match will be performed to route the request. - // - // Types that are assignable to HeaderMatchSpecifier: - // *HeaderMatcher_ExactMatch - // *HeaderMatcher_RegexMatch - // *HeaderMatcher_SafeRegexMatch - // *HeaderMatcher_RangeMatch - // *HeaderMatcher_PresentMatch - // *HeaderMatcher_PrefixMatch - // *HeaderMatcher_SuffixMatch - HeaderMatchSpecifier isHeaderMatcher_HeaderMatchSpecifier `protobuf_oneof:"header_match_specifier"` - // If specified, the match result will be inverted before checking. Defaults to false. - // - // Examples: - // - // * The regex ``\d{3}`` does not match the value *1234*, so it will match when inverted. - // * The range [-10,0) will match the value -1, so it will not match when inverted. - InvertMatch bool `protobuf:"varint,8,opt,name=invert_match,json=invertMatch,proto3" json:"invert_match,omitempty"` -} - -func (x *HeaderMatcher) Reset() { - *x = HeaderMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderMatcher) ProtoMessage() {} - -func (x *HeaderMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderMatcher.ProtoReflect.Descriptor instead. -func (*HeaderMatcher) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{15} -} - -func (x *HeaderMatcher) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier { - if m != nil { - return m.HeaderMatchSpecifier - } - return nil -} - -func (x *HeaderMatcher) GetExactMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_ExactMatch); ok { - return x.ExactMatch - } - return "" -} - -// Deprecated: Do not use. -func (x *HeaderMatcher) GetRegexMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_RegexMatch); ok { - return x.RegexMatch - } - return "" -} - -func (x *HeaderMatcher) GetSafeRegexMatch() *matcher.RegexMatcher { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SafeRegexMatch); ok { - return x.SafeRegexMatch - } - return nil -} - -func (x *HeaderMatcher) GetRangeMatch() *_type.Int64Range { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_RangeMatch); ok { - return x.RangeMatch - } - return nil -} - -func (x *HeaderMatcher) GetPresentMatch() bool { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -func (x *HeaderMatcher) GetPrefixMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_PrefixMatch); ok { - return x.PrefixMatch - } - return "" -} - -func (x *HeaderMatcher) GetSuffixMatch() string { - if x, ok := x.GetHeaderMatchSpecifier().(*HeaderMatcher_SuffixMatch); ok { - return x.SuffixMatch - } - return "" -} - -func (x *HeaderMatcher) GetInvertMatch() bool { - if x != nil { - return x.InvertMatch - } - return false -} - -type isHeaderMatcher_HeaderMatchSpecifier interface { - isHeaderMatcher_HeaderMatchSpecifier() -} - -type HeaderMatcher_ExactMatch struct { - // If specified, header match will be performed based on the value of the header. - ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"` -} - -type HeaderMatcher_RegexMatch struct { - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. The regex grammar used in the value field is defined - // `here `_. - // - // Examples: - // - // * The regex ``\d{3}`` matches the value *123* - // * The regex ``\d{3}`` does not match the value *1234* - // * The regex ``\d{3}`` does not match the value *123.456* - // - // .. attention:: - // This field has been deprecated in favor of `safe_regex_match` as it is not safe for use - // with untrusted input in all cases. - // - // Deprecated: Do not use. - RegexMatch string `protobuf:"bytes,5,opt,name=regex_match,json=regexMatch,proto3,oneof"` -} - -type HeaderMatcher_SafeRegexMatch struct { - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. - SafeRegexMatch *matcher.RegexMatcher `protobuf:"bytes,11,opt,name=safe_regex_match,json=safeRegexMatch,proto3,oneof"` -} - -type HeaderMatcher_RangeMatch struct { - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting of - // an optional plus or minus sign followed by a sequence of digits. The rule will not match if - // the header value does not represent an integer. Match will fail for empty values, floating - // point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, - // "-1somestring" - RangeMatch *_type.Int64Range `protobuf:"bytes,6,opt,name=range_match,json=rangeMatch,proto3,oneof"` -} - -type HeaderMatcher_PresentMatch struct { - // If specified, header match will be performed based on whether the header is in the - // request. - PresentMatch bool `protobuf:"varint,7,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -type HeaderMatcher_PrefixMatch struct { - // If specified, header match will be performed based on the prefix of the header value. - // Note: empty prefix is not allowed, please use present_match instead. - // - // Examples: - // - // * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. - PrefixMatch string `protobuf:"bytes,9,opt,name=prefix_match,json=prefixMatch,proto3,oneof"` -} - -type HeaderMatcher_SuffixMatch struct { - // If specified, header match will be performed based on the suffix of the header value. - // Note: empty suffix is not allowed, please use present_match instead. - // - // Examples: - // - // * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. - SuffixMatch string `protobuf:"bytes,10,opt,name=suffix_match,json=suffixMatch,proto3,oneof"` -} - -func (*HeaderMatcher_ExactMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_RegexMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_SafeRegexMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_RangeMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_PresentMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_PrefixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -func (*HeaderMatcher_SuffixMatch) isHeaderMatcher_HeaderMatchSpecifier() {} - -// Query parameter matching treats the query string of a request's :path header -// as an ampersand-separated list of keys and/or key=value elements. -// [#next-free-field: 7] -type QueryParameterMatcher struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the name of a key that must be present in the requested - // *path*'s query string. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Specifies the value of the key. If the value is absent, a request - // that contains the key in its query string will match, whether the - // key appears with a value (e.g., "?debug=true") or not (e.g., "?debug") - // - // ..attention:: - // This field is deprecated. Use an `exact` match inside the `string_match` field. - // - // Deprecated: Do not use. - Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // Specifies whether the query parameter value is a regular expression. - // Defaults to false. The entire query parameter value (i.e., the part to - // the right of the equals sign in "key=value") must match the regex. - // E.g., the regex ``\d+$`` will match *123* but not *a123* or *123a*. - // - // ..attention:: - // This field is deprecated. Use a `safe_regex` match inside the `string_match` field. - // - // Deprecated: Do not use. - Regex *wrappers.BoolValue `protobuf:"bytes,4,opt,name=regex,proto3" json:"regex,omitempty"` - // Types that are assignable to QueryParameterMatchSpecifier: - // *QueryParameterMatcher_StringMatch - // *QueryParameterMatcher_PresentMatch - QueryParameterMatchSpecifier isQueryParameterMatcher_QueryParameterMatchSpecifier `protobuf_oneof:"query_parameter_match_specifier"` -} - -func (x *QueryParameterMatcher) Reset() { - *x = QueryParameterMatcher{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParameterMatcher) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParameterMatcher) ProtoMessage() {} - -func (x *QueryParameterMatcher) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryParameterMatcher.ProtoReflect.Descriptor instead. -func (*QueryParameterMatcher) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryParameterMatcher) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// Deprecated: Do not use. -func (x *QueryParameterMatcher) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Deprecated: Do not use. -func (x *QueryParameterMatcher) GetRegex() *wrappers.BoolValue { - if x != nil { - return x.Regex - } - return nil -} - -func (m *QueryParameterMatcher) GetQueryParameterMatchSpecifier() isQueryParameterMatcher_QueryParameterMatchSpecifier { - if m != nil { - return m.QueryParameterMatchSpecifier - } - return nil -} - -func (x *QueryParameterMatcher) GetStringMatch() *matcher.StringMatcher { - if x, ok := x.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_StringMatch); ok { - return x.StringMatch - } - return nil -} - -func (x *QueryParameterMatcher) GetPresentMatch() bool { - if x, ok := x.GetQueryParameterMatchSpecifier().(*QueryParameterMatcher_PresentMatch); ok { - return x.PresentMatch - } - return false -} - -type isQueryParameterMatcher_QueryParameterMatchSpecifier interface { - isQueryParameterMatcher_QueryParameterMatchSpecifier() -} - -type QueryParameterMatcher_StringMatch struct { - // Specifies whether a query parameter value should match against a string. - StringMatch *matcher.StringMatcher `protobuf:"bytes,5,opt,name=string_match,json=stringMatch,proto3,oneof"` -} - -type QueryParameterMatcher_PresentMatch struct { - // Specifies whether a query parameter should be present. - PresentMatch bool `protobuf:"varint,6,opt,name=present_match,json=presentMatch,proto3,oneof"` -} - -func (*QueryParameterMatcher_StringMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} - -func (*QueryParameterMatcher_PresentMatch) isQueryParameterMatcher_QueryParameterMatchSpecifier() {} - -// [#next-free-field: 11] -type WeightedCluster_ClusterWeight struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the upstream cluster. The cluster must exist in the - // :ref:`cluster manager configuration `. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An integer between 0 and :ref:`total_weight - // `. When a request matches the route, - // the choice of an upstream cluster is determined by its weight. The sum of weights across all - // entries in the clusters array must add up to the total_weight, if total_weight is greater than 0. - Weight *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with - // values here taking precedence. The filter name should be specified as *envoy.lb*. - MetadataMatch *core.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` - // Specifies a list of headers to be added to requests when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` - // Specifies a list of HTTP headers that should be removed from each request when - // this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - RequestHeadersToRemove []string `protobuf:"bytes,9,rep,name=request_headers_to_remove,json=requestHeadersToRemove,proto3" json:"request_headers_to_remove,omitempty"` - // Specifies a list of headers to be added to responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - ResponseHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,5,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` - // Specifies a list of headers to be removed from responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - ResponseHeadersToRemove []string `protobuf:"bytes,6,rep,name=response_headers_to_remove,json=responseHeadersToRemove,proto3" json:"response_headers_to_remove,omitempty"` - // The per_filter_config field can be used to provide weighted cluster-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - // - // Deprecated: Do not use. - PerFilterConfig map[string]*_struct.Struct `protobuf:"bytes,8,rep,name=per_filter_config,json=perFilterConfig,proto3" json:"per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The per_filter_config field can be used to provide weighted cluster-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - TypedPerFilterConfig map[string]*any1.Any `protobuf:"bytes,10,rep,name=typed_per_filter_config,json=typedPerFilterConfig,proto3" json:"typed_per_filter_config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *WeightedCluster_ClusterWeight) Reset() { - *x = WeightedCluster_ClusterWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WeightedCluster_ClusterWeight) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WeightedCluster_ClusterWeight) ProtoMessage() {} - -func (x *WeightedCluster_ClusterWeight) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WeightedCluster_ClusterWeight.ProtoReflect.Descriptor instead. -func (*WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *WeightedCluster_ClusterWeight) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *WeightedCluster_ClusterWeight) GetWeight() *wrappers.UInt32Value { - if x != nil { - return x.Weight - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *core.Metadata { - if x != nil { - return x.MetadataMatch - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.RequestHeadersToAdd - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetRequestHeadersToRemove() []string { - if x != nil { - return x.RequestHeadersToRemove - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToAdd() []*core.HeaderValueOption { - if x != nil { - return x.ResponseHeadersToAdd - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetResponseHeadersToRemove() []string { - if x != nil { - return x.ResponseHeadersToRemove - } - return nil -} - -// Deprecated: Do not use. -func (x *WeightedCluster_ClusterWeight) GetPerFilterConfig() map[string]*_struct.Struct { - if x != nil { - return x.PerFilterConfig - } - return nil -} - -func (x *WeightedCluster_ClusterWeight) GetTypedPerFilterConfig() map[string]*any1.Any { - if x != nil { - return x.TypedPerFilterConfig - } - return nil -} - -type RouteMatch_GrpcRouteMatchOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RouteMatch_GrpcRouteMatchOptions) Reset() { - *x = RouteMatch_GrpcRouteMatchOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_GrpcRouteMatchOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_GrpcRouteMatchOptions) ProtoMessage() {} - -func (x *RouteMatch_GrpcRouteMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_GrpcRouteMatchOptions.ProtoReflect.Descriptor instead. -func (*RouteMatch_GrpcRouteMatchOptions) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{4, 0} -} - -type RouteMatch_TlsContextMatchOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If specified, the route will match against whether or not a certificate is presented. - // If not specified, certificate presentation status (true or false) will not be considered when route matching. - Presented *wrappers.BoolValue `protobuf:"bytes,1,opt,name=presented,proto3" json:"presented,omitempty"` - // If specified, the route will match against whether or not a certificate is validated. - // If not specified, certificate validation status (true or false) will not be considered when route matching. - Validated *wrappers.BoolValue `protobuf:"bytes,2,opt,name=validated,proto3" json:"validated,omitempty"` -} - -func (x *RouteMatch_TlsContextMatchOptions) Reset() { - *x = RouteMatch_TlsContextMatchOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteMatch_TlsContextMatchOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteMatch_TlsContextMatchOptions) ProtoMessage() {} - -func (x *RouteMatch_TlsContextMatchOptions) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteMatch_TlsContextMatchOptions.ProtoReflect.Descriptor instead. -func (*RouteMatch_TlsContextMatchOptions) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{4, 1} -} - -func (x *RouteMatch_TlsContextMatchOptions) GetPresented() *wrappers.BoolValue { - if x != nil { - return x.Presented - } - return nil -} - -func (x *RouteMatch_TlsContextMatchOptions) GetValidated() *wrappers.BoolValue { - if x != nil { - return x.Validated - } - return nil -} - -// The router is capable of shadowing traffic from one cluster to another. The current -// implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to -// respond before returning the response from the primary cluster. All normal statistics are -// collected for the shadow cluster making this feature useful for testing. -// -// During shadowing, the host/authority header is altered such that *-shadow* is appended. This is -// useful for logging. For example, *cluster1* becomes *cluster1-shadow*. -// -// .. note:: -// -// Shadowing will not be triggered if the primary cluster does not exist. -type RouteAction_RequestMirrorPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration. - Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // If not specified, all requests to the target cluster will be mirrored. If - // specified, Envoy will lookup the runtime key to get the % of requests to - // mirror. Valid values are from 0 to 10000, allowing for increments of - // 0.01% of requests to be mirrored. If the runtime key is specified in the - // configuration but not present in runtime, 0 is the default and thus 0% of - // requests will be mirrored. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`runtime_fraction - // ` - // field instead. Mirroring occurs if both this and - // ` - // are not set. - // - // Deprecated: Do not use. - RuntimeKey string `protobuf:"bytes,2,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` - // If not specified, all requests to the target cluster will be mirrored. - // - // If specified, this field takes precedence over the `runtime_key` field and requests must also - // fall under the percentage of matches indicated by this field. - // - // For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the request will be mirrored. - RuntimeFraction *core.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` - // Determines if the trace span should be sampled. Defaults to true. - TraceSampled *wrappers.BoolValue `protobuf:"bytes,4,opt,name=trace_sampled,json=traceSampled,proto3" json:"trace_sampled,omitempty"` -} - -func (x *RouteAction_RequestMirrorPolicy) Reset() { - *x = RouteAction_RequestMirrorPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_RequestMirrorPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} - -func (x *RouteAction_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_RequestMirrorPolicy.ProtoReflect.Descriptor instead. -func (*RouteAction_RequestMirrorPolicy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *RouteAction_RequestMirrorPolicy) GetCluster() string { - if x != nil { - return x.Cluster - } - return "" -} - -// Deprecated: Do not use. -func (x *RouteAction_RequestMirrorPolicy) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -func (x *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *core.RuntimeFractionalPercent { - if x != nil { - return x.RuntimeFraction - } - return nil -} - -func (x *RouteAction_RequestMirrorPolicy) GetTraceSampled() *wrappers.BoolValue { - if x != nil { - return x.TraceSampled - } - return nil -} - -// Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer -// `. -// [#next-free-field: 7] -type RouteAction_HashPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to PolicySpecifier: - // *RouteAction_HashPolicy_Header_ - // *RouteAction_HashPolicy_Cookie_ - // *RouteAction_HashPolicy_ConnectionProperties_ - // *RouteAction_HashPolicy_QueryParameter_ - // *RouteAction_HashPolicy_FilterState_ - PolicySpecifier isRouteAction_HashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` - // The flag that short-circuits the hash computing. This field provides a - // 'fallback' style of configuration: "if a terminal policy doesn't work, - // fallback to rest of the policy list", it saves time when the terminal - // policy works. - // - // If true, and there is already a hash computed, ignore rest of the - // list of hash polices. - // For example, if the following hash methods are configured: - // - // ========= ======== - // specifier terminal - // ========= ======== - // Header A true - // Header B false - // Header C false - // ========= ======== - // - // The generateHash process ends if policy "header A" generates a hash, as - // it's a terminal policy. - Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"` -} - -func (x *RouteAction_HashPolicy) Reset() { - *x = RouteAction_HashPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy) ProtoMessage() {} - -func (x *RouteAction_HashPolicy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 1} -} - -func (m *RouteAction_HashPolicy) GetPolicySpecifier() isRouteAction_HashPolicy_PolicySpecifier { - if m != nil { - return m.PolicySpecifier - } - return nil -} - -func (x *RouteAction_HashPolicy) GetHeader() *RouteAction_HashPolicy_Header { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_Header_); ok { - return x.Header - } - return nil -} - -func (x *RouteAction_HashPolicy) GetCookie() *RouteAction_HashPolicy_Cookie { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_Cookie_); ok { - return x.Cookie - } - return nil -} - -func (x *RouteAction_HashPolicy) GetConnectionProperties() *RouteAction_HashPolicy_ConnectionProperties { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_ConnectionProperties_); ok { - return x.ConnectionProperties - } - return nil -} - -func (x *RouteAction_HashPolicy) GetQueryParameter() *RouteAction_HashPolicy_QueryParameter { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_QueryParameter_); ok { - return x.QueryParameter - } - return nil -} - -func (x *RouteAction_HashPolicy) GetFilterState() *RouteAction_HashPolicy_FilterState { - if x, ok := x.GetPolicySpecifier().(*RouteAction_HashPolicy_FilterState_); ok { - return x.FilterState - } - return nil -} - -func (x *RouteAction_HashPolicy) GetTerminal() bool { - if x != nil { - return x.Terminal - } - return false -} - -type isRouteAction_HashPolicy_PolicySpecifier interface { - isRouteAction_HashPolicy_PolicySpecifier() -} - -type RouteAction_HashPolicy_Header_ struct { - // Header hash policy. - Header *RouteAction_HashPolicy_Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` -} - -type RouteAction_HashPolicy_Cookie_ struct { - // Cookie hash policy. - Cookie *RouteAction_HashPolicy_Cookie `protobuf:"bytes,2,opt,name=cookie,proto3,oneof"` -} - -type RouteAction_HashPolicy_ConnectionProperties_ struct { - // Connection properties hash policy. - ConnectionProperties *RouteAction_HashPolicy_ConnectionProperties `protobuf:"bytes,3,opt,name=connection_properties,json=connectionProperties,proto3,oneof"` -} - -type RouteAction_HashPolicy_QueryParameter_ struct { - // Query parameter hash policy. - QueryParameter *RouteAction_HashPolicy_QueryParameter `protobuf:"bytes,5,opt,name=query_parameter,json=queryParameter,proto3,oneof"` -} - -type RouteAction_HashPolicy_FilterState_ struct { - // Filter state hash policy. - FilterState *RouteAction_HashPolicy_FilterState `protobuf:"bytes,6,opt,name=filter_state,json=filterState,proto3,oneof"` -} - -func (*RouteAction_HashPolicy_Header_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_Cookie_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_ConnectionProperties_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_QueryParameter_) isRouteAction_HashPolicy_PolicySpecifier() {} - -func (*RouteAction_HashPolicy_FilterState_) isRouteAction_HashPolicy_PolicySpecifier() {} - -// Allows enabling and disabling upgrades on a per-route basis. -// This overrides any enabled/disabled upgrade filter chain specified in the -// HttpConnectionManager -// :ref:`upgrade_configs -// ` -// but does not affect any custom filter chain specified there. -type RouteAction_UpgradeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The case-insensitive name of this upgrade, e.g. "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] will be proxied upstream. - UpgradeType string `protobuf:"bytes,1,opt,name=upgrade_type,json=upgradeType,proto3" json:"upgrade_type,omitempty"` - // Determines if upgrades are available on this route. Defaults to true. - Enabled *wrappers.BoolValue `protobuf:"bytes,2,opt,name=enabled,proto3" json:"enabled,omitempty"` -} - -func (x *RouteAction_UpgradeConfig) Reset() { - *x = RouteAction_UpgradeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_UpgradeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_UpgradeConfig) ProtoMessage() {} - -func (x *RouteAction_UpgradeConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_UpgradeConfig.ProtoReflect.Descriptor instead. -func (*RouteAction_UpgradeConfig) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 2} -} - -func (x *RouteAction_UpgradeConfig) GetUpgradeType() string { - if x != nil { - return x.UpgradeType - } - return "" -} - -func (x *RouteAction_UpgradeConfig) GetEnabled() *wrappers.BoolValue { - if x != nil { - return x.Enabled - } - return nil -} - -type RouteAction_HashPolicy_Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the request header that will be used to obtain the hash - // key. If the request header is not present, no hash will be produced. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` -} - -func (x *RouteAction_HashPolicy_Header) Reset() { - *x = RouteAction_HashPolicy_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_Header) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_Header) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_Header.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_Header) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 1, 0} -} - -func (x *RouteAction_HashPolicy_Header) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -// Envoy supports two types of cookie affinity: -// -// 1. Passive. Envoy takes a cookie that's present in the cookies header and -// hashes on its value. -// -// 2. Generated. Envoy generates and sets a cookie with an expiration (TTL) -// on the first request from the client in its response to the client, -// based on the endpoint the request gets sent to. The client then -// presents this on the next and all subsequent requests. The hash of -// this is sufficient to ensure these requests get sent to the same -// endpoint. The cookie is generated by hashing the source and -// destination ports and addresses so that multiple independent HTTP2 -// streams on the same connection will independently receive the same -// cookie, even if they arrive at the Envoy simultaneously. -type RouteAction_HashPolicy_Cookie struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the cookie that will be used to obtain the hash key. If the - // cookie is not present and ttl below is not set, no hash will be - // produced. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // If specified, a cookie with the TTL will be generated if the cookie is - // not present. If the TTL is present and zero, the generated cookie will - // be a session cookie. - Ttl *duration.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` - // The name of the path for the cookie. If no path is specified here, no path - // will be set for the cookie. - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *RouteAction_HashPolicy_Cookie) Reset() { - *x = RouteAction_HashPolicy_Cookie{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_Cookie) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_Cookie) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_Cookie) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_Cookie.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_Cookie) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 1, 1} -} - -func (x *RouteAction_HashPolicy_Cookie) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RouteAction_HashPolicy_Cookie) GetTtl() *duration.Duration { - if x != nil { - return x.Ttl - } - return nil -} - -func (x *RouteAction_HashPolicy_Cookie) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type RouteAction_HashPolicy_ConnectionProperties struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Hash on source IP address. - SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) Reset() { - *x = RouteAction_HashPolicy_ConnectionProperties{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_ConnectionProperties) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_ConnectionProperties) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_ConnectionProperties.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_ConnectionProperties) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 1, 2} -} - -func (x *RouteAction_HashPolicy_ConnectionProperties) GetSourceIp() bool { - if x != nil { - return x.SourceIp - } - return false -} - -type RouteAction_HashPolicy_QueryParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the URL query parameter that will be used to obtain the hash - // key. If the parameter is not present, no hash will be produced. Query - // parameter names are case-sensitive. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *RouteAction_HashPolicy_QueryParameter) Reset() { - *x = RouteAction_HashPolicy_QueryParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_QueryParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_QueryParameter) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_QueryParameter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_QueryParameter.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_QueryParameter) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 1, 3} -} - -func (x *RouteAction_HashPolicy_QueryParameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type RouteAction_HashPolicy_FilterState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the Object in the per-request filterState, which is an - // Envoy::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Hashable, no hash will be produced. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *RouteAction_HashPolicy_FilterState) Reset() { - *x = RouteAction_HashPolicy_FilterState{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RouteAction_HashPolicy_FilterState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RouteAction_HashPolicy_FilterState) ProtoMessage() {} - -func (x *RouteAction_HashPolicy_FilterState) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RouteAction_HashPolicy_FilterState.ProtoReflect.Descriptor instead. -func (*RouteAction_HashPolicy_FilterState) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{6, 1, 4} -} - -func (x *RouteAction_HashPolicy_FilterState) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -type RetryPolicy_RetryPriority struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to ConfigType: - // *RetryPolicy_RetryPriority_Config - // *RetryPolicy_RetryPriority_TypedConfig - ConfigType isRetryPolicy_RetryPriority_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *RetryPolicy_RetryPriority) Reset() { - *x = RetryPolicy_RetryPriority{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryPriority) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryPriority) ProtoMessage() {} - -func (x *RetryPolicy_RetryPriority) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryPriority.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryPriority) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *RetryPolicy_RetryPriority) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *RetryPolicy_RetryPriority) GetConfigType() isRetryPolicy_RetryPriority_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *RetryPolicy_RetryPriority) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryPriority_Config); ok { - return x.Config - } - return nil -} - -func (x *RetryPolicy_RetryPriority) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryPriority_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isRetryPolicy_RetryPriority_ConfigType interface { - isRetryPolicy_RetryPriority_ConfigType() -} - -type RetryPolicy_RetryPriority_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} - -type RetryPolicy_RetryPriority_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryPriority_Config) isRetryPolicy_RetryPriority_ConfigType() {} - -func (*RetryPolicy_RetryPriority_TypedConfig) isRetryPolicy_RetryPriority_ConfigType() {} - -type RetryPolicy_RetryHostPredicate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Types that are assignable to ConfigType: - // *RetryPolicy_RetryHostPredicate_Config - // *RetryPolicy_RetryHostPredicate_TypedConfig - ConfigType isRetryPolicy_RetryHostPredicate_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *RetryPolicy_RetryHostPredicate) Reset() { - *x = RetryPolicy_RetryHostPredicate{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryHostPredicate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryHostPredicate) ProtoMessage() {} - -func (x *RetryPolicy_RetryHostPredicate) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryHostPredicate.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryHostPredicate) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{7, 1} -} - -func (x *RetryPolicy_RetryHostPredicate) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *RetryPolicy_RetryHostPredicate) GetConfigType() isRetryPolicy_RetryHostPredicate_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *RetryPolicy_RetryHostPredicate) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryHostPredicate_Config); ok { - return x.Config - } - return nil -} - -func (x *RetryPolicy_RetryHostPredicate) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*RetryPolicy_RetryHostPredicate_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isRetryPolicy_RetryHostPredicate_ConfigType interface { - isRetryPolicy_RetryHostPredicate_ConfigType() -} - -type RetryPolicy_RetryHostPredicate_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} - -type RetryPolicy_RetryHostPredicate_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*RetryPolicy_RetryHostPredicate_Config) isRetryPolicy_RetryHostPredicate_ConfigType() {} - -func (*RetryPolicy_RetryHostPredicate_TypedConfig) isRetryPolicy_RetryHostPredicate_ConfigType() {} - -type RetryPolicy_RetryBackOff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the base interval between retries. This parameter is required and must be greater - // than zero. Values less than 1 ms are rounded up to 1 ms. - // See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's - // back-off algorithm. - BaseInterval *duration.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"` - // Specifies the maximum interval between retries. This parameter is optional, but must be - // greater than or equal to the `base_interval` if set. The default is 10 times the - // `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion - // of Envoy's back-off algorithm. - MaxInterval *duration.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"` -} - -func (x *RetryPolicy_RetryBackOff) Reset() { - *x = RetryPolicy_RetryBackOff{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RetryPolicy_RetryBackOff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RetryPolicy_RetryBackOff) ProtoMessage() {} - -func (x *RetryPolicy_RetryBackOff) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RetryPolicy_RetryBackOff.ProtoReflect.Descriptor instead. -func (*RetryPolicy_RetryBackOff) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{7, 2} -} - -func (x *RetryPolicy_RetryBackOff) GetBaseInterval() *duration.Duration { - if x != nil { - return x.BaseInterval - } - return nil -} - -func (x *RetryPolicy_RetryBackOff) GetMaxInterval() *duration.Duration { - if x != nil { - return x.MaxInterval - } - return nil -} - -// [#next-free-field: 7] -type RateLimit_Action struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ActionSpecifier: - // *RateLimit_Action_SourceCluster_ - // *RateLimit_Action_DestinationCluster_ - // *RateLimit_Action_RequestHeaders_ - // *RateLimit_Action_RemoteAddress_ - // *RateLimit_Action_GenericKey_ - // *RateLimit_Action_HeaderValueMatch_ - ActionSpecifier isRateLimit_Action_ActionSpecifier `protobuf_oneof:"action_specifier"` -} - -func (x *RateLimit_Action) Reset() { - *x = RateLimit_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action) ProtoMessage() {} - -func (x *RateLimit_Action) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action.ProtoReflect.Descriptor instead. -func (*RateLimit_Action) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14, 0} -} - -func (m *RateLimit_Action) GetActionSpecifier() isRateLimit_Action_ActionSpecifier { - if m != nil { - return m.ActionSpecifier - } - return nil -} - -func (x *RateLimit_Action) GetSourceCluster() *RateLimit_Action_SourceCluster { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_SourceCluster_); ok { - return x.SourceCluster - } - return nil -} - -func (x *RateLimit_Action) GetDestinationCluster() *RateLimit_Action_DestinationCluster { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_DestinationCluster_); ok { - return x.DestinationCluster - } - return nil -} - -func (x *RateLimit_Action) GetRequestHeaders() *RateLimit_Action_RequestHeaders { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_RequestHeaders_); ok { - return x.RequestHeaders - } - return nil -} - -func (x *RateLimit_Action) GetRemoteAddress() *RateLimit_Action_RemoteAddress { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_RemoteAddress_); ok { - return x.RemoteAddress - } - return nil -} - -func (x *RateLimit_Action) GetGenericKey() *RateLimit_Action_GenericKey { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_GenericKey_); ok { - return x.GenericKey - } - return nil -} - -func (x *RateLimit_Action) GetHeaderValueMatch() *RateLimit_Action_HeaderValueMatch { - if x, ok := x.GetActionSpecifier().(*RateLimit_Action_HeaderValueMatch_); ok { - return x.HeaderValueMatch - } - return nil -} - -type isRateLimit_Action_ActionSpecifier interface { - isRateLimit_Action_ActionSpecifier() -} - -type RateLimit_Action_SourceCluster_ struct { - // Rate limit on source cluster. - SourceCluster *RateLimit_Action_SourceCluster `protobuf:"bytes,1,opt,name=source_cluster,json=sourceCluster,proto3,oneof"` -} - -type RateLimit_Action_DestinationCluster_ struct { - // Rate limit on destination cluster. - DestinationCluster *RateLimit_Action_DestinationCluster `protobuf:"bytes,2,opt,name=destination_cluster,json=destinationCluster,proto3,oneof"` -} - -type RateLimit_Action_RequestHeaders_ struct { - // Rate limit on request headers. - RequestHeaders *RateLimit_Action_RequestHeaders `protobuf:"bytes,3,opt,name=request_headers,json=requestHeaders,proto3,oneof"` -} - -type RateLimit_Action_RemoteAddress_ struct { - // Rate limit on remote address. - RemoteAddress *RateLimit_Action_RemoteAddress `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3,oneof"` -} - -type RateLimit_Action_GenericKey_ struct { - // Rate limit on a generic key. - GenericKey *RateLimit_Action_GenericKey `protobuf:"bytes,5,opt,name=generic_key,json=genericKey,proto3,oneof"` -} - -type RateLimit_Action_HeaderValueMatch_ struct { - // Rate limit on the existence of request headers. - HeaderValueMatch *RateLimit_Action_HeaderValueMatch `protobuf:"bytes,6,opt,name=header_value_match,json=headerValueMatch,proto3,oneof"` -} - -func (*RateLimit_Action_SourceCluster_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_DestinationCluster_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_RequestHeaders_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_RemoteAddress_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_GenericKey_) isRateLimit_Action_ActionSpecifier() {} - -func (*RateLimit_Action_HeaderValueMatch_) isRateLimit_Action_ActionSpecifier() {} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("source_cluster", "") -// -// is derived from the :option:`--service-cluster` option. -type RateLimit_Action_SourceCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_SourceCluster) Reset() { - *x = RateLimit_Action_SourceCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_SourceCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_SourceCluster) ProtoMessage() {} - -func (x *RateLimit_Action_SourceCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_SourceCluster.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_SourceCluster) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14, 0, 0} -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("destination_cluster", "") -// -// Once a request matches against a route table rule, a routed cluster is determined by one of -// the following :ref:`route table configuration ` -// settings: -// -// * :ref:`cluster ` indicates the upstream cluster -// to route to. -// * :ref:`weighted_clusters ` -// chooses a cluster randomly from a set of clusters with attributed weight. -// * :ref:`cluster_header ` indicates which -// header in the request contains the target cluster. -type RateLimit_Action_DestinationCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_DestinationCluster) Reset() { - *x = RateLimit_Action_DestinationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_DestinationCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_DestinationCluster) ProtoMessage() {} - -func (x *RateLimit_Action_DestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_DestinationCluster.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_DestinationCluster) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14, 0, 1} -} - -// The following descriptor entry is appended when a header contains a key that matches the -// *header_name*: -// -// .. code-block:: cpp -// -// ("", "") -type RateLimit_Action_RequestHeaders struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The header name to be queried from the request headers. The header’s - // value is used to populate the value of the descriptor entry for the - // descriptor_key. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` -} - -func (x *RateLimit_Action_RequestHeaders) Reset() { - *x = RateLimit_Action_RequestHeaders{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_RequestHeaders) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_RequestHeaders) ProtoMessage() {} - -func (x *RateLimit_Action_RequestHeaders) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_RequestHeaders.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_RequestHeaders) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14, 0, 2} -} - -func (x *RateLimit_Action_RequestHeaders) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -func (x *RateLimit_Action_RequestHeaders) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -// The following descriptor entry is appended to the descriptor and is populated using the -// trusted address from :ref:`x-forwarded-for `: -// -// .. code-block:: cpp -// -// ("remote_address", "") -type RateLimit_Action_RemoteAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimit_Action_RemoteAddress) Reset() { - *x = RateLimit_Action_RemoteAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_RemoteAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_RemoteAddress) ProtoMessage() {} - -func (x *RateLimit_Action_RemoteAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_RemoteAddress.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_RemoteAddress) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14, 0, 3} -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("generic_key", "") -type RateLimit_Action_GenericKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` -} - -func (x *RateLimit_Action_GenericKey) Reset() { - *x = RateLimit_Action_GenericKey{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_GenericKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_GenericKey) ProtoMessage() {} - -func (x *RateLimit_Action_GenericKey) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_GenericKey.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_GenericKey) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14, 0, 4} -} - -func (x *RateLimit_Action_GenericKey) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("header_match", "") -type RateLimit_Action_HeaderValueMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - // If set to true, the action will append a descriptor entry when the - // request matches the headers. If set to false, the action will append a - // descriptor entry when the request does not match the headers. The - // default value is true. - ExpectMatch *wrappers.BoolValue `protobuf:"bytes,2,opt,name=expect_match,json=expectMatch,proto3" json:"expect_match,omitempty"` - // Specifies a set of headers that the rate limit action should match - // on. The action will check the request’s headers against all the - // specified headers in the config. A match will happen if all the - // headers in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - Headers []*HeaderMatcher `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RateLimit_Action_HeaderValueMatch) Reset() { - *x = RateLimit_Action_HeaderValueMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimit_Action_HeaderValueMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimit_Action_HeaderValueMatch) ProtoMessage() {} - -func (x *RateLimit_Action_HeaderValueMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_route_route_components_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RateLimit_Action_HeaderValueMatch.ProtoReflect.Descriptor instead. -func (*RateLimit_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_route_route_components_proto_rawDescGZIP(), []int{14, 0, 5} -} - -func (x *RateLimit_Action_HeaderValueMatch) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimit_Action_HeaderValueMatch) GetExpectMatch() *wrappers.BoolValue { - if x != nil { - return x.ExpectMatch - } - return nil -} - -func (x *RateLimit_Action_HeaderValueMatch) GetHeaders() []*HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -var File_envoy_api_v2_route_route_components_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_route_route_components_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x1a, - 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, - 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, - 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, - 0x0d, 0x0a, 0x0b, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0x42, - 0x0f, 0x92, 0x01, 0x0c, 0x08, 0x01, 0x22, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, - 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x5d, 0x0a, 0x0b, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, - 0x73, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x54, 0x6c, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x76, - 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, - 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, - 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x16, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, - 0x5f, 0x61, 0x64, 0x64, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, - 0x12, 0x39, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, - 0x41, 0x64, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x04, - 0x63, 0x6f, 0x72, 0x73, 0x12, 0x64, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, - 0x2e, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x17, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x1d, - 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x1a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x48, 0x0a, 0x21, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, - 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x69, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x72, 0x65, 0x74, - 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, - 0x19, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, - 0x0a, 0x0c, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x68, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x14, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x3a, 0x0a, 0x12, 0x54, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, - 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x4f, 0x4e, 0x4c, - 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x09, - 0x10, 0x0a, 0x22, 0x3c, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xe6, 0x0a, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, - 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, - 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, - 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, - 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, - 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x53, 0x0a, 0x0f, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, - 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x3b, 0x0a, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x5e, 0x0a, - 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x70, 0x65, - 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6a, 0x0a, - 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, - 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x16, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, - 0x39, 0x0a, 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x0c, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, - 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, - 0x64, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, - 0x35, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, - 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x60, 0x0a, 0x1e, 0x70, 0x65, 0x72, 0x5f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x70, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x14, 0x50, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, - 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, - 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x22, 0x90, 0x09, 0x0a, 0x0f, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x57, 0x0a, - 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, - 0x02, 0x28, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0xab, - 0x07, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, - 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x42, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x64, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, - 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa, - 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x39, 0x0a, - 0x19, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x09, 0xfa, 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, - 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x76, 0x0a, - 0x11, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x50, 0x65, 0x72, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x17, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, - 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x79, 0x70, 0x65, 0x64, 0x50, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x5b, 0x0a, 0x14, 0x50, 0x65, - 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5d, 0x0a, 0x19, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0xc8, 0x06, 0x0a, - 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x28, 0x0a, 0x05, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, - 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x05, - 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x4b, 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, - 0x67, 0x65, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, - 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, - 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x10, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, - 0x0f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x48, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, - 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x56, 0x0a, 0x0b, 0x74, 0x6c, - 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x1a, 0x17, 0x0a, 0x15, 0x47, 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x8c, 0x01, 0x0a, 0x16, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, - 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, - 0x12, 0x38, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x64, 0x42, 0x15, 0x0a, 0x0e, 0x70, 0x61, - 0x74, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, - 0x01, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xaa, 0x05, 0x0a, 0x0a, 0x43, 0x6f, 0x72, 0x73, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0x18, 0x01, - 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x42, - 0x0f, 0x18, 0x01, 0xfa, 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, - 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x12, 0x5c, 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, - 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x61, 0x6c, - 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x73, 0x12, 0x40, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x52, 0x0a, 0x0e, 0x73, - 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x52, 0x0d, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, - 0x13, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x22, 0xfb, 0x1b, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x48, 0x00, - 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0e, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, - 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x52, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x1f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0d, 0x70, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x20, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x52, - 0x0c, 0x72, 0x65, 0x67, 0x65, 0x78, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x4c, 0x0a, - 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, - 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, 0x01, 0x52, 0x0b, - 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x11, 0x61, - 0x75, 0x74, 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x48, 0x01, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x61, 0x0a, 0x18, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, - 0x01, 0xc8, 0x01, 0x00, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x15, 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, - 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, - 0x01, 0x52, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, - 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, - 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, - 0x4f, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x21, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x6b, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, - 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x6b, 0x0a, - 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, - 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x08, 0x70, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4f, 0x0a, 0x16, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, - 0x76, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x13, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0b, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x32, 0x0a, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x04, 0x63, 0x6f, 0x72, 0x73, 0x12, 0x43, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, - 0x47, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x67, 0x72, 0x70, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x56, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x70, - 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x52, 0x0a, 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, - 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x73, 0x12, 0x42, 0x0a, 0x0c, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x48, 0x65, 0x64, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x68, 0x65, 0x64, - 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0xfc, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, - 0x05, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x56, - 0x0a, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, - 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x1a, 0xc6, 0x06, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4b, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, - 0x12, 0x76, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x48, 0x00, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x0f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x5b, - 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x1a, 0x38, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, - 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x1a, 0x66, 0x0a, 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x33, 0x0a, 0x14, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x1a, 0x2d, - 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x28, 0x0a, - 0x0b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x20, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x1a, 0x75, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x2e, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, - 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x45, 0x0a, 0x1b, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, - 0x45, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x22, 0x5a, - 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x41, 0x53, 0x53, - 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, - 0x4c, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, - 0x48, 0x41, 0x4e, 0x44, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, - 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, - 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, - 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, 0x04, 0x08, 0x16, 0x10, 0x17, 0x4a, 0x04, 0x08, 0x15, - 0x10, 0x16, 0x22, 0xf3, 0x09, 0x0a, 0x0b, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x79, 0x4f, 0x6e, 0x12, 0x3d, 0x0a, - 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0f, - 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0d, 0x70, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x54, 0x0a, 0x0e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, - 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, - 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x12, 0x72, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, - 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x74, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4d, 0x61, 0x78, 0x41, 0x74, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x66, 0x66, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, - 0x66, 0x52, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x12, - 0x4e, 0x0a, 0x11, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x10, 0x72, - 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x5d, 0x0a, 0x19, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x72, 0x65, 0x74, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0xad, - 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, - 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xb2, - 0x01, 0x0a, 0x12, 0x52, 0x65, 0x74, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x65, 0x64, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, - 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x1a, 0xa2, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0x61, 0x63, - 0x6b, 0x4f, 0x66, 0x66, 0x12, 0x4a, 0x0a, 0x0d, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, - 0x2a, 0x00, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x78, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xf2, 0x01, 0x0a, 0x0b, 0x48, 0x65, 0x64, - 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x50, 0x0a, 0x10, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x59, 0x0a, 0x19, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, - 0x68, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x68, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x6f, - 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, - 0x50, 0x65, 0x72, 0x54, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xdd, 0x04, - 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x27, 0x0a, 0x0e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x68, 0x74, 0x74, 0x70, - 0x73, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a, 0x0f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x64, 0x69, - 0x72, 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x64, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, - 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x72, - 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x0d, 0x70, - 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, - 0x01, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, - 0x34, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, - 0x02, 0xc8, 0x01, 0x00, 0x48, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x70, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x77, - 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x5f, - 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x45, 0x5f, - 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x45, 0x4d, 0x50, 0x4f, - 0x52, 0x41, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, - 0x16, 0x0a, 0x12, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x44, - 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x04, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x42, 0x18, 0x0a, 0x16, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x6d, 0x0a, - 0x14, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x10, 0xd8, 0x04, 0x28, - 0x64, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x04, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x6c, 0x0a, 0x09, - 0x44, 0x65, 0x63, 0x6f, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x09, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x22, 0xa6, 0x02, 0x0a, 0x07, 0x54, - 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x46, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x46, - 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, - 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x48, 0x0a, 0x10, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, - 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, - 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, - 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, - 0x61, 0x67, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, - 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x08, - 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x22, 0xd3, 0x09, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3b, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x07, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x9d, 0x08, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x5b, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, - 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, - 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6a, - 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x0f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x5b, 0x0a, 0x0e, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x00, 0x52, - 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x65, 0x0a, 0x12, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, - 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x1a, 0x0f, 0x0a, 0x0d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x1a, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x70, 0x0a, 0x0e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, - 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0d, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x1a, 0x0f, 0x0a, 0x0d, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x40, 0x0a, 0x0a, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xcc, - 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, - 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x45, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0x17, 0x0a, - 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xdf, 0x03, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, - 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x65, - 0x78, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x33, - 0x0a, 0x0b, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, - 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x4c, 0x0a, 0x10, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, - 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x0e, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x39, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, - 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x20, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x74, - 0x63, 0x68, 0x42, 0x18, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, 0x04, 0x08, 0x02, - 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0xaf, 0x02, 0x0a, 0x15, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x08, 0x18, 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0x18, - 0x01, 0xb8, 0xee, 0xf2, 0xd2, 0x05, 0x01, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x50, - 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, - 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x21, 0x0a, 0x1f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x9a, 0x01, 0x0a, 0x20, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x42, - 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, - 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, - 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_route_route_components_proto_rawDescOnce sync.Once - file_envoy_api_v2_route_route_components_proto_rawDescData = file_envoy_api_v2_route_route_components_proto_rawDesc -) - -func file_envoy_api_v2_route_route_components_proto_rawDescGZIP() []byte { - file_envoy_api_v2_route_route_components_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_route_route_components_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_route_route_components_proto_rawDescData) - }) - return file_envoy_api_v2_route_route_components_proto_rawDescData -} - -var file_envoy_api_v2_route_route_components_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_envoy_api_v2_route_route_components_proto_msgTypes = make([]protoimpl.MessageInfo, 44) -var file_envoy_api_v2_route_route_components_proto_goTypes = []interface{}{ - (VirtualHost_TlsRequirementType)(0), // 0: envoy.api.v2.route.VirtualHost.TlsRequirementType - (RouteAction_ClusterNotFoundResponseCode)(0), // 1: envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode - (RouteAction_InternalRedirectAction)(0), // 2: envoy.api.v2.route.RouteAction.InternalRedirectAction - (RedirectAction_RedirectResponseCode)(0), // 3: envoy.api.v2.route.RedirectAction.RedirectResponseCode - (*VirtualHost)(nil), // 4: envoy.api.v2.route.VirtualHost - (*FilterAction)(nil), // 5: envoy.api.v2.route.FilterAction - (*Route)(nil), // 6: envoy.api.v2.route.Route - (*WeightedCluster)(nil), // 7: envoy.api.v2.route.WeightedCluster - (*RouteMatch)(nil), // 8: envoy.api.v2.route.RouteMatch - (*CorsPolicy)(nil), // 9: envoy.api.v2.route.CorsPolicy - (*RouteAction)(nil), // 10: envoy.api.v2.route.RouteAction - (*RetryPolicy)(nil), // 11: envoy.api.v2.route.RetryPolicy - (*HedgePolicy)(nil), // 12: envoy.api.v2.route.HedgePolicy - (*RedirectAction)(nil), // 13: envoy.api.v2.route.RedirectAction - (*DirectResponseAction)(nil), // 14: envoy.api.v2.route.DirectResponseAction - (*Decorator)(nil), // 15: envoy.api.v2.route.Decorator - (*Tracing)(nil), // 16: envoy.api.v2.route.Tracing - (*VirtualCluster)(nil), // 17: envoy.api.v2.route.VirtualCluster - (*RateLimit)(nil), // 18: envoy.api.v2.route.RateLimit - (*HeaderMatcher)(nil), // 19: envoy.api.v2.route.HeaderMatcher - (*QueryParameterMatcher)(nil), // 20: envoy.api.v2.route.QueryParameterMatcher - nil, // 21: envoy.api.v2.route.VirtualHost.PerFilterConfigEntry - nil, // 22: envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry - nil, // 23: envoy.api.v2.route.Route.PerFilterConfigEntry - nil, // 24: envoy.api.v2.route.Route.TypedPerFilterConfigEntry - (*WeightedCluster_ClusterWeight)(nil), // 25: envoy.api.v2.route.WeightedCluster.ClusterWeight - nil, // 26: envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry - nil, // 27: envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - (*RouteMatch_GrpcRouteMatchOptions)(nil), // 28: envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions - (*RouteMatch_TlsContextMatchOptions)(nil), // 29: envoy.api.v2.route.RouteMatch.TlsContextMatchOptions - (*RouteAction_RequestMirrorPolicy)(nil), // 30: envoy.api.v2.route.RouteAction.RequestMirrorPolicy - (*RouteAction_HashPolicy)(nil), // 31: envoy.api.v2.route.RouteAction.HashPolicy - (*RouteAction_UpgradeConfig)(nil), // 32: envoy.api.v2.route.RouteAction.UpgradeConfig - (*RouteAction_HashPolicy_Header)(nil), // 33: envoy.api.v2.route.RouteAction.HashPolicy.Header - (*RouteAction_HashPolicy_Cookie)(nil), // 34: envoy.api.v2.route.RouteAction.HashPolicy.Cookie - (*RouteAction_HashPolicy_ConnectionProperties)(nil), // 35: envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties - (*RouteAction_HashPolicy_QueryParameter)(nil), // 36: envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter - (*RouteAction_HashPolicy_FilterState)(nil), // 37: envoy.api.v2.route.RouteAction.HashPolicy.FilterState - (*RetryPolicy_RetryPriority)(nil), // 38: envoy.api.v2.route.RetryPolicy.RetryPriority - (*RetryPolicy_RetryHostPredicate)(nil), // 39: envoy.api.v2.route.RetryPolicy.RetryHostPredicate - (*RetryPolicy_RetryBackOff)(nil), // 40: envoy.api.v2.route.RetryPolicy.RetryBackOff - (*RateLimit_Action)(nil), // 41: envoy.api.v2.route.RateLimit.Action - (*RateLimit_Action_SourceCluster)(nil), // 42: envoy.api.v2.route.RateLimit.Action.SourceCluster - (*RateLimit_Action_DestinationCluster)(nil), // 43: envoy.api.v2.route.RateLimit.Action.DestinationCluster - (*RateLimit_Action_RequestHeaders)(nil), // 44: envoy.api.v2.route.RateLimit.Action.RequestHeaders - (*RateLimit_Action_RemoteAddress)(nil), // 45: envoy.api.v2.route.RateLimit.Action.RemoteAddress - (*RateLimit_Action_GenericKey)(nil), // 46: envoy.api.v2.route.RateLimit.Action.GenericKey - (*RateLimit_Action_HeaderValueMatch)(nil), // 47: envoy.api.v2.route.RateLimit.Action.HeaderValueMatch - (*core.HeaderValueOption)(nil), // 48: envoy.api.v2.core.HeaderValueOption - (*any1.Any)(nil), // 49: google.protobuf.Any - (*wrappers.UInt32Value)(nil), // 50: google.protobuf.UInt32Value - (*core.Metadata)(nil), // 51: envoy.api.v2.core.Metadata - (*matcher.RegexMatcher)(nil), // 52: envoy.type.matcher.RegexMatcher - (*wrappers.BoolValue)(nil), // 53: google.protobuf.BoolValue - (*core.RuntimeFractionalPercent)(nil), // 54: envoy.api.v2.core.RuntimeFractionalPercent - (*matcher.StringMatcher)(nil), // 55: envoy.type.matcher.StringMatcher - (*matcher.RegexMatchAndSubstitute)(nil), // 56: envoy.type.matcher.RegexMatchAndSubstitute - (*duration.Duration)(nil), // 57: google.protobuf.Duration - (core.RoutingPriority)(0), // 58: envoy.api.v2.core.RoutingPriority - (*_type.FractionalPercent)(nil), // 59: envoy.type.FractionalPercent - (*core.DataSource)(nil), // 60: envoy.api.v2.core.DataSource - (*v2.CustomTag)(nil), // 61: envoy.type.tracing.v2.CustomTag - (core.RequestMethod)(0), // 62: envoy.api.v2.core.RequestMethod - (*_type.Int64Range)(nil), // 63: envoy.type.Int64Range - (*_struct.Struct)(nil), // 64: google.protobuf.Struct -} -var file_envoy_api_v2_route_route_components_proto_depIdxs = []int32{ - 6, // 0: envoy.api.v2.route.VirtualHost.routes:type_name -> envoy.api.v2.route.Route - 0, // 1: envoy.api.v2.route.VirtualHost.require_tls:type_name -> envoy.api.v2.route.VirtualHost.TlsRequirementType - 17, // 2: envoy.api.v2.route.VirtualHost.virtual_clusters:type_name -> envoy.api.v2.route.VirtualCluster - 18, // 3: envoy.api.v2.route.VirtualHost.rate_limits:type_name -> envoy.api.v2.route.RateLimit - 48, // 4: envoy.api.v2.route.VirtualHost.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 48, // 5: envoy.api.v2.route.VirtualHost.response_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 9, // 6: envoy.api.v2.route.VirtualHost.cors:type_name -> envoy.api.v2.route.CorsPolicy - 21, // 7: envoy.api.v2.route.VirtualHost.per_filter_config:type_name -> envoy.api.v2.route.VirtualHost.PerFilterConfigEntry - 22, // 8: envoy.api.v2.route.VirtualHost.typed_per_filter_config:type_name -> envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry - 11, // 9: envoy.api.v2.route.VirtualHost.retry_policy:type_name -> envoy.api.v2.route.RetryPolicy - 49, // 10: envoy.api.v2.route.VirtualHost.retry_policy_typed_config:type_name -> google.protobuf.Any - 12, // 11: envoy.api.v2.route.VirtualHost.hedge_policy:type_name -> envoy.api.v2.route.HedgePolicy - 50, // 12: envoy.api.v2.route.VirtualHost.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 49, // 13: envoy.api.v2.route.FilterAction.action:type_name -> google.protobuf.Any - 8, // 14: envoy.api.v2.route.Route.match:type_name -> envoy.api.v2.route.RouteMatch - 10, // 15: envoy.api.v2.route.Route.route:type_name -> envoy.api.v2.route.RouteAction - 13, // 16: envoy.api.v2.route.Route.redirect:type_name -> envoy.api.v2.route.RedirectAction - 14, // 17: envoy.api.v2.route.Route.direct_response:type_name -> envoy.api.v2.route.DirectResponseAction - 5, // 18: envoy.api.v2.route.Route.filter_action:type_name -> envoy.api.v2.route.FilterAction - 51, // 19: envoy.api.v2.route.Route.metadata:type_name -> envoy.api.v2.core.Metadata - 15, // 20: envoy.api.v2.route.Route.decorator:type_name -> envoy.api.v2.route.Decorator - 23, // 21: envoy.api.v2.route.Route.per_filter_config:type_name -> envoy.api.v2.route.Route.PerFilterConfigEntry - 24, // 22: envoy.api.v2.route.Route.typed_per_filter_config:type_name -> envoy.api.v2.route.Route.TypedPerFilterConfigEntry - 48, // 23: envoy.api.v2.route.Route.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 48, // 24: envoy.api.v2.route.Route.response_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 16, // 25: envoy.api.v2.route.Route.tracing:type_name -> envoy.api.v2.route.Tracing - 50, // 26: envoy.api.v2.route.Route.per_request_buffer_limit_bytes:type_name -> google.protobuf.UInt32Value - 25, // 27: envoy.api.v2.route.WeightedCluster.clusters:type_name -> envoy.api.v2.route.WeightedCluster.ClusterWeight - 50, // 28: envoy.api.v2.route.WeightedCluster.total_weight:type_name -> google.protobuf.UInt32Value - 52, // 29: envoy.api.v2.route.RouteMatch.safe_regex:type_name -> envoy.type.matcher.RegexMatcher - 53, // 30: envoy.api.v2.route.RouteMatch.case_sensitive:type_name -> google.protobuf.BoolValue - 54, // 31: envoy.api.v2.route.RouteMatch.runtime_fraction:type_name -> envoy.api.v2.core.RuntimeFractionalPercent - 19, // 32: envoy.api.v2.route.RouteMatch.headers:type_name -> envoy.api.v2.route.HeaderMatcher - 20, // 33: envoy.api.v2.route.RouteMatch.query_parameters:type_name -> envoy.api.v2.route.QueryParameterMatcher - 28, // 34: envoy.api.v2.route.RouteMatch.grpc:type_name -> envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions - 29, // 35: envoy.api.v2.route.RouteMatch.tls_context:type_name -> envoy.api.v2.route.RouteMatch.TlsContextMatchOptions - 55, // 36: envoy.api.v2.route.CorsPolicy.allow_origin_string_match:type_name -> envoy.type.matcher.StringMatcher - 53, // 37: envoy.api.v2.route.CorsPolicy.allow_credentials:type_name -> google.protobuf.BoolValue - 53, // 38: envoy.api.v2.route.CorsPolicy.enabled:type_name -> google.protobuf.BoolValue - 54, // 39: envoy.api.v2.route.CorsPolicy.filter_enabled:type_name -> envoy.api.v2.core.RuntimeFractionalPercent - 54, // 40: envoy.api.v2.route.CorsPolicy.shadow_enabled:type_name -> envoy.api.v2.core.RuntimeFractionalPercent - 7, // 41: envoy.api.v2.route.RouteAction.weighted_clusters:type_name -> envoy.api.v2.route.WeightedCluster - 1, // 42: envoy.api.v2.route.RouteAction.cluster_not_found_response_code:type_name -> envoy.api.v2.route.RouteAction.ClusterNotFoundResponseCode - 51, // 43: envoy.api.v2.route.RouteAction.metadata_match:type_name -> envoy.api.v2.core.Metadata - 56, // 44: envoy.api.v2.route.RouteAction.regex_rewrite:type_name -> envoy.type.matcher.RegexMatchAndSubstitute - 53, // 45: envoy.api.v2.route.RouteAction.auto_host_rewrite:type_name -> google.protobuf.BoolValue - 57, // 46: envoy.api.v2.route.RouteAction.timeout:type_name -> google.protobuf.Duration - 57, // 47: envoy.api.v2.route.RouteAction.idle_timeout:type_name -> google.protobuf.Duration - 11, // 48: envoy.api.v2.route.RouteAction.retry_policy:type_name -> envoy.api.v2.route.RetryPolicy - 49, // 49: envoy.api.v2.route.RouteAction.retry_policy_typed_config:type_name -> google.protobuf.Any - 30, // 50: envoy.api.v2.route.RouteAction.request_mirror_policy:type_name -> envoy.api.v2.route.RouteAction.RequestMirrorPolicy - 30, // 51: envoy.api.v2.route.RouteAction.request_mirror_policies:type_name -> envoy.api.v2.route.RouteAction.RequestMirrorPolicy - 58, // 52: envoy.api.v2.route.RouteAction.priority:type_name -> envoy.api.v2.core.RoutingPriority - 18, // 53: envoy.api.v2.route.RouteAction.rate_limits:type_name -> envoy.api.v2.route.RateLimit - 53, // 54: envoy.api.v2.route.RouteAction.include_vh_rate_limits:type_name -> google.protobuf.BoolValue - 31, // 55: envoy.api.v2.route.RouteAction.hash_policy:type_name -> envoy.api.v2.route.RouteAction.HashPolicy - 9, // 56: envoy.api.v2.route.RouteAction.cors:type_name -> envoy.api.v2.route.CorsPolicy - 57, // 57: envoy.api.v2.route.RouteAction.max_grpc_timeout:type_name -> google.protobuf.Duration - 57, // 58: envoy.api.v2.route.RouteAction.grpc_timeout_offset:type_name -> google.protobuf.Duration - 32, // 59: envoy.api.v2.route.RouteAction.upgrade_configs:type_name -> envoy.api.v2.route.RouteAction.UpgradeConfig - 2, // 60: envoy.api.v2.route.RouteAction.internal_redirect_action:type_name -> envoy.api.v2.route.RouteAction.InternalRedirectAction - 50, // 61: envoy.api.v2.route.RouteAction.max_internal_redirects:type_name -> google.protobuf.UInt32Value - 12, // 62: envoy.api.v2.route.RouteAction.hedge_policy:type_name -> envoy.api.v2.route.HedgePolicy - 50, // 63: envoy.api.v2.route.RetryPolicy.num_retries:type_name -> google.protobuf.UInt32Value - 57, // 64: envoy.api.v2.route.RetryPolicy.per_try_timeout:type_name -> google.protobuf.Duration - 38, // 65: envoy.api.v2.route.RetryPolicy.retry_priority:type_name -> envoy.api.v2.route.RetryPolicy.RetryPriority - 39, // 66: envoy.api.v2.route.RetryPolicy.retry_host_predicate:type_name -> envoy.api.v2.route.RetryPolicy.RetryHostPredicate - 40, // 67: envoy.api.v2.route.RetryPolicy.retry_back_off:type_name -> envoy.api.v2.route.RetryPolicy.RetryBackOff - 19, // 68: envoy.api.v2.route.RetryPolicy.retriable_headers:type_name -> envoy.api.v2.route.HeaderMatcher - 19, // 69: envoy.api.v2.route.RetryPolicy.retriable_request_headers:type_name -> envoy.api.v2.route.HeaderMatcher - 50, // 70: envoy.api.v2.route.HedgePolicy.initial_requests:type_name -> google.protobuf.UInt32Value - 59, // 71: envoy.api.v2.route.HedgePolicy.additional_request_chance:type_name -> envoy.type.FractionalPercent - 3, // 72: envoy.api.v2.route.RedirectAction.response_code:type_name -> envoy.api.v2.route.RedirectAction.RedirectResponseCode - 60, // 73: envoy.api.v2.route.DirectResponseAction.body:type_name -> envoy.api.v2.core.DataSource - 53, // 74: envoy.api.v2.route.Decorator.propagate:type_name -> google.protobuf.BoolValue - 59, // 75: envoy.api.v2.route.Tracing.client_sampling:type_name -> envoy.type.FractionalPercent - 59, // 76: envoy.api.v2.route.Tracing.random_sampling:type_name -> envoy.type.FractionalPercent - 59, // 77: envoy.api.v2.route.Tracing.overall_sampling:type_name -> envoy.type.FractionalPercent - 61, // 78: envoy.api.v2.route.Tracing.custom_tags:type_name -> envoy.type.tracing.v2.CustomTag - 19, // 79: envoy.api.v2.route.VirtualCluster.headers:type_name -> envoy.api.v2.route.HeaderMatcher - 62, // 80: envoy.api.v2.route.VirtualCluster.method:type_name -> envoy.api.v2.core.RequestMethod - 50, // 81: envoy.api.v2.route.RateLimit.stage:type_name -> google.protobuf.UInt32Value - 41, // 82: envoy.api.v2.route.RateLimit.actions:type_name -> envoy.api.v2.route.RateLimit.Action - 52, // 83: envoy.api.v2.route.HeaderMatcher.safe_regex_match:type_name -> envoy.type.matcher.RegexMatcher - 63, // 84: envoy.api.v2.route.HeaderMatcher.range_match:type_name -> envoy.type.Int64Range - 53, // 85: envoy.api.v2.route.QueryParameterMatcher.regex:type_name -> google.protobuf.BoolValue - 55, // 86: envoy.api.v2.route.QueryParameterMatcher.string_match:type_name -> envoy.type.matcher.StringMatcher - 64, // 87: envoy.api.v2.route.VirtualHost.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 49, // 88: envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 64, // 89: envoy.api.v2.route.Route.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 49, // 90: envoy.api.v2.route.Route.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 50, // 91: envoy.api.v2.route.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value - 51, // 92: envoy.api.v2.route.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.api.v2.core.Metadata - 48, // 93: envoy.api.v2.route.WeightedCluster.ClusterWeight.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 48, // 94: envoy.api.v2.route.WeightedCluster.ClusterWeight.response_headers_to_add:type_name -> envoy.api.v2.core.HeaderValueOption - 26, // 95: envoy.api.v2.route.WeightedCluster.ClusterWeight.per_filter_config:type_name -> envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry - 27, // 96: envoy.api.v2.route.WeightedCluster.ClusterWeight.typed_per_filter_config:type_name -> envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry - 64, // 97: envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry.value:type_name -> google.protobuf.Struct - 49, // 98: envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry.value:type_name -> google.protobuf.Any - 53, // 99: envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.presented:type_name -> google.protobuf.BoolValue - 53, // 100: envoy.api.v2.route.RouteMatch.TlsContextMatchOptions.validated:type_name -> google.protobuf.BoolValue - 54, // 101: envoy.api.v2.route.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.api.v2.core.RuntimeFractionalPercent - 53, // 102: envoy.api.v2.route.RouteAction.RequestMirrorPolicy.trace_sampled:type_name -> google.protobuf.BoolValue - 33, // 103: envoy.api.v2.route.RouteAction.HashPolicy.header:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.Header - 34, // 104: envoy.api.v2.route.RouteAction.HashPolicy.cookie:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.Cookie - 35, // 105: envoy.api.v2.route.RouteAction.HashPolicy.connection_properties:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties - 36, // 106: envoy.api.v2.route.RouteAction.HashPolicy.query_parameter:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter - 37, // 107: envoy.api.v2.route.RouteAction.HashPolicy.filter_state:type_name -> envoy.api.v2.route.RouteAction.HashPolicy.FilterState - 53, // 108: envoy.api.v2.route.RouteAction.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue - 57, // 109: envoy.api.v2.route.RouteAction.HashPolicy.Cookie.ttl:type_name -> google.protobuf.Duration - 64, // 110: envoy.api.v2.route.RetryPolicy.RetryPriority.config:type_name -> google.protobuf.Struct - 49, // 111: envoy.api.v2.route.RetryPolicy.RetryPriority.typed_config:type_name -> google.protobuf.Any - 64, // 112: envoy.api.v2.route.RetryPolicy.RetryHostPredicate.config:type_name -> google.protobuf.Struct - 49, // 113: envoy.api.v2.route.RetryPolicy.RetryHostPredicate.typed_config:type_name -> google.protobuf.Any - 57, // 114: envoy.api.v2.route.RetryPolicy.RetryBackOff.base_interval:type_name -> google.protobuf.Duration - 57, // 115: envoy.api.v2.route.RetryPolicy.RetryBackOff.max_interval:type_name -> google.protobuf.Duration - 42, // 116: envoy.api.v2.route.RateLimit.Action.source_cluster:type_name -> envoy.api.v2.route.RateLimit.Action.SourceCluster - 43, // 117: envoy.api.v2.route.RateLimit.Action.destination_cluster:type_name -> envoy.api.v2.route.RateLimit.Action.DestinationCluster - 44, // 118: envoy.api.v2.route.RateLimit.Action.request_headers:type_name -> envoy.api.v2.route.RateLimit.Action.RequestHeaders - 45, // 119: envoy.api.v2.route.RateLimit.Action.remote_address:type_name -> envoy.api.v2.route.RateLimit.Action.RemoteAddress - 46, // 120: envoy.api.v2.route.RateLimit.Action.generic_key:type_name -> envoy.api.v2.route.RateLimit.Action.GenericKey - 47, // 121: envoy.api.v2.route.RateLimit.Action.header_value_match:type_name -> envoy.api.v2.route.RateLimit.Action.HeaderValueMatch - 53, // 122: envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.expect_match:type_name -> google.protobuf.BoolValue - 19, // 123: envoy.api.v2.route.RateLimit.Action.HeaderValueMatch.headers:type_name -> envoy.api.v2.route.HeaderMatcher - 124, // [124:124] is the sub-list for method output_type - 124, // [124:124] is the sub-list for method input_type - 124, // [124:124] is the sub-list for extension type_name - 124, // [124:124] is the sub-list for extension extendee - 0, // [0:124] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_route_route_components_proto_init() } -func file_envoy_api_v2_route_route_components_proto_init() { - if File_envoy_api_v2_route_route_components_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_route_route_components_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualHost); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CorsPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HedgePolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedirectAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DirectResponseAction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decorator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tracing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VirtualCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParameterMatcher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WeightedCluster_ClusterWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_GrpcRouteMatchOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteMatch_TlsContextMatchOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_RequestMirrorPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_UpgradeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_Cookie); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_ConnectionProperties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_QueryParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouteAction_HashPolicy_FilterState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryPriority); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryHostPredicate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryPolicy_RetryBackOff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_SourceCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_DestinationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_RequestHeaders); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_RemoteAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_GenericKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimit_Action_HeaderValueMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_route_route_components_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Route_Route)(nil), - (*Route_Redirect)(nil), - (*Route_DirectResponse)(nil), - (*Route_FilterAction)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*RouteMatch_Prefix)(nil), - (*RouteMatch_Path)(nil), - (*RouteMatch_Regex)(nil), - (*RouteMatch_SafeRegex)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*CorsPolicy_Enabled)(nil), - (*CorsPolicy_FilterEnabled)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[6].OneofWrappers = []interface{}{ - (*RouteAction_Cluster)(nil), - (*RouteAction_ClusterHeader)(nil), - (*RouteAction_WeightedClusters)(nil), - (*RouteAction_HostRewrite)(nil), - (*RouteAction_AutoHostRewrite)(nil), - (*RouteAction_AutoHostRewriteHeader)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[9].OneofWrappers = []interface{}{ - (*RedirectAction_HttpsRedirect)(nil), - (*RedirectAction_SchemeRedirect)(nil), - (*RedirectAction_PathRedirect)(nil), - (*RedirectAction_PrefixRewrite)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[15].OneofWrappers = []interface{}{ - (*HeaderMatcher_ExactMatch)(nil), - (*HeaderMatcher_RegexMatch)(nil), - (*HeaderMatcher_SafeRegexMatch)(nil), - (*HeaderMatcher_RangeMatch)(nil), - (*HeaderMatcher_PresentMatch)(nil), - (*HeaderMatcher_PrefixMatch)(nil), - (*HeaderMatcher_SuffixMatch)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[16].OneofWrappers = []interface{}{ - (*QueryParameterMatcher_StringMatch)(nil), - (*QueryParameterMatcher_PresentMatch)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[27].OneofWrappers = []interface{}{ - (*RouteAction_HashPolicy_Header_)(nil), - (*RouteAction_HashPolicy_Cookie_)(nil), - (*RouteAction_HashPolicy_ConnectionProperties_)(nil), - (*RouteAction_HashPolicy_QueryParameter_)(nil), - (*RouteAction_HashPolicy_FilterState_)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[34].OneofWrappers = []interface{}{ - (*RetryPolicy_RetryPriority_Config)(nil), - (*RetryPolicy_RetryPriority_TypedConfig)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[35].OneofWrappers = []interface{}{ - (*RetryPolicy_RetryHostPredicate_Config)(nil), - (*RetryPolicy_RetryHostPredicate_TypedConfig)(nil), - } - file_envoy_api_v2_route_route_components_proto_msgTypes[37].OneofWrappers = []interface{}{ - (*RateLimit_Action_SourceCluster_)(nil), - (*RateLimit_Action_DestinationCluster_)(nil), - (*RateLimit_Action_RequestHeaders_)(nil), - (*RateLimit_Action_RemoteAddress_)(nil), - (*RateLimit_Action_GenericKey_)(nil), - (*RateLimit_Action_HeaderValueMatch_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_route_route_components_proto_rawDesc, - NumEnums: 4, - NumMessages: 44, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_route_route_components_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_route_route_components_proto_depIdxs, - EnumInfos: file_envoy_api_v2_route_route_components_proto_enumTypes, - MessageInfos: file_envoy_api_v2_route_route_components_proto_msgTypes, - }.Build() - File_envoy_api_v2_route_route_components_proto = out.File - file_envoy_api_v2_route_route_components_proto_rawDesc = nil - file_envoy_api_v2_route_route_components_proto_goTypes = nil - file_envoy_api_v2_route_route_components_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go deleted file mode 100644 index 5ba46350536a..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go +++ /dev/null @@ -1,8694 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/route/route_components.proto - -package route - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = core.RequestMethod(0) -) - -// Validate checks the field values on VirtualHost with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *VirtualHost) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on VirtualHost with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in VirtualHostMultiError, or -// nil if none found. -func (m *VirtualHost) ValidateAll() error { - return m.validate(true) -} - -func (m *VirtualHost) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := VirtualHostValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetDomains()) < 1 { - err := VirtualHostValidationError{ - field: "Domains", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetDomains() { - _, _ = idx, item - - if !_VirtualHost_Domains_Pattern.MatchString(item) { - err := VirtualHostValidationError{ - field: fmt.Sprintf("Domains[%v]", idx), - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - for idx, item := range m.GetRoutes() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("Routes[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if _, ok := VirtualHost_TlsRequirementType_name[int32(m.GetRequireTls())]; !ok { - err := VirtualHostValidationError{ - field: "RequireTls", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetVirtualClusters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("VirtualClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("VirtualClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("VirtualClusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRateLimits() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := VirtualHostValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := VirtualHostValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetCors()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - } - } - } - - { - sorted_keys := make([]string, len(m.GetPerFilterConfig())) - i := 0 - for key := range m.GetPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetPerFilterConfig()[key] - _ = val - - // no validation rules for PerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) - i := 0 - for key := range m.GetTypedPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedPerFilterConfig()[key] - _ = val - - // no validation rules for TypedPerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - // no validation rules for IncludeRequestAttemptCount - - // no validation rules for IncludeAttemptCountInResponse - - if all { - switch v := interface{}(m.GetRetryPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHedgePolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualHostValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualHostValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return VirtualHostMultiError(errors) - } - - return nil -} - -// VirtualHostMultiError is an error wrapping multiple validation errors -// returned by VirtualHost.ValidateAll() if the designated constraints aren't met. -type VirtualHostMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VirtualHostMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VirtualHostMultiError) AllErrors() []error { return m } - -// VirtualHostValidationError is the validation error returned by -// VirtualHost.Validate if the designated constraints aren't met. -type VirtualHostValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VirtualHostValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VirtualHostValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VirtualHostValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VirtualHostValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VirtualHostValidationError) ErrorName() string { return "VirtualHostValidationError" } - -// Error satisfies the builtin error interface -func (e VirtualHostValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVirtualHost.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VirtualHostValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VirtualHostValidationError{} - -var _VirtualHost_Domains_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on FilterAction with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *FilterAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on FilterAction with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in FilterActionMultiError, or -// nil if none found. -func (m *FilterAction) ValidateAll() error { - return m.validate(true) -} - -func (m *FilterAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetAction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, FilterActionValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, FilterActionValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return FilterActionValidationError{ - field: "Action", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return FilterActionMultiError(errors) - } - - return nil -} - -// FilterActionMultiError is an error wrapping multiple validation errors -// returned by FilterAction.ValidateAll() if the designated constraints aren't met. -type FilterActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m FilterActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m FilterActionMultiError) AllErrors() []error { return m } - -// FilterActionValidationError is the validation error returned by -// FilterAction.Validate if the designated constraints aren't met. -type FilterActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e FilterActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e FilterActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e FilterActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e FilterActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e FilterActionValidationError) ErrorName() string { return "FilterActionValidationError" } - -// Error satisfies the builtin error interface -func (e FilterActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sFilterAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = FilterActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = FilterActionValidationError{} - -// Validate checks the field values on Route with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Route) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Route with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in RouteMultiError, or nil if none found. -func (m *Route) ValidateAll() error { - return m.validate(true) -} - -func (m *Route) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if m.GetMatch() == nil { - err := RouteValidationError{ - field: "Match", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Match", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetDecorator()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Decorator", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Decorator", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDecorator()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Decorator", - reason: "embedded message failed validation", - cause: err, - } - } - } - - { - sorted_keys := make([]string, len(m.GetPerFilterConfig())) - i := 0 - for key := range m.GetPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetPerFilterConfig()[key] - _ = val - - // no validation rules for PerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) - i := 0 - for key := range m.GetTypedPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedPerFilterConfig()[key] - _ = val - - // no validation rules for TypedPerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := RouteValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := RouteValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetTracing()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Tracing", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Tracing", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Tracing", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerRequestBufferLimitBytes()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerRequestBufferLimitBytes()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "PerRequestBufferLimitBytes", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofActionPresent := false - switch v := m.Action.(type) { - case *Route_Route: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetRoute()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Route_Redirect: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetRedirect()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Redirect", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "Redirect", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRedirect()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "Redirect", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Route_DirectResponse: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetDirectResponse()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "DirectResponse", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "DirectResponse", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDirectResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "DirectResponse", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Route_FilterAction: - if v == nil { - err := RouteValidationError{ - field: "Action", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionPresent = true - - if all { - switch v := interface{}(m.GetFilterAction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteValidationError{ - field: "FilterAction", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteValidationError{ - field: "FilterAction", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterAction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteValidationError{ - field: "FilterAction", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofActionPresent { - err := RouteValidationError{ - field: "Action", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteMultiError(errors) - } - - return nil -} - -// RouteMultiError is an error wrapping multiple validation errors returned by -// Route.ValidateAll() if the designated constraints aren't met. -type RouteMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMultiError) AllErrors() []error { return m } - -// RouteValidationError is the validation error returned by Route.Validate if -// the designated constraints aren't met. -type RouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteValidationError) ErrorName() string { return "RouteValidationError" } - -// Error satisfies the builtin error interface -func (e RouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRoute.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteValidationError{} - -// Validate checks the field values on WeightedCluster with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *WeightedCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on WeightedCluster with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// WeightedClusterMultiError, or nil if none found. -func (m *WeightedCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *WeightedCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetClusters()) < 1 { - err := WeightedClusterValidationError{ - field: "Clusters", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetClusters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedClusterValidationError{ - field: fmt.Sprintf("Clusters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if wrapper := m.GetTotalWeight(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := WeightedClusterValidationError{ - field: "TotalWeight", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for RuntimeKeyPrefix - - if len(errors) > 0 { - return WeightedClusterMultiError(errors) - } - - return nil -} - -// WeightedClusterMultiError is an error wrapping multiple validation errors -// returned by WeightedCluster.ValidateAll() if the designated constraints -// aren't met. -type WeightedClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m WeightedClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m WeightedClusterMultiError) AllErrors() []error { return m } - -// WeightedClusterValidationError is the validation error returned by -// WeightedCluster.Validate if the designated constraints aren't met. -type WeightedClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WeightedClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WeightedClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WeightedClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WeightedClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WeightedClusterValidationError) ErrorName() string { return "WeightedClusterValidationError" } - -// Error satisfies the builtin error interface -func (e WeightedClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWeightedCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WeightedClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WeightedClusterValidationError{} - -// Validate checks the field values on RouteMatch with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RouteMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteMatch with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RouteMatchMultiError, or -// nil if none found. -func (m *RouteMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetCaseSensitive()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "CaseSensitive", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "CaseSensitive", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCaseSensitive()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "CaseSensitive", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRuntimeFraction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetQueryParameters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: fmt.Sprintf("QueryParameters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetGrpc()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "Grpc", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "Grpc", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpc()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "Grpc", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTlsContext()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTlsContext()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "TlsContext", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofPathSpecifierPresent := false - switch v := m.PathSpecifier.(type) { - case *RouteMatch_Prefix: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - // no validation rules for Prefix - case *RouteMatch_Path: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - // no validation rules for Path - case *RouteMatch_Regex: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - - if len(m.GetRegex()) > 1024 { - err := RouteMatchValidationError{ - field: "Regex", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteMatch_SafeRegex: - if v == nil { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPathSpecifierPresent = true - - if m.GetSafeRegex() == nil { - err := RouteMatchValidationError{ - field: "SafeRegex", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSafeRegex()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatchValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatchValidationError{ - field: "SafeRegex", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofPathSpecifierPresent { - err := RouteMatchValidationError{ - field: "PathSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteMatchMultiError(errors) - } - - return nil -} - -// RouteMatchMultiError is an error wrapping multiple validation errors -// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. -type RouteMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMatchMultiError) AllErrors() []error { return m } - -// RouteMatchValidationError is the validation error returned by -// RouteMatch.Validate if the designated constraints aren't met. -type RouteMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatchValidationError) ErrorName() string { return "RouteMatchValidationError" } - -// Error satisfies the builtin error interface -func (e RouteMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatchValidationError{} - -// Validate checks the field values on CorsPolicy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CorsPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CorsPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CorsPolicyMultiError, or -// nil if none found. -func (m *CorsPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *CorsPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetAllowOriginRegex() { - _, _ = idx, item - - if len(item) > 1024 { - err := CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginRegex[%v]", idx), - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - for idx, item := range m.GetAllowOriginStringMatch() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: fmt.Sprintf("AllowOriginStringMatch[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for AllowMethods - - // no validation rules for AllowHeaders - - // no validation rules for ExposeHeaders - - // no validation rules for MaxAge - - if all { - switch v := interface{}(m.GetAllowCredentials()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "AllowCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "AllowCredentials", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAllowCredentials()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "AllowCredentials", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetShadowEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "ShadowEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.EnabledSpecifier.(type) { - case *CorsPolicy_Enabled: - if v == nil { - err := CorsPolicyValidationError{ - field: "EnabledSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CorsPolicy_FilterEnabled: - if v == nil { - err := CorsPolicyValidationError{ - field: "EnabledSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetFilterEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CorsPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CorsPolicyValidationError{ - field: "FilterEnabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return CorsPolicyMultiError(errors) - } - - return nil -} - -// CorsPolicyMultiError is an error wrapping multiple validation errors -// returned by CorsPolicy.ValidateAll() if the designated constraints aren't met. -type CorsPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CorsPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CorsPolicyMultiError) AllErrors() []error { return m } - -// CorsPolicyValidationError is the validation error returned by -// CorsPolicy.Validate if the designated constraints aren't met. -type CorsPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CorsPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CorsPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CorsPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CorsPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CorsPolicyValidationError) ErrorName() string { return "CorsPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e CorsPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCorsPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CorsPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CorsPolicyValidationError{} - -// Validate checks the field values on RouteAction with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RouteAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RouteActionMultiError, or -// nil if none found. -func (m *RouteAction) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := RouteAction_ClusterNotFoundResponseCode_name[int32(m.GetClusterNotFoundResponseCode())]; !ok { - err := RouteActionValidationError{ - field: "ClusterNotFoundResponseCode", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadataMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if !_RouteAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - err := RouteActionValidationError{ - field: "PrefixRewrite", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRegexRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRegexRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RegexRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "Timeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetIdleTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "IdleTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RetryPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPolicyTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPolicyTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RetryPolicyTypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRequestMirrorPolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RequestMirrorPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "RequestMirrorPolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequestMirrorPolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "RequestMirrorPolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRequestMirrorPolicies() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if _, ok := core.RoutingPriority_name[int32(m.GetPriority())]; !ok { - err := RouteActionValidationError{ - field: "Priority", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRateLimits() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("RateLimits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetIncludeVhRateLimits()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IncludeVhRateLimits", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "IncludeVhRateLimits", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetIncludeVhRateLimits()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "IncludeVhRateLimits", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetHashPolicy() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("HashPolicy[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("HashPolicy[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("HashPolicy[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetCors()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCors()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "Cors", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMaxGrpcTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxGrpcTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxGrpcTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetGrpcTimeoutOffset()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "GrpcTimeoutOffset", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "GrpcTimeoutOffset", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpcTimeoutOffset()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "GrpcTimeoutOffset", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetUpgradeConfigs() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("UpgradeConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: fmt.Sprintf("UpgradeConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: fmt.Sprintf("UpgradeConfigs[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for InternalRedirectAction - - if all { - switch v := interface{}(m.GetMaxInternalRedirects()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMaxInternalRedirects()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "MaxInternalRedirects", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetHedgePolicy()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHedgePolicy()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "HedgePolicy", - reason: "embedded message failed validation", - cause: err, - } - } - } - - oneofClusterSpecifierPresent := false - switch v := m.ClusterSpecifier.(type) { - case *RouteAction_Cluster: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - - if len(m.GetCluster()) < 1 { - err := RouteActionValidationError{ - field: "Cluster", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteAction_ClusterHeader: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - - if len(m.GetClusterHeader()) < 1 { - err := RouteActionValidationError{ - field: "ClusterHeader", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { - err := RouteActionValidationError{ - field: "ClusterHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteAction_WeightedClusters: - if v == nil { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofClusterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetWeightedClusters()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "WeightedClusters", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofClusterSpecifierPresent { - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - switch v := m.HostRewriteSpecifier.(type) { - case *RouteAction_HostRewrite: - if v == nil { - err := RouteActionValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_HostRewrite_Pattern.MatchString(m.GetHostRewrite()) { - err := RouteActionValidationError{ - field: "HostRewrite", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RouteAction_AutoHostRewrite: - if v == nil { - err := RouteActionValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetAutoHostRewrite()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "AutoHostRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteActionValidationError{ - field: "AutoHostRewrite", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAutoHostRewrite()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteActionValidationError{ - field: "AutoHostRewrite", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_AutoHostRewriteHeader: - if v == nil { - err := RouteActionValidationError{ - field: "HostRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_AutoHostRewriteHeader_Pattern.MatchString(m.GetAutoHostRewriteHeader()) { - err := RouteActionValidationError{ - field: "AutoHostRewriteHeader", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RouteActionMultiError(errors) - } - - return nil -} - -// RouteActionMultiError is an error wrapping multiple validation errors -// returned by RouteAction.ValidateAll() if the designated constraints aren't met. -type RouteActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteActionMultiError) AllErrors() []error { return m } - -// RouteActionValidationError is the validation error returned by -// RouteAction.Validate if the designated constraints aren't met. -type RouteActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteActionValidationError) ErrorName() string { return "RouteActionValidationError" } - -// Error satisfies the builtin error interface -func (e RouteActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteActionValidationError{} - -var _RouteAction_ClusterHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_PrefixRewrite_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_HostRewrite_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RouteAction_AutoHostRewriteHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RetryPolicyMultiError, or -// nil if none found. -func (m *RetryPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for RetryOn - - if all { - switch v := interface{}(m.GetNumRetries()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNumRetries()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "NumRetries", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetPerTryTimeout()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "PerTryTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "PerTryTimeout", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPerTryTimeout()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "PerTryTimeout", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRetryPriority()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryPriority", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryPriority", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryPriority()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RetryPriority", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRetryHostPredicate() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetryHostPredicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetryHostPredicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: fmt.Sprintf("RetryHostPredicate[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for HostSelectionRetryMaxAttempts - - if all { - switch v := interface{}(m.GetRetryBackOff()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRetryBackOff()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: "RetryBackOff", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetRetriableHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetRetriableRequestHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicyValidationError{ - field: fmt.Sprintf("RetriableRequestHeaders[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RetryPolicyMultiError(errors) - } - - return nil -} - -// RetryPolicyMultiError is an error wrapping multiple validation errors -// returned by RetryPolicy.ValidateAll() if the designated constraints aren't met. -type RetryPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicyMultiError) AllErrors() []error { return m } - -// RetryPolicyValidationError is the validation error returned by -// RetryPolicy.Validate if the designated constraints aren't met. -type RetryPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicyValidationError) ErrorName() string { return "RetryPolicyValidationError" } - -// Error satisfies the builtin error interface -func (e RetryPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicyValidationError{} - -// Validate checks the field values on HedgePolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HedgePolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HedgePolicy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HedgePolicyMultiError, or -// nil if none found. -func (m *HedgePolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *HedgePolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetInitialRequests(); wrapper != nil { - - if wrapper.GetValue() < 1 { - err := HedgePolicyValidationError{ - field: "InitialRequests", - reason: "value must be greater than or equal to 1", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if all { - switch v := interface{}(m.GetAdditionalRequestChance()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HedgePolicyValidationError{ - field: "AdditionalRequestChance", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HedgePolicyValidationError{ - field: "AdditionalRequestChance", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAdditionalRequestChance()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HedgePolicyValidationError{ - field: "AdditionalRequestChance", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for HedgeOnPerTryTimeout - - if len(errors) > 0 { - return HedgePolicyMultiError(errors) - } - - return nil -} - -// HedgePolicyMultiError is an error wrapping multiple validation errors -// returned by HedgePolicy.ValidateAll() if the designated constraints aren't met. -type HedgePolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HedgePolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HedgePolicyMultiError) AllErrors() []error { return m } - -// HedgePolicyValidationError is the validation error returned by -// HedgePolicy.Validate if the designated constraints aren't met. -type HedgePolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HedgePolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HedgePolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HedgePolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HedgePolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HedgePolicyValidationError) ErrorName() string { return "HedgePolicyValidationError" } - -// Error satisfies the builtin error interface -func (e HedgePolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHedgePolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HedgePolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HedgePolicyValidationError{} - -// Validate checks the field values on RedirectAction with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RedirectAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RedirectAction with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RedirectActionMultiError, -// or nil if none found. -func (m *RedirectAction) ValidateAll() error { - return m.validate(true) -} - -func (m *RedirectAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_RedirectAction_HostRedirect_Pattern.MatchString(m.GetHostRedirect()) { - err := RedirectActionValidationError{ - field: "HostRedirect", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for PortRedirect - - if _, ok := RedirectAction_RedirectResponseCode_name[int32(m.GetResponseCode())]; !ok { - err := RedirectActionValidationError{ - field: "ResponseCode", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for StripQuery - - switch v := m.SchemeRewriteSpecifier.(type) { - case *RedirectAction_HttpsRedirect: - if v == nil { - err := RedirectActionValidationError{ - field: "SchemeRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for HttpsRedirect - case *RedirectAction_SchemeRedirect: - if v == nil { - err := RedirectActionValidationError{ - field: "SchemeRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for SchemeRedirect - default: - _ = v // ensures v is used - } - switch v := m.PathRewriteSpecifier.(type) { - case *RedirectAction_PathRedirect: - if v == nil { - err := RedirectActionValidationError{ - field: "PathRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RedirectAction_PathRedirect_Pattern.MatchString(m.GetPathRedirect()) { - err := RedirectActionValidationError{ - field: "PathRedirect", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *RedirectAction_PrefixRewrite: - if v == nil { - err := RedirectActionValidationError{ - field: "PathRewriteSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RedirectAction_PrefixRewrite_Pattern.MatchString(m.GetPrefixRewrite()) { - err := RedirectActionValidationError{ - field: "PrefixRewrite", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RedirectActionMultiError(errors) - } - - return nil -} - -// RedirectActionMultiError is an error wrapping multiple validation errors -// returned by RedirectAction.ValidateAll() if the designated constraints -// aren't met. -type RedirectActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RedirectActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RedirectActionMultiError) AllErrors() []error { return m } - -// RedirectActionValidationError is the validation error returned by -// RedirectAction.Validate if the designated constraints aren't met. -type RedirectActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RedirectActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RedirectActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RedirectActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RedirectActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RedirectActionValidationError) ErrorName() string { return "RedirectActionValidationError" } - -// Error satisfies the builtin error interface -func (e RedirectActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRedirectAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RedirectActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RedirectActionValidationError{} - -var _RedirectAction_HostRedirect_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RedirectAction_PathRedirect_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -var _RedirectAction_PrefixRewrite_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on DirectResponseAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DirectResponseAction) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DirectResponseAction with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DirectResponseActionMultiError, or nil if none found. -func (m *DirectResponseAction) ValidateAll() error { - return m.validate(true) -} - -func (m *DirectResponseAction) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if val := m.GetStatus(); val < 100 || val >= 600 { - err := DirectResponseActionValidationError{ - field: "Status", - reason: "value must be inside range [100, 600)", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetBody()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DirectResponseActionValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DirectResponseActionValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DirectResponseActionValidationError{ - field: "Body", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DirectResponseActionMultiError(errors) - } - - return nil -} - -// DirectResponseActionMultiError is an error wrapping multiple validation -// errors returned by DirectResponseAction.ValidateAll() if the designated -// constraints aren't met. -type DirectResponseActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DirectResponseActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DirectResponseActionMultiError) AllErrors() []error { return m } - -// DirectResponseActionValidationError is the validation error returned by -// DirectResponseAction.Validate if the designated constraints aren't met. -type DirectResponseActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DirectResponseActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DirectResponseActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DirectResponseActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DirectResponseActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DirectResponseActionValidationError) ErrorName() string { - return "DirectResponseActionValidationError" -} - -// Error satisfies the builtin error interface -func (e DirectResponseActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDirectResponseAction.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DirectResponseActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DirectResponseActionValidationError{} - -// Validate checks the field values on Decorator with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Decorator) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Decorator with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DecoratorMultiError, or nil -// if none found. -func (m *Decorator) ValidateAll() error { - return m.validate(true) -} - -func (m *Decorator) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetOperation()) < 1 { - err := DecoratorValidationError{ - field: "Operation", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPropagate()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DecoratorValidationError{ - field: "Propagate", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DecoratorValidationError{ - field: "Propagate", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPropagate()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DecoratorValidationError{ - field: "Propagate", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DecoratorMultiError(errors) - } - - return nil -} - -// DecoratorMultiError is an error wrapping multiple validation errors returned -// by Decorator.ValidateAll() if the designated constraints aren't met. -type DecoratorMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DecoratorMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DecoratorMultiError) AllErrors() []error { return m } - -// DecoratorValidationError is the validation error returned by -// Decorator.Validate if the designated constraints aren't met. -type DecoratorValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DecoratorValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DecoratorValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DecoratorValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DecoratorValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DecoratorValidationError) ErrorName() string { return "DecoratorValidationError" } - -// Error satisfies the builtin error interface -func (e DecoratorValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDecorator.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DecoratorValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DecoratorValidationError{} - -// Validate checks the field values on Tracing with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Tracing) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Tracing with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in TracingMultiError, or nil if none found. -func (m *Tracing) ValidateAll() error { - return m.validate(true) -} - -func (m *Tracing) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetClientSampling()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: "ClientSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: "ClientSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: "ClientSampling", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetRandomSampling()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: "RandomSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: "RandomSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: "RandomSampling", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetOverallSampling()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: "OverallSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: "OverallSampling", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: "OverallSampling", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetCustomTags() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, TracingValidationError{ - field: fmt.Sprintf("CustomTags[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, TracingValidationError{ - field: fmt.Sprintf("CustomTags[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TracingValidationError{ - field: fmt.Sprintf("CustomTags[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return TracingMultiError(errors) - } - - return nil -} - -// TracingMultiError is an error wrapping multiple validation errors returned -// by Tracing.ValidateAll() if the designated constraints aren't met. -type TracingMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TracingMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TracingMultiError) AllErrors() []error { return m } - -// TracingValidationError is the validation error returned by Tracing.Validate -// if the designated constraints aren't met. -type TracingValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TracingValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TracingValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TracingValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TracingValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TracingValidationError) ErrorName() string { return "TracingValidationError" } - -// Error satisfies the builtin error interface -func (e TracingValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTracing.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TracingValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TracingValidationError{} - -// Validate checks the field values on VirtualCluster with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *VirtualCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on VirtualCluster with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in VirtualClusterMultiError, -// or nil if none found. -func (m *VirtualCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *VirtualCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetPattern()) > 1024 { - err := VirtualClusterValidationError{ - field: "Pattern", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VirtualClusterValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VirtualClusterValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VirtualClusterValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetName()) < 1 { - err := VirtualClusterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Method - - if len(errors) > 0 { - return VirtualClusterMultiError(errors) - } - - return nil -} - -// VirtualClusterMultiError is an error wrapping multiple validation errors -// returned by VirtualCluster.ValidateAll() if the designated constraints -// aren't met. -type VirtualClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VirtualClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VirtualClusterMultiError) AllErrors() []error { return m } - -// VirtualClusterValidationError is the validation error returned by -// VirtualCluster.Validate if the designated constraints aren't met. -type VirtualClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VirtualClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VirtualClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VirtualClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VirtualClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VirtualClusterValidationError) ErrorName() string { return "VirtualClusterValidationError" } - -// Error satisfies the builtin error interface -func (e VirtualClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sVirtualCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VirtualClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VirtualClusterValidationError{} - -// Validate checks the field values on RateLimit with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RateLimit) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RateLimitMultiError, or nil -// if none found. -func (m *RateLimit) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if wrapper := m.GetStage(); wrapper != nil { - - if wrapper.GetValue() > 10 { - err := RateLimitValidationError{ - field: "Stage", - reason: "value must be less than or equal to 10", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for DisableKey - - if len(m.GetActions()) < 1 { - err := RateLimitValidationError{ - field: "Actions", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetActions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RateLimitMultiError(errors) - } - - return nil -} - -// RateLimitMultiError is an error wrapping multiple validation errors returned -// by RateLimit.ValidateAll() if the designated constraints aren't met. -type RateLimitMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitMultiError) AllErrors() []error { return m } - -// RateLimitValidationError is the validation error returned by -// RateLimit.Validate if the designated constraints aren't met. -type RateLimitValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitValidationError) ErrorName() string { return "RateLimitValidationError" } - -// Error satisfies the builtin error interface -func (e RateLimitValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitValidationError{} - -// Validate checks the field values on HeaderMatcher with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HeaderMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HeaderMatcher with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HeaderMatcherMultiError, or -// nil if none found. -func (m *HeaderMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *HeaderMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := HeaderMatcherValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_HeaderMatcher_Name_Pattern.MatchString(m.GetName()) { - err := HeaderMatcherValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for InvertMatch - - switch v := m.HeaderMatchSpecifier.(type) { - case *HeaderMatcher_ExactMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for ExactMatch - case *HeaderMatcher_RegexMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetRegexMatch()) > 1024 { - err := HeaderMatcherValidationError{ - field: "RegexMatch", - reason: "value length must be at most 1024 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *HeaderMatcher_SafeRegexMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetSafeRegexMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "SafeRegexMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "SafeRegexMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSafeRegexMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderMatcherValidationError{ - field: "SafeRegexMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HeaderMatcher_RangeMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetRangeMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderMatcherValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderMatcherValidationError{ - field: "RangeMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HeaderMatcher_PresentMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for PresentMatch - case *HeaderMatcher_PrefixMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetPrefixMatch()) < 1 { - err := HeaderMatcherValidationError{ - field: "PrefixMatch", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *HeaderMatcher_SuffixMatch: - if v == nil { - err := HeaderMatcherValidationError{ - field: "HeaderMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetSuffixMatch()) < 1 { - err := HeaderMatcherValidationError{ - field: "SuffixMatch", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return HeaderMatcherMultiError(errors) - } - - return nil -} - -// HeaderMatcherMultiError is an error wrapping multiple validation errors -// returned by HeaderMatcher.ValidateAll() if the designated constraints -// aren't met. -type HeaderMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HeaderMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HeaderMatcherMultiError) AllErrors() []error { return m } - -// HeaderMatcherValidationError is the validation error returned by -// HeaderMatcher.Validate if the designated constraints aren't met. -type HeaderMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderMatcherValidationError) ErrorName() string { return "HeaderMatcherValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderMatcherValidationError{} - -var _HeaderMatcher_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on QueryParameterMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *QueryParameterMatcher) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on QueryParameterMatcher with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// QueryParameterMatcherMultiError, or nil if none found. -func (m *QueryParameterMatcher) ValidateAll() error { - return m.validate(true) -} - -func (m *QueryParameterMatcher) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if l := len(m.GetName()); l < 1 || l > 1024 { - err := QueryParameterMatcherValidationError{ - field: "Name", - reason: "value length must be between 1 and 1024 bytes, inclusive", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for Value - - if all { - switch v := interface{}(m.GetRegex()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, QueryParameterMatcherValidationError{ - field: "Regex", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, QueryParameterMatcherValidationError{ - field: "Regex", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRegex()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QueryParameterMatcherValidationError{ - field: "Regex", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.QueryParameterMatchSpecifier.(type) { - case *QueryParameterMatcher_StringMatch: - if v == nil { - err := QueryParameterMatcherValidationError{ - field: "QueryParameterMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetStringMatch() == nil { - err := QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetStringMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return QueryParameterMatcherValidationError{ - field: "StringMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *QueryParameterMatcher_PresentMatch: - if v == nil { - err := QueryParameterMatcherValidationError{ - field: "QueryParameterMatchSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for PresentMatch - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return QueryParameterMatcherMultiError(errors) - } - - return nil -} - -// QueryParameterMatcherMultiError is an error wrapping multiple validation -// errors returned by QueryParameterMatcher.ValidateAll() if the designated -// constraints aren't met. -type QueryParameterMatcherMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m QueryParameterMatcherMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m QueryParameterMatcherMultiError) AllErrors() []error { return m } - -// QueryParameterMatcherValidationError is the validation error returned by -// QueryParameterMatcher.Validate if the designated constraints aren't met. -type QueryParameterMatcherValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e QueryParameterMatcherValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e QueryParameterMatcherValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e QueryParameterMatcherValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e QueryParameterMatcherValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e QueryParameterMatcherValidationError) ErrorName() string { - return "QueryParameterMatcherValidationError" -} - -// Error satisfies the builtin error interface -func (e QueryParameterMatcherValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sQueryParameterMatcher.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = QueryParameterMatcherValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = QueryParameterMatcherValidationError{} - -// Validate checks the field values on WeightedCluster_ClusterWeight with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *WeightedCluster_ClusterWeight) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on WeightedCluster_ClusterWeight with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// WeightedCluster_ClusterWeightMultiError, or nil if none found. -func (m *WeightedCluster_ClusterWeight) ValidateAll() error { - return m.validate(true) -} - -func (m *WeightedCluster_ClusterWeight) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := WeightedCluster_ClusterWeightValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetWeight()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetWeight()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: "Weight", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadataMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: "MetadataMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetRequestHeadersToAdd()) > 1000 { - err := WeightedCluster_ClusterWeightValidationError{ - field: "RequestHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetRequestHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(m.GetResponseHeadersToAdd()) > 1000 { - err := WeightedCluster_ClusterWeightValidationError{ - field: "ResponseHeadersToAdd", - reason: "value must contain no more than 1000 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetResponseHeadersToAdd() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - { - sorted_keys := make([]string, len(m.GetPerFilterConfig())) - i := 0 - for key := range m.GetPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetPerFilterConfig()[key] - _ = val - - // no validation rules for PerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("PerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - { - sorted_keys := make([]string, len(m.GetTypedPerFilterConfig())) - i := 0 - for key := range m.GetTypedPerFilterConfig() { - sorted_keys[i] = key - i++ - } - sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) - for _, key := range sorted_keys { - val := m.GetTypedPerFilterConfig()[key] - _ = val - - // no validation rules for TypedPerFilterConfig[key] - - if all { - switch v := interface{}(val).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return WeightedCluster_ClusterWeightValidationError{ - field: fmt.Sprintf("TypedPerFilterConfig[%v]", key), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - } - - if len(errors) > 0 { - return WeightedCluster_ClusterWeightMultiError(errors) - } - - return nil -} - -// WeightedCluster_ClusterWeightMultiError is an error wrapping multiple -// validation errors returned by WeightedCluster_ClusterWeight.ValidateAll() -// if the designated constraints aren't met. -type WeightedCluster_ClusterWeightMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m WeightedCluster_ClusterWeightMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } - -// WeightedCluster_ClusterWeightValidationError is the validation error -// returned by WeightedCluster_ClusterWeight.Validate if the designated -// constraints aren't met. -type WeightedCluster_ClusterWeightValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e WeightedCluster_ClusterWeightValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e WeightedCluster_ClusterWeightValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e WeightedCluster_ClusterWeightValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e WeightedCluster_ClusterWeightValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e WeightedCluster_ClusterWeightValidationError) ErrorName() string { - return "WeightedCluster_ClusterWeightValidationError" -} - -// Error satisfies the builtin error interface -func (e WeightedCluster_ClusterWeightValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sWeightedCluster_ClusterWeight.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = WeightedCluster_ClusterWeightValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = WeightedCluster_ClusterWeightValidationError{} - -// Validate checks the field values on RouteMatch_GrpcRouteMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RouteMatch_GrpcRouteMatchOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteMatch_GrpcRouteMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteMatch_GrpcRouteMatchOptionsMultiError, or nil if none found. -func (m *RouteMatch_GrpcRouteMatchOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteMatch_GrpcRouteMatchOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RouteMatch_GrpcRouteMatchOptionsMultiError(errors) - } - - return nil -} - -// RouteMatch_GrpcRouteMatchOptionsMultiError is an error wrapping multiple -// validation errors returned by -// RouteMatch_GrpcRouteMatchOptions.ValidateAll() if the designated -// constraints aren't met. -type RouteMatch_GrpcRouteMatchOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMatch_GrpcRouteMatchOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMatch_GrpcRouteMatchOptionsMultiError) AllErrors() []error { return m } - -// RouteMatch_GrpcRouteMatchOptionsValidationError is the validation error -// returned by RouteMatch_GrpcRouteMatchOptions.Validate if the designated -// constraints aren't met. -type RouteMatch_GrpcRouteMatchOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) ErrorName() string { - return "RouteMatch_GrpcRouteMatchOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteMatch_GrpcRouteMatchOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch_GrpcRouteMatchOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatch_GrpcRouteMatchOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatch_GrpcRouteMatchOptionsValidationError{} - -// Validate checks the field values on RouteMatch_TlsContextMatchOptions with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RouteMatch_TlsContextMatchOptions) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteMatch_TlsContextMatchOptions -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RouteMatch_TlsContextMatchOptionsMultiError, or nil if none found. -func (m *RouteMatch_TlsContextMatchOptions) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteMatch_TlsContextMatchOptions) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetPresented()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Presented", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Presented", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPresented()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Presented", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetValidated()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Validated", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Validated", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValidated()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteMatch_TlsContextMatchOptionsValidationError{ - field: "Validated", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteMatch_TlsContextMatchOptionsMultiError(errors) - } - - return nil -} - -// RouteMatch_TlsContextMatchOptionsMultiError is an error wrapping multiple -// validation errors returned by -// RouteMatch_TlsContextMatchOptions.ValidateAll() if the designated -// constraints aren't met. -type RouteMatch_TlsContextMatchOptionsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteMatch_TlsContextMatchOptionsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteMatch_TlsContextMatchOptionsMultiError) AllErrors() []error { return m } - -// RouteMatch_TlsContextMatchOptionsValidationError is the validation error -// returned by RouteMatch_TlsContextMatchOptions.Validate if the designated -// constraints aren't met. -type RouteMatch_TlsContextMatchOptionsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteMatch_TlsContextMatchOptionsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteMatch_TlsContextMatchOptionsValidationError) ErrorName() string { - return "RouteMatch_TlsContextMatchOptionsValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteMatch_TlsContextMatchOptionsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteMatch_TlsContextMatchOptions.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteMatch_TlsContextMatchOptionsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteMatch_TlsContextMatchOptionsValidationError{} - -// Validate checks the field values on RouteAction_RequestMirrorPolicy with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_RequestMirrorPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_RequestMirrorPolicy with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteAction_RequestMirrorPolicyMultiError, or nil if none found. -func (m *RouteAction_RequestMirrorPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_RequestMirrorPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetCluster()) < 1 { - err := RouteAction_RequestMirrorPolicyValidationError{ - field: "Cluster", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for RuntimeKey - - if all { - switch v := interface{}(m.GetRuntimeFraction()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_RequestMirrorPolicyValidationError{ - field: "RuntimeFraction", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetTraceSampled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "TraceSampled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ - field: "TraceSampled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTraceSampled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_RequestMirrorPolicyValidationError{ - field: "TraceSampled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteAction_RequestMirrorPolicyMultiError(errors) - } - - return nil -} - -// RouteAction_RequestMirrorPolicyMultiError is an error wrapping multiple -// validation errors returned by RouteAction_RequestMirrorPolicy.ValidateAll() -// if the designated constraints aren't met. -type RouteAction_RequestMirrorPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_RequestMirrorPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_RequestMirrorPolicyMultiError) AllErrors() []error { return m } - -// RouteAction_RequestMirrorPolicyValidationError is the validation error -// returned by RouteAction_RequestMirrorPolicy.Validate if the designated -// constraints aren't met. -type RouteAction_RequestMirrorPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_RequestMirrorPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_RequestMirrorPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_RequestMirrorPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_RequestMirrorPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_RequestMirrorPolicyValidationError) ErrorName() string { - return "RouteAction_RequestMirrorPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_RequestMirrorPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_RequestMirrorPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_RequestMirrorPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_RequestMirrorPolicyValidationError{} - -// Validate checks the field values on RouteAction_HashPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicyMultiError, or nil if none found. -func (m *RouteAction_HashPolicy) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Terminal - - oneofPolicySpecifierPresent := false - switch v := m.PolicySpecifier.(type) { - case *RouteAction_HashPolicy_Header_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetHeader()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_Cookie_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetCookie()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Cookie", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "Cookie", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "Cookie", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_ConnectionProperties_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetConnectionProperties()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "ConnectionProperties", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "ConnectionProperties", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "ConnectionProperties", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_QueryParameter_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetQueryParameter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "QueryParameter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "QueryParameter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetQueryParameter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "QueryParameter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RouteAction_HashPolicy_FilterState_: - if v == nil { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofPolicySpecifierPresent = true - - if all { - switch v := interface{}(m.GetFilterState()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicyValidationError{ - field: "FilterState", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofPolicySpecifierPresent { - err := RouteAction_HashPolicyValidationError{ - field: "PolicySpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicyMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicyMultiError is an error wrapping multiple validation -// errors returned by RouteAction_HashPolicy.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicyMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicyValidationError is the validation error returned by -// RouteAction_HashPolicy.Validate if the designated constraints aren't met. -type RouteAction_HashPolicyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicyValidationError) ErrorName() string { - return "RouteAction_HashPolicyValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicyValidationError{} - -// Validate checks the field values on RouteAction_UpgradeConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_UpgradeConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_UpgradeConfig with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RouteAction_UpgradeConfigMultiError, or nil if none found. -func (m *RouteAction_UpgradeConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_UpgradeConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if !_RouteAction_UpgradeConfig_UpgradeType_Pattern.MatchString(m.GetUpgradeType()) { - err := RouteAction_UpgradeConfigValidationError{ - field: "UpgradeType", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetEnabled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_UpgradeConfigValidationError{ - field: "Enabled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RouteAction_UpgradeConfigMultiError(errors) - } - - return nil -} - -// RouteAction_UpgradeConfigMultiError is an error wrapping multiple validation -// errors returned by RouteAction_UpgradeConfig.ValidateAll() if the -// designated constraints aren't met. -type RouteAction_UpgradeConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_UpgradeConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_UpgradeConfigMultiError) AllErrors() []error { return m } - -// RouteAction_UpgradeConfigValidationError is the validation error returned by -// RouteAction_UpgradeConfig.Validate if the designated constraints aren't met. -type RouteAction_UpgradeConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_UpgradeConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_UpgradeConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_UpgradeConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_UpgradeConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_UpgradeConfigValidationError) ErrorName() string { - return "RouteAction_UpgradeConfigValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_UpgradeConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_UpgradeConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_UpgradeConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_UpgradeConfigValidationError{} - -var _RouteAction_UpgradeConfig_UpgradeType_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteAction_HashPolicy_Header with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy_Header) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_Header with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_HeaderMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_Header) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_Header) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetHeaderName()) < 1 { - err := RouteAction_HashPolicy_HeaderValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RouteAction_HashPolicy_Header_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := RouteAction_HashPolicy_HeaderValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_HeaderMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_HeaderMultiError is an error wrapping multiple -// validation errors returned by RouteAction_HashPolicy_Header.ValidateAll() -// if the designated constraints aren't met. -type RouteAction_HashPolicy_HeaderMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_HeaderMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_HeaderMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_HeaderValidationError is the validation error -// returned by RouteAction_HashPolicy_Header.Validate if the designated -// constraints aren't met. -type RouteAction_HashPolicy_HeaderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_HeaderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_HeaderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_HeaderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_HeaderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_HeaderValidationError) ErrorName() string { - return "RouteAction_HashPolicy_HeaderValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_HeaderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_Header.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_HeaderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_HeaderValidationError{} - -var _RouteAction_HashPolicy_Header_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RouteAction_HashPolicy_Cookie with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy_Cookie) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_Cookie with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_CookieMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_Cookie) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_Cookie) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := RouteAction_HashPolicy_CookieValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTtl()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RouteAction_HashPolicy_CookieValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RouteAction_HashPolicy_CookieValidationError{ - field: "Ttl", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for Path - - if len(errors) > 0 { - return RouteAction_HashPolicy_CookieMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_CookieMultiError is an error wrapping multiple -// validation errors returned by RouteAction_HashPolicy_Cookie.ValidateAll() -// if the designated constraints aren't met. -type RouteAction_HashPolicy_CookieMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_CookieMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_CookieMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_CookieValidationError is the validation error -// returned by RouteAction_HashPolicy_Cookie.Validate if the designated -// constraints aren't met. -type RouteAction_HashPolicy_CookieValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_CookieValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_CookieValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_CookieValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_CookieValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_CookieValidationError) ErrorName() string { - return "RouteAction_HashPolicy_CookieValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_CookieValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_Cookie.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_CookieValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_CookieValidationError{} - -// Validate checks the field values on -// RouteAction_HashPolicy_ConnectionProperties with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RouteAction_HashPolicy_ConnectionProperties) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RouteAction_HashPolicy_ConnectionProperties with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// RouteAction_HashPolicy_ConnectionPropertiesMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_ConnectionProperties) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_ConnectionProperties) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for SourceIp - - if len(errors) > 0 { - return RouteAction_HashPolicy_ConnectionPropertiesMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_ConnectionPropertiesMultiError is an error wrapping -// multiple validation errors returned by -// RouteAction_HashPolicy_ConnectionProperties.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicy_ConnectionPropertiesMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_ConnectionPropertiesMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_ConnectionPropertiesValidationError is the validation -// error returned by RouteAction_HashPolicy_ConnectionProperties.Validate if -// the designated constraints aren't met. -type RouteAction_HashPolicy_ConnectionPropertiesValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) ErrorName() string { - return "RouteAction_HashPolicy_ConnectionPropertiesValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_ConnectionPropertiesValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_ConnectionProperties.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_ConnectionPropertiesValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_ConnectionPropertiesValidationError{} - -// Validate checks the field values on RouteAction_HashPolicy_QueryParameter -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RouteAction_HashPolicy_QueryParameter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_QueryParameter -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_QueryParameterMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_QueryParameter) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_QueryParameter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := RouteAction_HashPolicy_QueryParameterValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_QueryParameterMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_QueryParameterMultiError is an error wrapping -// multiple validation errors returned by -// RouteAction_HashPolicy_QueryParameter.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicy_QueryParameterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_QueryParameterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_QueryParameterMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_QueryParameterValidationError is the validation error -// returned by RouteAction_HashPolicy_QueryParameter.Validate if the -// designated constraints aren't met. -type RouteAction_HashPolicy_QueryParameterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_QueryParameterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_QueryParameterValidationError) ErrorName() string { - return "RouteAction_HashPolicy_QueryParameterValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_QueryParameterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_QueryParameter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_QueryParameterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_QueryParameterValidationError{} - -// Validate checks the field values on RouteAction_HashPolicy_FilterState with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RouteAction_HashPolicy_FilterState) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RouteAction_HashPolicy_FilterState -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RouteAction_HashPolicy_FilterStateMultiError, or nil if none found. -func (m *RouteAction_HashPolicy_FilterState) ValidateAll() error { - return m.validate(true) -} - -func (m *RouteAction_HashPolicy_FilterState) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetKey()) < 1 { - err := RouteAction_HashPolicy_FilterStateValidationError{ - field: "Key", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RouteAction_HashPolicy_FilterStateMultiError(errors) - } - - return nil -} - -// RouteAction_HashPolicy_FilterStateMultiError is an error wrapping multiple -// validation errors returned by -// RouteAction_HashPolicy_FilterState.ValidateAll() if the designated -// constraints aren't met. -type RouteAction_HashPolicy_FilterStateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RouteAction_HashPolicy_FilterStateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RouteAction_HashPolicy_FilterStateMultiError) AllErrors() []error { return m } - -// RouteAction_HashPolicy_FilterStateValidationError is the validation error -// returned by RouteAction_HashPolicy_FilterState.Validate if the designated -// constraints aren't met. -type RouteAction_HashPolicy_FilterStateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RouteAction_HashPolicy_FilterStateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RouteAction_HashPolicy_FilterStateValidationError) ErrorName() string { - return "RouteAction_HashPolicy_FilterStateValidationError" -} - -// Error satisfies the builtin error interface -func (e RouteAction_HashPolicy_FilterStateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRouteAction_HashPolicy_FilterState.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RouteAction_HashPolicy_FilterStateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RouteAction_HashPolicy_FilterStateValidationError{} - -// Validate checks the field values on RetryPolicy_RetryPriority with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy_RetryPriority) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_RetryPriority with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RetryPolicy_RetryPriorityMultiError, or nil if none found. -func (m *RetryPolicy_RetryPriority) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_RetryPriority) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := RetryPolicy_RetryPriorityValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *RetryPolicy_RetryPriority_Config: - if v == nil { - err := RetryPolicy_RetryPriorityValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicy_RetryPriorityValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicy_RetryPriorityValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RetryPriorityValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RetryPolicy_RetryPriority_TypedConfig: - if v == nil { - err := RetryPolicy_RetryPriorityValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicy_RetryPriorityValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicy_RetryPriorityValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RetryPriorityValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RetryPolicy_RetryPriorityMultiError(errors) - } - - return nil -} - -// RetryPolicy_RetryPriorityMultiError is an error wrapping multiple validation -// errors returned by RetryPolicy_RetryPriority.ValidateAll() if the -// designated constraints aren't met. -type RetryPolicy_RetryPriorityMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_RetryPriorityMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_RetryPriorityMultiError) AllErrors() []error { return m } - -// RetryPolicy_RetryPriorityValidationError is the validation error returned by -// RetryPolicy_RetryPriority.Validate if the designated constraints aren't met. -type RetryPolicy_RetryPriorityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RetryPriorityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RetryPriorityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RetryPriorityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RetryPriorityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RetryPriorityValidationError) ErrorName() string { - return "RetryPolicy_RetryPriorityValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RetryPriorityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RetryPriority.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RetryPriorityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RetryPriorityValidationError{} - -// Validate checks the field values on RetryPolicy_RetryHostPredicate with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy_RetryHostPredicate) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_RetryHostPredicate with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RetryPolicy_RetryHostPredicateMultiError, or nil if none found. -func (m *RetryPolicy_RetryHostPredicate) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_RetryHostPredicate) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := RetryPolicy_RetryHostPredicateValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - switch v := m.ConfigType.(type) { - case *RetryPolicy_RetryHostPredicate_Config: - if v == nil { - err := RetryPolicy_RetryHostPredicateValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RetryHostPredicateValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RetryPolicy_RetryHostPredicate_TypedConfig: - if v == nil { - err := RetryPolicy_RetryHostPredicateValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RetryPolicy_RetryHostPredicateValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RetryPolicy_RetryHostPredicateValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return RetryPolicy_RetryHostPredicateMultiError(errors) - } - - return nil -} - -// RetryPolicy_RetryHostPredicateMultiError is an error wrapping multiple -// validation errors returned by RetryPolicy_RetryHostPredicate.ValidateAll() -// if the designated constraints aren't met. -type RetryPolicy_RetryHostPredicateMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_RetryHostPredicateMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_RetryHostPredicateMultiError) AllErrors() []error { return m } - -// RetryPolicy_RetryHostPredicateValidationError is the validation error -// returned by RetryPolicy_RetryHostPredicate.Validate if the designated -// constraints aren't met. -type RetryPolicy_RetryHostPredicateValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RetryHostPredicateValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RetryHostPredicateValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RetryHostPredicateValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RetryHostPredicateValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RetryHostPredicateValidationError) ErrorName() string { - return "RetryPolicy_RetryHostPredicateValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RetryHostPredicateValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RetryHostPredicate.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RetryHostPredicateValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RetryHostPredicateValidationError{} - -// Validate checks the field values on RetryPolicy_RetryBackOff with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RetryPolicy_RetryBackOff) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RetryPolicy_RetryBackOff with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RetryPolicy_RetryBackOffMultiError, or nil if none found. -func (m *RetryPolicy_RetryBackOff) ValidateAll() error { - return m.validate(true) -} - -func (m *RetryPolicy_RetryBackOff) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetBaseInterval() == nil { - err := RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if d := m.GetBaseInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := RetryPolicy_RetryBackOffValidationError{ - field: "BaseInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if d := m.GetMaxInterval(); d != nil { - dur, err := d.AsDuration(), d.CheckValid() - if err != nil { - err = RetryPolicy_RetryBackOffValidationError{ - field: "MaxInterval", - reason: "value is not a valid duration", - cause: err, - } - if !all { - return err - } - errors = append(errors, err) - } else { - - gt := time.Duration(0*time.Second + 0*time.Nanosecond) - - if dur <= gt { - err := RetryPolicy_RetryBackOffValidationError{ - field: "MaxInterval", - reason: "value must be greater than 0s", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - } - - if len(errors) > 0 { - return RetryPolicy_RetryBackOffMultiError(errors) - } - - return nil -} - -// RetryPolicy_RetryBackOffMultiError is an error wrapping multiple validation -// errors returned by RetryPolicy_RetryBackOff.ValidateAll() if the designated -// constraints aren't met. -type RetryPolicy_RetryBackOffMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RetryPolicy_RetryBackOffMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RetryPolicy_RetryBackOffMultiError) AllErrors() []error { return m } - -// RetryPolicy_RetryBackOffValidationError is the validation error returned by -// RetryPolicy_RetryBackOff.Validate if the designated constraints aren't met. -type RetryPolicy_RetryBackOffValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RetryPolicy_RetryBackOffValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RetryPolicy_RetryBackOffValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RetryPolicy_RetryBackOffValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RetryPolicy_RetryBackOffValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RetryPolicy_RetryBackOffValidationError) ErrorName() string { - return "RetryPolicy_RetryBackOffValidationError" -} - -// Error satisfies the builtin error interface -func (e RetryPolicy_RetryBackOffValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRetryPolicy_RetryBackOff.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RetryPolicy_RetryBackOffValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RetryPolicy_RetryBackOffValidationError{} - -// Validate checks the field values on RateLimit_Action with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimit_ActionMultiError, or nil if none found. -func (m *RateLimit_Action) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofActionSpecifierPresent := false - switch v := m.ActionSpecifier.(type) { - case *RateLimit_Action_SourceCluster_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetSourceCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_DestinationCluster_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetDestinationCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_RequestHeaders_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRequestHeaders()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_RemoteAddress_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRemoteAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_GenericKey_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGenericKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimit_Action_HeaderValueMatch_: - if v == nil { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetHeaderValueMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofActionSpecifierPresent { - err := RateLimit_ActionValidationError{ - field: "ActionSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimit_ActionMultiError(errors) - } - - return nil -} - -// RateLimit_ActionMultiError is an error wrapping multiple validation errors -// returned by RateLimit_Action.ValidateAll() if the designated constraints -// aren't met. -type RateLimit_ActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_ActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_ActionMultiError) AllErrors() []error { return m } - -// RateLimit_ActionValidationError is the validation error returned by -// RateLimit_Action.Validate if the designated constraints aren't met. -type RateLimit_ActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_ActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_ActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_ActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_ActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_ActionValidationError) ErrorName() string { return "RateLimit_ActionValidationError" } - -// Error satisfies the builtin error interface -func (e RateLimit_ActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_ActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_ActionValidationError{} - -// Validate checks the field values on RateLimit_Action_SourceCluster with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_SourceCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_SourceCluster with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_SourceClusterMultiError, or nil if none found. -func (m *RateLimit_Action_SourceCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_SourceCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimit_Action_SourceClusterMultiError(errors) - } - - return nil -} - -// RateLimit_Action_SourceClusterMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_SourceCluster.ValidateAll() -// if the designated constraints aren't met. -type RateLimit_Action_SourceClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_SourceClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_SourceClusterMultiError) AllErrors() []error { return m } - -// RateLimit_Action_SourceClusterValidationError is the validation error -// returned by RateLimit_Action_SourceCluster.Validate if the designated -// constraints aren't met. -type RateLimit_Action_SourceClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_SourceClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_SourceClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_SourceClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_SourceClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_SourceClusterValidationError) ErrorName() string { - return "RateLimit_Action_SourceClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_SourceClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_SourceCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_SourceClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_SourceClusterValidationError{} - -// Validate checks the field values on RateLimit_Action_DestinationCluster with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RateLimit_Action_DestinationCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_DestinationCluster -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_DestinationClusterMultiError, or nil if none found. -func (m *RateLimit_Action_DestinationCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_DestinationCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimit_Action_DestinationClusterMultiError(errors) - } - - return nil -} - -// RateLimit_Action_DestinationClusterMultiError is an error wrapping multiple -// validation errors returned by -// RateLimit_Action_DestinationCluster.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Action_DestinationClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_DestinationClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_DestinationClusterMultiError) AllErrors() []error { return m } - -// RateLimit_Action_DestinationClusterValidationError is the validation error -// returned by RateLimit_Action_DestinationCluster.Validate if the designated -// constraints aren't met. -type RateLimit_Action_DestinationClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_DestinationClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_DestinationClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_DestinationClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_DestinationClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_DestinationClusterValidationError) ErrorName() string { - return "RateLimit_Action_DestinationClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_DestinationClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_DestinationCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_DestinationClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_DestinationClusterValidationError{} - -// Validate checks the field values on RateLimit_Action_RequestHeaders with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_RequestHeaders) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_RequestHeaders with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_RequestHeadersMultiError, or nil if none found. -func (m *RateLimit_Action_RequestHeaders) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_RequestHeaders) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetHeaderName()) < 1 { - err := RateLimit_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RateLimit_Action_RequestHeaders_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := RateLimit_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetDescriptorKey()) < 1 { - err := RateLimit_Action_RequestHeadersValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimit_Action_RequestHeadersMultiError(errors) - } - - return nil -} - -// RateLimit_Action_RequestHeadersMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_RequestHeaders.ValidateAll() -// if the designated constraints aren't met. -type RateLimit_Action_RequestHeadersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_RequestHeadersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_RequestHeadersMultiError) AllErrors() []error { return m } - -// RateLimit_Action_RequestHeadersValidationError is the validation error -// returned by RateLimit_Action_RequestHeaders.Validate if the designated -// constraints aren't met. -type RateLimit_Action_RequestHeadersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_RequestHeadersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_RequestHeadersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_RequestHeadersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_RequestHeadersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_RequestHeadersValidationError) ErrorName() string { - return "RateLimit_Action_RequestHeadersValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_RequestHeadersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_RequestHeaders.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_RequestHeadersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_RequestHeadersValidationError{} - -var _RateLimit_Action_RequestHeaders_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RateLimit_Action_RemoteAddress with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_RemoteAddress) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_RemoteAddress with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_RemoteAddressMultiError, or nil if none found. -func (m *RateLimit_Action_RemoteAddress) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_RemoteAddress) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimit_Action_RemoteAddressMultiError(errors) - } - - return nil -} - -// RateLimit_Action_RemoteAddressMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_RemoteAddress.ValidateAll() -// if the designated constraints aren't met. -type RateLimit_Action_RemoteAddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_RemoteAddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_RemoteAddressMultiError) AllErrors() []error { return m } - -// RateLimit_Action_RemoteAddressValidationError is the validation error -// returned by RateLimit_Action_RemoteAddress.Validate if the designated -// constraints aren't met. -type RateLimit_Action_RemoteAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_RemoteAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_RemoteAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_RemoteAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_RemoteAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_RemoteAddressValidationError) ErrorName() string { - return "RateLimit_Action_RemoteAddressValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_RemoteAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_RemoteAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_RemoteAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_RemoteAddressValidationError{} - -// Validate checks the field values on RateLimit_Action_GenericKey with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimit_Action_GenericKey) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_GenericKey with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimit_Action_GenericKeyMultiError, or nil if none found. -func (m *RateLimit_Action_GenericKey) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_GenericKey) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetDescriptorValue()) < 1 { - err := RateLimit_Action_GenericKeyValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimit_Action_GenericKeyMultiError(errors) - } - - return nil -} - -// RateLimit_Action_GenericKeyMultiError is an error wrapping multiple -// validation errors returned by RateLimit_Action_GenericKey.ValidateAll() if -// the designated constraints aren't met. -type RateLimit_Action_GenericKeyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_GenericKeyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_GenericKeyMultiError) AllErrors() []error { return m } - -// RateLimit_Action_GenericKeyValidationError is the validation error returned -// by RateLimit_Action_GenericKey.Validate if the designated constraints -// aren't met. -type RateLimit_Action_GenericKeyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_GenericKeyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_GenericKeyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_GenericKeyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_GenericKeyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_GenericKeyValidationError) ErrorName() string { - return "RateLimit_Action_GenericKeyValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_GenericKeyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_GenericKey.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_GenericKeyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_GenericKeyValidationError{} - -// Validate checks the field values on RateLimit_Action_HeaderValueMatch with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RateLimit_Action_HeaderValueMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimit_Action_HeaderValueMatch -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimit_Action_HeaderValueMatchMultiError, or nil if none found. -func (m *RateLimit_Action_HeaderValueMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimit_Action_HeaderValueMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetDescriptorValue()) < 1 { - err := RateLimit_Action_HeaderValueMatchValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetExpectMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExpectMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_HeaderValueMatchValidationError{ - field: "ExpectMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetHeaders()) < 1 { - err := RateLimit_Action_HeaderValueMatchValidationError{ - field: "Headers", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimit_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimit_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RateLimit_Action_HeaderValueMatchMultiError(errors) - } - - return nil -} - -// RateLimit_Action_HeaderValueMatchMultiError is an error wrapping multiple -// validation errors returned by -// RateLimit_Action_HeaderValueMatch.ValidateAll() if the designated -// constraints aren't met. -type RateLimit_Action_HeaderValueMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimit_Action_HeaderValueMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimit_Action_HeaderValueMatchMultiError) AllErrors() []error { return m } - -// RateLimit_Action_HeaderValueMatchValidationError is the validation error -// returned by RateLimit_Action_HeaderValueMatch.Validate if the designated -// constraints aren't met. -type RateLimit_Action_HeaderValueMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimit_Action_HeaderValueMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimit_Action_HeaderValueMatchValidationError) ErrorName() string { - return "RateLimit_Action_HeaderValueMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimit_Action_HeaderValueMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimit_Action_HeaderValueMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimit_Action_HeaderValueMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimit_Action_HeaderValueMatchValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go deleted file mode 100644 index 3808fdeeb287..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.go +++ /dev/null @@ -1,413 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/scoped_route.proto - -package apiv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name). -// -// The HTTP connection manager builds up a table consisting of these Key to -// RouteConfiguration mappings, and looks up the RouteConfiguration to use per -// request according to the algorithm specified in the -// :ref:`scope_key_builder` -// assigned to the HttpConnectionManager. -// -// For example, with the following configurations (in YAML): -// -// HttpConnectionManager config: -// -// .. code:: -// -// ... -// scoped_routes: -// name: foo-scoped-routes -// scope_key_builder: -// fragments: -// - header_value_extractor: -// name: X-Route-Selector -// element_separator: , -// element: -// separator: = -// key: vip -// -// ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` -// or obtained dynamically via SRDS): -// -// .. code:: -// -// (1) -// name: route-scope1 -// route_configuration_name: route-config1 -// key: -// fragments: -// - string_key: 172.10.10.20 -// -// (2) -// name: route-scope2 -// route_configuration_name: route-config2 -// key: -// fragments: -// - string_key: 172.20.20.30 -// -// A request from a client such as: -// -// .. code:: -// -// GET / HTTP/1.1 -// Host: foo.com -// X-Route-Selector: vip=172.10.10.20 -// -// would result in the routing table defined by the `route-config1` -// RouteConfiguration being assigned to the HTTP request/stream. -// -type ScopedRouteConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name assigned to the routing scope. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated - // with this scope. - RouteConfigurationName string `protobuf:"bytes,2,opt,name=route_configuration_name,json=routeConfigurationName,proto3" json:"route_configuration_name,omitempty"` - // The key to match against. - Key *ScopedRouteConfiguration_Key `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *ScopedRouteConfiguration) Reset() { - *x = ScopedRouteConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_scoped_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration) ProtoMessage() {} - -func (x *ScopedRouteConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_scoped_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_scoped_route_proto_rawDescGZIP(), []int{0} -} - -func (x *ScopedRouteConfiguration) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ScopedRouteConfiguration) GetRouteConfigurationName() string { - if x != nil { - return x.RouteConfigurationName - } - return "" -} - -func (x *ScopedRouteConfiguration) GetKey() *ScopedRouteConfiguration_Key { - if x != nil { - return x.Key - } - return nil -} - -// Specifies a key which is matched against the output of the -// :ref:`scope_key_builder` -// specified in the HttpConnectionManager. The matching is done per HTTP -// request and is dependent on the order of the fragments contained in the -// Key. -type ScopedRouteConfiguration_Key struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The ordered set of fragments to match against. The order must match the - // fragments in the corresponding - // :ref:`scope_key_builder`. - Fragments []*ScopedRouteConfiguration_Key_Fragment `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"` -} - -func (x *ScopedRouteConfiguration_Key) Reset() { - *x = ScopedRouteConfiguration_Key{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_scoped_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration_Key) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration_Key) ProtoMessage() {} - -func (x *ScopedRouteConfiguration_Key) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_scoped_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration_Key.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration_Key) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_scoped_route_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *ScopedRouteConfiguration_Key) GetFragments() []*ScopedRouteConfiguration_Key_Fragment { - if x != nil { - return x.Fragments - } - return nil -} - -type ScopedRouteConfiguration_Key_Fragment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // *ScopedRouteConfiguration_Key_Fragment_StringKey - Type isScopedRouteConfiguration_Key_Fragment_Type `protobuf_oneof:"type"` -} - -func (x *ScopedRouteConfiguration_Key_Fragment) Reset() { - *x = ScopedRouteConfiguration_Key_Fragment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_scoped_route_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ScopedRouteConfiguration_Key_Fragment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScopedRouteConfiguration_Key_Fragment) ProtoMessage() {} - -func (x *ScopedRouteConfiguration_Key_Fragment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_scoped_route_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScopedRouteConfiguration_Key_Fragment.ProtoReflect.Descriptor instead. -func (*ScopedRouteConfiguration_Key_Fragment) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_scoped_route_proto_rawDescGZIP(), []int{0, 0, 0} -} - -func (m *ScopedRouteConfiguration_Key_Fragment) GetType() isScopedRouteConfiguration_Key_Fragment_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *ScopedRouteConfiguration_Key_Fragment) GetStringKey() string { - if x, ok := x.GetType().(*ScopedRouteConfiguration_Key_Fragment_StringKey); ok { - return x.StringKey - } - return "" -} - -type isScopedRouteConfiguration_Key_Fragment_Type interface { - isScopedRouteConfiguration_Key_Fragment_Type() -} - -type ScopedRouteConfiguration_Key_Fragment_StringKey struct { - // A string to match against. - StringKey string `protobuf:"bytes,1,opt,name=string_key,json=stringKey,proto3,oneof"` -} - -func (*ScopedRouteConfiguration_Key_Fragment_StringKey) isScopedRouteConfiguration_Key_Fragment_Type() { -} - -var File_envoy_api_v2_scoped_route_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_scoped_route_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, - 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x02, 0x0a, 0x18, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x41, 0x0a, 0x18, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x16, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0x9c, 0x01, 0x0a, - 0x03, 0x4b, 0x65, 0x79, 0x12, 0x5b, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x4b, 0x65, 0x79, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x1a, 0x38, 0x0a, 0x08, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, - 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x42, 0x0b, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x90, 0x01, 0x0a, 0x1a, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x17, 0x12, - 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_scoped_route_proto_rawDescOnce sync.Once - file_envoy_api_v2_scoped_route_proto_rawDescData = file_envoy_api_v2_scoped_route_proto_rawDesc -) - -func file_envoy_api_v2_scoped_route_proto_rawDescGZIP() []byte { - file_envoy_api_v2_scoped_route_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_scoped_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_scoped_route_proto_rawDescData) - }) - return file_envoy_api_v2_scoped_route_proto_rawDescData -} - -var file_envoy_api_v2_scoped_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_envoy_api_v2_scoped_route_proto_goTypes = []interface{}{ - (*ScopedRouteConfiguration)(nil), // 0: envoy.api.v2.ScopedRouteConfiguration - (*ScopedRouteConfiguration_Key)(nil), // 1: envoy.api.v2.ScopedRouteConfiguration.Key - (*ScopedRouteConfiguration_Key_Fragment)(nil), // 2: envoy.api.v2.ScopedRouteConfiguration.Key.Fragment -} -var file_envoy_api_v2_scoped_route_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.ScopedRouteConfiguration.key:type_name -> envoy.api.v2.ScopedRouteConfiguration.Key - 2, // 1: envoy.api.v2.ScopedRouteConfiguration.Key.fragments:type_name -> envoy.api.v2.ScopedRouteConfiguration.Key.Fragment - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_scoped_route_proto_init() } -func file_envoy_api_v2_scoped_route_proto_init() { - if File_envoy_api_v2_scoped_route_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_scoped_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_scoped_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration_Key); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_api_v2_scoped_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ScopedRouteConfiguration_Key_Fragment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_api_v2_scoped_route_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*ScopedRouteConfiguration_Key_Fragment_StringKey)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_scoped_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_api_v2_scoped_route_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_scoped_route_proto_depIdxs, - MessageInfos: file_envoy_api_v2_scoped_route_proto_msgTypes, - }.Build() - File_envoy_api_v2_scoped_route_proto = out.File - file_envoy_api_v2_scoped_route_proto_rawDesc = nil - file_envoy_api_v2_scoped_route_proto_goTypes = nil - file_envoy_api_v2_scoped_route_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go deleted file mode 100644 index 4f77fd9028ba..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go +++ /dev/null @@ -1,482 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/scoped_route.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ScopedRouteConfiguration with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ScopedRouteConfiguration) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ScopedRouteConfiguration with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ScopedRouteConfigurationMultiError, or nil if none found. -func (m *ScopedRouteConfiguration) ValidateAll() error { - return m.validate(true) -} - -func (m *ScopedRouteConfiguration) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := ScopedRouteConfigurationValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetRouteConfigurationName()) < 1 { - err := ScopedRouteConfigurationValidationError{ - field: "RouteConfigurationName", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetKey() == nil { - err := ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRouteConfigurationValidationError{ - field: "Key", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ScopedRouteConfigurationMultiError(errors) - } - - return nil -} - -// ScopedRouteConfigurationMultiError is an error wrapping multiple validation -// errors returned by ScopedRouteConfiguration.ValidateAll() if the designated -// constraints aren't met. -type ScopedRouteConfigurationMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ScopedRouteConfigurationMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ScopedRouteConfigurationMultiError) AllErrors() []error { return m } - -// ScopedRouteConfigurationValidationError is the validation error returned by -// ScopedRouteConfiguration.Validate if the designated constraints aren't met. -type ScopedRouteConfigurationValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRouteConfigurationValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ScopedRouteConfigurationValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ScopedRouteConfigurationValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRouteConfigurationValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRouteConfigurationValidationError) ErrorName() string { - return "ScopedRouteConfigurationValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRouteConfigurationValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRouteConfiguration.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRouteConfigurationValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRouteConfigurationValidationError{} - -// Validate checks the field values on ScopedRouteConfiguration_Key with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ScopedRouteConfiguration_Key) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ScopedRouteConfiguration_Key with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ScopedRouteConfiguration_KeyMultiError, or nil if none found. -func (m *ScopedRouteConfiguration_Key) ValidateAll() error { - return m.validate(true) -} - -func (m *ScopedRouteConfiguration_Key) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetFragments()) < 1 { - err := ScopedRouteConfiguration_KeyValidationError{ - field: "Fragments", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetFragments() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ - field: fmt.Sprintf("Fragments[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ScopedRouteConfiguration_KeyValidationError{ - field: fmt.Sprintf("Fragments[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ScopedRouteConfiguration_KeyValidationError{ - field: fmt.Sprintf("Fragments[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ScopedRouteConfiguration_KeyMultiError(errors) - } - - return nil -} - -// ScopedRouteConfiguration_KeyMultiError is an error wrapping multiple -// validation errors returned by ScopedRouteConfiguration_Key.ValidateAll() if -// the designated constraints aren't met. -type ScopedRouteConfiguration_KeyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ScopedRouteConfiguration_KeyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ScopedRouteConfiguration_KeyMultiError) AllErrors() []error { return m } - -// ScopedRouteConfiguration_KeyValidationError is the validation error returned -// by ScopedRouteConfiguration_Key.Validate if the designated constraints -// aren't met. -type ScopedRouteConfiguration_KeyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRouteConfiguration_KeyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ScopedRouteConfiguration_KeyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ScopedRouteConfiguration_KeyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRouteConfiguration_KeyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRouteConfiguration_KeyValidationError) ErrorName() string { - return "ScopedRouteConfiguration_KeyValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRouteConfiguration_KeyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRouteConfiguration_Key.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRouteConfiguration_KeyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRouteConfiguration_KeyValidationError{} - -// Validate checks the field values on ScopedRouteConfiguration_Key_Fragment -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *ScopedRouteConfiguration_Key_Fragment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ScopedRouteConfiguration_Key_Fragment -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// ScopedRouteConfiguration_Key_FragmentMultiError, or nil if none found. -func (m *ScopedRouteConfiguration_Key_Fragment) ValidateAll() error { - return m.validate(true) -} - -func (m *ScopedRouteConfiguration_Key_Fragment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofTypePresent := false - switch v := m.Type.(type) { - case *ScopedRouteConfiguration_Key_Fragment_StringKey: - if v == nil { - err := ScopedRouteConfiguration_Key_FragmentValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - // no validation rules for StringKey - default: - _ = v // ensures v is used - } - if !oneofTypePresent { - err := ScopedRouteConfiguration_Key_FragmentValidationError{ - field: "Type", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return ScopedRouteConfiguration_Key_FragmentMultiError(errors) - } - - return nil -} - -// ScopedRouteConfiguration_Key_FragmentMultiError is an error wrapping -// multiple validation errors returned by -// ScopedRouteConfiguration_Key_Fragment.ValidateAll() if the designated -// constraints aren't met. -type ScopedRouteConfiguration_Key_FragmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ScopedRouteConfiguration_Key_FragmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ScopedRouteConfiguration_Key_FragmentMultiError) AllErrors() []error { return m } - -// ScopedRouteConfiguration_Key_FragmentValidationError is the validation error -// returned by ScopedRouteConfiguration_Key_Fragment.Validate if the -// designated constraints aren't met. -type ScopedRouteConfiguration_Key_FragmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ScopedRouteConfiguration_Key_FragmentValidationError) ErrorName() string { - return "ScopedRouteConfiguration_Key_FragmentValidationError" -} - -// Error satisfies the builtin error interface -func (e ScopedRouteConfiguration_Key_FragmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sScopedRouteConfiguration_Key_Fragment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ScopedRouteConfiguration_Key_FragmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ScopedRouteConfiguration_Key_FragmentValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go deleted file mode 100644 index a127d4f21ec1..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.go +++ /dev/null @@ -1,416 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/api/v2/srds.proto - -package apiv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -type SrdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SrdsDummy) Reset() { - *x = SrdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_api_v2_srds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SrdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SrdsDummy) ProtoMessage() {} - -func (x *SrdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_api_v2_srds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SrdsDummy.ProtoReflect.Descriptor instead. -func (*SrdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_api_v2_srds_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_api_v2_srds_proto protoreflect.FileDescriptor - -var file_envoy_api_v2_srds_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, - 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x53, 0x72, 0x64, 0x73, 0x44, 0x75, 0x6d, - 0x6d, 0x79, 0x32, 0x95, 0x03, 0x0a, 0x1c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x3a, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x2d, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x2d, 0x8a, 0xa4, 0x96, - 0xf3, 0x07, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8d, 0x01, 0x0a, 0x1a, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x09, 0x53, 0x72, 0x64, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, - 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x50, 0x05, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_api_v2_srds_proto_rawDescOnce sync.Once - file_envoy_api_v2_srds_proto_rawDescData = file_envoy_api_v2_srds_proto_rawDesc -) - -func file_envoy_api_v2_srds_proto_rawDescGZIP() []byte { - file_envoy_api_v2_srds_proto_rawDescOnce.Do(func() { - file_envoy_api_v2_srds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_api_v2_srds_proto_rawDescData) - }) - return file_envoy_api_v2_srds_proto_rawDescData -} - -var file_envoy_api_v2_srds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_api_v2_srds_proto_goTypes = []interface{}{ - (*SrdsDummy)(nil), // 0: envoy.api.v2.SrdsDummy - (*DiscoveryRequest)(nil), // 1: envoy.api.v2.DiscoveryRequest - (*DeltaDiscoveryRequest)(nil), // 2: envoy.api.v2.DeltaDiscoveryRequest - (*DiscoveryResponse)(nil), // 3: envoy.api.v2.DiscoveryResponse - (*DeltaDiscoveryResponse)(nil), // 4: envoy.api.v2.DeltaDiscoveryResponse -} -var file_envoy_api_v2_srds_proto_depIdxs = []int32{ - 1, // 0: envoy.api.v2.ScopedRoutesDiscoveryService.StreamScopedRoutes:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 1: envoy.api.v2.ScopedRoutesDiscoveryService.DeltaScopedRoutes:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 1, // 2: envoy.api.v2.ScopedRoutesDiscoveryService.FetchScopedRoutes:input_type -> envoy.api.v2.DiscoveryRequest - 3, // 3: envoy.api.v2.ScopedRoutesDiscoveryService.StreamScopedRoutes:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 4: envoy.api.v2.ScopedRoutesDiscoveryService.DeltaScopedRoutes:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 3, // 5: envoy.api.v2.ScopedRoutesDiscoveryService.FetchScopedRoutes:output_type -> envoy.api.v2.DiscoveryResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_api_v2_srds_proto_init() } -func file_envoy_api_v2_srds_proto_init() { - if File_envoy_api_v2_srds_proto != nil { - return - } - file_envoy_api_v2_discovery_proto_init() - file_envoy_api_v2_scoped_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_envoy_api_v2_srds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SrdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_api_v2_srds_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_api_v2_srds_proto_goTypes, - DependencyIndexes: file_envoy_api_v2_srds_proto_depIdxs, - MessageInfos: file_envoy_api_v2_srds_proto_msgTypes, - }.Build() - File_envoy_api_v2_srds_proto = out.File - file_envoy_api_v2_srds_proto_rawDesc = nil - file_envoy_api_v2_srds_proto_goTypes = nil - file_envoy_api_v2_srds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ScopedRoutesDiscoveryServiceClient is the client API for ScopedRoutesDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ScopedRoutesDiscoveryServiceClient interface { - StreamScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_StreamScopedRoutesClient, error) - DeltaScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_DeltaScopedRoutesClient, error) - FetchScopedRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) -} - -type scopedRoutesDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewScopedRoutesDiscoveryServiceClient(cc grpc.ClientConnInterface) ScopedRoutesDiscoveryServiceClient { - return &scopedRoutesDiscoveryServiceClient{cc} -} - -func (c *scopedRoutesDiscoveryServiceClient) StreamScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_StreamScopedRoutesClient, error) { - stream, err := c.cc.NewStream(ctx, &_ScopedRoutesDiscoveryService_serviceDesc.Streams[0], "/envoy.api.v2.ScopedRoutesDiscoveryService/StreamScopedRoutes", opts...) - if err != nil { - return nil, err - } - x := &scopedRoutesDiscoveryServiceStreamScopedRoutesClient{stream} - return x, nil -} - -type ScopedRoutesDiscoveryService_StreamScopedRoutesClient interface { - Send(*DiscoveryRequest) error - Recv() (*DiscoveryResponse, error) - grpc.ClientStream -} - -type scopedRoutesDiscoveryServiceStreamScopedRoutesClient struct { - grpc.ClientStream -} - -func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesClient) Send(m *DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesClient) Recv() (*DiscoveryResponse, error) { - m := new(DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *scopedRoutesDiscoveryServiceClient) DeltaScopedRoutes(ctx context.Context, opts ...grpc.CallOption) (ScopedRoutesDiscoveryService_DeltaScopedRoutesClient, error) { - stream, err := c.cc.NewStream(ctx, &_ScopedRoutesDiscoveryService_serviceDesc.Streams[1], "/envoy.api.v2.ScopedRoutesDiscoveryService/DeltaScopedRoutes", opts...) - if err != nil { - return nil, err - } - x := &scopedRoutesDiscoveryServiceDeltaScopedRoutesClient{stream} - return x, nil -} - -type ScopedRoutesDiscoveryService_DeltaScopedRoutesClient interface { - Send(*DeltaDiscoveryRequest) error - Recv() (*DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type scopedRoutesDiscoveryServiceDeltaScopedRoutesClient struct { - grpc.ClientStream -} - -func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesClient) Send(m *DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesClient) Recv() (*DeltaDiscoveryResponse, error) { - m := new(DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *scopedRoutesDiscoveryServiceClient) FetchScopedRoutes(ctx context.Context, in *DiscoveryRequest, opts ...grpc.CallOption) (*DiscoveryResponse, error) { - out := new(DiscoveryResponse) - err := c.cc.Invoke(ctx, "/envoy.api.v2.ScopedRoutesDiscoveryService/FetchScopedRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ScopedRoutesDiscoveryServiceServer is the server API for ScopedRoutesDiscoveryService service. -type ScopedRoutesDiscoveryServiceServer interface { - StreamScopedRoutes(ScopedRoutesDiscoveryService_StreamScopedRoutesServer) error - DeltaScopedRoutes(ScopedRoutesDiscoveryService_DeltaScopedRoutesServer) error - FetchScopedRoutes(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) -} - -// UnimplementedScopedRoutesDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedScopedRoutesDiscoveryServiceServer struct { -} - -func (*UnimplementedScopedRoutesDiscoveryServiceServer) StreamScopedRoutes(ScopedRoutesDiscoveryService_StreamScopedRoutesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamScopedRoutes not implemented") -} -func (*UnimplementedScopedRoutesDiscoveryServiceServer) DeltaScopedRoutes(ScopedRoutesDiscoveryService_DeltaScopedRoutesServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaScopedRoutes not implemented") -} -func (*UnimplementedScopedRoutesDiscoveryServiceServer) FetchScopedRoutes(context.Context, *DiscoveryRequest) (*DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchScopedRoutes not implemented") -} - -func RegisterScopedRoutesDiscoveryServiceServer(s *grpc.Server, srv ScopedRoutesDiscoveryServiceServer) { - s.RegisterService(&_ScopedRoutesDiscoveryService_serviceDesc, srv) -} - -func _ScopedRoutesDiscoveryService_StreamScopedRoutes_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ScopedRoutesDiscoveryServiceServer).StreamScopedRoutes(&scopedRoutesDiscoveryServiceStreamScopedRoutesServer{stream}) -} - -type ScopedRoutesDiscoveryService_StreamScopedRoutesServer interface { - Send(*DiscoveryResponse) error - Recv() (*DiscoveryRequest, error) - grpc.ServerStream -} - -type scopedRoutesDiscoveryServiceStreamScopedRoutesServer struct { - grpc.ServerStream -} - -func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesServer) Send(m *DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *scopedRoutesDiscoveryServiceStreamScopedRoutesServer) Recv() (*DiscoveryRequest, error) { - m := new(DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ScopedRoutesDiscoveryService_DeltaScopedRoutes_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ScopedRoutesDiscoveryServiceServer).DeltaScopedRoutes(&scopedRoutesDiscoveryServiceDeltaScopedRoutesServer{stream}) -} - -type ScopedRoutesDiscoveryService_DeltaScopedRoutesServer interface { - Send(*DeltaDiscoveryResponse) error - Recv() (*DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type scopedRoutesDiscoveryServiceDeltaScopedRoutesServer struct { - grpc.ServerStream -} - -func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesServer) Send(m *DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *scopedRoutesDiscoveryServiceDeltaScopedRoutesServer) Recv() (*DeltaDiscoveryRequest, error) { - m := new(DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _ScopedRoutesDiscoveryService_FetchScopedRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ScopedRoutesDiscoveryServiceServer).FetchScopedRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.api.v2.ScopedRoutesDiscoveryService/FetchScopedRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ScopedRoutesDiscoveryServiceServer).FetchScopedRoutes(ctx, req.(*DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ScopedRoutesDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.api.v2.ScopedRoutesDiscoveryService", - HandlerType: (*ScopedRoutesDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchScopedRoutes", - Handler: _ScopedRoutesDiscoveryService_FetchScopedRoutes_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamScopedRoutes", - Handler: _ScopedRoutesDiscoveryService_StreamScopedRoutes_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaScopedRoutes", - Handler: _ScopedRoutesDiscoveryService_DeltaScopedRoutes_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/api/v2/srds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go deleted file mode 100644 index fd29f295368b..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/srds.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/api/v2/srds.proto - -package apiv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on SrdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SrdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SrdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SrdsDummyMultiError, or nil -// if none found. -func (m *SrdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *SrdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return SrdsDummyMultiError(errors) - } - - return nil -} - -// SrdsDummyMultiError is an error wrapping multiple validation errors returned -// by SrdsDummy.ValidateAll() if the designated constraints aren't met. -type SrdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SrdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SrdsDummyMultiError) AllErrors() []error { return m } - -// SrdsDummyValidationError is the validation error returned by -// SrdsDummy.Validate if the designated constraints aren't met. -type SrdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SrdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SrdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SrdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SrdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SrdsDummyValidationError) ErrorName() string { return "SrdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e SrdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSrdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SrdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SrdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go deleted file mode 100644 index 07274c40502f..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.go +++ /dev/null @@ -1,1692 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/config/filter/accesslog/v2/accesslog.proto - -package accesslogv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route" - _type "github.com/envoyproxy/go-control-plane/envoy/type" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - any1 "github.com/golang/protobuf/ptypes/any" - _struct "github.com/golang/protobuf/ptypes/struct" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ComparisonFilter_Op int32 - -const ( - // = - ComparisonFilter_EQ ComparisonFilter_Op = 0 - // >= - ComparisonFilter_GE ComparisonFilter_Op = 1 - // <= - ComparisonFilter_LE ComparisonFilter_Op = 2 -) - -// Enum value maps for ComparisonFilter_Op. -var ( - ComparisonFilter_Op_name = map[int32]string{ - 0: "EQ", - 1: "GE", - 2: "LE", - } - ComparisonFilter_Op_value = map[string]int32{ - "EQ": 0, - "GE": 1, - "LE": 2, - } -) - -func (x ComparisonFilter_Op) Enum() *ComparisonFilter_Op { - p := new(ComparisonFilter_Op) - *p = x - return p -} - -func (x ComparisonFilter_Op) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ComparisonFilter_Op) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_enumTypes[0].Descriptor() -} - -func (ComparisonFilter_Op) Type() protoreflect.EnumType { - return &file_envoy_config_filter_accesslog_v2_accesslog_proto_enumTypes[0] -} - -func (x ComparisonFilter_Op) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ComparisonFilter_Op.Descriptor instead. -func (ComparisonFilter_Op) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{2, 0} -} - -type GrpcStatusFilter_Status int32 - -const ( - GrpcStatusFilter_OK GrpcStatusFilter_Status = 0 - GrpcStatusFilter_CANCELED GrpcStatusFilter_Status = 1 - GrpcStatusFilter_UNKNOWN GrpcStatusFilter_Status = 2 - GrpcStatusFilter_INVALID_ARGUMENT GrpcStatusFilter_Status = 3 - GrpcStatusFilter_DEADLINE_EXCEEDED GrpcStatusFilter_Status = 4 - GrpcStatusFilter_NOT_FOUND GrpcStatusFilter_Status = 5 - GrpcStatusFilter_ALREADY_EXISTS GrpcStatusFilter_Status = 6 - GrpcStatusFilter_PERMISSION_DENIED GrpcStatusFilter_Status = 7 - GrpcStatusFilter_RESOURCE_EXHAUSTED GrpcStatusFilter_Status = 8 - GrpcStatusFilter_FAILED_PRECONDITION GrpcStatusFilter_Status = 9 - GrpcStatusFilter_ABORTED GrpcStatusFilter_Status = 10 - GrpcStatusFilter_OUT_OF_RANGE GrpcStatusFilter_Status = 11 - GrpcStatusFilter_UNIMPLEMENTED GrpcStatusFilter_Status = 12 - GrpcStatusFilter_INTERNAL GrpcStatusFilter_Status = 13 - GrpcStatusFilter_UNAVAILABLE GrpcStatusFilter_Status = 14 - GrpcStatusFilter_DATA_LOSS GrpcStatusFilter_Status = 15 - GrpcStatusFilter_UNAUTHENTICATED GrpcStatusFilter_Status = 16 -) - -// Enum value maps for GrpcStatusFilter_Status. -var ( - GrpcStatusFilter_Status_name = map[int32]string{ - 0: "OK", - 1: "CANCELED", - 2: "UNKNOWN", - 3: "INVALID_ARGUMENT", - 4: "DEADLINE_EXCEEDED", - 5: "NOT_FOUND", - 6: "ALREADY_EXISTS", - 7: "PERMISSION_DENIED", - 8: "RESOURCE_EXHAUSTED", - 9: "FAILED_PRECONDITION", - 10: "ABORTED", - 11: "OUT_OF_RANGE", - 12: "UNIMPLEMENTED", - 13: "INTERNAL", - 14: "UNAVAILABLE", - 15: "DATA_LOSS", - 16: "UNAUTHENTICATED", - } - GrpcStatusFilter_Status_value = map[string]int32{ - "OK": 0, - "CANCELED": 1, - "UNKNOWN": 2, - "INVALID_ARGUMENT": 3, - "DEADLINE_EXCEEDED": 4, - "NOT_FOUND": 5, - "ALREADY_EXISTS": 6, - "PERMISSION_DENIED": 7, - "RESOURCE_EXHAUSTED": 8, - "FAILED_PRECONDITION": 9, - "ABORTED": 10, - "OUT_OF_RANGE": 11, - "UNIMPLEMENTED": 12, - "INTERNAL": 13, - "UNAVAILABLE": 14, - "DATA_LOSS": 15, - "UNAUTHENTICATED": 16, - } -) - -func (x GrpcStatusFilter_Status) Enum() *GrpcStatusFilter_Status { - p := new(GrpcStatusFilter_Status) - *p = x - return p -} - -func (x GrpcStatusFilter_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GrpcStatusFilter_Status) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_enumTypes[1].Descriptor() -} - -func (GrpcStatusFilter_Status) Type() protoreflect.EnumType { - return &file_envoy_config_filter_accesslog_v2_accesslog_proto_enumTypes[1] -} - -func (x GrpcStatusFilter_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GrpcStatusFilter_Status.Descriptor instead. -func (GrpcStatusFilter_Status) EnumDescriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{12, 0} -} - -type AccessLog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the access log implementation to instantiate. The name must - // match a statically registered access log. Current built-in loggers include: - // - // #. "envoy.access_loggers.file" - // #. "envoy.access_loggers.http_grpc" - // #. "envoy.access_loggers.tcp_grpc" - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Filter which is used to determine if the access log needs to be written. - Filter *AccessLogFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` - // Custom configuration that depends on the access log being instantiated. Built-in - // configurations include: - // - // #. "envoy.access_loggers.file": :ref:`FileAccessLog - // ` - // #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig - // ` - // #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig - // ` - // - // Types that are assignable to ConfigType: - // *AccessLog_Config - // *AccessLog_TypedConfig - ConfigType isAccessLog_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *AccessLog) Reset() { - *x = AccessLog{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessLog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessLog) ProtoMessage() {} - -func (x *AccessLog) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessLog.ProtoReflect.Descriptor instead. -func (*AccessLog) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{0} -} - -func (x *AccessLog) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *AccessLog) GetFilter() *AccessLogFilter { - if x != nil { - return x.Filter - } - return nil -} - -func (m *AccessLog) GetConfigType() isAccessLog_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *AccessLog) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*AccessLog_Config); ok { - return x.Config - } - return nil -} - -func (x *AccessLog) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*AccessLog_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isAccessLog_ConfigType interface { - isAccessLog_ConfigType() -} - -type AccessLog_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,3,opt,name=config,proto3,oneof"` -} - -type AccessLog_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,4,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*AccessLog_Config) isAccessLog_ConfigType() {} - -func (*AccessLog_TypedConfig) isAccessLog_ConfigType() {} - -// [#next-free-field: 12] -type AccessLogFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to FilterSpecifier: - // *AccessLogFilter_StatusCodeFilter - // *AccessLogFilter_DurationFilter - // *AccessLogFilter_NotHealthCheckFilter - // *AccessLogFilter_TraceableFilter - // *AccessLogFilter_RuntimeFilter - // *AccessLogFilter_AndFilter - // *AccessLogFilter_OrFilter - // *AccessLogFilter_HeaderFilter - // *AccessLogFilter_ResponseFlagFilter - // *AccessLogFilter_GrpcStatusFilter - // *AccessLogFilter_ExtensionFilter - FilterSpecifier isAccessLogFilter_FilterSpecifier `protobuf_oneof:"filter_specifier"` -} - -func (x *AccessLogFilter) Reset() { - *x = AccessLogFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessLogFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessLogFilter) ProtoMessage() {} - -func (x *AccessLogFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccessLogFilter.ProtoReflect.Descriptor instead. -func (*AccessLogFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{1} -} - -func (m *AccessLogFilter) GetFilterSpecifier() isAccessLogFilter_FilterSpecifier { - if m != nil { - return m.FilterSpecifier - } - return nil -} - -func (x *AccessLogFilter) GetStatusCodeFilter() *StatusCodeFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_StatusCodeFilter); ok { - return x.StatusCodeFilter - } - return nil -} - -func (x *AccessLogFilter) GetDurationFilter() *DurationFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_DurationFilter); ok { - return x.DurationFilter - } - return nil -} - -func (x *AccessLogFilter) GetNotHealthCheckFilter() *NotHealthCheckFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_NotHealthCheckFilter); ok { - return x.NotHealthCheckFilter - } - return nil -} - -func (x *AccessLogFilter) GetTraceableFilter() *TraceableFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_TraceableFilter); ok { - return x.TraceableFilter - } - return nil -} - -func (x *AccessLogFilter) GetRuntimeFilter() *RuntimeFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_RuntimeFilter); ok { - return x.RuntimeFilter - } - return nil -} - -func (x *AccessLogFilter) GetAndFilter() *AndFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_AndFilter); ok { - return x.AndFilter - } - return nil -} - -func (x *AccessLogFilter) GetOrFilter() *OrFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_OrFilter); ok { - return x.OrFilter - } - return nil -} - -func (x *AccessLogFilter) GetHeaderFilter() *HeaderFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_HeaderFilter); ok { - return x.HeaderFilter - } - return nil -} - -func (x *AccessLogFilter) GetResponseFlagFilter() *ResponseFlagFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_ResponseFlagFilter); ok { - return x.ResponseFlagFilter - } - return nil -} - -func (x *AccessLogFilter) GetGrpcStatusFilter() *GrpcStatusFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_GrpcStatusFilter); ok { - return x.GrpcStatusFilter - } - return nil -} - -func (x *AccessLogFilter) GetExtensionFilter() *ExtensionFilter { - if x, ok := x.GetFilterSpecifier().(*AccessLogFilter_ExtensionFilter); ok { - return x.ExtensionFilter - } - return nil -} - -type isAccessLogFilter_FilterSpecifier interface { - isAccessLogFilter_FilterSpecifier() -} - -type AccessLogFilter_StatusCodeFilter struct { - // Status code filter. - StatusCodeFilter *StatusCodeFilter `protobuf:"bytes,1,opt,name=status_code_filter,json=statusCodeFilter,proto3,oneof"` -} - -type AccessLogFilter_DurationFilter struct { - // Duration filter. - DurationFilter *DurationFilter `protobuf:"bytes,2,opt,name=duration_filter,json=durationFilter,proto3,oneof"` -} - -type AccessLogFilter_NotHealthCheckFilter struct { - // Not health check filter. - NotHealthCheckFilter *NotHealthCheckFilter `protobuf:"bytes,3,opt,name=not_health_check_filter,json=notHealthCheckFilter,proto3,oneof"` -} - -type AccessLogFilter_TraceableFilter struct { - // Traceable filter. - TraceableFilter *TraceableFilter `protobuf:"bytes,4,opt,name=traceable_filter,json=traceableFilter,proto3,oneof"` -} - -type AccessLogFilter_RuntimeFilter struct { - // Runtime filter. - RuntimeFilter *RuntimeFilter `protobuf:"bytes,5,opt,name=runtime_filter,json=runtimeFilter,proto3,oneof"` -} - -type AccessLogFilter_AndFilter struct { - // And filter. - AndFilter *AndFilter `protobuf:"bytes,6,opt,name=and_filter,json=andFilter,proto3,oneof"` -} - -type AccessLogFilter_OrFilter struct { - // Or filter. - OrFilter *OrFilter `protobuf:"bytes,7,opt,name=or_filter,json=orFilter,proto3,oneof"` -} - -type AccessLogFilter_HeaderFilter struct { - // Header filter. - HeaderFilter *HeaderFilter `protobuf:"bytes,8,opt,name=header_filter,json=headerFilter,proto3,oneof"` -} - -type AccessLogFilter_ResponseFlagFilter struct { - // Response flag filter. - ResponseFlagFilter *ResponseFlagFilter `protobuf:"bytes,9,opt,name=response_flag_filter,json=responseFlagFilter,proto3,oneof"` -} - -type AccessLogFilter_GrpcStatusFilter struct { - // gRPC status filter. - GrpcStatusFilter *GrpcStatusFilter `protobuf:"bytes,10,opt,name=grpc_status_filter,json=grpcStatusFilter,proto3,oneof"` -} - -type AccessLogFilter_ExtensionFilter struct { - // Extension filter. - ExtensionFilter *ExtensionFilter `protobuf:"bytes,11,opt,name=extension_filter,json=extensionFilter,proto3,oneof"` -} - -func (*AccessLogFilter_StatusCodeFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_DurationFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_NotHealthCheckFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_TraceableFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_RuntimeFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_AndFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_OrFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_HeaderFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_ResponseFlagFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_GrpcStatusFilter) isAccessLogFilter_FilterSpecifier() {} - -func (*AccessLogFilter_ExtensionFilter) isAccessLogFilter_FilterSpecifier() {} - -// Filter on an integer comparison. -type ComparisonFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Comparison operator. - Op ComparisonFilter_Op `protobuf:"varint,1,opt,name=op,proto3,enum=envoy.config.filter.accesslog.v2.ComparisonFilter_Op" json:"op,omitempty"` - // Value to compare against. - Value *core.RuntimeUInt32 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *ComparisonFilter) Reset() { - *x = ComparisonFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ComparisonFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ComparisonFilter) ProtoMessage() {} - -func (x *ComparisonFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ComparisonFilter.ProtoReflect.Descriptor instead. -func (*ComparisonFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{2} -} - -func (x *ComparisonFilter) GetOp() ComparisonFilter_Op { - if x != nil { - return x.Op - } - return ComparisonFilter_EQ -} - -func (x *ComparisonFilter) GetValue() *core.RuntimeUInt32 { - if x != nil { - return x.Value - } - return nil -} - -// Filters on HTTP response/status code. -type StatusCodeFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Comparison. - Comparison *ComparisonFilter `protobuf:"bytes,1,opt,name=comparison,proto3" json:"comparison,omitempty"` -} - -func (x *StatusCodeFilter) Reset() { - *x = StatusCodeFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatusCodeFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatusCodeFilter) ProtoMessage() {} - -func (x *StatusCodeFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatusCodeFilter.ProtoReflect.Descriptor instead. -func (*StatusCodeFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{3} -} - -func (x *StatusCodeFilter) GetComparison() *ComparisonFilter { - if x != nil { - return x.Comparison - } - return nil -} - -// Filters on total request duration in milliseconds. -type DurationFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Comparison. - Comparison *ComparisonFilter `protobuf:"bytes,1,opt,name=comparison,proto3" json:"comparison,omitempty"` -} - -func (x *DurationFilter) Reset() { - *x = DurationFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DurationFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DurationFilter) ProtoMessage() {} - -func (x *DurationFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DurationFilter.ProtoReflect.Descriptor instead. -func (*DurationFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{4} -} - -func (x *DurationFilter) GetComparison() *ComparisonFilter { - if x != nil { - return x.Comparison - } - return nil -} - -// Filters for requests that are not health check requests. A health check -// request is marked by the health check filter. -type NotHealthCheckFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *NotHealthCheckFilter) Reset() { - *x = NotHealthCheckFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NotHealthCheckFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotHealthCheckFilter) ProtoMessage() {} - -func (x *NotHealthCheckFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NotHealthCheckFilter.ProtoReflect.Descriptor instead. -func (*NotHealthCheckFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{5} -} - -// Filters for requests that are traceable. See the tracing overview for more -// information on how a request becomes traceable. -type TraceableFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TraceableFilter) Reset() { - *x = TraceableFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TraceableFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TraceableFilter) ProtoMessage() {} - -func (x *TraceableFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TraceableFilter.ProtoReflect.Descriptor instead. -func (*TraceableFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{6} -} - -// Filters for random sampling of requests. -type RuntimeFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Runtime key to get an optional overridden numerator for use in the *percent_sampled* field. - // If found in runtime, this value will replace the default numerator. - RuntimeKey string `protobuf:"bytes,1,opt,name=runtime_key,json=runtimeKey,proto3" json:"runtime_key,omitempty"` - // The default sampling percentage. If not specified, defaults to 0% with denominator of 100. - PercentSampled *_type.FractionalPercent `protobuf:"bytes,2,opt,name=percent_sampled,json=percentSampled,proto3" json:"percent_sampled,omitempty"` - // By default, sampling pivots on the header - // :ref:`x-request-id` being present. If - // :ref:`x-request-id` is present, the filter will - // consistently sample across multiple hosts based on the runtime key value and the value - // extracted from :ref:`x-request-id`. If it is - // missing, or *use_independent_randomness* is set to true, the filter will randomly sample based - // on the runtime key value alone. *use_independent_randomness* can be used for logging kill - // switches within complex nested :ref:`AndFilter - // ` and :ref:`OrFilter - // ` blocks that are easier to reason about - // from a probability perspective (i.e., setting to true will cause the filter to behave like - // an independent random variable when composed within logical operator filters). - UseIndependentRandomness bool `protobuf:"varint,3,opt,name=use_independent_randomness,json=useIndependentRandomness,proto3" json:"use_independent_randomness,omitempty"` -} - -func (x *RuntimeFilter) Reset() { - *x = RuntimeFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RuntimeFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RuntimeFilter) ProtoMessage() {} - -func (x *RuntimeFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RuntimeFilter.ProtoReflect.Descriptor instead. -func (*RuntimeFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{7} -} - -func (x *RuntimeFilter) GetRuntimeKey() string { - if x != nil { - return x.RuntimeKey - } - return "" -} - -func (x *RuntimeFilter) GetPercentSampled() *_type.FractionalPercent { - if x != nil { - return x.PercentSampled - } - return nil -} - -func (x *RuntimeFilter) GetUseIndependentRandomness() bool { - if x != nil { - return x.UseIndependentRandomness - } - return false -} - -// Performs a logical “and” operation on the result of each filter in filters. -// Filters are evaluated sequentially and if one of them returns false, the -// filter returns false immediately. -type AndFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filters []*AccessLogFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *AndFilter) Reset() { - *x = AndFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AndFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AndFilter) ProtoMessage() {} - -func (x *AndFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AndFilter.ProtoReflect.Descriptor instead. -func (*AndFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{8} -} - -func (x *AndFilter) GetFilters() []*AccessLogFilter { - if x != nil { - return x.Filters - } - return nil -} - -// Performs a logical “or” operation on the result of each individual filter. -// Filters are evaluated sequentially and if one of them returns true, the -// filter returns true immediately. -type OrFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filters []*AccessLogFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *OrFilter) Reset() { - *x = OrFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OrFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OrFilter) ProtoMessage() {} - -func (x *OrFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OrFilter.ProtoReflect.Descriptor instead. -func (*OrFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{9} -} - -func (x *OrFilter) GetFilters() []*AccessLogFilter { - if x != nil { - return x.Filters - } - return nil -} - -// Filters requests based on the presence or value of a request header. -type HeaderFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Only requests with a header which matches the specified HeaderMatcher will pass the filter - // check. - Header *route.HeaderMatcher `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` -} - -func (x *HeaderFilter) Reset() { - *x = HeaderFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeaderFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeaderFilter) ProtoMessage() {} - -func (x *HeaderFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeaderFilter.ProtoReflect.Descriptor instead. -func (*HeaderFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{10} -} - -func (x *HeaderFilter) GetHeader() *route.HeaderMatcher { - if x != nil { - return x.Header - } - return nil -} - -// Filters requests that received responses with an Envoy response flag set. -// A list of the response flags can be found -// in the access log formatter :ref:`documentation`. -type ResponseFlagFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Only responses with the any of the flags listed in this field will be logged. - // This field is optional. If it is not specified, then any response flag will pass - // the filter check. - Flags []string `protobuf:"bytes,1,rep,name=flags,proto3" json:"flags,omitempty"` -} - -func (x *ResponseFlagFilter) Reset() { - *x = ResponseFlagFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResponseFlagFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResponseFlagFilter) ProtoMessage() {} - -func (x *ResponseFlagFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResponseFlagFilter.ProtoReflect.Descriptor instead. -func (*ResponseFlagFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{11} -} - -func (x *ResponseFlagFilter) GetFlags() []string { - if x != nil { - return x.Flags - } - return nil -} - -// Filters gRPC requests based on their response status. If a gRPC status is not provided, the -// filter will infer the status from the HTTP status code. -type GrpcStatusFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Logs only responses that have any one of the gRPC statuses in this field. - Statuses []GrpcStatusFilter_Status `protobuf:"varint,1,rep,packed,name=statuses,proto3,enum=envoy.config.filter.accesslog.v2.GrpcStatusFilter_Status" json:"statuses,omitempty"` - // If included and set to true, the filter will instead block all responses with a gRPC status or - // inferred gRPC status enumerated in statuses, and allow all other responses. - Exclude bool `protobuf:"varint,2,opt,name=exclude,proto3" json:"exclude,omitempty"` -} - -func (x *GrpcStatusFilter) Reset() { - *x = GrpcStatusFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GrpcStatusFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GrpcStatusFilter) ProtoMessage() {} - -func (x *GrpcStatusFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GrpcStatusFilter.ProtoReflect.Descriptor instead. -func (*GrpcStatusFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{12} -} - -func (x *GrpcStatusFilter) GetStatuses() []GrpcStatusFilter_Status { - if x != nil { - return x.Statuses - } - return nil -} - -func (x *GrpcStatusFilter) GetExclude() bool { - if x != nil { - return x.Exclude - } - return false -} - -// Extension filter is statically registered at runtime. -type ExtensionFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the filter implementation to instantiate. The name must - // match a statically registered filter. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Custom configuration that depends on the filter being instantiated. - // - // Types that are assignable to ConfigType: - // *ExtensionFilter_Config - // *ExtensionFilter_TypedConfig - ConfigType isExtensionFilter_ConfigType `protobuf_oneof:"config_type"` -} - -func (x *ExtensionFilter) Reset() { - *x = ExtensionFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExtensionFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtensionFilter) ProtoMessage() {} - -func (x *ExtensionFilter) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtensionFilter.ProtoReflect.Descriptor instead. -func (*ExtensionFilter) Descriptor() ([]byte, []int) { - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP(), []int{13} -} - -func (x *ExtensionFilter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *ExtensionFilter) GetConfigType() isExtensionFilter_ConfigType { - if m != nil { - return m.ConfigType - } - return nil -} - -// Deprecated: Do not use. -func (x *ExtensionFilter) GetConfig() *_struct.Struct { - if x, ok := x.GetConfigType().(*ExtensionFilter_Config); ok { - return x.Config - } - return nil -} - -func (x *ExtensionFilter) GetTypedConfig() *any1.Any { - if x, ok := x.GetConfigType().(*ExtensionFilter_TypedConfig); ok { - return x.TypedConfig - } - return nil -} - -type isExtensionFilter_ConfigType interface { - isExtensionFilter_ConfigType() -} - -type ExtensionFilter_Config struct { - // Deprecated: Do not use. - Config *_struct.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"` -} - -type ExtensionFilter_TypedConfig struct { - TypedConfig *any1.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` -} - -func (*ExtensionFilter_Config) isExtensionFilter_ConfigType() {} - -func (*ExtensionFilter_TypedConfig) isExtensionFilter_ConfigType() {} - -var File_envoy_config_filter_accesslog_v2_accesslog_proto protoreflect.FileDescriptor - -var file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDesc = []byte{ - 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, - 0x76, 0x32, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, - 0x18, 0x01, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, 0x0a, 0x0c, - 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xb4, 0x08, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x62, 0x0a, 0x12, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5b, - 0x0a, 0x0f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x17, 0x6e, - 0x6f, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, - 0x4e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x14, 0x6e, 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x10, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, - 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0e, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0a, 0x61, 0x6e, 0x64, 0x5f, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, - 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x61, 0x6e, 0x64, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x09, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x72, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x55, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x62, 0x0a, 0x12, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, - 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, - 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x42, 0x17, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb9, 0x01, - 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, - 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x2e, 0x4f, 0x70, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x02, 0x6f, 0x70, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1c, 0x0a, 0x02, 0x4f, - 0x70, 0x12, 0x06, 0x0a, 0x02, 0x45, 0x51, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x45, 0x10, - 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x45, 0x10, 0x02, 0x22, 0x70, 0x0a, 0x10, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5c, 0x0a, - 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x0e, 0x44, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x5c, 0x0a, - 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, - 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x4e, - 0x6f, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0x11, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x63, 0x65, 0x61, 0x62, 0x6c, 0x65, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xbf, 0x01, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x0b, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4b, - 0x65, 0x79, 0x12, 0x46, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x75, 0x73, - 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x61, - 0x6e, 0x64, 0x6f, 0x6d, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, - 0x75, 0x73, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x52, 0x61, - 0x6e, 0x64, 0x6f, 0x6d, 0x6e, 0x65, 0x73, 0x73, 0x22, 0x62, 0x0a, 0x09, 0x41, 0x6e, 0x64, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, - 0x02, 0x08, 0x02, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x61, 0x0a, 0x08, - 0x4f, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, - 0x53, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x43, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x46, 0x6c, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x05, 0x66, - 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x5c, 0xfa, 0x42, 0x59, 0x92, - 0x01, 0x56, 0x22, 0x54, 0x72, 0x52, 0x52, 0x02, 0x4c, 0x48, 0x52, 0x02, 0x55, 0x48, 0x52, 0x02, - 0x55, 0x54, 0x52, 0x02, 0x4c, 0x52, 0x52, 0x02, 0x55, 0x52, 0x52, 0x02, 0x55, 0x46, 0x52, 0x02, - 0x55, 0x43, 0x52, 0x02, 0x55, 0x4f, 0x52, 0x02, 0x4e, 0x52, 0x52, 0x02, 0x44, 0x49, 0x52, 0x02, - 0x46, 0x49, 0x52, 0x02, 0x52, 0x4c, 0x52, 0x04, 0x55, 0x41, 0x45, 0x58, 0x52, 0x04, 0x52, 0x4c, - 0x53, 0x45, 0x52, 0x02, 0x44, 0x43, 0x52, 0x03, 0x55, 0x52, 0x58, 0x52, 0x02, 0x53, 0x49, 0x52, - 0x02, 0x49, 0x48, 0x52, 0x03, 0x44, 0x50, 0x45, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, - 0xcd, 0x03, 0x0a, 0x10, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x92, 0x01, 0x07, 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x63, - 0x6c, 0x75, 0x64, 0x65, 0x22, 0xb8, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, - 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, - 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x41, 0x44, - 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x05, 0x12, 0x12, - 0x0a, 0x0e, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53, - 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x07, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x58, 0x48, 0x41, 0x55, 0x53, 0x54, 0x45, 0x44, 0x10, - 0x08, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x43, - 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x42, - 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55, 0x54, 0x5f, 0x4f, - 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, - 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x0c, 0x0a, 0x08, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x0d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, - 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x44, - 0x41, 0x54, 0x41, 0x5f, 0x4c, 0x4f, 0x53, 0x53, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, - 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x10, 0x22, - 0xa6, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x39, - 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, - 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0xc0, 0x01, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x42, 0x0e, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, - 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1b, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, - 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescOnce sync.Once - file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescData = file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDesc -) - -func file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescGZIP() []byte { - file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescOnce.Do(func() { - file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescData) - }) - return file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDescData -} - -var file_envoy_config_filter_accesslog_v2_accesslog_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_envoy_config_filter_accesslog_v2_accesslog_proto_goTypes = []interface{}{ - (ComparisonFilter_Op)(0), // 0: envoy.config.filter.accesslog.v2.ComparisonFilter.Op - (GrpcStatusFilter_Status)(0), // 1: envoy.config.filter.accesslog.v2.GrpcStatusFilter.Status - (*AccessLog)(nil), // 2: envoy.config.filter.accesslog.v2.AccessLog - (*AccessLogFilter)(nil), // 3: envoy.config.filter.accesslog.v2.AccessLogFilter - (*ComparisonFilter)(nil), // 4: envoy.config.filter.accesslog.v2.ComparisonFilter - (*StatusCodeFilter)(nil), // 5: envoy.config.filter.accesslog.v2.StatusCodeFilter - (*DurationFilter)(nil), // 6: envoy.config.filter.accesslog.v2.DurationFilter - (*NotHealthCheckFilter)(nil), // 7: envoy.config.filter.accesslog.v2.NotHealthCheckFilter - (*TraceableFilter)(nil), // 8: envoy.config.filter.accesslog.v2.TraceableFilter - (*RuntimeFilter)(nil), // 9: envoy.config.filter.accesslog.v2.RuntimeFilter - (*AndFilter)(nil), // 10: envoy.config.filter.accesslog.v2.AndFilter - (*OrFilter)(nil), // 11: envoy.config.filter.accesslog.v2.OrFilter - (*HeaderFilter)(nil), // 12: envoy.config.filter.accesslog.v2.HeaderFilter - (*ResponseFlagFilter)(nil), // 13: envoy.config.filter.accesslog.v2.ResponseFlagFilter - (*GrpcStatusFilter)(nil), // 14: envoy.config.filter.accesslog.v2.GrpcStatusFilter - (*ExtensionFilter)(nil), // 15: envoy.config.filter.accesslog.v2.ExtensionFilter - (*_struct.Struct)(nil), // 16: google.protobuf.Struct - (*any1.Any)(nil), // 17: google.protobuf.Any - (*core.RuntimeUInt32)(nil), // 18: envoy.api.v2.core.RuntimeUInt32 - (*_type.FractionalPercent)(nil), // 19: envoy.type.FractionalPercent - (*route.HeaderMatcher)(nil), // 20: envoy.api.v2.route.HeaderMatcher -} -var file_envoy_config_filter_accesslog_v2_accesslog_proto_depIdxs = []int32{ - 3, // 0: envoy.config.filter.accesslog.v2.AccessLog.filter:type_name -> envoy.config.filter.accesslog.v2.AccessLogFilter - 16, // 1: envoy.config.filter.accesslog.v2.AccessLog.config:type_name -> google.protobuf.Struct - 17, // 2: envoy.config.filter.accesslog.v2.AccessLog.typed_config:type_name -> google.protobuf.Any - 5, // 3: envoy.config.filter.accesslog.v2.AccessLogFilter.status_code_filter:type_name -> envoy.config.filter.accesslog.v2.StatusCodeFilter - 6, // 4: envoy.config.filter.accesslog.v2.AccessLogFilter.duration_filter:type_name -> envoy.config.filter.accesslog.v2.DurationFilter - 7, // 5: envoy.config.filter.accesslog.v2.AccessLogFilter.not_health_check_filter:type_name -> envoy.config.filter.accesslog.v2.NotHealthCheckFilter - 8, // 6: envoy.config.filter.accesslog.v2.AccessLogFilter.traceable_filter:type_name -> envoy.config.filter.accesslog.v2.TraceableFilter - 9, // 7: envoy.config.filter.accesslog.v2.AccessLogFilter.runtime_filter:type_name -> envoy.config.filter.accesslog.v2.RuntimeFilter - 10, // 8: envoy.config.filter.accesslog.v2.AccessLogFilter.and_filter:type_name -> envoy.config.filter.accesslog.v2.AndFilter - 11, // 9: envoy.config.filter.accesslog.v2.AccessLogFilter.or_filter:type_name -> envoy.config.filter.accesslog.v2.OrFilter - 12, // 10: envoy.config.filter.accesslog.v2.AccessLogFilter.header_filter:type_name -> envoy.config.filter.accesslog.v2.HeaderFilter - 13, // 11: envoy.config.filter.accesslog.v2.AccessLogFilter.response_flag_filter:type_name -> envoy.config.filter.accesslog.v2.ResponseFlagFilter - 14, // 12: envoy.config.filter.accesslog.v2.AccessLogFilter.grpc_status_filter:type_name -> envoy.config.filter.accesslog.v2.GrpcStatusFilter - 15, // 13: envoy.config.filter.accesslog.v2.AccessLogFilter.extension_filter:type_name -> envoy.config.filter.accesslog.v2.ExtensionFilter - 0, // 14: envoy.config.filter.accesslog.v2.ComparisonFilter.op:type_name -> envoy.config.filter.accesslog.v2.ComparisonFilter.Op - 18, // 15: envoy.config.filter.accesslog.v2.ComparisonFilter.value:type_name -> envoy.api.v2.core.RuntimeUInt32 - 4, // 16: envoy.config.filter.accesslog.v2.StatusCodeFilter.comparison:type_name -> envoy.config.filter.accesslog.v2.ComparisonFilter - 4, // 17: envoy.config.filter.accesslog.v2.DurationFilter.comparison:type_name -> envoy.config.filter.accesslog.v2.ComparisonFilter - 19, // 18: envoy.config.filter.accesslog.v2.RuntimeFilter.percent_sampled:type_name -> envoy.type.FractionalPercent - 3, // 19: envoy.config.filter.accesslog.v2.AndFilter.filters:type_name -> envoy.config.filter.accesslog.v2.AccessLogFilter - 3, // 20: envoy.config.filter.accesslog.v2.OrFilter.filters:type_name -> envoy.config.filter.accesslog.v2.AccessLogFilter - 20, // 21: envoy.config.filter.accesslog.v2.HeaderFilter.header:type_name -> envoy.api.v2.route.HeaderMatcher - 1, // 22: envoy.config.filter.accesslog.v2.GrpcStatusFilter.statuses:type_name -> envoy.config.filter.accesslog.v2.GrpcStatusFilter.Status - 16, // 23: envoy.config.filter.accesslog.v2.ExtensionFilter.config:type_name -> google.protobuf.Struct - 17, // 24: envoy.config.filter.accesslog.v2.ExtensionFilter.typed_config:type_name -> google.protobuf.Any - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name -} - -func init() { file_envoy_config_filter_accesslog_v2_accesslog_proto_init() } -func file_envoy_config_filter_accesslog_v2_accesslog_proto_init() { - if File_envoy_config_filter_accesslog_v2_accesslog_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessLog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessLogFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComparisonFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusCodeFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DurationFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NotHealthCheckFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TraceableFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RuntimeFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AndFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeaderFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseFlagFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GrpcStatusFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtensionFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*AccessLog_Config)(nil), - (*AccessLog_TypedConfig)(nil), - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*AccessLogFilter_StatusCodeFilter)(nil), - (*AccessLogFilter_DurationFilter)(nil), - (*AccessLogFilter_NotHealthCheckFilter)(nil), - (*AccessLogFilter_TraceableFilter)(nil), - (*AccessLogFilter_RuntimeFilter)(nil), - (*AccessLogFilter_AndFilter)(nil), - (*AccessLogFilter_OrFilter)(nil), - (*AccessLogFilter_HeaderFilter)(nil), - (*AccessLogFilter_ResponseFlagFilter)(nil), - (*AccessLogFilter_GrpcStatusFilter)(nil), - (*AccessLogFilter_ExtensionFilter)(nil), - } - file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes[13].OneofWrappers = []interface{}{ - (*ExtensionFilter_Config)(nil), - (*ExtensionFilter_TypedConfig)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDesc, - NumEnums: 2, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_filter_accesslog_v2_accesslog_proto_goTypes, - DependencyIndexes: file_envoy_config_filter_accesslog_v2_accesslog_proto_depIdxs, - EnumInfos: file_envoy_config_filter_accesslog_v2_accesslog_proto_enumTypes, - MessageInfos: file_envoy_config_filter_accesslog_v2_accesslog_proto_msgTypes, - }.Build() - File_envoy_config_filter_accesslog_v2_accesslog_proto = out.File - file_envoy_config_filter_accesslog_v2_accesslog_proto_rawDesc = nil - file_envoy_config_filter_accesslog_v2_accesslog_proto_goTypes = nil - file_envoy_config_filter_accesslog_v2_accesslog_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go deleted file mode 100644 index e5fa4c68701d..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go +++ /dev/null @@ -1,2469 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/filter/accesslog/v2/accesslog.proto - -package accesslogv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on AccessLog with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *AccessLog) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AccessLog with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in AccessLogMultiError, or nil -// if none found. -func (m *AccessLog) ValidateAll() error { - return m.validate(true) -} - -func (m *AccessLog) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogValidationError{ - field: "Filter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogValidationError{ - field: "Filter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogValidationError{ - field: "Filter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch v := m.ConfigType.(type) { - case *AccessLog_Config: - if v == nil { - err := AccessLogValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLog_TypedConfig: - if v == nil { - err := AccessLogValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return AccessLogMultiError(errors) - } - - return nil -} - -// AccessLogMultiError is an error wrapping multiple validation errors returned -// by AccessLog.ValidateAll() if the designated constraints aren't met. -type AccessLogMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AccessLogMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AccessLogMultiError) AllErrors() []error { return m } - -// AccessLogValidationError is the validation error returned by -// AccessLog.Validate if the designated constraints aren't met. -type AccessLogValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AccessLogValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AccessLogValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AccessLogValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AccessLogValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AccessLogValidationError) ErrorName() string { return "AccessLogValidationError" } - -// Error satisfies the builtin error interface -func (e AccessLogValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAccessLog.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AccessLogValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AccessLogValidationError{} - -// Validate checks the field values on AccessLogFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *AccessLogFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AccessLogFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// AccessLogFilterMultiError, or nil if none found. -func (m *AccessLogFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *AccessLogFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofFilterSpecifierPresent := false - switch v := m.FilterSpecifier.(type) { - case *AccessLogFilter_StatusCodeFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetStatusCodeFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "StatusCodeFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "StatusCodeFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetStatusCodeFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "StatusCodeFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_DurationFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetDurationFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "DurationFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "DurationFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDurationFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "DurationFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_NotHealthCheckFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetNotHealthCheckFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "NotHealthCheckFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "NotHealthCheckFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNotHealthCheckFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "NotHealthCheckFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_TraceableFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetTraceableFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "TraceableFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "TraceableFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTraceableFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "TraceableFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_RuntimeFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRuntimeFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "RuntimeFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "RuntimeFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRuntimeFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "RuntimeFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_AndFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetAndFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "AndFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "AndFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetAndFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "AndFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_OrFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetOrFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "OrFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "OrFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetOrFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "OrFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_HeaderFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetHeaderFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "HeaderFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "HeaderFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeaderFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "HeaderFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_ResponseFlagFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetResponseFlagFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "ResponseFlagFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "ResponseFlagFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetResponseFlagFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "ResponseFlagFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_GrpcStatusFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGrpcStatusFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "GrpcStatusFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "GrpcStatusFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGrpcStatusFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "GrpcStatusFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *AccessLogFilter_ExtensionFilter: - if v == nil { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofFilterSpecifierPresent = true - - if all { - switch v := interface{}(m.GetExtensionFilter()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "ExtensionFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AccessLogFilterValidationError{ - field: "ExtensionFilter", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExtensionFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AccessLogFilterValidationError{ - field: "ExtensionFilter", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofFilterSpecifierPresent { - err := AccessLogFilterValidationError{ - field: "FilterSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return AccessLogFilterMultiError(errors) - } - - return nil -} - -// AccessLogFilterMultiError is an error wrapping multiple validation errors -// returned by AccessLogFilter.ValidateAll() if the designated constraints -// aren't met. -type AccessLogFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AccessLogFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AccessLogFilterMultiError) AllErrors() []error { return m } - -// AccessLogFilterValidationError is the validation error returned by -// AccessLogFilter.Validate if the designated constraints aren't met. -type AccessLogFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AccessLogFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AccessLogFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AccessLogFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AccessLogFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AccessLogFilterValidationError) ErrorName() string { return "AccessLogFilterValidationError" } - -// Error satisfies the builtin error interface -func (e AccessLogFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAccessLogFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AccessLogFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AccessLogFilterValidationError{} - -// Validate checks the field values on ComparisonFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ComparisonFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ComparisonFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ComparisonFilterMultiError, or nil if none found. -func (m *ComparisonFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *ComparisonFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if _, ok := ComparisonFilter_Op_name[int32(m.GetOp())]; !ok { - err := ComparisonFilterValidationError{ - field: "Op", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetValue()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ComparisonFilterValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ComparisonFilterValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ComparisonFilterValidationError{ - field: "Value", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ComparisonFilterMultiError(errors) - } - - return nil -} - -// ComparisonFilterMultiError is an error wrapping multiple validation errors -// returned by ComparisonFilter.ValidateAll() if the designated constraints -// aren't met. -type ComparisonFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ComparisonFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ComparisonFilterMultiError) AllErrors() []error { return m } - -// ComparisonFilterValidationError is the validation error returned by -// ComparisonFilter.Validate if the designated constraints aren't met. -type ComparisonFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ComparisonFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ComparisonFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ComparisonFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ComparisonFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ComparisonFilterValidationError) ErrorName() string { return "ComparisonFilterValidationError" } - -// Error satisfies the builtin error interface -func (e ComparisonFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sComparisonFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ComparisonFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ComparisonFilterValidationError{} - -// Validate checks the field values on StatusCodeFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *StatusCodeFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on StatusCodeFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// StatusCodeFilterMultiError, or nil if none found. -func (m *StatusCodeFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *StatusCodeFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetComparison() == nil { - err := StatusCodeFilterValidationError{ - field: "Comparison", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetComparison()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, StatusCodeFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, StatusCodeFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return StatusCodeFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return StatusCodeFilterMultiError(errors) - } - - return nil -} - -// StatusCodeFilterMultiError is an error wrapping multiple validation errors -// returned by StatusCodeFilter.ValidateAll() if the designated constraints -// aren't met. -type StatusCodeFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m StatusCodeFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m StatusCodeFilterMultiError) AllErrors() []error { return m } - -// StatusCodeFilterValidationError is the validation error returned by -// StatusCodeFilter.Validate if the designated constraints aren't met. -type StatusCodeFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e StatusCodeFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e StatusCodeFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e StatusCodeFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e StatusCodeFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e StatusCodeFilterValidationError) ErrorName() string { return "StatusCodeFilterValidationError" } - -// Error satisfies the builtin error interface -func (e StatusCodeFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sStatusCodeFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = StatusCodeFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = StatusCodeFilterValidationError{} - -// Validate checks the field values on DurationFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *DurationFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DurationFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in DurationFilterMultiError, -// or nil if none found. -func (m *DurationFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *DurationFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetComparison() == nil { - err := DurationFilterValidationError{ - field: "Comparison", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetComparison()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, DurationFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, DurationFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetComparison()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return DurationFilterValidationError{ - field: "Comparison", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return DurationFilterMultiError(errors) - } - - return nil -} - -// DurationFilterMultiError is an error wrapping multiple validation errors -// returned by DurationFilter.ValidateAll() if the designated constraints -// aren't met. -type DurationFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DurationFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DurationFilterMultiError) AllErrors() []error { return m } - -// DurationFilterValidationError is the validation error returned by -// DurationFilter.Validate if the designated constraints aren't met. -type DurationFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DurationFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DurationFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DurationFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DurationFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DurationFilterValidationError) ErrorName() string { return "DurationFilterValidationError" } - -// Error satisfies the builtin error interface -func (e DurationFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDurationFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DurationFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DurationFilterValidationError{} - -// Validate checks the field values on NotHealthCheckFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *NotHealthCheckFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on NotHealthCheckFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// NotHealthCheckFilterMultiError, or nil if none found. -func (m *NotHealthCheckFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *NotHealthCheckFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return NotHealthCheckFilterMultiError(errors) - } - - return nil -} - -// NotHealthCheckFilterMultiError is an error wrapping multiple validation -// errors returned by NotHealthCheckFilter.ValidateAll() if the designated -// constraints aren't met. -type NotHealthCheckFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NotHealthCheckFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NotHealthCheckFilterMultiError) AllErrors() []error { return m } - -// NotHealthCheckFilterValidationError is the validation error returned by -// NotHealthCheckFilter.Validate if the designated constraints aren't met. -type NotHealthCheckFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NotHealthCheckFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NotHealthCheckFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NotHealthCheckFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NotHealthCheckFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NotHealthCheckFilterValidationError) ErrorName() string { - return "NotHealthCheckFilterValidationError" -} - -// Error satisfies the builtin error interface -func (e NotHealthCheckFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNotHealthCheckFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NotHealthCheckFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NotHealthCheckFilterValidationError{} - -// Validate checks the field values on TraceableFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *TraceableFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on TraceableFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// TraceableFilterMultiError, or nil if none found. -func (m *TraceableFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *TraceableFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return TraceableFilterMultiError(errors) - } - - return nil -} - -// TraceableFilterMultiError is an error wrapping multiple validation errors -// returned by TraceableFilter.ValidateAll() if the designated constraints -// aren't met. -type TraceableFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m TraceableFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m TraceableFilterMultiError) AllErrors() []error { return m } - -// TraceableFilterValidationError is the validation error returned by -// TraceableFilter.Validate if the designated constraints aren't met. -type TraceableFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e TraceableFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e TraceableFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e TraceableFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e TraceableFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e TraceableFilterValidationError) ErrorName() string { return "TraceableFilterValidationError" } - -// Error satisfies the builtin error interface -func (e TraceableFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sTraceableFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = TraceableFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = TraceableFilterValidationError{} - -// Validate checks the field values on RuntimeFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RuntimeFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RuntimeFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RuntimeFilterMultiError, or -// nil if none found. -func (m *RuntimeFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *RuntimeFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetRuntimeKey()) < 1 { - err := RuntimeFilterValidationError{ - field: "RuntimeKey", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetPercentSampled()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RuntimeFilterValidationError{ - field: "PercentSampled", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RuntimeFilterValidationError{ - field: "PercentSampled", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetPercentSampled()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeFilterValidationError{ - field: "PercentSampled", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for UseIndependentRandomness - - if len(errors) > 0 { - return RuntimeFilterMultiError(errors) - } - - return nil -} - -// RuntimeFilterMultiError is an error wrapping multiple validation errors -// returned by RuntimeFilter.ValidateAll() if the designated constraints -// aren't met. -type RuntimeFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RuntimeFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RuntimeFilterMultiError) AllErrors() []error { return m } - -// RuntimeFilterValidationError is the validation error returned by -// RuntimeFilter.Validate if the designated constraints aren't met. -type RuntimeFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeFilterValidationError) ErrorName() string { return "RuntimeFilterValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntimeFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeFilterValidationError{} - -// Validate checks the field values on AndFilter with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *AndFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AndFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in AndFilterMultiError, or nil -// if none found. -func (m *AndFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *AndFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetFilters()) < 2 { - err := AndFilterValidationError{ - field: "Filters", - reason: "value must contain at least 2 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, AndFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, AndFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return AndFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return AndFilterMultiError(errors) - } - - return nil -} - -// AndFilterMultiError is an error wrapping multiple validation errors returned -// by AndFilter.ValidateAll() if the designated constraints aren't met. -type AndFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AndFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AndFilterMultiError) AllErrors() []error { return m } - -// AndFilterValidationError is the validation error returned by -// AndFilter.Validate if the designated constraints aren't met. -type AndFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AndFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AndFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AndFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AndFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AndFilterValidationError) ErrorName() string { return "AndFilterValidationError" } - -// Error satisfies the builtin error interface -func (e AndFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAndFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AndFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AndFilterValidationError{} - -// Validate checks the field values on OrFilter with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *OrFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on OrFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in OrFilterMultiError, or nil -// if none found. -func (m *OrFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *OrFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetFilters()) < 2 { - err := OrFilterValidationError{ - field: "Filters", - reason: "value must contain at least 2 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetFilters() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, OrFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, OrFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return OrFilterValidationError{ - field: fmt.Sprintf("Filters[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return OrFilterMultiError(errors) - } - - return nil -} - -// OrFilterMultiError is an error wrapping multiple validation errors returned -// by OrFilter.ValidateAll() if the designated constraints aren't met. -type OrFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m OrFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m OrFilterMultiError) AllErrors() []error { return m } - -// OrFilterValidationError is the validation error returned by -// OrFilter.Validate if the designated constraints aren't met. -type OrFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e OrFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e OrFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e OrFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e OrFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e OrFilterValidationError) ErrorName() string { return "OrFilterValidationError" } - -// Error satisfies the builtin error interface -func (e OrFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sOrFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = OrFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = OrFilterValidationError{} - -// Validate checks the field values on HeaderFilter with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HeaderFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HeaderFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HeaderFilterMultiError, or -// nil if none found. -func (m *HeaderFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *HeaderFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetHeader() == nil { - err := HeaderFilterValidationError{ - field: "Header", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHeader()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HeaderFilterValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HeaderFilterValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HeaderFilterValidationError{ - field: "Header", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return HeaderFilterMultiError(errors) - } - - return nil -} - -// HeaderFilterMultiError is an error wrapping multiple validation errors -// returned by HeaderFilter.ValidateAll() if the designated constraints aren't met. -type HeaderFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HeaderFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HeaderFilterMultiError) AllErrors() []error { return m } - -// HeaderFilterValidationError is the validation error returned by -// HeaderFilter.Validate if the designated constraints aren't met. -type HeaderFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HeaderFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HeaderFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HeaderFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HeaderFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HeaderFilterValidationError) ErrorName() string { return "HeaderFilterValidationError" } - -// Error satisfies the builtin error interface -func (e HeaderFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHeaderFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HeaderFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HeaderFilterValidationError{} - -// Validate checks the field values on ResponseFlagFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ResponseFlagFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ResponseFlagFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ResponseFlagFilterMultiError, or nil if none found. -func (m *ResponseFlagFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *ResponseFlagFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetFlags() { - _, _ = idx, item - - if _, ok := _ResponseFlagFilter_Flags_InLookup[item]; !ok { - err := ResponseFlagFilterValidationError{ - field: fmt.Sprintf("Flags[%v]", idx), - reason: "value must be in list [LH UH UT LR UR UF UC UO NR DI FI RL UAEX RLSE DC URX SI IH DPE]", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - if len(errors) > 0 { - return ResponseFlagFilterMultiError(errors) - } - - return nil -} - -// ResponseFlagFilterMultiError is an error wrapping multiple validation errors -// returned by ResponseFlagFilter.ValidateAll() if the designated constraints -// aren't met. -type ResponseFlagFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ResponseFlagFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ResponseFlagFilterMultiError) AllErrors() []error { return m } - -// ResponseFlagFilterValidationError is the validation error returned by -// ResponseFlagFilter.Validate if the designated constraints aren't met. -type ResponseFlagFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ResponseFlagFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ResponseFlagFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ResponseFlagFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ResponseFlagFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ResponseFlagFilterValidationError) ErrorName() string { - return "ResponseFlagFilterValidationError" -} - -// Error satisfies the builtin error interface -func (e ResponseFlagFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sResponseFlagFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ResponseFlagFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ResponseFlagFilterValidationError{} - -var _ResponseFlagFilter_Flags_InLookup = map[string]struct{}{ - "LH": {}, - "UH": {}, - "UT": {}, - "LR": {}, - "UR": {}, - "UF": {}, - "UC": {}, - "UO": {}, - "NR": {}, - "DI": {}, - "FI": {}, - "RL": {}, - "UAEX": {}, - "RLSE": {}, - "DC": {}, - "URX": {}, - "SI": {}, - "IH": {}, - "DPE": {}, -} - -// Validate checks the field values on GrpcStatusFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *GrpcStatusFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GrpcStatusFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GrpcStatusFilterMultiError, or nil if none found. -func (m *GrpcStatusFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *GrpcStatusFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetStatuses() { - _, _ = idx, item - - if _, ok := GrpcStatusFilter_Status_name[int32(item)]; !ok { - err := GrpcStatusFilterValidationError{ - field: fmt.Sprintf("Statuses[%v]", idx), - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - } - - // no validation rules for Exclude - - if len(errors) > 0 { - return GrpcStatusFilterMultiError(errors) - } - - return nil -} - -// GrpcStatusFilterMultiError is an error wrapping multiple validation errors -// returned by GrpcStatusFilter.ValidateAll() if the designated constraints -// aren't met. -type GrpcStatusFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GrpcStatusFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GrpcStatusFilterMultiError) AllErrors() []error { return m } - -// GrpcStatusFilterValidationError is the validation error returned by -// GrpcStatusFilter.Validate if the designated constraints aren't met. -type GrpcStatusFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GrpcStatusFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GrpcStatusFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GrpcStatusFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GrpcStatusFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GrpcStatusFilterValidationError) ErrorName() string { return "GrpcStatusFilterValidationError" } - -// Error satisfies the builtin error interface -func (e GrpcStatusFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGrpcStatusFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GrpcStatusFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GrpcStatusFilterValidationError{} - -// Validate checks the field values on ExtensionFilter with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *ExtensionFilter) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ExtensionFilter with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ExtensionFilterMultiError, or nil if none found. -func (m *ExtensionFilter) ValidateAll() error { - return m.validate(true) -} - -func (m *ExtensionFilter) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - switch v := m.ConfigType.(type) { - case *ExtensionFilter_Config: - if v == nil { - err := ExtensionFilterValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ExtensionFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ExtensionFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionFilterValidationError{ - field: "Config", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *ExtensionFilter_TypedConfig: - if v == nil { - err := ExtensionFilterValidationError{ - field: "ConfigType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetTypedConfig()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ExtensionFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ExtensionFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExtensionFilterValidationError{ - field: "TypedConfig", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return ExtensionFilterMultiError(errors) - } - - return nil -} - -// ExtensionFilterMultiError is an error wrapping multiple validation errors -// returned by ExtensionFilter.ValidateAll() if the designated constraints -// aren't met. -type ExtensionFilterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ExtensionFilterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ExtensionFilterMultiError) AllErrors() []error { return m } - -// ExtensionFilterValidationError is the validation error returned by -// ExtensionFilter.Validate if the designated constraints aren't met. -type ExtensionFilterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ExtensionFilterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ExtensionFilterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ExtensionFilterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ExtensionFilterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ExtensionFilterValidationError) ErrorName() string { return "ExtensionFilterValidationError" } - -// Error satisfies the builtin error interface -func (e ExtensionFilterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sExtensionFilter.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ExtensionFilterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ExtensionFilterValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go deleted file mode 100644 index f7e80d739d0d..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/config/listener/v2/api_listener.proto - -package listenerv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - any1 "github.com/golang/protobuf/ptypes/any" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Describes a type of API listener, which is used in non-proxy clients. The type of API -// exposed to the non-proxy application depends on the type of API listener. -type ApiListener struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type in this field determines the type of API listener. At present, the following - // types are supported: - // envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) - // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the - // specific config message for each type of API listener. We could not do this in v2 because - // it would have caused circular dependencies for go protos: lds.proto depends on this file, - // and http_connection_manager.proto depends on rds.proto, which is in the same directory as - // lds.proto, so lds.proto cannot depend on this file.] - ApiListener *any1.Any `protobuf:"bytes,1,opt,name=api_listener,json=apiListener,proto3" json:"api_listener,omitempty"` -} - -func (x *ApiListener) Reset() { - *x = ApiListener{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_config_listener_v2_api_listener_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApiListener) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApiListener) ProtoMessage() {} - -func (x *ApiListener) ProtoReflect() protoreflect.Message { - mi := &file_envoy_config_listener_v2_api_listener_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ApiListener.ProtoReflect.Descriptor instead. -func (*ApiListener) Descriptor() ([]byte, []int) { - return file_envoy_config_listener_v2_api_listener_proto_rawDescGZIP(), []int{0} -} - -func (x *ApiListener) GetApiListener() *any1.Any { - if x != nil { - return x.ApiListener - } - return nil -} - -var File_envoy_config_listener_v2_api_listener_proto protoreflect.FileDescriptor - -var file_envoy_config_listener_v2_api_listener_proto_rawDesc = []byte{ - 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x6c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x46, 0x0a, 0x0b, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x12, 0x37, 0x0a, 0x0c, 0x61, 0x70, 0x69, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x70, - 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0xb0, 0x01, 0x0a, 0x26, 0x69, 0x6f, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x41, 0x70, 0x69, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x76, 0x32, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_config_listener_v2_api_listener_proto_rawDescOnce sync.Once - file_envoy_config_listener_v2_api_listener_proto_rawDescData = file_envoy_config_listener_v2_api_listener_proto_rawDesc -) - -func file_envoy_config_listener_v2_api_listener_proto_rawDescGZIP() []byte { - file_envoy_config_listener_v2_api_listener_proto_rawDescOnce.Do(func() { - file_envoy_config_listener_v2_api_listener_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_listener_v2_api_listener_proto_rawDescData) - }) - return file_envoy_config_listener_v2_api_listener_proto_rawDescData -} - -var file_envoy_config_listener_v2_api_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_config_listener_v2_api_listener_proto_goTypes = []interface{}{ - (*ApiListener)(nil), // 0: envoy.config.listener.v2.ApiListener - (*any1.Any)(nil), // 1: google.protobuf.Any -} -var file_envoy_config_listener_v2_api_listener_proto_depIdxs = []int32{ - 1, // 0: envoy.config.listener.v2.ApiListener.api_listener:type_name -> google.protobuf.Any - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_config_listener_v2_api_listener_proto_init() } -func file_envoy_config_listener_v2_api_listener_proto_init() { - if File_envoy_config_listener_v2_api_listener_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_config_listener_v2_api_listener_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApiListener); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_config_listener_v2_api_listener_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_config_listener_v2_api_listener_proto_goTypes, - DependencyIndexes: file_envoy_config_listener_v2_api_listener_proto_depIdxs, - MessageInfos: file_envoy_config_listener_v2_api_listener_proto_msgTypes, - }.Build() - File_envoy_config_listener_v2_api_listener_proto = out.File - file_envoy_config_listener_v2_api_listener_proto_rawDesc = nil - file_envoy_config_listener_v2_api_listener_proto_goTypes = nil - file_envoy_config_listener_v2_api_listener_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go deleted file mode 100644 index e1a810386116..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/listener/v2/api_listener.pb.validate.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/config/listener/v2/api_listener.proto - -package listenerv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on ApiListener with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *ApiListener) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ApiListener with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in ApiListenerMultiError, or -// nil if none found. -func (m *ApiListener) ValidateAll() error { - return m.validate(true) -} - -func (m *ApiListener) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetApiListener()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ApiListenerValidationError{ - field: "ApiListener", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ApiListenerValidationError{ - field: "ApiListener", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetApiListener()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ApiListenerValidationError{ - field: "ApiListener", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return ApiListenerMultiError(errors) - } - - return nil -} - -// ApiListenerMultiError is an error wrapping multiple validation errors -// returned by ApiListener.ValidateAll() if the designated constraints aren't met. -type ApiListenerMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ApiListenerMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ApiListenerMultiError) AllErrors() []error { return m } - -// ApiListenerValidationError is the validation error returned by -// ApiListener.Validate if the designated constraints aren't met. -type ApiListenerValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ApiListenerValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ApiListenerValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ApiListenerValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ApiListenerValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ApiListenerValidationError) ErrorName() string { return "ApiListenerValidationError" } - -// Error satisfies the builtin error interface -func (e ApiListenerValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sApiListener.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ApiListenerValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ApiListenerValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go deleted file mode 100644 index df70dac80a3d..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go +++ /dev/null @@ -1,359 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/service/discovery/v2/ads.proto - -package discoveryv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -type AdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AdsDummy) Reset() { - *x = AdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_ads_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdsDummy) ProtoMessage() {} - -func (x *AdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_ads_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdsDummy.ProtoReflect.Descriptor instead. -func (*AdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_ads_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_service_discovery_v2_ads_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v2_ads_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x64, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x0a, 0x0a, 0x08, 0x41, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xed, 0x01, 0x0a, 0x1a, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x19, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6b, - 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x90, 0x01, 0x0a, 0x28, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x41, 0x64, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_discovery_v2_ads_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v2_ads_proto_rawDescData = file_envoy_service_discovery_v2_ads_proto_rawDesc -) - -func file_envoy_service_discovery_v2_ads_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v2_ads_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v2_ads_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v2_ads_proto_rawDescData) - }) - return file_envoy_service_discovery_v2_ads_proto_rawDescData -} - -var file_envoy_service_discovery_v2_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_service_discovery_v2_ads_proto_goTypes = []interface{}{ - (*AdsDummy)(nil), // 0: envoy.service.discovery.v2.AdsDummy - (*v2.DiscoveryRequest)(nil), // 1: envoy.api.v2.DiscoveryRequest - (*v2.DeltaDiscoveryRequest)(nil), // 2: envoy.api.v2.DeltaDiscoveryRequest - (*v2.DiscoveryResponse)(nil), // 3: envoy.api.v2.DiscoveryResponse - (*v2.DeltaDiscoveryResponse)(nil), // 4: envoy.api.v2.DeltaDiscoveryResponse -} -var file_envoy_service_discovery_v2_ads_proto_depIdxs = []int32{ - 1, // 0: envoy.service.discovery.v2.AggregatedDiscoveryService.StreamAggregatedResources:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 1: envoy.service.discovery.v2.AggregatedDiscoveryService.DeltaAggregatedResources:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 3, // 2: envoy.service.discovery.v2.AggregatedDiscoveryService.StreamAggregatedResources:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 3: envoy.service.discovery.v2.AggregatedDiscoveryService.DeltaAggregatedResources:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v2_ads_proto_init() } -func file_envoy_service_discovery_v2_ads_proto_init() { - if File_envoy_service_discovery_v2_ads_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v2_ads_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v2_ads_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_discovery_v2_ads_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v2_ads_proto_depIdxs, - MessageInfos: file_envoy_service_discovery_v2_ads_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v2_ads_proto = out.File - file_envoy_service_discovery_v2_ads_proto_rawDesc = nil - file_envoy_service_discovery_v2_ads_proto_goTypes = nil - file_envoy_service_discovery_v2_ads_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AggregatedDiscoveryServiceClient is the client API for AggregatedDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AggregatedDiscoveryServiceClient interface { - // This is a gRPC-only API. - StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) - DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error) -} - -type aggregatedDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAggregatedDiscoveryServiceClient(cc grpc.ClientConnInterface) AggregatedDiscoveryServiceClient { - return &aggregatedDiscoveryServiceClient{cc} -} - -func (c *aggregatedDiscoveryServiceClient) StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) { - stream, err := c.cc.NewStream(ctx, &_AggregatedDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources", opts...) - if err != nil { - return nil, err - } - x := &aggregatedDiscoveryServiceStreamAggregatedResourcesClient{stream} - return x, nil -} - -type AggregatedDiscoveryService_StreamAggregatedResourcesClient interface { - Send(*v2.DiscoveryRequest) error - Recv() (*v2.DiscoveryResponse, error) - grpc.ClientStream -} - -type aggregatedDiscoveryServiceStreamAggregatedResourcesClient struct { - grpc.ClientStream -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Send(m *v2.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Recv() (*v2.DiscoveryResponse, error) { - m := new(v2.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *aggregatedDiscoveryServiceClient) DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error) { - stream, err := c.cc.NewStream(ctx, &_AggregatedDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v2.AggregatedDiscoveryService/DeltaAggregatedResources", opts...) - if err != nil { - return nil, err - } - x := &aggregatedDiscoveryServiceDeltaAggregatedResourcesClient{stream} - return x, nil -} - -type AggregatedDiscoveryService_DeltaAggregatedResourcesClient interface { - Send(*v2.DeltaDiscoveryRequest) error - Recv() (*v2.DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type aggregatedDiscoveryServiceDeltaAggregatedResourcesClient struct { - grpc.ClientStream -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Send(m *v2.DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Recv() (*v2.DeltaDiscoveryResponse, error) { - m := new(v2.DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// AggregatedDiscoveryServiceServer is the server API for AggregatedDiscoveryService service. -type AggregatedDiscoveryServiceServer interface { - // This is a gRPC-only API. - StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error - DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error -} - -// UnimplementedAggregatedDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAggregatedDiscoveryServiceServer struct { -} - -func (*UnimplementedAggregatedDiscoveryServiceServer) StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error { - return status.Errorf(codes.Unimplemented, "method StreamAggregatedResources not implemented") -} -func (*UnimplementedAggregatedDiscoveryServiceServer) DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaAggregatedResources not implemented") -} - -func RegisterAggregatedDiscoveryServiceServer(s *grpc.Server, srv AggregatedDiscoveryServiceServer) { - s.RegisterService(&_AggregatedDiscoveryService_serviceDesc, srv) -} - -func _AggregatedDiscoveryService_StreamAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AggregatedDiscoveryServiceServer).StreamAggregatedResources(&aggregatedDiscoveryServiceStreamAggregatedResourcesServer{stream}) -} - -type AggregatedDiscoveryService_StreamAggregatedResourcesServer interface { - Send(*v2.DiscoveryResponse) error - Recv() (*v2.DiscoveryRequest, error) - grpc.ServerStream -} - -type aggregatedDiscoveryServiceStreamAggregatedResourcesServer struct { - grpc.ServerStream -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Send(m *v2.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Recv() (*v2.DiscoveryRequest, error) { - m := new(v2.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _AggregatedDiscoveryService_DeltaAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(AggregatedDiscoveryServiceServer).DeltaAggregatedResources(&aggregatedDiscoveryServiceDeltaAggregatedResourcesServer{stream}) -} - -type AggregatedDiscoveryService_DeltaAggregatedResourcesServer interface { - Send(*v2.DeltaDiscoveryResponse) error - Recv() (*v2.DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type aggregatedDiscoveryServiceDeltaAggregatedResourcesServer struct { - grpc.ServerStream -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Send(m *v2.DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Recv() (*v2.DeltaDiscoveryRequest, error) { - m := new(v2.DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _AggregatedDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.discovery.v2.AggregatedDiscoveryService", - HandlerType: (*AggregatedDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamAggregatedResources", - Handler: _AggregatedDiscoveryService_StreamAggregatedResources_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaAggregatedResources", - Handler: _AggregatedDiscoveryService_DeltaAggregatedResources_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/discovery/v2/ads.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go deleted file mode 100644 index 7b1e54779b30..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v2/ads.proto - -package discoveryv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on AdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *AdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on AdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in AdsDummyMultiError, or nil -// if none found. -func (m *AdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *AdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return AdsDummyMultiError(errors) - } - - return nil -} - -// AdsDummyMultiError is an error wrapping multiple validation errors returned -// by AdsDummy.ValidateAll() if the designated constraints aren't met. -type AdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m AdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m AdsDummyMultiError) AllErrors() []error { return m } - -// AdsDummyValidationError is the validation error returned by -// AdsDummy.Validate if the designated constraints aren't met. -type AdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e AdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e AdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e AdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e AdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e AdsDummyValidationError) ErrorName() string { return "AdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e AdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sAdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = AdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = AdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go deleted file mode 100644 index 539feb02f22c..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.go +++ /dev/null @@ -1,1100 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/service/discovery/v2/hds.proto - -package discoveryv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" - duration "github.com/golang/protobuf/ptypes/duration" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Different Envoy instances may have different capabilities (e.g. Redis) -// and/or have ports enabled for different protocols. -type Capability_Protocol int32 - -const ( - Capability_HTTP Capability_Protocol = 0 - Capability_TCP Capability_Protocol = 1 - Capability_REDIS Capability_Protocol = 2 -) - -// Enum value maps for Capability_Protocol. -var ( - Capability_Protocol_name = map[int32]string{ - 0: "HTTP", - 1: "TCP", - 2: "REDIS", - } - Capability_Protocol_value = map[string]int32{ - "HTTP": 0, - "TCP": 1, - "REDIS": 2, - } -) - -func (x Capability_Protocol) Enum() *Capability_Protocol { - p := new(Capability_Protocol) - *p = x - return p -} - -func (x Capability_Protocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Capability_Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_service_discovery_v2_hds_proto_enumTypes[0].Descriptor() -} - -func (Capability_Protocol) Type() protoreflect.EnumType { - return &file_envoy_service_discovery_v2_hds_proto_enumTypes[0] -} - -func (x Capability_Protocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Capability_Protocol.Descriptor instead. -func (Capability_Protocol) EnumDescriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{0, 0} -} - -// Defines supported protocols etc, so the management server can assign proper -// endpoints to healthcheck. -type Capability struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HealthCheckProtocols []Capability_Protocol `protobuf:"varint,1,rep,packed,name=health_check_protocols,json=healthCheckProtocols,proto3,enum=envoy.service.discovery.v2.Capability_Protocol" json:"health_check_protocols,omitempty"` -} - -func (x *Capability) Reset() { - *x = Capability{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Capability) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Capability) ProtoMessage() {} - -func (x *Capability) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Capability.ProtoReflect.Descriptor instead. -func (*Capability) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{0} -} - -func (x *Capability) GetHealthCheckProtocols() []Capability_Protocol { - if x != nil { - return x.HealthCheckProtocols - } - return nil -} - -type HealthCheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - Capability *Capability `protobuf:"bytes,2,opt,name=capability,proto3" json:"capability,omitempty"` -} - -func (x *HealthCheckRequest) Reset() { - *x = HealthCheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequest) ProtoMessage() {} - -func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead. -func (*HealthCheckRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{1} -} - -func (x *HealthCheckRequest) GetNode() *core.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *HealthCheckRequest) GetCapability() *Capability { - if x != nil { - return x.Capability - } - return nil -} - -type EndpointHealth struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Endpoint *endpoint.Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` - HealthStatus core.HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=envoy.api.v2.core.HealthStatus" json:"health_status,omitempty"` -} - -func (x *EndpointHealth) Reset() { - *x = EndpointHealth{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointHealth) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointHealth) ProtoMessage() {} - -func (x *EndpointHealth) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointHealth.ProtoReflect.Descriptor instead. -func (*EndpointHealth) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{2} -} - -func (x *EndpointHealth) GetEndpoint() *endpoint.Endpoint { - if x != nil { - return x.Endpoint - } - return nil -} - -func (x *EndpointHealth) GetHealthStatus() core.HealthStatus { - if x != nil { - return x.HealthStatus - } - return core.HealthStatus(0) -} - -type EndpointHealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EndpointsHealth []*EndpointHealth `protobuf:"bytes,1,rep,name=endpoints_health,json=endpointsHealth,proto3" json:"endpoints_health,omitempty"` -} - -func (x *EndpointHealthResponse) Reset() { - *x = EndpointHealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EndpointHealthResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EndpointHealthResponse) ProtoMessage() {} - -func (x *EndpointHealthResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EndpointHealthResponse.ProtoReflect.Descriptor instead. -func (*EndpointHealthResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{3} -} - -func (x *EndpointHealthResponse) GetEndpointsHealth() []*EndpointHealth { - if x != nil { - return x.EndpointsHealth - } - return nil -} - -type HealthCheckRequestOrEndpointHealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to RequestType: - // *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest - // *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse - RequestType isHealthCheckRequestOrEndpointHealthResponse_RequestType `protobuf_oneof:"request_type"` -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) Reset() { - *x = HealthCheckRequestOrEndpointHealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckRequestOrEndpointHealthResponse) ProtoMessage() {} - -func (x *HealthCheckRequestOrEndpointHealthResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckRequestOrEndpointHealthResponse.ProtoReflect.Descriptor instead. -func (*HealthCheckRequestOrEndpointHealthResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{4} -} - -func (m *HealthCheckRequestOrEndpointHealthResponse) GetRequestType() isHealthCheckRequestOrEndpointHealthResponse_RequestType { - if m != nil { - return m.RequestType - } - return nil -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) GetHealthCheckRequest() *HealthCheckRequest { - if x, ok := x.GetRequestType().(*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest); ok { - return x.HealthCheckRequest - } - return nil -} - -func (x *HealthCheckRequestOrEndpointHealthResponse) GetEndpointHealthResponse() *EndpointHealthResponse { - if x, ok := x.GetRequestType().(*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse); ok { - return x.EndpointHealthResponse - } - return nil -} - -type isHealthCheckRequestOrEndpointHealthResponse_RequestType interface { - isHealthCheckRequestOrEndpointHealthResponse_RequestType() -} - -type HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest struct { - HealthCheckRequest *HealthCheckRequest `protobuf:"bytes,1,opt,name=health_check_request,json=healthCheckRequest,proto3,oneof"` -} - -type HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse struct { - EndpointHealthResponse *EndpointHealthResponse `protobuf:"bytes,2,opt,name=endpoint_health_response,json=endpointHealthResponse,proto3,oneof"` -} - -func (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest) isHealthCheckRequestOrEndpointHealthResponse_RequestType() { -} - -func (*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse) isHealthCheckRequestOrEndpointHealthResponse_RequestType() { -} - -type LocalityEndpoints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Locality *core.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` - Endpoints []*endpoint.Endpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` -} - -func (x *LocalityEndpoints) Reset() { - *x = LocalityEndpoints{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LocalityEndpoints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalityEndpoints) ProtoMessage() {} - -func (x *LocalityEndpoints) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalityEndpoints.ProtoReflect.Descriptor instead. -func (*LocalityEndpoints) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{5} -} - -func (x *LocalityEndpoints) GetLocality() *core.Locality { - if x != nil { - return x.Locality - } - return nil -} - -func (x *LocalityEndpoints) GetEndpoints() []*endpoint.Endpoint { - if x != nil { - return x.Endpoints - } - return nil -} - -// The cluster name and locality is provided to Envoy for the endpoints that it -// health checks to support statistics reporting, logging and debugging by the -// Envoy instance (outside of HDS). For maximum usefulness, it should match the -// same cluster structure as that provided by EDS. -type ClusterHealthCheck struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` - HealthChecks []*core.HealthCheck `protobuf:"bytes,2,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` - LocalityEndpoints []*LocalityEndpoints `protobuf:"bytes,3,rep,name=locality_endpoints,json=localityEndpoints,proto3" json:"locality_endpoints,omitempty"` -} - -func (x *ClusterHealthCheck) Reset() { - *x = ClusterHealthCheck{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClusterHealthCheck) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClusterHealthCheck) ProtoMessage() {} - -func (x *ClusterHealthCheck) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClusterHealthCheck.ProtoReflect.Descriptor instead. -func (*ClusterHealthCheck) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{6} -} - -func (x *ClusterHealthCheck) GetClusterName() string { - if x != nil { - return x.ClusterName - } - return "" -} - -func (x *ClusterHealthCheck) GetHealthChecks() []*core.HealthCheck { - if x != nil { - return x.HealthChecks - } - return nil -} - -func (x *ClusterHealthCheck) GetLocalityEndpoints() []*LocalityEndpoints { - if x != nil { - return x.LocalityEndpoints - } - return nil -} - -type HealthCheckSpecifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClusterHealthChecks []*ClusterHealthCheck `protobuf:"bytes,1,rep,name=cluster_health_checks,json=clusterHealthChecks,proto3" json:"cluster_health_checks,omitempty"` - // The default is 1 second. - Interval *duration.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` -} - -func (x *HealthCheckSpecifier) Reset() { - *x = HealthCheckSpecifier{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HealthCheckSpecifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HealthCheckSpecifier) ProtoMessage() {} - -func (x *HealthCheckSpecifier) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_hds_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HealthCheckSpecifier.ProtoReflect.Descriptor instead. -func (*HealthCheckSpecifier) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_hds_proto_rawDescGZIP(), []int{7} -} - -func (x *HealthCheckSpecifier) GetClusterHealthChecks() []*ClusterHealthCheck { - if x != nil { - return x.ClusterHealthChecks - } - return nil -} - -func (x *HealthCheckSpecifier) GetInterval() *duration.Duration { - if x != nil { - return x.Interval - } - return nil -} - -var File_envoy_service_discovery_v2_hds_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v2_hds_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x68, 0x64, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x12, 0x65, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0x28, 0x0a, 0x08, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, - 0x49, 0x53, 0x10, 0x02, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x22, 0x93, 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x12, 0x3b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x44, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x6f, 0x0a, 0x16, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x55, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0x90, 0x02, 0x0a, 0x2a, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6e, 0x0a, 0x18, 0x65, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x00, 0x52, 0x16, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x4c, - 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x12, 0x37, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, - 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x12, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, - 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x5c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x62, - 0x0a, 0x15, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x13, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x32, 0xea, 0x02, 0x0a, 0x16, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x46, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x1a, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0xb9, 0x01, 0x0a, 0x10, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, - 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, - 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0xaf, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x32, 0x42, 0x08, 0x48, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, - 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x32, 0x88, 0x01, - 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, - 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_discovery_v2_hds_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v2_hds_proto_rawDescData = file_envoy_service_discovery_v2_hds_proto_rawDesc -) - -func file_envoy_service_discovery_v2_hds_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v2_hds_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v2_hds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v2_hds_proto_rawDescData) - }) - return file_envoy_service_discovery_v2_hds_proto_rawDescData -} - -var file_envoy_service_discovery_v2_hds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_envoy_service_discovery_v2_hds_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_envoy_service_discovery_v2_hds_proto_goTypes = []interface{}{ - (Capability_Protocol)(0), // 0: envoy.service.discovery.v2.Capability.Protocol - (*Capability)(nil), // 1: envoy.service.discovery.v2.Capability - (*HealthCheckRequest)(nil), // 2: envoy.service.discovery.v2.HealthCheckRequest - (*EndpointHealth)(nil), // 3: envoy.service.discovery.v2.EndpointHealth - (*EndpointHealthResponse)(nil), // 4: envoy.service.discovery.v2.EndpointHealthResponse - (*HealthCheckRequestOrEndpointHealthResponse)(nil), // 5: envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse - (*LocalityEndpoints)(nil), // 6: envoy.service.discovery.v2.LocalityEndpoints - (*ClusterHealthCheck)(nil), // 7: envoy.service.discovery.v2.ClusterHealthCheck - (*HealthCheckSpecifier)(nil), // 8: envoy.service.discovery.v2.HealthCheckSpecifier - (*core.Node)(nil), // 9: envoy.api.v2.core.Node - (*endpoint.Endpoint)(nil), // 10: envoy.api.v2.endpoint.Endpoint - (core.HealthStatus)(0), // 11: envoy.api.v2.core.HealthStatus - (*core.Locality)(nil), // 12: envoy.api.v2.core.Locality - (*core.HealthCheck)(nil), // 13: envoy.api.v2.core.HealthCheck - (*duration.Duration)(nil), // 14: google.protobuf.Duration -} -var file_envoy_service_discovery_v2_hds_proto_depIdxs = []int32{ - 0, // 0: envoy.service.discovery.v2.Capability.health_check_protocols:type_name -> envoy.service.discovery.v2.Capability.Protocol - 9, // 1: envoy.service.discovery.v2.HealthCheckRequest.node:type_name -> envoy.api.v2.core.Node - 1, // 2: envoy.service.discovery.v2.HealthCheckRequest.capability:type_name -> envoy.service.discovery.v2.Capability - 10, // 3: envoy.service.discovery.v2.EndpointHealth.endpoint:type_name -> envoy.api.v2.endpoint.Endpoint - 11, // 4: envoy.service.discovery.v2.EndpointHealth.health_status:type_name -> envoy.api.v2.core.HealthStatus - 3, // 5: envoy.service.discovery.v2.EndpointHealthResponse.endpoints_health:type_name -> envoy.service.discovery.v2.EndpointHealth - 2, // 6: envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse.health_check_request:type_name -> envoy.service.discovery.v2.HealthCheckRequest - 4, // 7: envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse.endpoint_health_response:type_name -> envoy.service.discovery.v2.EndpointHealthResponse - 12, // 8: envoy.service.discovery.v2.LocalityEndpoints.locality:type_name -> envoy.api.v2.core.Locality - 10, // 9: envoy.service.discovery.v2.LocalityEndpoints.endpoints:type_name -> envoy.api.v2.endpoint.Endpoint - 13, // 10: envoy.service.discovery.v2.ClusterHealthCheck.health_checks:type_name -> envoy.api.v2.core.HealthCheck - 6, // 11: envoy.service.discovery.v2.ClusterHealthCheck.locality_endpoints:type_name -> envoy.service.discovery.v2.LocalityEndpoints - 7, // 12: envoy.service.discovery.v2.HealthCheckSpecifier.cluster_health_checks:type_name -> envoy.service.discovery.v2.ClusterHealthCheck - 14, // 13: envoy.service.discovery.v2.HealthCheckSpecifier.interval:type_name -> google.protobuf.Duration - 5, // 14: envoy.service.discovery.v2.HealthDiscoveryService.StreamHealthCheck:input_type -> envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse - 5, // 15: envoy.service.discovery.v2.HealthDiscoveryService.FetchHealthCheck:input_type -> envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse - 8, // 16: envoy.service.discovery.v2.HealthDiscoveryService.StreamHealthCheck:output_type -> envoy.service.discovery.v2.HealthCheckSpecifier - 8, // 17: envoy.service.discovery.v2.HealthDiscoveryService.FetchHealthCheck:output_type -> envoy.service.discovery.v2.HealthCheckSpecifier - 16, // [16:18] is the sub-list for method output_type - 14, // [14:16] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v2_hds_proto_init() } -func file_envoy_service_discovery_v2_hds_proto_init() { - if File_envoy_service_discovery_v2_hds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v2_hds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Capability); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointHealth); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EndpointHealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckRequestOrEndpointHealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalityEndpoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterHealthCheck); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HealthCheckSpecifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_service_discovery_v2_hds_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest)(nil), - (*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v2_hds_proto_rawDesc, - NumEnums: 1, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_discovery_v2_hds_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v2_hds_proto_depIdxs, - EnumInfos: file_envoy_service_discovery_v2_hds_proto_enumTypes, - MessageInfos: file_envoy_service_discovery_v2_hds_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v2_hds_proto = out.File - file_envoy_service_discovery_v2_hds_proto_rawDesc = nil - file_envoy_service_discovery_v2_hds_proto_goTypes = nil - file_envoy_service_discovery_v2_hds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// HealthDiscoveryServiceClient is the client API for HealthDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HealthDiscoveryServiceClient interface { - // 1. Envoy starts up and if its can_healthcheck option in the static - // bootstrap config is enabled, sends HealthCheckRequest to the management - // server. It supplies its capabilities (which protocol it can health check - // with, what zone it resides in, etc.). - // 2. In response to (1), the management server designates this Envoy as a - // healthchecker to health check a subset of all upstream hosts for a given - // cluster (for example upstream Host 1 and Host 2). It streams - // HealthCheckSpecifier messages with cluster related configuration for all - // clusters this Envoy is designated to health check. Subsequent - // HealthCheckSpecifier message will be sent on changes to: - // a. Endpoints to health checks - // b. Per cluster configuration change - // 3. Envoy creates a health probe based on the HealthCheck config and sends - // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck - // configuration Envoy waits upon the arrival of the probe response and - // looks at the content of the response to decide whether the endpoint is - // healthy or not. If a response hasn't been received within the timeout - // interval, the endpoint health status is considered TIMEOUT. - // 4. Envoy reports results back in an EndpointHealthResponse message. - // Envoy streams responses as often as the interval configured by the - // management server in HealthCheckSpecifier. - // 5. The management Server collects health statuses for all endpoints in the - // cluster (for all clusters) and uses this information to construct - // EndpointDiscoveryResponse messages. - // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load - // balances traffic to them without additional health checking. It may - // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection - // failed to a particular endpoint to account for health status propagation - // delay between HDS and EDS). - // By default, can_healthcheck is true. If can_healthcheck is false, Cluster - // configuration may not contain HealthCheck message. - // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above - // invariant? - // TODO(htuch): Add @amb67's diagram. - StreamHealthCheck(ctx context.Context, opts ...grpc.CallOption) (HealthDiscoveryService_StreamHealthCheckClient, error) - // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of - // request/response. Should we add an identifier to the HealthCheckSpecifier - // to bind with the response? - FetchHealthCheck(ctx context.Context, in *HealthCheckRequestOrEndpointHealthResponse, opts ...grpc.CallOption) (*HealthCheckSpecifier, error) -} - -type healthDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewHealthDiscoveryServiceClient(cc grpc.ClientConnInterface) HealthDiscoveryServiceClient { - return &healthDiscoveryServiceClient{cc} -} - -func (c *healthDiscoveryServiceClient) StreamHealthCheck(ctx context.Context, opts ...grpc.CallOption) (HealthDiscoveryService_StreamHealthCheckClient, error) { - stream, err := c.cc.NewStream(ctx, &_HealthDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.HealthDiscoveryService/StreamHealthCheck", opts...) - if err != nil { - return nil, err - } - x := &healthDiscoveryServiceStreamHealthCheckClient{stream} - return x, nil -} - -type HealthDiscoveryService_StreamHealthCheckClient interface { - Send(*HealthCheckRequestOrEndpointHealthResponse) error - Recv() (*HealthCheckSpecifier, error) - grpc.ClientStream -} - -type healthDiscoveryServiceStreamHealthCheckClient struct { - grpc.ClientStream -} - -func (x *healthDiscoveryServiceStreamHealthCheckClient) Send(m *HealthCheckRequestOrEndpointHealthResponse) error { - return x.ClientStream.SendMsg(m) -} - -func (x *healthDiscoveryServiceStreamHealthCheckClient) Recv() (*HealthCheckSpecifier, error) { - m := new(HealthCheckSpecifier) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *healthDiscoveryServiceClient) FetchHealthCheck(ctx context.Context, in *HealthCheckRequestOrEndpointHealthResponse, opts ...grpc.CallOption) (*HealthCheckSpecifier, error) { - out := new(HealthCheckSpecifier) - err := c.cc.Invoke(ctx, "/envoy.service.discovery.v2.HealthDiscoveryService/FetchHealthCheck", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HealthDiscoveryServiceServer is the server API for HealthDiscoveryService service. -type HealthDiscoveryServiceServer interface { - // 1. Envoy starts up and if its can_healthcheck option in the static - // bootstrap config is enabled, sends HealthCheckRequest to the management - // server. It supplies its capabilities (which protocol it can health check - // with, what zone it resides in, etc.). - // 2. In response to (1), the management server designates this Envoy as a - // healthchecker to health check a subset of all upstream hosts for a given - // cluster (for example upstream Host 1 and Host 2). It streams - // HealthCheckSpecifier messages with cluster related configuration for all - // clusters this Envoy is designated to health check. Subsequent - // HealthCheckSpecifier message will be sent on changes to: - // a. Endpoints to health checks - // b. Per cluster configuration change - // 3. Envoy creates a health probe based on the HealthCheck config and sends - // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck - // configuration Envoy waits upon the arrival of the probe response and - // looks at the content of the response to decide whether the endpoint is - // healthy or not. If a response hasn't been received within the timeout - // interval, the endpoint health status is considered TIMEOUT. - // 4. Envoy reports results back in an EndpointHealthResponse message. - // Envoy streams responses as often as the interval configured by the - // management server in HealthCheckSpecifier. - // 5. The management Server collects health statuses for all endpoints in the - // cluster (for all clusters) and uses this information to construct - // EndpointDiscoveryResponse messages. - // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load - // balances traffic to them without additional health checking. It may - // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection - // failed to a particular endpoint to account for health status propagation - // delay between HDS and EDS). - // By default, can_healthcheck is true. If can_healthcheck is false, Cluster - // configuration may not contain HealthCheck message. - // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above - // invariant? - // TODO(htuch): Add @amb67's diagram. - StreamHealthCheck(HealthDiscoveryService_StreamHealthCheckServer) error - // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of - // request/response. Should we add an identifier to the HealthCheckSpecifier - // to bind with the response? - FetchHealthCheck(context.Context, *HealthCheckRequestOrEndpointHealthResponse) (*HealthCheckSpecifier, error) -} - -// UnimplementedHealthDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedHealthDiscoveryServiceServer struct { -} - -func (*UnimplementedHealthDiscoveryServiceServer) StreamHealthCheck(HealthDiscoveryService_StreamHealthCheckServer) error { - return status.Errorf(codes.Unimplemented, "method StreamHealthCheck not implemented") -} -func (*UnimplementedHealthDiscoveryServiceServer) FetchHealthCheck(context.Context, *HealthCheckRequestOrEndpointHealthResponse) (*HealthCheckSpecifier, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchHealthCheck not implemented") -} - -func RegisterHealthDiscoveryServiceServer(s *grpc.Server, srv HealthDiscoveryServiceServer) { - s.RegisterService(&_HealthDiscoveryService_serviceDesc, srv) -} - -func _HealthDiscoveryService_StreamHealthCheck_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(HealthDiscoveryServiceServer).StreamHealthCheck(&healthDiscoveryServiceStreamHealthCheckServer{stream}) -} - -type HealthDiscoveryService_StreamHealthCheckServer interface { - Send(*HealthCheckSpecifier) error - Recv() (*HealthCheckRequestOrEndpointHealthResponse, error) - grpc.ServerStream -} - -type healthDiscoveryServiceStreamHealthCheckServer struct { - grpc.ServerStream -} - -func (x *healthDiscoveryServiceStreamHealthCheckServer) Send(m *HealthCheckSpecifier) error { - return x.ServerStream.SendMsg(m) -} - -func (x *healthDiscoveryServiceStreamHealthCheckServer) Recv() (*HealthCheckRequestOrEndpointHealthResponse, error) { - m := new(HealthCheckRequestOrEndpointHealthResponse) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _HealthDiscoveryService_FetchHealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HealthCheckRequestOrEndpointHealthResponse) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HealthDiscoveryServiceServer).FetchHealthCheck(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.service.discovery.v2.HealthDiscoveryService/FetchHealthCheck", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HealthDiscoveryServiceServer).FetchHealthCheck(ctx, req.(*HealthCheckRequestOrEndpointHealthResponse)) - } - return interceptor(ctx, in, info, handler) -} - -var _HealthDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.discovery.v2.HealthDiscoveryService", - HandlerType: (*HealthDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchHealthCheck", - Handler: _HealthDiscoveryService_FetchHealthCheck_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamHealthCheck", - Handler: _HealthDiscoveryService_StreamHealthCheck_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/discovery/v2/hds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go deleted file mode 100644 index 1ce708162178..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go +++ /dev/null @@ -1,1261 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v2/hds.proto - -package discoveryv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" - - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort - - _ = core.HealthStatus(0) -) - -// Validate checks the field values on Capability with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Capability) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Capability with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CapabilityMultiError, or -// nil if none found. -func (m *Capability) ValidateAll() error { - return m.validate(true) -} - -func (m *Capability) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return CapabilityMultiError(errors) - } - - return nil -} - -// CapabilityMultiError is an error wrapping multiple validation errors -// returned by Capability.ValidateAll() if the designated constraints aren't met. -type CapabilityMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CapabilityMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CapabilityMultiError) AllErrors() []error { return m } - -// CapabilityValidationError is the validation error returned by -// Capability.Validate if the designated constraints aren't met. -type CapabilityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CapabilityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CapabilityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CapabilityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CapabilityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CapabilityValidationError) ErrorName() string { return "CapabilityValidationError" } - -// Error satisfies the builtin error interface -func (e CapabilityValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCapability.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CapabilityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CapabilityValidationError{} - -// Validate checks the field values on HealthCheckRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheckRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheckRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheckRequestMultiError, or nil if none found. -func (m *HealthCheckRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheckRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetCapability()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckRequestValidationError{ - field: "Capability", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckRequestValidationError{ - field: "Capability", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCapability()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckRequestValidationError{ - field: "Capability", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return HealthCheckRequestMultiError(errors) - } - - return nil -} - -// HealthCheckRequestMultiError is an error wrapping multiple validation errors -// returned by HealthCheckRequest.ValidateAll() if the designated constraints -// aren't met. -type HealthCheckRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheckRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheckRequestMultiError) AllErrors() []error { return m } - -// HealthCheckRequestValidationError is the validation error returned by -// HealthCheckRequest.Validate if the designated constraints aren't met. -type HealthCheckRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckRequestValidationError) ErrorName() string { - return "HealthCheckRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheckRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheckRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckRequestValidationError{} - -// Validate checks the field values on EndpointHealth with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *EndpointHealth) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on EndpointHealth with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in EndpointHealthMultiError, -// or nil if none found. -func (m *EndpointHealth) ValidateAll() error { - return m.validate(true) -} - -func (m *EndpointHealth) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetEndpoint()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, EndpointHealthValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, EndpointHealthValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointHealthValidationError{ - field: "Endpoint", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for HealthStatus - - if len(errors) > 0 { - return EndpointHealthMultiError(errors) - } - - return nil -} - -// EndpointHealthMultiError is an error wrapping multiple validation errors -// returned by EndpointHealth.ValidateAll() if the designated constraints -// aren't met. -type EndpointHealthMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m EndpointHealthMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m EndpointHealthMultiError) AllErrors() []error { return m } - -// EndpointHealthValidationError is the validation error returned by -// EndpointHealth.Validate if the designated constraints aren't met. -type EndpointHealthValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointHealthValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointHealthValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointHealthValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointHealthValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointHealthValidationError) ErrorName() string { return "EndpointHealthValidationError" } - -// Error satisfies the builtin error interface -func (e EndpointHealthValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointHealth.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointHealthValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointHealthValidationError{} - -// Validate checks the field values on EndpointHealthResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *EndpointHealthResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on EndpointHealthResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// EndpointHealthResponseMultiError, or nil if none found. -func (m *EndpointHealthResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *EndpointHealthResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetEndpointsHealth() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, EndpointHealthResponseValidationError{ - field: fmt.Sprintf("EndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, EndpointHealthResponseValidationError{ - field: fmt.Sprintf("EndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return EndpointHealthResponseValidationError{ - field: fmt.Sprintf("EndpointsHealth[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return EndpointHealthResponseMultiError(errors) - } - - return nil -} - -// EndpointHealthResponseMultiError is an error wrapping multiple validation -// errors returned by EndpointHealthResponse.ValidateAll() if the designated -// constraints aren't met. -type EndpointHealthResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m EndpointHealthResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m EndpointHealthResponseMultiError) AllErrors() []error { return m } - -// EndpointHealthResponseValidationError is the validation error returned by -// EndpointHealthResponse.Validate if the designated constraints aren't met. -type EndpointHealthResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e EndpointHealthResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e EndpointHealthResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e EndpointHealthResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e EndpointHealthResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e EndpointHealthResponseValidationError) ErrorName() string { - return "EndpointHealthResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e EndpointHealthResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sEndpointHealthResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = EndpointHealthResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = EndpointHealthResponseValidationError{} - -// Validate checks the field values on -// HealthCheckRequestOrEndpointHealthResponse with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HealthCheckRequestOrEndpointHealthResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// HealthCheckRequestOrEndpointHealthResponse with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// HealthCheckRequestOrEndpointHealthResponseMultiError, or nil if none found. -func (m *HealthCheckRequestOrEndpointHealthResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheckRequestOrEndpointHealthResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - switch v := m.RequestType.(type) { - case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - if v == nil { - err := HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "RequestType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetHealthCheckRequest()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "HealthCheckRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "HealthCheckRequest", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHealthCheckRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "HealthCheckRequest", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: - if v == nil { - err := HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "RequestType", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetEndpointHealthResponse()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "EndpointHealthResponse", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "EndpointHealthResponse", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEndpointHealthResponse()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckRequestOrEndpointHealthResponseValidationError{ - field: "EndpointHealthResponse", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return HealthCheckRequestOrEndpointHealthResponseMultiError(errors) - } - - return nil -} - -// HealthCheckRequestOrEndpointHealthResponseMultiError is an error wrapping -// multiple validation errors returned by -// HealthCheckRequestOrEndpointHealthResponse.ValidateAll() if the designated -// constraints aren't met. -type HealthCheckRequestOrEndpointHealthResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheckRequestOrEndpointHealthResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheckRequestOrEndpointHealthResponseMultiError) AllErrors() []error { return m } - -// HealthCheckRequestOrEndpointHealthResponseValidationError is the validation -// error returned by HealthCheckRequestOrEndpointHealthResponse.Validate if -// the designated constraints aren't met. -type HealthCheckRequestOrEndpointHealthResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) ErrorName() string { - return "HealthCheckRequestOrEndpointHealthResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheckRequestOrEndpointHealthResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckRequestOrEndpointHealthResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckRequestOrEndpointHealthResponseValidationError{} - -// Validate checks the field values on LocalityEndpoints with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *LocalityEndpoints) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LocalityEndpoints with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// LocalityEndpointsMultiError, or nil if none found. -func (m *LocalityEndpoints) ValidateAll() error { - return m.validate(true) -} - -func (m *LocalityEndpoints) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetLocality()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LocalityEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LocalityEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalityEndpointsValidationError{ - field: "Locality", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetEndpoints() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LocalityEndpointsValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LocalityEndpointsValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LocalityEndpointsValidationError{ - field: fmt.Sprintf("Endpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return LocalityEndpointsMultiError(errors) - } - - return nil -} - -// LocalityEndpointsMultiError is an error wrapping multiple validation errors -// returned by LocalityEndpoints.ValidateAll() if the designated constraints -// aren't met. -type LocalityEndpointsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LocalityEndpointsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LocalityEndpointsMultiError) AllErrors() []error { return m } - -// LocalityEndpointsValidationError is the validation error returned by -// LocalityEndpoints.Validate if the designated constraints aren't met. -type LocalityEndpointsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LocalityEndpointsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LocalityEndpointsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LocalityEndpointsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LocalityEndpointsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LocalityEndpointsValidationError) ErrorName() string { - return "LocalityEndpointsValidationError" -} - -// Error satisfies the builtin error interface -func (e LocalityEndpointsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLocalityEndpoints.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LocalityEndpointsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LocalityEndpointsValidationError{} - -// Validate checks the field values on ClusterHealthCheck with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ClusterHealthCheck) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ClusterHealthCheck with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ClusterHealthCheckMultiError, or nil if none found. -func (m *ClusterHealthCheck) ValidateAll() error { - return m.validate(true) -} - -func (m *ClusterHealthCheck) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for ClusterName - - for idx, item := range m.GetHealthChecks() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterHealthCheckValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterHealthCheckValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterHealthCheckValidationError{ - field: fmt.Sprintf("HealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - for idx, item := range m.GetLocalityEndpoints() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ClusterHealthCheckValidationError{ - field: fmt.Sprintf("LocalityEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ClusterHealthCheckValidationError{ - field: fmt.Sprintf("LocalityEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ClusterHealthCheckValidationError{ - field: fmt.Sprintf("LocalityEndpoints[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ClusterHealthCheckMultiError(errors) - } - - return nil -} - -// ClusterHealthCheckMultiError is an error wrapping multiple validation errors -// returned by ClusterHealthCheck.ValidateAll() if the designated constraints -// aren't met. -type ClusterHealthCheckMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ClusterHealthCheckMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ClusterHealthCheckMultiError) AllErrors() []error { return m } - -// ClusterHealthCheckValidationError is the validation error returned by -// ClusterHealthCheck.Validate if the designated constraints aren't met. -type ClusterHealthCheckValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ClusterHealthCheckValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ClusterHealthCheckValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ClusterHealthCheckValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ClusterHealthCheckValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ClusterHealthCheckValidationError) ErrorName() string { - return "ClusterHealthCheckValidationError" -} - -// Error satisfies the builtin error interface -func (e ClusterHealthCheckValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sClusterHealthCheck.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ClusterHealthCheckValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ClusterHealthCheckValidationError{} - -// Validate checks the field values on HealthCheckSpecifier with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *HealthCheckSpecifier) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HealthCheckSpecifier with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// HealthCheckSpecifierMultiError, or nil if none found. -func (m *HealthCheckSpecifier) ValidateAll() error { - return m.validate(true) -} - -func (m *HealthCheckSpecifier) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetClusterHealthChecks() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckSpecifierValidationError{ - field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckSpecifierValidationError{ - field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckSpecifierValidationError{ - field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetInterval()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HealthCheckSpecifierValidationError{ - field: "Interval", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HealthCheckSpecifierValidationError{ - field: "Interval", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HealthCheckSpecifierValidationError{ - field: "Interval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return HealthCheckSpecifierMultiError(errors) - } - - return nil -} - -// HealthCheckSpecifierMultiError is an error wrapping multiple validation -// errors returned by HealthCheckSpecifier.ValidateAll() if the designated -// constraints aren't met. -type HealthCheckSpecifierMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HealthCheckSpecifierMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HealthCheckSpecifierMultiError) AllErrors() []error { return m } - -// HealthCheckSpecifierValidationError is the validation error returned by -// HealthCheckSpecifier.Validate if the designated constraints aren't met. -type HealthCheckSpecifierValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HealthCheckSpecifierValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HealthCheckSpecifierValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HealthCheckSpecifierValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HealthCheckSpecifierValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HealthCheckSpecifierValidationError) ErrorName() string { - return "HealthCheckSpecifierValidationError" -} - -// Error satisfies the builtin error interface -func (e HealthCheckSpecifierValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sHealthCheckSpecifier.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HealthCheckSpecifierValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HealthCheckSpecifierValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go deleted file mode 100644 index f91246c66475..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.go +++ /dev/null @@ -1,499 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/service/discovery/v2/rtds.proto - -package discoveryv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _struct "github.com/golang/protobuf/ptypes/struct" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -type RtdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RtdsDummy) Reset() { - *x = RtdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RtdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RtdsDummy) ProtoMessage() {} - -func (x *RtdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RtdsDummy.ProtoReflect.Descriptor instead. -func (*RtdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_rtds_proto_rawDescGZIP(), []int{0} -} - -// RTDS resource type. This describes a layer in the runtime virtual filesystem. -type Runtime struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Runtime resource name. This makes the Runtime a self-describing xDS - // resource. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Layer *_struct.Struct `protobuf:"bytes,2,opt,name=layer,proto3" json:"layer,omitempty"` -} - -func (x *Runtime) Reset() { - *x = Runtime{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Runtime) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Runtime) ProtoMessage() {} - -func (x *Runtime) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Runtime.ProtoReflect.Descriptor instead. -func (*Runtime) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_rtds_proto_rawDescGZIP(), []int{1} -} - -func (x *Runtime) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Runtime) GetLayer() *_struct.Struct { - if x != nil { - return x.Layer - } - return nil -} - -var File_envoy_service_discovery_v2_rtds_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v2_rtds_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x74, 0x64, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x74, 0x64, 0x73, 0x44, - 0x75, 0x6d, 0x6d, 0x79, 0x22, 0x55, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, - 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x32, 0xf7, 0x02, 0x0a, 0x17, - 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x5f, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, - 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, - 0x12, 0x77, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x76, 0x32, 0x2f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x2a, 0x8a, 0xa4, 0x96, 0xf3, 0x07, - 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0xb1, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x32, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, - 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x32, 0x88, 0x01, - 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_envoy_service_discovery_v2_rtds_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v2_rtds_proto_rawDescData = file_envoy_service_discovery_v2_rtds_proto_rawDesc -) - -func file_envoy_service_discovery_v2_rtds_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v2_rtds_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v2_rtds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v2_rtds_proto_rawDescData) - }) - return file_envoy_service_discovery_v2_rtds_proto_rawDescData -} - -var file_envoy_service_discovery_v2_rtds_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_service_discovery_v2_rtds_proto_goTypes = []interface{}{ - (*RtdsDummy)(nil), // 0: envoy.service.discovery.v2.RtdsDummy - (*Runtime)(nil), // 1: envoy.service.discovery.v2.Runtime - (*_struct.Struct)(nil), // 2: google.protobuf.Struct - (*v2.DiscoveryRequest)(nil), // 3: envoy.api.v2.DiscoveryRequest - (*v2.DeltaDiscoveryRequest)(nil), // 4: envoy.api.v2.DeltaDiscoveryRequest - (*v2.DiscoveryResponse)(nil), // 5: envoy.api.v2.DiscoveryResponse - (*v2.DeltaDiscoveryResponse)(nil), // 6: envoy.api.v2.DeltaDiscoveryResponse -} -var file_envoy_service_discovery_v2_rtds_proto_depIdxs = []int32{ - 2, // 0: envoy.service.discovery.v2.Runtime.layer:type_name -> google.protobuf.Struct - 3, // 1: envoy.service.discovery.v2.RuntimeDiscoveryService.StreamRuntime:input_type -> envoy.api.v2.DiscoveryRequest - 4, // 2: envoy.service.discovery.v2.RuntimeDiscoveryService.DeltaRuntime:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 3, // 3: envoy.service.discovery.v2.RuntimeDiscoveryService.FetchRuntime:input_type -> envoy.api.v2.DiscoveryRequest - 5, // 4: envoy.service.discovery.v2.RuntimeDiscoveryService.StreamRuntime:output_type -> envoy.api.v2.DiscoveryResponse - 6, // 5: envoy.service.discovery.v2.RuntimeDiscoveryService.DeltaRuntime:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 5, // 6: envoy.service.discovery.v2.RuntimeDiscoveryService.FetchRuntime:output_type -> envoy.api.v2.DiscoveryResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v2_rtds_proto_init() } -func file_envoy_service_discovery_v2_rtds_proto_init() { - if File_envoy_service_discovery_v2_rtds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v2_rtds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RtdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_discovery_v2_rtds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Runtime); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v2_rtds_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_discovery_v2_rtds_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v2_rtds_proto_depIdxs, - MessageInfos: file_envoy_service_discovery_v2_rtds_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v2_rtds_proto = out.File - file_envoy_service_discovery_v2_rtds_proto_rawDesc = nil - file_envoy_service_discovery_v2_rtds_proto_goTypes = nil - file_envoy_service_discovery_v2_rtds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RuntimeDiscoveryServiceClient is the client API for RuntimeDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RuntimeDiscoveryServiceClient interface { - StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) - DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) - FetchRuntime(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) -} - -type runtimeDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRuntimeDiscoveryServiceClient(cc grpc.ClientConnInterface) RuntimeDiscoveryServiceClient { - return &runtimeDiscoveryServiceClient{cc} -} - -func (c *runtimeDiscoveryServiceClient) StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) { - stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.RuntimeDiscoveryService/StreamRuntime", opts...) - if err != nil { - return nil, err - } - x := &runtimeDiscoveryServiceStreamRuntimeClient{stream} - return x, nil -} - -type RuntimeDiscoveryService_StreamRuntimeClient interface { - Send(*v2.DiscoveryRequest) error - Recv() (*v2.DiscoveryResponse, error) - grpc.ClientStream -} - -type runtimeDiscoveryServiceStreamRuntimeClient struct { - grpc.ClientStream -} - -func (x *runtimeDiscoveryServiceStreamRuntimeClient) Send(m *v2.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *runtimeDiscoveryServiceStreamRuntimeClient) Recv() (*v2.DiscoveryResponse, error) { - m := new(v2.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *runtimeDiscoveryServiceClient) DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) { - stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v2.RuntimeDiscoveryService/DeltaRuntime", opts...) - if err != nil { - return nil, err - } - x := &runtimeDiscoveryServiceDeltaRuntimeClient{stream} - return x, nil -} - -type RuntimeDiscoveryService_DeltaRuntimeClient interface { - Send(*v2.DeltaDiscoveryRequest) error - Recv() (*v2.DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type runtimeDiscoveryServiceDeltaRuntimeClient struct { - grpc.ClientStream -} - -func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Send(m *v2.DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Recv() (*v2.DeltaDiscoveryResponse, error) { - m := new(v2.DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *runtimeDiscoveryServiceClient) FetchRuntime(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) { - out := new(v2.DiscoveryResponse) - err := c.cc.Invoke(ctx, "/envoy.service.discovery.v2.RuntimeDiscoveryService/FetchRuntime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RuntimeDiscoveryServiceServer is the server API for RuntimeDiscoveryService service. -type RuntimeDiscoveryServiceServer interface { - StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error - DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error - FetchRuntime(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) -} - -// UnimplementedRuntimeDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRuntimeDiscoveryServiceServer struct { -} - -func (*UnimplementedRuntimeDiscoveryServiceServer) StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error { - return status.Errorf(codes.Unimplemented, "method StreamRuntime not implemented") -} -func (*UnimplementedRuntimeDiscoveryServiceServer) DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaRuntime not implemented") -} -func (*UnimplementedRuntimeDiscoveryServiceServer) FetchRuntime(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchRuntime not implemented") -} - -func RegisterRuntimeDiscoveryServiceServer(s *grpc.Server, srv RuntimeDiscoveryServiceServer) { - s.RegisterService(&_RuntimeDiscoveryService_serviceDesc, srv) -} - -func _RuntimeDiscoveryService_StreamRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RuntimeDiscoveryServiceServer).StreamRuntime(&runtimeDiscoveryServiceStreamRuntimeServer{stream}) -} - -type RuntimeDiscoveryService_StreamRuntimeServer interface { - Send(*v2.DiscoveryResponse) error - Recv() (*v2.DiscoveryRequest, error) - grpc.ServerStream -} - -type runtimeDiscoveryServiceStreamRuntimeServer struct { - grpc.ServerStream -} - -func (x *runtimeDiscoveryServiceStreamRuntimeServer) Send(m *v2.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *runtimeDiscoveryServiceStreamRuntimeServer) Recv() (*v2.DiscoveryRequest, error) { - m := new(v2.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _RuntimeDiscoveryService_DeltaRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(RuntimeDiscoveryServiceServer).DeltaRuntime(&runtimeDiscoveryServiceDeltaRuntimeServer{stream}) -} - -type RuntimeDiscoveryService_DeltaRuntimeServer interface { - Send(*v2.DeltaDiscoveryResponse) error - Recv() (*v2.DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type runtimeDiscoveryServiceDeltaRuntimeServer struct { - grpc.ServerStream -} - -func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Send(m *v2.DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Recv() (*v2.DeltaDiscoveryRequest, error) { - m := new(v2.DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _RuntimeDiscoveryService_FetchRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v2.DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.service.discovery.v2.RuntimeDiscoveryService/FetchRuntime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, req.(*v2.DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RuntimeDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.discovery.v2.RuntimeDiscoveryService", - HandlerType: (*RuntimeDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchRuntime", - Handler: _RuntimeDiscoveryService_FetchRuntime_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamRuntime", - Handler: _RuntimeDiscoveryService_StreamRuntime_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "DeltaRuntime", - Handler: _RuntimeDiscoveryService_DeltaRuntime_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/discovery/v2/rtds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go deleted file mode 100644 index 4917a198b789..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/rtds.pb.validate.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v2/rtds.proto - -package discoveryv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on RtdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RtdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RtdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in RtdsDummyMultiError, or nil -// if none found. -func (m *RtdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *RtdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RtdsDummyMultiError(errors) - } - - return nil -} - -// RtdsDummyMultiError is an error wrapping multiple validation errors returned -// by RtdsDummy.ValidateAll() if the designated constraints aren't met. -type RtdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RtdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RtdsDummyMultiError) AllErrors() []error { return m } - -// RtdsDummyValidationError is the validation error returned by -// RtdsDummy.Validate if the designated constraints aren't met. -type RtdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RtdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RtdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RtdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RtdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RtdsDummyValidationError) ErrorName() string { return "RtdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e RtdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRtdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RtdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RtdsDummyValidationError{} - -// Validate checks the field values on Runtime with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Runtime) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Runtime with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in RuntimeMultiError, or nil if none found. -func (m *Runtime) ValidateAll() error { - return m.validate(true) -} - -func (m *Runtime) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := RuntimeValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetLayer()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RuntimeValidationError{ - field: "Layer", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RuntimeValidationError{ - field: "Layer", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLayer()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RuntimeValidationError{ - field: "Layer", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RuntimeMultiError(errors) - } - - return nil -} - -// RuntimeMultiError is an error wrapping multiple validation errors returned -// by Runtime.ValidateAll() if the designated constraints aren't met. -type RuntimeMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RuntimeMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RuntimeMultiError) AllErrors() []error { return m } - -// RuntimeValidationError is the validation error returned by Runtime.Validate -// if the designated constraints aren't met. -type RuntimeValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RuntimeValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RuntimeValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RuntimeValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RuntimeValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RuntimeValidationError) ErrorName() string { return "RuntimeValidationError" } - -// Error satisfies the builtin error interface -func (e RuntimeValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRuntime.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RuntimeValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RuntimeValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go deleted file mode 100644 index 6095737513e0..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.go +++ /dev/null @@ -1,414 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/service/discovery/v2/sds.proto - -package discoveryv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/go-control-plane/envoy/annotations" - v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -type SdsDummy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SdsDummy) Reset() { - *x = SdsDummy{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_discovery_v2_sds_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SdsDummy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SdsDummy) ProtoMessage() {} - -func (x *SdsDummy) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_discovery_v2_sds_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SdsDummy.ProtoReflect.Descriptor instead. -func (*SdsDummy) Descriptor() ([]byte, []int) { - return file_envoy_service_discovery_v2_sds_proto_rawDescGZIP(), []int{0} -} - -var File_envoy_service_discovery_v2_sds_proto protoreflect.FileDescriptor - -var file_envoy_service_discovery_v2_sds_proto_rawDesc = []byte{ - 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x64, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x0a, 0x0a, 0x08, 0x53, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xec, 0x02, 0x0a, 0x16, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x77, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, - 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x20, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x1a, - 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42, 0xaf, 0x01, 0x0a, 0x28, 0x69, - 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x53, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x76, 0x32, 0x88, 0x01, 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_discovery_v2_sds_proto_rawDescOnce sync.Once - file_envoy_service_discovery_v2_sds_proto_rawDescData = file_envoy_service_discovery_v2_sds_proto_rawDesc -) - -func file_envoy_service_discovery_v2_sds_proto_rawDescGZIP() []byte { - file_envoy_service_discovery_v2_sds_proto_rawDescOnce.Do(func() { - file_envoy_service_discovery_v2_sds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v2_sds_proto_rawDescData) - }) - return file_envoy_service_discovery_v2_sds_proto_rawDescData -} - -var file_envoy_service_discovery_v2_sds_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_envoy_service_discovery_v2_sds_proto_goTypes = []interface{}{ - (*SdsDummy)(nil), // 0: envoy.service.discovery.v2.SdsDummy - (*v2.DeltaDiscoveryRequest)(nil), // 1: envoy.api.v2.DeltaDiscoveryRequest - (*v2.DiscoveryRequest)(nil), // 2: envoy.api.v2.DiscoveryRequest - (*v2.DeltaDiscoveryResponse)(nil), // 3: envoy.api.v2.DeltaDiscoveryResponse - (*v2.DiscoveryResponse)(nil), // 4: envoy.api.v2.DiscoveryResponse -} -var file_envoy_service_discovery_v2_sds_proto_depIdxs = []int32{ - 1, // 0: envoy.service.discovery.v2.SecretDiscoveryService.DeltaSecrets:input_type -> envoy.api.v2.DeltaDiscoveryRequest - 2, // 1: envoy.service.discovery.v2.SecretDiscoveryService.StreamSecrets:input_type -> envoy.api.v2.DiscoveryRequest - 2, // 2: envoy.service.discovery.v2.SecretDiscoveryService.FetchSecrets:input_type -> envoy.api.v2.DiscoveryRequest - 3, // 3: envoy.service.discovery.v2.SecretDiscoveryService.DeltaSecrets:output_type -> envoy.api.v2.DeltaDiscoveryResponse - 4, // 4: envoy.service.discovery.v2.SecretDiscoveryService.StreamSecrets:output_type -> envoy.api.v2.DiscoveryResponse - 4, // 5: envoy.service.discovery.v2.SecretDiscoveryService.FetchSecrets:output_type -> envoy.api.v2.DiscoveryResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_envoy_service_discovery_v2_sds_proto_init() } -func file_envoy_service_discovery_v2_sds_proto_init() { - if File_envoy_service_discovery_v2_sds_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_discovery_v2_sds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SdsDummy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_discovery_v2_sds_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_discovery_v2_sds_proto_goTypes, - DependencyIndexes: file_envoy_service_discovery_v2_sds_proto_depIdxs, - MessageInfos: file_envoy_service_discovery_v2_sds_proto_msgTypes, - }.Build() - File_envoy_service_discovery_v2_sds_proto = out.File - file_envoy_service_discovery_v2_sds_proto_rawDesc = nil - file_envoy_service_discovery_v2_sds_proto_goTypes = nil - file_envoy_service_discovery_v2_sds_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SecretDiscoveryServiceClient is the client API for SecretDiscoveryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SecretDiscoveryServiceClient interface { - DeltaSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_DeltaSecretsClient, error) - StreamSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_StreamSecretsClient, error) - FetchSecrets(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) -} - -type secretDiscoveryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSecretDiscoveryServiceClient(cc grpc.ClientConnInterface) SecretDiscoveryServiceClient { - return &secretDiscoveryServiceClient{cc} -} - -func (c *secretDiscoveryServiceClient) DeltaSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_DeltaSecretsClient, error) { - stream, err := c.cc.NewStream(ctx, &_SecretDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.SecretDiscoveryService/DeltaSecrets", opts...) - if err != nil { - return nil, err - } - x := &secretDiscoveryServiceDeltaSecretsClient{stream} - return x, nil -} - -type SecretDiscoveryService_DeltaSecretsClient interface { - Send(*v2.DeltaDiscoveryRequest) error - Recv() (*v2.DeltaDiscoveryResponse, error) - grpc.ClientStream -} - -type secretDiscoveryServiceDeltaSecretsClient struct { - grpc.ClientStream -} - -func (x *secretDiscoveryServiceDeltaSecretsClient) Send(m *v2.DeltaDiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *secretDiscoveryServiceDeltaSecretsClient) Recv() (*v2.DeltaDiscoveryResponse, error) { - m := new(v2.DeltaDiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *secretDiscoveryServiceClient) StreamSecrets(ctx context.Context, opts ...grpc.CallOption) (SecretDiscoveryService_StreamSecretsClient, error) { - stream, err := c.cc.NewStream(ctx, &_SecretDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v2.SecretDiscoveryService/StreamSecrets", opts...) - if err != nil { - return nil, err - } - x := &secretDiscoveryServiceStreamSecretsClient{stream} - return x, nil -} - -type SecretDiscoveryService_StreamSecretsClient interface { - Send(*v2.DiscoveryRequest) error - Recv() (*v2.DiscoveryResponse, error) - grpc.ClientStream -} - -type secretDiscoveryServiceStreamSecretsClient struct { - grpc.ClientStream -} - -func (x *secretDiscoveryServiceStreamSecretsClient) Send(m *v2.DiscoveryRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *secretDiscoveryServiceStreamSecretsClient) Recv() (*v2.DiscoveryResponse, error) { - m := new(v2.DiscoveryResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *secretDiscoveryServiceClient) FetchSecrets(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) { - out := new(v2.DiscoveryResponse) - err := c.cc.Invoke(ctx, "/envoy.service.discovery.v2.SecretDiscoveryService/FetchSecrets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SecretDiscoveryServiceServer is the server API for SecretDiscoveryService service. -type SecretDiscoveryServiceServer interface { - DeltaSecrets(SecretDiscoveryService_DeltaSecretsServer) error - StreamSecrets(SecretDiscoveryService_StreamSecretsServer) error - FetchSecrets(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) -} - -// UnimplementedSecretDiscoveryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSecretDiscoveryServiceServer struct { -} - -func (*UnimplementedSecretDiscoveryServiceServer) DeltaSecrets(SecretDiscoveryService_DeltaSecretsServer) error { - return status.Errorf(codes.Unimplemented, "method DeltaSecrets not implemented") -} -func (*UnimplementedSecretDiscoveryServiceServer) StreamSecrets(SecretDiscoveryService_StreamSecretsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamSecrets not implemented") -} -func (*UnimplementedSecretDiscoveryServiceServer) FetchSecrets(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchSecrets not implemented") -} - -func RegisterSecretDiscoveryServiceServer(s *grpc.Server, srv SecretDiscoveryServiceServer) { - s.RegisterService(&_SecretDiscoveryService_serviceDesc, srv) -} - -func _SecretDiscoveryService_DeltaSecrets_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SecretDiscoveryServiceServer).DeltaSecrets(&secretDiscoveryServiceDeltaSecretsServer{stream}) -} - -type SecretDiscoveryService_DeltaSecretsServer interface { - Send(*v2.DeltaDiscoveryResponse) error - Recv() (*v2.DeltaDiscoveryRequest, error) - grpc.ServerStream -} - -type secretDiscoveryServiceDeltaSecretsServer struct { - grpc.ServerStream -} - -func (x *secretDiscoveryServiceDeltaSecretsServer) Send(m *v2.DeltaDiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *secretDiscoveryServiceDeltaSecretsServer) Recv() (*v2.DeltaDiscoveryRequest, error) { - m := new(v2.DeltaDiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _SecretDiscoveryService_StreamSecrets_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(SecretDiscoveryServiceServer).StreamSecrets(&secretDiscoveryServiceStreamSecretsServer{stream}) -} - -type SecretDiscoveryService_StreamSecretsServer interface { - Send(*v2.DiscoveryResponse) error - Recv() (*v2.DiscoveryRequest, error) - grpc.ServerStream -} - -type secretDiscoveryServiceStreamSecretsServer struct { - grpc.ServerStream -} - -func (x *secretDiscoveryServiceStreamSecretsServer) Send(m *v2.DiscoveryResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *secretDiscoveryServiceStreamSecretsServer) Recv() (*v2.DiscoveryRequest, error) { - m := new(v2.DiscoveryRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _SecretDiscoveryService_FetchSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(v2.DiscoveryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SecretDiscoveryServiceServer).FetchSecrets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/envoy.service.discovery.v2.SecretDiscoveryService/FetchSecrets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecretDiscoveryServiceServer).FetchSecrets(ctx, req.(*v2.DiscoveryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SecretDiscoveryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.discovery.v2.SecretDiscoveryService", - HandlerType: (*SecretDiscoveryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchSecrets", - Handler: _SecretDiscoveryService_FetchSecrets_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "DeltaSecrets", - Handler: _SecretDiscoveryService_DeltaSecrets_Handler, - ServerStreams: true, - ClientStreams: true, - }, - { - StreamName: "StreamSecrets", - Handler: _SecretDiscoveryService_StreamSecrets_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/discovery/v2/sds.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go deleted file mode 100644 index 33239814b649..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/sds.pb.validate.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/discovery/v2/sds.proto - -package discoveryv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on SdsDummy with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SdsDummy) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SdsDummy with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SdsDummyMultiError, or nil -// if none found. -func (m *SdsDummy) ValidateAll() error { - return m.validate(true) -} - -func (m *SdsDummy) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return SdsDummyMultiError(errors) - } - - return nil -} - -// SdsDummyMultiError is an error wrapping multiple validation errors returned -// by SdsDummy.ValidateAll() if the designated constraints aren't met. -type SdsDummyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SdsDummyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SdsDummyMultiError) AllErrors() []error { return m } - -// SdsDummyValidationError is the validation error returned by -// SdsDummy.Validate if the designated constraints aren't met. -type SdsDummyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SdsDummyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SdsDummyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SdsDummyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SdsDummyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SdsDummyValidationError) ErrorName() string { return "SdsDummyValidationError" } - -// Error satisfies the builtin error interface -func (e SdsDummyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSdsDummy.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SdsDummyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SdsDummyValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.go deleted file mode 100644 index 6a1597e6f7ad..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.go +++ /dev/null @@ -1,489 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/service/load_stats/v2/lrs.proto - -package load_statsv2 - -import ( - context "context" - _ "github.com/cncf/xds/go/udpa/annotations" - core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" - duration "github.com/golang/protobuf/ptypes/duration" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A load report Envoy sends to the management server. -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -type LoadStatsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Node identifier for Envoy instance. - Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - // A list of load stats to report. - ClusterStats []*endpoint.ClusterStats `protobuf:"bytes,2,rep,name=cluster_stats,json=clusterStats,proto3" json:"cluster_stats,omitempty"` -} - -func (x *LoadStatsRequest) Reset() { - *x = LoadStatsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadStatsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadStatsRequest) ProtoMessage() {} - -func (x *LoadStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadStatsRequest.ProtoReflect.Descriptor instead. -func (*LoadStatsRequest) Descriptor() ([]byte, []int) { - return file_envoy_service_load_stats_v2_lrs_proto_rawDescGZIP(), []int{0} -} - -func (x *LoadStatsRequest) GetNode() *core.Node { - if x != nil { - return x.Node - } - return nil -} - -func (x *LoadStatsRequest) GetClusterStats() []*endpoint.ClusterStats { - if x != nil { - return x.ClusterStats - } - return nil -} - -// The management server sends envoy a LoadStatsResponse with all clusters it -// is interested in learning load stats about. -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -type LoadStatsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Clusters to report stats for. - // Not populated if *send_all_clusters* is true. - Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` - // If true, the client should send all clusters it knows about. - // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their - // :ref:`client_features` field will honor this field. - SendAllClusters bool `protobuf:"varint,4,opt,name=send_all_clusters,json=sendAllClusters,proto3" json:"send_all_clusters,omitempty"` - // The minimum interval of time to collect stats over. This is only a minimum for two reasons: - // 1. There may be some delay from when the timer fires until stats sampling occurs. - // 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic - // that is observed in between the corresponding previous *LoadStatsRequest* and this - // *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period - // of inobservability that might otherwise exists between the messages. New clusters are not - // subject to this consideration. - LoadReportingInterval *duration.Duration `protobuf:"bytes,2,opt,name=load_reporting_interval,json=loadReportingInterval,proto3" json:"load_reporting_interval,omitempty"` - // Set to *true* if the management server supports endpoint granularity - // report. - ReportEndpointGranularity bool `protobuf:"varint,3,opt,name=report_endpoint_granularity,json=reportEndpointGranularity,proto3" json:"report_endpoint_granularity,omitempty"` -} - -func (x *LoadStatsResponse) Reset() { - *x = LoadStatsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadStatsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadStatsResponse) ProtoMessage() {} - -func (x *LoadStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoadStatsResponse.ProtoReflect.Descriptor instead. -func (*LoadStatsResponse) Descriptor() ([]byte, []int) { - return file_envoy_service_load_stats_v2_lrs_proto_rawDescGZIP(), []int{1} -} - -func (x *LoadStatsResponse) GetClusters() []string { - if x != nil { - return x.Clusters - } - return nil -} - -func (x *LoadStatsResponse) GetSendAllClusters() bool { - if x != nil { - return x.SendAllClusters - } - return false -} - -func (x *LoadStatsResponse) GetLoadReportingInterval() *duration.Duration { - if x != nil { - return x.LoadReportingInterval - } - return nil -} - -func (x *LoadStatsResponse) GetReportEndpointGranularity() bool { - if x != nil { - return x.ReportEndpointGranularity - } - return false -} - -var File_envoy_service_load_stats_v2_lrs_proto protoreflect.FileDescriptor - -var file_envoy_service_load_stats_v2_lrs_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x72, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x10, 0x4c, - 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x0d, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x6e, 0x64, - 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x75, - 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x6e, - 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, - 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_service_load_stats_v2_lrs_proto_rawDescOnce sync.Once - file_envoy_service_load_stats_v2_lrs_proto_rawDescData = file_envoy_service_load_stats_v2_lrs_proto_rawDesc -) - -func file_envoy_service_load_stats_v2_lrs_proto_rawDescGZIP() []byte { - file_envoy_service_load_stats_v2_lrs_proto_rawDescOnce.Do(func() { - file_envoy_service_load_stats_v2_lrs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_load_stats_v2_lrs_proto_rawDescData) - }) - return file_envoy_service_load_stats_v2_lrs_proto_rawDescData -} - -var file_envoy_service_load_stats_v2_lrs_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_envoy_service_load_stats_v2_lrs_proto_goTypes = []interface{}{ - (*LoadStatsRequest)(nil), // 0: envoy.service.load_stats.v2.LoadStatsRequest - (*LoadStatsResponse)(nil), // 1: envoy.service.load_stats.v2.LoadStatsResponse - (*core.Node)(nil), // 2: envoy.api.v2.core.Node - (*endpoint.ClusterStats)(nil), // 3: envoy.api.v2.endpoint.ClusterStats - (*duration.Duration)(nil), // 4: google.protobuf.Duration -} -var file_envoy_service_load_stats_v2_lrs_proto_depIdxs = []int32{ - 2, // 0: envoy.service.load_stats.v2.LoadStatsRequest.node:type_name -> envoy.api.v2.core.Node - 3, // 1: envoy.service.load_stats.v2.LoadStatsRequest.cluster_stats:type_name -> envoy.api.v2.endpoint.ClusterStats - 4, // 2: envoy.service.load_stats.v2.LoadStatsResponse.load_reporting_interval:type_name -> google.protobuf.Duration - 0, // 3: envoy.service.load_stats.v2.LoadReportingService.StreamLoadStats:input_type -> envoy.service.load_stats.v2.LoadStatsRequest - 1, // 4: envoy.service.load_stats.v2.LoadReportingService.StreamLoadStats:output_type -> envoy.service.load_stats.v2.LoadStatsResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_envoy_service_load_stats_v2_lrs_proto_init() } -func file_envoy_service_load_stats_v2_lrs_proto_init() { - if File_envoy_service_load_stats_v2_lrs_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_service_load_stats_v2_lrs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadStatsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_service_load_stats_v2_lrs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoadStatsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_service_load_stats_v2_lrs_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_envoy_service_load_stats_v2_lrs_proto_goTypes, - DependencyIndexes: file_envoy_service_load_stats_v2_lrs_proto_depIdxs, - MessageInfos: file_envoy_service_load_stats_v2_lrs_proto_msgTypes, - }.Build() - File_envoy_service_load_stats_v2_lrs_proto = out.File - file_envoy_service_load_stats_v2_lrs_proto_rawDesc = nil - file_envoy_service_load_stats_v2_lrs_proto_goTypes = nil - file_envoy_service_load_stats_v2_lrs_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// LoadReportingServiceClient is the client API for LoadReportingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LoadReportingServiceClient interface { - // Advanced API to allow for multi-dimensional load balancing by remote - // server. For receiving LB assignments, the steps are: - // 1, The management server is configured with per cluster/zone/load metric - // capacity configuration. The capacity configuration definition is - // outside of the scope of this document. - // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters - // to balance. - // - // Independently, Envoy will initiate a StreamLoadStats bidi stream with a - // management server: - // 1. Once a connection establishes, the management server publishes a - // LoadStatsResponse for all clusters it is interested in learning load - // stats about. - // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts - // based on per-zone weights and/or per-instance weights (if specified) - // based on intra-zone LbPolicy. This information comes from the above - // {Stream,Fetch}Endpoints. - // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. - // 4. Envoy aggregates load reports over the period of time given to it in - // LoadStatsResponse.load_reporting_interval. This includes aggregation - // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as - // well as load metrics from upstream hosts. - // 5. When the timer of load_reporting_interval expires, Envoy sends new - // LoadStatsRequest filled with load reports for each cluster. - // 6. The management server uses the load reports from all reported Envoys - // from around the world, computes global assignment and prepares traffic - // assignment destined for each zone Envoys are located in. Goto 2. - StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) -} - -type loadReportingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewLoadReportingServiceClient(cc grpc.ClientConnInterface) LoadReportingServiceClient { - return &loadReportingServiceClient{cc} -} - -func (c *loadReportingServiceClient) StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) { - stream, err := c.cc.NewStream(ctx, &_LoadReportingService_serviceDesc.Streams[0], "/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats", opts...) - if err != nil { - return nil, err - } - x := &loadReportingServiceStreamLoadStatsClient{stream} - return x, nil -} - -type LoadReportingService_StreamLoadStatsClient interface { - Send(*LoadStatsRequest) error - Recv() (*LoadStatsResponse, error) - grpc.ClientStream -} - -type loadReportingServiceStreamLoadStatsClient struct { - grpc.ClientStream -} - -func (x *loadReportingServiceStreamLoadStatsClient) Send(m *LoadStatsRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *loadReportingServiceStreamLoadStatsClient) Recv() (*LoadStatsResponse, error) { - m := new(LoadStatsResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// LoadReportingServiceServer is the server API for LoadReportingService service. -type LoadReportingServiceServer interface { - // Advanced API to allow for multi-dimensional load balancing by remote - // server. For receiving LB assignments, the steps are: - // 1, The management server is configured with per cluster/zone/load metric - // capacity configuration. The capacity configuration definition is - // outside of the scope of this document. - // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters - // to balance. - // - // Independently, Envoy will initiate a StreamLoadStats bidi stream with a - // management server: - // 1. Once a connection establishes, the management server publishes a - // LoadStatsResponse for all clusters it is interested in learning load - // stats about. - // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts - // based on per-zone weights and/or per-instance weights (if specified) - // based on intra-zone LbPolicy. This information comes from the above - // {Stream,Fetch}Endpoints. - // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. - // 4. Envoy aggregates load reports over the period of time given to it in - // LoadStatsResponse.load_reporting_interval. This includes aggregation - // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as - // well as load metrics from upstream hosts. - // 5. When the timer of load_reporting_interval expires, Envoy sends new - // LoadStatsRequest filled with load reports for each cluster. - // 6. The management server uses the load reports from all reported Envoys - // from around the world, computes global assignment and prepares traffic - // assignment destined for each zone Envoys are located in. Goto 2. - StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error -} - -// UnimplementedLoadReportingServiceServer can be embedded to have forward compatible implementations. -type UnimplementedLoadReportingServiceServer struct { -} - -func (*UnimplementedLoadReportingServiceServer) StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error { - return status.Errorf(codes.Unimplemented, "method StreamLoadStats not implemented") -} - -func RegisterLoadReportingServiceServer(s *grpc.Server, srv LoadReportingServiceServer) { - s.RegisterService(&_LoadReportingService_serviceDesc, srv) -} - -func _LoadReportingService_StreamLoadStats_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(LoadReportingServiceServer).StreamLoadStats(&loadReportingServiceStreamLoadStatsServer{stream}) -} - -type LoadReportingService_StreamLoadStatsServer interface { - Send(*LoadStatsResponse) error - Recv() (*LoadStatsRequest, error) - grpc.ServerStream -} - -type loadReportingServiceStreamLoadStatsServer struct { - grpc.ServerStream -} - -func (x *loadReportingServiceStreamLoadStatsServer) Send(m *LoadStatsResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *loadReportingServiceStreamLoadStatsServer) Recv() (*LoadStatsRequest, error) { - m := new(LoadStatsRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _LoadReportingService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "envoy.service.load_stats.v2.LoadReportingService", - HandlerType: (*LoadReportingServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "StreamLoadStats", - Handler: _LoadReportingService_StreamLoadStats_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "envoy/service/load_stats/v2/lrs.proto", -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.validate.go deleted file mode 100644 index 7edaaf8023d2..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2/lrs.pb.validate.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/service/load_stats/v2/lrs.proto - -package load_statsv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on LoadStatsRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *LoadStatsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LoadStatsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// LoadStatsRequestMultiError, or nil if none found. -func (m *LoadStatsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *LoadStatsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNode()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LoadStatsRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LoadStatsRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadStatsRequestValidationError{ - field: "Node", - reason: "embedded message failed validation", - cause: err, - } - } - } - - for idx, item := range m.GetClusterStats() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LoadStatsRequestValidationError{ - field: fmt.Sprintf("ClusterStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LoadStatsRequestValidationError{ - field: fmt.Sprintf("ClusterStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadStatsRequestValidationError{ - field: fmt.Sprintf("ClusterStats[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return LoadStatsRequestMultiError(errors) - } - - return nil -} - -// LoadStatsRequestMultiError is an error wrapping multiple validation errors -// returned by LoadStatsRequest.ValidateAll() if the designated constraints -// aren't met. -type LoadStatsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LoadStatsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LoadStatsRequestMultiError) AllErrors() []error { return m } - -// LoadStatsRequestValidationError is the validation error returned by -// LoadStatsRequest.Validate if the designated constraints aren't met. -type LoadStatsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LoadStatsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LoadStatsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LoadStatsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LoadStatsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LoadStatsRequestValidationError) ErrorName() string { return "LoadStatsRequestValidationError" } - -// Error satisfies the builtin error interface -func (e LoadStatsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLoadStatsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LoadStatsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LoadStatsRequestValidationError{} - -// Validate checks the field values on LoadStatsResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *LoadStatsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on LoadStatsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// LoadStatsResponseMultiError, or nil if none found. -func (m *LoadStatsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *LoadStatsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for SendAllClusters - - if all { - switch v := interface{}(m.GetLoadReportingInterval()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, LoadStatsResponseValidationError{ - field: "LoadReportingInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, LoadStatsResponseValidationError{ - field: "LoadReportingInterval", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return LoadStatsResponseValidationError{ - field: "LoadReportingInterval", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for ReportEndpointGranularity - - if len(errors) > 0 { - return LoadStatsResponseMultiError(errors) - } - - return nil -} - -// LoadStatsResponseMultiError is an error wrapping multiple validation errors -// returned by LoadStatsResponse.ValidateAll() if the designated constraints -// aren't met. -type LoadStatsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m LoadStatsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m LoadStatsResponseMultiError) AllErrors() []error { return m } - -// LoadStatsResponseValidationError is the validation error returned by -// LoadStatsResponse.Validate if the designated constraints aren't met. -type LoadStatsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e LoadStatsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e LoadStatsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e LoadStatsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e LoadStatsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e LoadStatsResponseValidationError) ErrorName() string { - return "LoadStatsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e LoadStatsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sLoadStatsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = LoadStatsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = LoadStatsResponseValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go deleted file mode 100644 index 5daaeb94ab39..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.go +++ /dev/null @@ -1,662 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/type/metadata/v2/metadata.proto - -package metadatav2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MetadataKey provides a general interface using `key` and `path` to retrieve value from -// :ref:`Metadata `. -// -// For example, for the following Metadata: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.xxx: -// prop: -// foo: bar -// xyz: -// hello: envoy -// -// The following MetadataKey will retrieve a string value "bar" from the Metadata. -// -// .. code-block:: yaml -// -// key: envoy.xxx -// path: -// - key: prop -// - key: foo -// -type MetadataKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key name of Metadata to retrieve the Struct from the metadata. - // Typically, it represents a builtin subsystem or custom extension. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The path to retrieve the Value from the Struct. It can be a prefix or a full path, - // e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, - // which depends on the particular scenario. - // - // Note: Due to that only the key type segment is supported, the path can not specify a list - // unless the list is the last segment. - Path []*MetadataKey_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` -} - -func (x *MetadataKey) Reset() { - *x = MetadataKey{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKey) ProtoMessage() {} - -func (x *MetadataKey) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKey.ProtoReflect.Descriptor instead. -func (*MetadataKey) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP(), []int{0} -} - -func (x *MetadataKey) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *MetadataKey) GetPath() []*MetadataKey_PathSegment { - if x != nil { - return x.Path - } - return nil -} - -// Describes what kind of metadata. -type MetadataKind struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Kind: - // *MetadataKind_Request_ - // *MetadataKind_Route_ - // *MetadataKind_Cluster_ - // *MetadataKind_Host_ - Kind isMetadataKind_Kind `protobuf_oneof:"kind"` -} - -func (x *MetadataKind) Reset() { - *x = MetadataKind{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind) ProtoMessage() {} - -func (x *MetadataKind) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind.ProtoReflect.Descriptor instead. -func (*MetadataKind) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP(), []int{1} -} - -func (m *MetadataKind) GetKind() isMetadataKind_Kind { - if m != nil { - return m.Kind - } - return nil -} - -func (x *MetadataKind) GetRequest() *MetadataKind_Request { - if x, ok := x.GetKind().(*MetadataKind_Request_); ok { - return x.Request - } - return nil -} - -func (x *MetadataKind) GetRoute() *MetadataKind_Route { - if x, ok := x.GetKind().(*MetadataKind_Route_); ok { - return x.Route - } - return nil -} - -func (x *MetadataKind) GetCluster() *MetadataKind_Cluster { - if x, ok := x.GetKind().(*MetadataKind_Cluster_); ok { - return x.Cluster - } - return nil -} - -func (x *MetadataKind) GetHost() *MetadataKind_Host { - if x, ok := x.GetKind().(*MetadataKind_Host_); ok { - return x.Host - } - return nil -} - -type isMetadataKind_Kind interface { - isMetadataKind_Kind() -} - -type MetadataKind_Request_ struct { - // Request kind of metadata. - Request *MetadataKind_Request `protobuf:"bytes,1,opt,name=request,proto3,oneof"` -} - -type MetadataKind_Route_ struct { - // Route kind of metadata. - Route *MetadataKind_Route `protobuf:"bytes,2,opt,name=route,proto3,oneof"` -} - -type MetadataKind_Cluster_ struct { - // Cluster kind of metadata. - Cluster *MetadataKind_Cluster `protobuf:"bytes,3,opt,name=cluster,proto3,oneof"` -} - -type MetadataKind_Host_ struct { - // Host kind of metadata. - Host *MetadataKind_Host `protobuf:"bytes,4,opt,name=host,proto3,oneof"` -} - -func (*MetadataKind_Request_) isMetadataKind_Kind() {} - -func (*MetadataKind_Route_) isMetadataKind_Kind() {} - -func (*MetadataKind_Cluster_) isMetadataKind_Kind() {} - -func (*MetadataKind_Host_) isMetadataKind_Kind() {} - -// Specifies the segment in a path to retrieve value from Metadata. -// Currently it is only supported to specify the key, i.e. field name, as one segment of a path. -type MetadataKey_PathSegment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Segment: - // *MetadataKey_PathSegment_Key - Segment isMetadataKey_PathSegment_Segment `protobuf_oneof:"segment"` -} - -func (x *MetadataKey_PathSegment) Reset() { - *x = MetadataKey_PathSegment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKey_PathSegment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKey_PathSegment) ProtoMessage() {} - -func (x *MetadataKey_PathSegment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKey_PathSegment.ProtoReflect.Descriptor instead. -func (*MetadataKey_PathSegment) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP(), []int{0, 0} -} - -func (m *MetadataKey_PathSegment) GetSegment() isMetadataKey_PathSegment_Segment { - if m != nil { - return m.Segment - } - return nil -} - -func (x *MetadataKey_PathSegment) GetKey() string { - if x, ok := x.GetSegment().(*MetadataKey_PathSegment_Key); ok { - return x.Key - } - return "" -} - -type isMetadataKey_PathSegment_Segment interface { - isMetadataKey_PathSegment_Segment() -} - -type MetadataKey_PathSegment_Key struct { - // If specified, use the key to retrieve the value in a Struct. - Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` -} - -func (*MetadataKey_PathSegment_Key) isMetadataKey_PathSegment_Segment() {} - -// Represents dynamic metadata associated with the request. -type MetadataKind_Request struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Request) Reset() { - *x = MetadataKind_Request{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Request) ProtoMessage() {} - -func (x *MetadataKind_Request) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Request.ProtoReflect.Descriptor instead. -func (*MetadataKind_Request) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP(), []int{1, 0} -} - -// Represents metadata from :ref:`the route`. -type MetadataKind_Route struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Route) Reset() { - *x = MetadataKind_Route{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Route) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Route) ProtoMessage() {} - -func (x *MetadataKind_Route) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Route.ProtoReflect.Descriptor instead. -func (*MetadataKind_Route) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP(), []int{1, 1} -} - -// Represents metadata from :ref:`the upstream cluster`. -type MetadataKind_Cluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Cluster) Reset() { - *x = MetadataKind_Cluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Cluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Cluster) ProtoMessage() {} - -func (x *MetadataKind_Cluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Cluster.ProtoReflect.Descriptor instead. -func (*MetadataKind_Cluster) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP(), []int{1, 2} -} - -// Represents metadata from :ref:`the upstream -// host`. -type MetadataKind_Host struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MetadataKind_Host) Reset() { - *x = MetadataKind_Host{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetadataKind_Host) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetadataKind_Host) ProtoMessage() {} - -func (x *MetadataKind_Host) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_metadata_v2_metadata_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetadataKind_Host.ProtoReflect.Descriptor instead. -func (*MetadataKind_Host) Descriptor() ([]byte, []int) { - return file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP(), []int{1, 3} -} - -var File_envoy_type_metadata_v2_metadata_proto protoreflect.FileDescriptor - -var file_envoy_type_metadata_v2_metadata_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x1a, - 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x4b, 0x65, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x1a, 0x3a, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x0e, 0x0a, - 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xdb, 0x02, - 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x48, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x07, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, - 0x69, 0x6e, 0x64, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x1a, 0x09, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x07, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x09, 0x0a, 0x07, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x06, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x0b, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xa7, 0x01, 0x0a, 0x24, - 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2f, 0x76, 0x32, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xf2, - 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0xba, 0x80, 0xc8, - 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_metadata_v2_metadata_proto_rawDescOnce sync.Once - file_envoy_type_metadata_v2_metadata_proto_rawDescData = file_envoy_type_metadata_v2_metadata_proto_rawDesc -) - -func file_envoy_type_metadata_v2_metadata_proto_rawDescGZIP() []byte { - file_envoy_type_metadata_v2_metadata_proto_rawDescOnce.Do(func() { - file_envoy_type_metadata_v2_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_metadata_v2_metadata_proto_rawDescData) - }) - return file_envoy_type_metadata_v2_metadata_proto_rawDescData -} - -var file_envoy_type_metadata_v2_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_envoy_type_metadata_v2_metadata_proto_goTypes = []interface{}{ - (*MetadataKey)(nil), // 0: envoy.type.metadata.v2.MetadataKey - (*MetadataKind)(nil), // 1: envoy.type.metadata.v2.MetadataKind - (*MetadataKey_PathSegment)(nil), // 2: envoy.type.metadata.v2.MetadataKey.PathSegment - (*MetadataKind_Request)(nil), // 3: envoy.type.metadata.v2.MetadataKind.Request - (*MetadataKind_Route)(nil), // 4: envoy.type.metadata.v2.MetadataKind.Route - (*MetadataKind_Cluster)(nil), // 5: envoy.type.metadata.v2.MetadataKind.Cluster - (*MetadataKind_Host)(nil), // 6: envoy.type.metadata.v2.MetadataKind.Host -} -var file_envoy_type_metadata_v2_metadata_proto_depIdxs = []int32{ - 2, // 0: envoy.type.metadata.v2.MetadataKey.path:type_name -> envoy.type.metadata.v2.MetadataKey.PathSegment - 3, // 1: envoy.type.metadata.v2.MetadataKind.request:type_name -> envoy.type.metadata.v2.MetadataKind.Request - 4, // 2: envoy.type.metadata.v2.MetadataKind.route:type_name -> envoy.type.metadata.v2.MetadataKind.Route - 5, // 3: envoy.type.metadata.v2.MetadataKind.cluster:type_name -> envoy.type.metadata.v2.MetadataKind.Cluster - 6, // 4: envoy.type.metadata.v2.MetadataKind.host:type_name -> envoy.type.metadata.v2.MetadataKind.Host - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_envoy_type_metadata_v2_metadata_proto_init() } -func file_envoy_type_metadata_v2_metadata_proto_init() { - if File_envoy_type_metadata_v2_metadata_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_metadata_v2_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKey_PathSegment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Request); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Route); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Cluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataKind_Host); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*MetadataKind_Request_)(nil), - (*MetadataKind_Route_)(nil), - (*MetadataKind_Cluster_)(nil), - (*MetadataKind_Host_)(nil), - } - file_envoy_type_metadata_v2_metadata_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*MetadataKey_PathSegment_Key)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_metadata_v2_metadata_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_metadata_v2_metadata_proto_goTypes, - DependencyIndexes: file_envoy_type_metadata_v2_metadata_proto_depIdxs, - MessageInfos: file_envoy_type_metadata_v2_metadata_proto_msgTypes, - }.Build() - File_envoy_type_metadata_v2_metadata_proto = out.File - file_envoy_type_metadata_v2_metadata_proto_rawDesc = nil - file_envoy_type_metadata_v2_metadata_proto_goTypes = nil - file_envoy_type_metadata_v2_metadata_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go deleted file mode 100644 index 0aa463af9d38..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go +++ /dev/null @@ -1,1024 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/metadata/v2/metadata.proto - -package metadatav2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on MetadataKey with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *MetadataKey) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKey with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in MetadataKeyMultiError, or -// nil if none found. -func (m *MetadataKey) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKey) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetKey()) < 1 { - err := MetadataKeyValidationError{ - field: "Key", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(m.GetPath()) < 1 { - err := MetadataKeyValidationError{ - field: "Path", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetPath() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKeyValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKeyValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKeyValidationError{ - field: fmt.Sprintf("Path[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return MetadataKeyMultiError(errors) - } - - return nil -} - -// MetadataKeyMultiError is an error wrapping multiple validation errors -// returned by MetadataKey.ValidateAll() if the designated constraints aren't met. -type MetadataKeyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKeyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKeyMultiError) AllErrors() []error { return m } - -// MetadataKeyValidationError is the validation error returned by -// MetadataKey.Validate if the designated constraints aren't met. -type MetadataKeyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKeyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKeyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKeyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKeyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKeyValidationError) ErrorName() string { return "MetadataKeyValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataKeyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKey.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKeyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKeyValidationError{} - -// Validate checks the field values on MetadataKind with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *MetadataKind) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in MetadataKindMultiError, or -// nil if none found. -func (m *MetadataKind) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofKindPresent := false - switch v := m.Kind.(type) { - case *MetadataKind_Request_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetRequest()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Request", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MetadataKind_Route_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetRoute()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Route", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MetadataKind_Cluster_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Cluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *MetadataKind_Host_: - if v == nil { - err := MetadataKindValidationError{ - field: "Kind", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofKindPresent = true - - if all { - switch v := interface{}(m.GetHost()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Host", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, MetadataKindValidationError{ - field: "Host", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return MetadataKindValidationError{ - field: "Host", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofKindPresent { - err := MetadataKindValidationError{ - field: "Kind", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return MetadataKindMultiError(errors) - } - - return nil -} - -// MetadataKindMultiError is an error wrapping multiple validation errors -// returned by MetadataKind.ValidateAll() if the designated constraints aren't met. -type MetadataKindMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKindMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKindMultiError) AllErrors() []error { return m } - -// MetadataKindValidationError is the validation error returned by -// MetadataKind.Validate if the designated constraints aren't met. -type MetadataKindValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKindValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKindValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKindValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKindValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKindValidationError) ErrorName() string { return "MetadataKindValidationError" } - -// Error satisfies the builtin error interface -func (e MetadataKindValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKindValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKindValidationError{} - -// Validate checks the field values on MetadataKey_PathSegment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKey_PathSegment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKey_PathSegment with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKey_PathSegmentMultiError, or nil if none found. -func (m *MetadataKey_PathSegment) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKey_PathSegment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofSegmentPresent := false - switch v := m.Segment.(type) { - case *MetadataKey_PathSegment_Key: - if v == nil { - err := MetadataKey_PathSegmentValidationError{ - field: "Segment", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofSegmentPresent = true - - if len(m.GetKey()) < 1 { - err := MetadataKey_PathSegmentValidationError{ - field: "Key", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - default: - _ = v // ensures v is used - } - if !oneofSegmentPresent { - err := MetadataKey_PathSegmentValidationError{ - field: "Segment", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return MetadataKey_PathSegmentMultiError(errors) - } - - return nil -} - -// MetadataKey_PathSegmentMultiError is an error wrapping multiple validation -// errors returned by MetadataKey_PathSegment.ValidateAll() if the designated -// constraints aren't met. -type MetadataKey_PathSegmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKey_PathSegmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKey_PathSegmentMultiError) AllErrors() []error { return m } - -// MetadataKey_PathSegmentValidationError is the validation error returned by -// MetadataKey_PathSegment.Validate if the designated constraints aren't met. -type MetadataKey_PathSegmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKey_PathSegmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKey_PathSegmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKey_PathSegmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKey_PathSegmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKey_PathSegmentValidationError) ErrorName() string { - return "MetadataKey_PathSegmentValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKey_PathSegmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKey_PathSegment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKey_PathSegmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKey_PathSegmentValidationError{} - -// Validate checks the field values on MetadataKind_Request with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Request) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Request with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_RequestMultiError, or nil if none found. -func (m *MetadataKind_Request) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Request) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_RequestMultiError(errors) - } - - return nil -} - -// MetadataKind_RequestMultiError is an error wrapping multiple validation -// errors returned by MetadataKind_Request.ValidateAll() if the designated -// constraints aren't met. -type MetadataKind_RequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_RequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_RequestMultiError) AllErrors() []error { return m } - -// MetadataKind_RequestValidationError is the validation error returned by -// MetadataKind_Request.Validate if the designated constraints aren't met. -type MetadataKind_RequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_RequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_RequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_RequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_RequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_RequestValidationError) ErrorName() string { - return "MetadataKind_RequestValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_RequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Request.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_RequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_RequestValidationError{} - -// Validate checks the field values on MetadataKind_Route with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Route) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Route with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_RouteMultiError, or nil if none found. -func (m *MetadataKind_Route) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Route) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_RouteMultiError(errors) - } - - return nil -} - -// MetadataKind_RouteMultiError is an error wrapping multiple validation errors -// returned by MetadataKind_Route.ValidateAll() if the designated constraints -// aren't met. -type MetadataKind_RouteMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_RouteMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_RouteMultiError) AllErrors() []error { return m } - -// MetadataKind_RouteValidationError is the validation error returned by -// MetadataKind_Route.Validate if the designated constraints aren't met. -type MetadataKind_RouteValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_RouteValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_RouteValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_RouteValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_RouteValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_RouteValidationError) ErrorName() string { - return "MetadataKind_RouteValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_RouteValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Route.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_RouteValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_RouteValidationError{} - -// Validate checks the field values on MetadataKind_Cluster with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Cluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Cluster with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_ClusterMultiError, or nil if none found. -func (m *MetadataKind_Cluster) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Cluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_ClusterMultiError(errors) - } - - return nil -} - -// MetadataKind_ClusterMultiError is an error wrapping multiple validation -// errors returned by MetadataKind_Cluster.ValidateAll() if the designated -// constraints aren't met. -type MetadataKind_ClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_ClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_ClusterMultiError) AllErrors() []error { return m } - -// MetadataKind_ClusterValidationError is the validation error returned by -// MetadataKind_Cluster.Validate if the designated constraints aren't met. -type MetadataKind_ClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_ClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_ClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_ClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_ClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_ClusterValidationError) ErrorName() string { - return "MetadataKind_ClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_ClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Cluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_ClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_ClusterValidationError{} - -// Validate checks the field values on MetadataKind_Host with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *MetadataKind_Host) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on MetadataKind_Host with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// MetadataKind_HostMultiError, or nil if none found. -func (m *MetadataKind_Host) ValidateAll() error { - return m.validate(true) -} - -func (m *MetadataKind_Host) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return MetadataKind_HostMultiError(errors) - } - - return nil -} - -// MetadataKind_HostMultiError is an error wrapping multiple validation errors -// returned by MetadataKind_Host.ValidateAll() if the designated constraints -// aren't met. -type MetadataKind_HostMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m MetadataKind_HostMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m MetadataKind_HostMultiError) AllErrors() []error { return m } - -// MetadataKind_HostValidationError is the validation error returned by -// MetadataKind_Host.Validate if the designated constraints aren't met. -type MetadataKind_HostValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e MetadataKind_HostValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e MetadataKind_HostValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e MetadataKind_HostValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e MetadataKind_HostValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e MetadataKind_HostValidationError) ErrorName() string { - return "MetadataKind_HostValidationError" -} - -// Error satisfies the builtin error interface -func (e MetadataKind_HostValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sMetadataKind_Host.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = MetadataKind_HostValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = MetadataKind_HostValidationError{} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go deleted file mode 100644 index 050338f6fd1e..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.go +++ /dev/null @@ -1,591 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: envoy/type/tracing/v2/custom_tag.proto - -package tracingv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - v2 "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Describes custom tags for the active span. -// [#next-free-field: 6] -type CustomTag struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Used to populate the tag name. - Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` - // Used to specify what kind of custom tag. - // - // Types that are assignable to Type: - // *CustomTag_Literal_ - // *CustomTag_Environment_ - // *CustomTag_RequestHeader - // *CustomTag_Metadata_ - Type isCustomTag_Type `protobuf_oneof:"type"` -} - -func (x *CustomTag) Reset() { - *x = CustomTag{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag) ProtoMessage() {} - -func (x *CustomTag) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag.ProtoReflect.Descriptor instead. -func (*CustomTag) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v2_custom_tag_proto_rawDescGZIP(), []int{0} -} - -func (x *CustomTag) GetTag() string { - if x != nil { - return x.Tag - } - return "" -} - -func (m *CustomTag) GetType() isCustomTag_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *CustomTag) GetLiteral() *CustomTag_Literal { - if x, ok := x.GetType().(*CustomTag_Literal_); ok { - return x.Literal - } - return nil -} - -func (x *CustomTag) GetEnvironment() *CustomTag_Environment { - if x, ok := x.GetType().(*CustomTag_Environment_); ok { - return x.Environment - } - return nil -} - -func (x *CustomTag) GetRequestHeader() *CustomTag_Header { - if x, ok := x.GetType().(*CustomTag_RequestHeader); ok { - return x.RequestHeader - } - return nil -} - -func (x *CustomTag) GetMetadata() *CustomTag_Metadata { - if x, ok := x.GetType().(*CustomTag_Metadata_); ok { - return x.Metadata - } - return nil -} - -type isCustomTag_Type interface { - isCustomTag_Type() -} - -type CustomTag_Literal_ struct { - // A literal custom tag. - Literal *CustomTag_Literal `protobuf:"bytes,2,opt,name=literal,proto3,oneof"` -} - -type CustomTag_Environment_ struct { - // An environment custom tag. - Environment *CustomTag_Environment `protobuf:"bytes,3,opt,name=environment,proto3,oneof"` -} - -type CustomTag_RequestHeader struct { - // A request header custom tag. - RequestHeader *CustomTag_Header `protobuf:"bytes,4,opt,name=request_header,json=requestHeader,proto3,oneof"` -} - -type CustomTag_Metadata_ struct { - // A custom tag to obtain tag value from the metadata. - Metadata *CustomTag_Metadata `protobuf:"bytes,5,opt,name=metadata,proto3,oneof"` -} - -func (*CustomTag_Literal_) isCustomTag_Type() {} - -func (*CustomTag_Environment_) isCustomTag_Type() {} - -func (*CustomTag_RequestHeader) isCustomTag_Type() {} - -func (*CustomTag_Metadata_) isCustomTag_Type() {} - -// Literal type custom tag with static value for the tag value. -type CustomTag_Literal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Static literal value to populate the tag value. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *CustomTag_Literal) Reset() { - *x = CustomTag_Literal{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Literal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Literal) ProtoMessage() {} - -func (x *CustomTag_Literal) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Literal.ProtoReflect.Descriptor instead. -func (*CustomTag_Literal) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v2_custom_tag_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *CustomTag_Literal) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Environment type custom tag with environment name and default value. -type CustomTag_Environment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Environment variable name to obtain the value to populate the tag value. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // When the environment variable is not found, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *CustomTag_Environment) Reset() { - *x = CustomTag_Environment{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Environment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Environment) ProtoMessage() {} - -func (x *CustomTag_Environment) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Environment.ProtoReflect.Descriptor instead. -func (*CustomTag_Environment) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v2_custom_tag_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *CustomTag_Environment) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CustomTag_Environment) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -// Header type custom tag with header name and default value. -type CustomTag_Header struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Header name to obtain the value to populate the tag value. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // When the header does not exist, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *CustomTag_Header) Reset() { - *x = CustomTag_Header{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Header) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Header) ProtoMessage() {} - -func (x *CustomTag_Header) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Header.ProtoReflect.Descriptor instead. -func (*CustomTag_Header) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v2_custom_tag_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *CustomTag_Header) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CustomTag_Header) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -// Metadata type custom tag using -// :ref:`MetadataKey ` to retrieve the protobuf value -// from :ref:`Metadata `, and populate the tag value with -// `the canonical JSON `_ -// representation of it. -type CustomTag_Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specify what kind of metadata to obtain tag value from. - Kind *v2.MetadataKind `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - // Metadata key to define the path to retrieve the tag value. - MetadataKey *v2.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` - // When no valid metadata is found, - // the tag value would be populated with this default value if specified, - // otherwise no tag would be populated. - DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` -} - -func (x *CustomTag_Metadata) Reset() { - *x = CustomTag_Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomTag_Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomTag_Metadata) ProtoMessage() {} - -func (x *CustomTag_Metadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomTag_Metadata.ProtoReflect.Descriptor instead. -func (*CustomTag_Metadata) Descriptor() ([]byte, []int) { - return file_envoy_type_tracing_v2_custom_tag_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *CustomTag_Metadata) GetKind() *v2.MetadataKind { - if x != nil { - return x.Kind - } - return nil -} - -func (x *CustomTag_Metadata) GetMetadataKey() *v2.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -func (x *CustomTag_Metadata) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -var File_envoy_type_tracing_v2_custom_tag_proto protoreflect.FileDescriptor - -var file_envoy_type_tracing_v2_custom_tag_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, - 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x1a, - 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, - 0x05, 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x12, 0x19, 0x0a, 0x03, - 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x20, 0x01, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, - 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, - 0x61, 0x6c, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x50, 0x0a, - 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x48, 0x00, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x50, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x12, 0x47, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x28, 0x0a, 0x07, 0x4c, 0x69, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4f, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x50, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, - 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xb1, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x46, - 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x87, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, - 0x42, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, - 0x3b, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x76, 0x32, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, - 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_type_tracing_v2_custom_tag_proto_rawDescOnce sync.Once - file_envoy_type_tracing_v2_custom_tag_proto_rawDescData = file_envoy_type_tracing_v2_custom_tag_proto_rawDesc -) - -func file_envoy_type_tracing_v2_custom_tag_proto_rawDescGZIP() []byte { - file_envoy_type_tracing_v2_custom_tag_proto_rawDescOnce.Do(func() { - file_envoy_type_tracing_v2_custom_tag_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_tracing_v2_custom_tag_proto_rawDescData) - }) - return file_envoy_type_tracing_v2_custom_tag_proto_rawDescData -} - -var file_envoy_type_tracing_v2_custom_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_envoy_type_tracing_v2_custom_tag_proto_goTypes = []interface{}{ - (*CustomTag)(nil), // 0: envoy.type.tracing.v2.CustomTag - (*CustomTag_Literal)(nil), // 1: envoy.type.tracing.v2.CustomTag.Literal - (*CustomTag_Environment)(nil), // 2: envoy.type.tracing.v2.CustomTag.Environment - (*CustomTag_Header)(nil), // 3: envoy.type.tracing.v2.CustomTag.Header - (*CustomTag_Metadata)(nil), // 4: envoy.type.tracing.v2.CustomTag.Metadata - (*v2.MetadataKind)(nil), // 5: envoy.type.metadata.v2.MetadataKind - (*v2.MetadataKey)(nil), // 6: envoy.type.metadata.v2.MetadataKey -} -var file_envoy_type_tracing_v2_custom_tag_proto_depIdxs = []int32{ - 1, // 0: envoy.type.tracing.v2.CustomTag.literal:type_name -> envoy.type.tracing.v2.CustomTag.Literal - 2, // 1: envoy.type.tracing.v2.CustomTag.environment:type_name -> envoy.type.tracing.v2.CustomTag.Environment - 3, // 2: envoy.type.tracing.v2.CustomTag.request_header:type_name -> envoy.type.tracing.v2.CustomTag.Header - 4, // 3: envoy.type.tracing.v2.CustomTag.metadata:type_name -> envoy.type.tracing.v2.CustomTag.Metadata - 5, // 4: envoy.type.tracing.v2.CustomTag.Metadata.kind:type_name -> envoy.type.metadata.v2.MetadataKind - 6, // 5: envoy.type.tracing.v2.CustomTag.Metadata.metadata_key:type_name -> envoy.type.metadata.v2.MetadataKey - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_envoy_type_tracing_v2_custom_tag_proto_init() } -func file_envoy_type_tracing_v2_custom_tag_proto_init() { - if File_envoy_type_tracing_v2_custom_tag_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Literal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Environment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Header); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomTag_Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*CustomTag_Literal_)(nil), - (*CustomTag_Environment_)(nil), - (*CustomTag_RequestHeader)(nil), - (*CustomTag_Metadata_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_envoy_type_tracing_v2_custom_tag_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_envoy_type_tracing_v2_custom_tag_proto_goTypes, - DependencyIndexes: file_envoy_type_tracing_v2_custom_tag_proto_depIdxs, - MessageInfos: file_envoy_type_tracing_v2_custom_tag_proto_msgTypes, - }.Build() - File_envoy_type_tracing_v2_custom_tag_proto = out.File - file_envoy_type_tracing_v2_custom_tag_proto_rawDesc = nil - file_envoy_type_tracing_v2_custom_tag_proto_goTypes = nil - file_envoy_type_tracing_v2_custom_tag_proto_depIdxs = nil -} diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go deleted file mode 100644 index 86f5b4534d58..000000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go +++ /dev/null @@ -1,846 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: envoy/type/tracing/v2/custom_tag.proto - -package tracingv2 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on CustomTag with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *CustomTag) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in CustomTagMultiError, or nil -// if none found. -func (m *CustomTag) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetTag()) < 1 { - err := CustomTagValidationError{ - field: "Tag", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - oneofTypePresent := false - switch v := m.Type.(type) { - case *CustomTag_Literal_: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetLiteral()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Literal", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Literal", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLiteral()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "Literal", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CustomTag_Environment_: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetEnvironment()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Environment", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Environment", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetEnvironment()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "Environment", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CustomTag_RequestHeader: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetRequestHeader()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "RequestHeader", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "RequestHeader", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequestHeader()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "RequestHeader", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *CustomTag_Metadata_: - if v == nil { - err := CustomTagValidationError{ - field: "Type", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofTypePresent = true - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTagValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTagValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofTypePresent { - err := CustomTagValidationError{ - field: "Type", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return CustomTagMultiError(errors) - } - - return nil -} - -// CustomTagMultiError is an error wrapping multiple validation errors returned -// by CustomTag.ValidateAll() if the designated constraints aren't met. -type CustomTagMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTagMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTagMultiError) AllErrors() []error { return m } - -// CustomTagValidationError is the validation error returned by -// CustomTag.Validate if the designated constraints aren't met. -type CustomTagValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTagValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTagValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTagValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTagValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTagValidationError) ErrorName() string { return "CustomTagValidationError" } - -// Error satisfies the builtin error interface -func (e CustomTagValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTagValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTagValidationError{} - -// Validate checks the field values on CustomTag_Literal with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Literal) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Literal with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_LiteralMultiError, or nil if none found. -func (m *CustomTag_Literal) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Literal) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetValue()) < 1 { - err := CustomTag_LiteralValidationError{ - field: "Value", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return CustomTag_LiteralMultiError(errors) - } - - return nil -} - -// CustomTag_LiteralMultiError is an error wrapping multiple validation errors -// returned by CustomTag_Literal.ValidateAll() if the designated constraints -// aren't met. -type CustomTag_LiteralMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_LiteralMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_LiteralMultiError) AllErrors() []error { return m } - -// CustomTag_LiteralValidationError is the validation error returned by -// CustomTag_Literal.Validate if the designated constraints aren't met. -type CustomTag_LiteralValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_LiteralValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_LiteralValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_LiteralValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_LiteralValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_LiteralValidationError) ErrorName() string { - return "CustomTag_LiteralValidationError" -} - -// Error satisfies the builtin error interface -func (e CustomTag_LiteralValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Literal.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_LiteralValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_LiteralValidationError{} - -// Validate checks the field values on CustomTag_Environment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Environment) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Environment with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_EnvironmentMultiError, or nil if none found. -func (m *CustomTag_Environment) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Environment) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := CustomTag_EnvironmentValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DefaultValue - - if len(errors) > 0 { - return CustomTag_EnvironmentMultiError(errors) - } - - return nil -} - -// CustomTag_EnvironmentMultiError is an error wrapping multiple validation -// errors returned by CustomTag_Environment.ValidateAll() if the designated -// constraints aren't met. -type CustomTag_EnvironmentMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_EnvironmentMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_EnvironmentMultiError) AllErrors() []error { return m } - -// CustomTag_EnvironmentValidationError is the validation error returned by -// CustomTag_Environment.Validate if the designated constraints aren't met. -type CustomTag_EnvironmentValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_EnvironmentValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_EnvironmentValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_EnvironmentValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_EnvironmentValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_EnvironmentValidationError) ErrorName() string { - return "CustomTag_EnvironmentValidationError" -} - -// Error satisfies the builtin error interface -func (e CustomTag_EnvironmentValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Environment.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_EnvironmentValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_EnvironmentValidationError{} - -// Validate checks the field values on CustomTag_Header with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Header) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Header with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_HeaderMultiError, or nil if none found. -func (m *CustomTag_Header) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Header) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(m.GetName()) < 1 { - err := CustomTag_HeaderValidationError{ - field: "Name", - reason: "value length must be at least 1 bytes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_CustomTag_Header_Name_Pattern.MatchString(m.GetName()) { - err := CustomTag_HeaderValidationError{ - field: "Name", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DefaultValue - - if len(errors) > 0 { - return CustomTag_HeaderMultiError(errors) - } - - return nil -} - -// CustomTag_HeaderMultiError is an error wrapping multiple validation errors -// returned by CustomTag_Header.ValidateAll() if the designated constraints -// aren't met. -type CustomTag_HeaderMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_HeaderMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_HeaderMultiError) AllErrors() []error { return m } - -// CustomTag_HeaderValidationError is the validation error returned by -// CustomTag_Header.Validate if the designated constraints aren't met. -type CustomTag_HeaderValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_HeaderValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_HeaderValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_HeaderValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_HeaderValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_HeaderValidationError) ErrorName() string { return "CustomTag_HeaderValidationError" } - -// Error satisfies the builtin error interface -func (e CustomTag_HeaderValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Header.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_HeaderValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_HeaderValidationError{} - -var _CustomTag_Header_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on CustomTag_Metadata with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CustomTag_Metadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomTag_Metadata with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomTag_MetadataMultiError, or nil if none found. -func (m *CustomTag_Metadata) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomTag_Metadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetKind()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "Kind", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "Kind", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTag_MetadataValidationError{ - field: "Kind", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetMetadataKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CustomTag_MetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CustomTag_MetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultValue - - if len(errors) > 0 { - return CustomTag_MetadataMultiError(errors) - } - - return nil -} - -// CustomTag_MetadataMultiError is an error wrapping multiple validation errors -// returned by CustomTag_Metadata.ValidateAll() if the designated constraints -// aren't met. -type CustomTag_MetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomTag_MetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomTag_MetadataMultiError) AllErrors() []error { return m } - -// CustomTag_MetadataValidationError is the validation error returned by -// CustomTag_Metadata.Validate if the designated constraints aren't met. -type CustomTag_MetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomTag_MetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomTag_MetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomTag_MetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomTag_MetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomTag_MetadataValidationError) ErrorName() string { - return "CustomTag_MetadataValidationError" -} - -// Error satisfies the builtin error interface -func (e CustomTag_MetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCustomTag_Metadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomTag_MetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomTag_MetadataValidationError{} diff --git a/vendor/github.com/grafana/dskit/grpcclient/grpcclient.go b/vendor/github.com/grafana/dskit/grpcclient/grpcclient.go index 9e6ef613926f..b9faf3d6e786 100644 --- a/vendor/github.com/grafana/dskit/grpcclient/grpcclient.go +++ b/vendor/github.com/grafana/dskit/grpcclient/grpcclient.go @@ -7,6 +7,7 @@ import ( "github.com/go-kit/log" "github.com/pkg/errors" "google.golang.org/grpc" + grpcbackoff "google.golang.org/grpc/backoff" "google.golang.org/grpc/encoding/gzip" "google.golang.org/grpc/keepalive" @@ -28,6 +29,11 @@ type Config struct { TLSEnabled bool `yaml:"tls_enabled" category:"advanced"` TLS tls.ClientConfig `yaml:",inline"` + + ConnectTimeout time.Duration `yaml:"connect_timeout" category:"advanced"` + // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md + ConnectBackoffBaseDelay time.Duration `yaml:"connect_backoff_base_delay" category:"advanced"` + ConnectBackoffMaxDelay time.Duration `yaml:"connect_backoff_max_delay" category:"advanced"` } // RegisterFlags registers flags. @@ -45,6 +51,10 @@ func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { f.BoolVar(&cfg.BackoffOnRatelimits, prefix+".backoff-on-ratelimits", false, "Enable backoff and retry when we hit ratelimits.") f.BoolVar(&cfg.TLSEnabled, prefix+".tls-enabled", cfg.TLSEnabled, "Enable TLS in the GRPC client. This flag needs to be enabled when any other TLS flag is set. If set to false, insecure connection to gRPC server will be used.") + f.DurationVar(&cfg.ConnectTimeout, prefix+".connect-timeout", 0, "The maximum amount of time to establish a connection. A value of 0 means default gRPC connect timeout and backoff.") + f.DurationVar(&cfg.ConnectBackoffBaseDelay, prefix+".connect-backoff-base-delay", time.Second, "Initial backoff delay after first connection failure. Only relevant if ConnectTimeout > 0.") + f.DurationVar(&cfg.ConnectBackoffMaxDelay, prefix+".connect-backoff-max-delay", 5*time.Second, "Maximum backoff delay when establishing a connection. Only relevant if ConnectTimeout > 0.") + cfg.BackoffConfig.RegisterFlagsWithPrefix(prefix, f) cfg.TLS.RegisterFlagsWithPrefix(prefix, f) @@ -88,6 +98,26 @@ func (cfg *Config) DialOption(unaryClientInterceptors []grpc.UnaryClientIntercep unaryClientInterceptors = append([]grpc.UnaryClientInterceptor{NewRateLimiter(cfg)}, unaryClientInterceptors...) } + if cfg.ConnectTimeout > 0 { + defaultCfg := grpcbackoff.DefaultConfig + + if cfg.ConnectBackoffBaseDelay > 0 { + defaultCfg.BaseDelay = cfg.ConnectBackoffBaseDelay + } + + if cfg.ConnectBackoffMaxDelay > 0 { + defaultCfg.MaxDelay = cfg.ConnectBackoffMaxDelay + } + + opts = append( + opts, + grpc.WithConnectParams(grpc.ConnectParams{ + Backoff: defaultCfg, + MinConnectTimeout: cfg.ConnectTimeout, + }), + ) + } + return append( opts, grpc.WithDefaultCallOptions(cfg.CallOptions()...), diff --git a/vendor/github.com/grafana/dskit/ring/basic_lifecycler.go b/vendor/github.com/grafana/dskit/ring/basic_lifecycler.go index 780926c0d755..6d5d60c12750 100644 --- a/vendor/github.com/grafana/dskit/ring/basic_lifecycler.go +++ b/vendor/github.com/grafana/dskit/ring/basic_lifecycler.go @@ -12,6 +12,7 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" + "go.uber.org/atomic" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/services" @@ -83,19 +84,23 @@ type BasicLifecycler struct { // The current instance state. currState sync.RWMutex currInstanceDesc *InstanceDesc + + // Whether to keep the instance in the ring or to unregister it on shutdown + keepInstanceInTheRingOnShutdown *atomic.Bool } // NewBasicLifecycler makes a new BasicLifecycler. func NewBasicLifecycler(cfg BasicLifecyclerConfig, ringName, ringKey string, store kv.Client, delegate BasicLifecyclerDelegate, logger log.Logger, reg prometheus.Registerer) (*BasicLifecycler, error) { l := &BasicLifecycler{ - cfg: cfg, - ringName: ringName, - ringKey: ringKey, - logger: logger, - store: store, - delegate: delegate, - metrics: NewBasicLifecyclerMetrics(ringName, reg), - actorChan: make(chan func()), + cfg: cfg, + ringName: ringName, + ringKey: ringKey, + logger: logger, + store: store, + delegate: delegate, + metrics: NewBasicLifecyclerMetrics(ringName, reg), + actorChan: make(chan func()), + keepInstanceInTheRingOnShutdown: atomic.NewBool(cfg.KeepInstanceInTheRingOnShutdown), } l.metrics.tokensToOwn.Set(float64(cfg.NumTokens)) @@ -162,6 +167,16 @@ func (l *BasicLifecycler) ChangeState(ctx context.Context, state InstanceState) }) } +// ShouldKeepInstanceInTheRingOnShutdown returns if the instance should be kept in the ring or unregistered on shutdown. +func (l *BasicLifecycler) ShouldKeepInstanceInTheRingOnShutdown() bool { + return l.keepInstanceInTheRingOnShutdown.Load() +} + +// SetKeepInstanceInTheRingOnShutdown enables/disables unregistering on shutdown. +func (l *BasicLifecycler) SetKeepInstanceInTheRingOnShutdown(enabled bool) { + l.keepInstanceInTheRingOnShutdown.Store(enabled) +} + func (l *BasicLifecycler) starting(ctx context.Context) error { if err := l.registerInstance(ctx); err != nil { return errors.Wrap(err, "register instance in the ring") @@ -232,7 +247,7 @@ heartbeatLoop: } } - if l.cfg.KeepInstanceInTheRingOnShutdown { + if l.ShouldKeepInstanceInTheRingOnShutdown() { level.Info(l.logger).Log("msg", "keeping instance the ring", "ring", l.ringName) } else { // Remove the instance from the ring. diff --git a/vendor/github.com/grafana/dskit/ring/model.go b/vendor/github.com/grafana/dskit/ring/model.go index 658160b881bf..e97573bc1cc3 100644 --- a/vendor/github.com/grafana/dskit/ring/model.go +++ b/vendor/github.com/grafana/dskit/ring/model.go @@ -478,7 +478,7 @@ func (d *Desc) GetTokens() []uint32 { func (d *Desc) getTokensByZone() map[string][]uint32 { zones := map[string][][]uint32{} for _, instance := range d.Ingesters { - // Tokens may not be sorted for an older version which, so we enforce sorting here. + // Tokens may not be sorted for an older version, so we enforce sorting here. tokens := instance.Tokens if !sort.IsSorted(Tokens(tokens)) { sort.Sort(Tokens(tokens)) diff --git a/vendor/github.com/grafana/dskit/ring/replication_set.go b/vendor/github.com/grafana/dskit/ring/replication_set.go index b73227136d30..3fee7580eb75 100644 --- a/vendor/github.com/grafana/dskit/ring/replication_set.go +++ b/vendor/github.com/grafana/dskit/ring/replication_set.go @@ -24,12 +24,6 @@ type ReplicationSet struct { // MaxErrors and returning early otherwise. // Return a slice of all results from f, or nil if an error occurred. func (r ReplicationSet) Do(ctx context.Context, delay time.Duration, f func(context.Context, *InstanceDesc) (interface{}, error)) ([]interface{}, error) { - type instanceResult struct { - res interface{} - err error - instance *InstanceDesc - } - // Initialise the result tracker, which is use to keep track of successes and failures. var tracker replicationSetResultTracker if r.MaxUnavailableZones > 0 { @@ -39,7 +33,7 @@ func (r ReplicationSet) Do(ctx context.Context, delay time.Duration, f func(cont } var ( - ch = make(chan instanceResult, len(r.Instances)) + ch = make(chan instanceResult[any], len(r.Instances)) forceStart = make(chan struct{}, r.MaxErrors) ) ctx, cancel := context.WithCancel(ctx) @@ -60,8 +54,8 @@ func (r ReplicationSet) Do(ctx context.Context, delay time.Duration, f func(cont } } result, err := f(ctx, ing) - ch <- instanceResult{ - res: result, + ch <- instanceResult[any]{ + result: result, err: err, instance: ing, } @@ -84,17 +78,138 @@ func (r ReplicationSet) Do(ctx context.Context, delay time.Duration, f func(cont forceStart <- struct{}{} } } else { - results = append(results, res.res) + results = append(results, res.result) + } + + case <-ctx.Done(): + return nil, ctx.Err() + } + } + + return results, nil +} + +// DoUntilQuorum runs function f in parallel for all replicas in r. +// +// If r.MaxUnavailableZones is greater than zero: +// - DoUntilQuorum returns an error if calls to f for instances in more than r.MaxUnavailableZones zones return errors +// - Otherwise, DoUntilQuorum returns all results from all replicas in the first zones for which f succeeds +// for every instance in that zone (eg. if there are 3 zones and r.MaxUnavailableZones is 1, DoUntilQuorum will +// return the results from all instances in 2 zones, even if all calls to f succeed). +// +// Otherwise: +// - DoUntilQuorum returns an error if more than r.MaxErrors calls to f return errors +// - Otherwise, DoUntilQuorum returns all results from the first len(r.Instances) - r.MaxErrors instances +// (eg. if there are 6 replicas and r.MaxErrors is 2, DoUntilQuorum will return the results from the first 4 +// successful calls to f, even if all 6 calls to f succeed). +// +// Any results from successful calls to f that are not returned by DoUntilQuorum will be passed to cleanupFunc, +// including when DoUntilQuorum returns an error or only returns a subset of successful results. cleanupFunc may +// be called both before and after DoUntilQuorum returns. +// +// A call to f is considered successful if it returns a nil error. +// +// DoUntilQuorum cancels the context.Context passed to each invocation of f if the result of that invocation of +// f will not be returned. If the result of that invocation of f will be returned, the context.Context passed +// to that invocation of f will not be cancelled by DoUntilQuorum, but the context.Context is a child of ctx +// passed to DoUntilQuorum and so will be cancelled if ctx is cancelled. +func DoUntilQuorum[T any](ctx context.Context, r ReplicationSet, f func(context.Context, *InstanceDesc) (T, error), cleanupFunc func(T)) ([]T, error) { + resultsChan := make(chan instanceResult[T], len(r.Instances)) + resultsRemaining := len(r.Instances) + + defer func() { + go func() { + for resultsRemaining > 0 { + result := <-resultsChan + resultsRemaining-- + + if result.err == nil { + cleanupFunc(result.result) + } } + }() + }() + + var resultTracker replicationSetResultTracker + var contextTracker replicationSetContextTracker + if r.MaxUnavailableZones > 0 { + resultTracker = newZoneAwareResultTracker(r.Instances, r.MaxUnavailableZones) + contextTracker = newZoneAwareContextTracker(ctx, r.Instances) + } else { + resultTracker = newDefaultResultTracker(r.Instances, r.MaxErrors) + contextTracker = newDefaultContextTracker(ctx, r.Instances) + } + + for i := range r.Instances { + instance := &r.Instances[i] + instanceCtx := contextTracker.contextFor(instance) + + go func(desc *InstanceDesc) { + result, err := f(instanceCtx, desc) + resultsChan <- instanceResult[T]{ + result: result, + err: err, + instance: desc, + } + }(instance) + } + + resultsMap := make(map[*InstanceDesc]T, len(r.Instances)) + cleanupResultsAlreadyReceived := func() { + for _, result := range resultsMap { + cleanupFunc(result) + } + } + for !resultTracker.succeeded() { + select { case <-ctx.Done(): + // No need to cancel individual instance contexts, as they inherit the cancellation from ctx. + cleanupResultsAlreadyReceived() + return nil, ctx.Err() + case result := <-resultsChan: + resultsRemaining-- + resultTracker.done(result.instance, result.err) + + if result.err == nil { + resultsMap[result.instance] = result.result + } else if resultTracker.failed() { + contextTracker.cancelAllContexts() + cleanupResultsAlreadyReceived() + return nil, result.err + } + } + } + + results := make([]T, 0, len(r.Instances)) + + for i := range r.Instances { + instance := &r.Instances[i] + result, haveResult := resultsMap[instance] + + if haveResult { + if resultTracker.shouldIncludeResultFrom(instance) { + results = append(results, result) + } else { + contextTracker.cancelContextFor(instance) + cleanupFunc(result) + } + } else { + // Nothing to clean up (yet) - this will be handled by deferred call above. + contextTracker.cancelContextFor(instance) } } return results, nil } +type instanceResult[T any] struct { + result T + err error + instance *InstanceDesc +} + // Includes returns whether the replication set includes the replica with the provided addr. func (r ReplicationSet) Includes(addr string) bool { for _, instance := range r.Instances { @@ -128,6 +243,29 @@ func (r ReplicationSet) GetAddressesWithout(exclude string) []string { return addrs } +// ZoneCount returns the number of unique zones represented by instances within this replication set. +func (r *ReplicationSet) ZoneCount() int { + // Why not use a map here? Using a slice is faster for the small number of zones we expect to typically use. + zones := []string{} + + for _, i := range r.Instances { + sawZone := false + + for _, z := range zones { + if z == i.Zone { + sawZone = true + break + } + } + + if !sawZone { + zones = append(zones, i.Zone) + } + } + + return len(zones) +} + // HasReplicationSetChanged returns true if two replications sets are the same (with possibly different timestamps), // false if they differ in any way (number of instances, instance states, tokens, zones, ...). func HasReplicationSetChanged(before, after ReplicationSet) bool { diff --git a/vendor/github.com/grafana/dskit/ring/replication_set_tracker.go b/vendor/github.com/grafana/dskit/ring/replication_set_tracker.go index fcdf5441dd24..60d4847639b9 100644 --- a/vendor/github.com/grafana/dskit/ring/replication_set_tracker.go +++ b/vendor/github.com/grafana/dskit/ring/replication_set_tracker.go @@ -1,5 +1,7 @@ package ring +import "context" + type replicationSetResultTracker interface { // Signals an instance has done the execution, either successful (no error) // or failed (with error). @@ -10,6 +12,27 @@ type replicationSetResultTracker interface { // Returns true if the maximum number of failed executions have been reached. failed() bool + + // Returns true if the result returned by instance is part of the minimal set of all results + // required to meet the quorum requirements of this tracker. + // This method should only be called for instances that have returned a successful result, + // calling this method for an instance that returned an error may return unpredictable results. + // This method should only be called after succeeded returns true for the first time and before + // calling done any further times. + shouldIncludeResultFrom(instance *InstanceDesc) bool +} + +type replicationSetContextTracker interface { + // Returns a context.Context for instance. + contextFor(instance *InstanceDesc) context.Context + + // Cancels the context for instance previously obtained with contextFor. + // This method may cancel the context for other instances if those other instances are part of + // the same zone and this tracker is zone-aware. + cancelContextFor(instance *InstanceDesc) + + // Cancels all contexts previously obtained with contextFor. + cancelAllContexts() } type defaultResultTracker struct { @@ -44,6 +67,42 @@ func (t *defaultResultTracker) failed() bool { return t.numErrors > t.maxErrors } +func (t *defaultResultTracker) shouldIncludeResultFrom(_ *InstanceDesc) bool { + return true +} + +type defaultContextTracker struct { + ctx context.Context + cancelFuncs map[*InstanceDesc]context.CancelFunc +} + +func newDefaultContextTracker(ctx context.Context, instances []InstanceDesc) *defaultContextTracker { + return &defaultContextTracker{ + ctx: ctx, + cancelFuncs: make(map[*InstanceDesc]context.CancelFunc, len(instances)), + } +} + +func (t *defaultContextTracker) contextFor(instance *InstanceDesc) context.Context { + ctx, cancel := context.WithCancel(t.ctx) + t.cancelFuncs[instance] = cancel + return ctx +} + +func (t *defaultContextTracker) cancelContextFor(instance *InstanceDesc) { + if cancel, ok := t.cancelFuncs[instance]; ok { + cancel() + delete(t.cancelFuncs, instance) + } +} + +func (t *defaultContextTracker) cancelAllContexts() { + for instance, cancel := range t.cancelFuncs { + cancel() + delete(t.cancelFuncs, instance) + } +} + // zoneAwareResultTracker tracks the results per zone. // All instances in a zone must succeed in order for the zone to succeed. type zoneAwareResultTracker struct { @@ -63,6 +122,7 @@ func newZoneAwareResultTracker(instances []InstanceDesc, maxUnavailableZones int for _, instance := range instances { t.waitingByZone[instance.Zone]++ } + t.minSuccessfulZones = len(t.waitingByZone) - maxUnavailableZones return t @@ -94,3 +154,47 @@ func (t *zoneAwareResultTracker) failed() bool { failedZones := len(t.failuresByZone) return failedZones > t.maxUnavailableZones } + +func (t *zoneAwareResultTracker) shouldIncludeResultFrom(instance *InstanceDesc) bool { + return t.failuresByZone[instance.Zone] == 0 && t.waitingByZone[instance.Zone] == 0 +} + +type zoneAwareContextTracker struct { + contexts map[string]context.Context + cancelFuncs map[string]context.CancelFunc +} + +func newZoneAwareContextTracker(ctx context.Context, instances []InstanceDesc) *zoneAwareContextTracker { + t := &zoneAwareContextTracker{ + contexts: map[string]context.Context{}, + cancelFuncs: map[string]context.CancelFunc{}, + } + + for _, instance := range instances { + if _, ok := t.contexts[instance.Zone]; !ok { + zoneCtx, cancel := context.WithCancel(ctx) + t.contexts[instance.Zone] = zoneCtx + t.cancelFuncs[instance.Zone] = cancel + } + } + + return t +} + +func (t *zoneAwareContextTracker) contextFor(instance *InstanceDesc) context.Context { + return t.contexts[instance.Zone] +} + +func (t *zoneAwareContextTracker) cancelContextFor(instance *InstanceDesc) { + if cancel, ok := t.cancelFuncs[instance.Zone]; ok { + cancel() + delete(t.cancelFuncs, instance.Zone) + } +} + +func (t *zoneAwareContextTracker) cancelAllContexts() { + for zone, cancel := range t.cancelFuncs { + cancel() + delete(t.cancelFuncs, zone) + } +} diff --git a/vendor/github.com/grafana/dskit/ring/ring.go b/vendor/github.com/grafana/dskit/ring/ring.go index 6466231207de..9cc4e757cb9a 100644 --- a/vendor/github.com/grafana/dskit/ring/ring.go +++ b/vendor/github.com/grafana/dskit/ring/ring.go @@ -184,7 +184,8 @@ type Ring struct { // Cache of shuffle-sharded subrings per identifier. Invalidated when topology changes. // If set to nil, no caching is done (used by tests, and subrings). - shuffledSubringCache map[subringCacheKey]*Ring + shuffledSubringCache map[subringCacheKey]*Ring + shuffledSubringWithLookbackCache map[subringCacheKey]cachedSubringWithLookback numMembersGaugeVec *prometheus.GaugeVec totalTokensGauge prometheus.Gauge @@ -194,8 +195,15 @@ type Ring struct { } type subringCacheKey struct { - identifier string - shardSize int + identifier string + shardSize int + lookbackPeriod time.Duration +} + +type cachedSubringWithLookback struct { + subring *Ring + validForLookbackWindowsStartingAfter int64 // if the lookback window is from T to S, validForLookbackWindowsStartingAfter is the earliest value of T this cache entry is valid for + validForLookbackWindowsStartingBefore int64 // if the lookback window is from T to S, validForLookbackWindowsStartingBefore is the latest value of T this cache entry is valid for } // New creates a new Ring. Being a service, Ring needs to be started to do anything. @@ -221,12 +229,13 @@ func NewWithStoreClientAndStrategy(cfg Config, name, key string, store kv.Client } r := &Ring{ - key: key, - cfg: cfg, - KVClient: store, - strategy: strategy, - ringDesc: &Desc{}, - shuffledSubringCache: map[subringCacheKey]*Ring{}, + key: key, + cfg: cfg, + KVClient: store, + strategy: strategy, + ringDesc: &Desc{}, + shuffledSubringCache: map[subringCacheKey]*Ring{}, + shuffledSubringWithLookbackCache: map[subringCacheKey]cachedSubringWithLookback{}, numMembersGaugeVec: promauto.With(reg).NewGaugeVec(prometheus.GaugeOpts{ Name: "ring_members", Help: "Number of members in the ring", @@ -324,10 +333,15 @@ func (r *Ring) updateRingState(ringDesc *Desc) { r.ringZones = ringZones r.oldestRegisteredTimestamp = oldestRegisteredTimestamp r.lastTopologyChange = now + + // Invalidate all cached subrings. if r.shuffledSubringCache != nil { - // Invalidate all cached subrings. r.shuffledSubringCache = make(map[subringCacheKey]*Ring) } + if r.shuffledSubringWithLookbackCache != nil { + r.shuffledSubringWithLookbackCache = make(map[subringCacheKey]cachedSubringWithLookback) + } + r.updateRingMetrics(rc) } @@ -340,17 +354,19 @@ func (r *Ring) Get(key uint32, op Operation, bufDescs []InstanceDesc, bufHosts, } var ( - n = r.cfg.ReplicationFactor - instances = bufDescs[:0] - start = searchToken(r.ringTokens, key) - iterations = 0 + n = r.cfg.ReplicationFactor + instances = bufDescs[:0] + start = searchToken(r.ringTokens, key) + iterations = 0 + maxZones = len(r.ringTokensByZone) + maxInstances = len(r.ringDesc.Ingesters) // We use a slice instead of a map because it's faster to search within a // slice than lookup a map for a very low number of items. distinctHosts = bufHosts[:0] distinctZones = bufZones[:0] ) - for i := start; len(distinctHosts) < n && iterations < len(r.ringTokens); i++ { + for i := start; len(distinctHosts) < dsmath.Min(maxInstances, n) && len(distinctZones) < maxZones && iterations < len(r.ringTokens); i++ { iterations++ // Wrap i around in the ring. i %= len(r.ringTokens) @@ -623,14 +639,25 @@ func (r *Ring) ShuffleShard(identifier string, size int) ReadRing { // The returned subring may be unbalanced with regard to zones and should never be used for write // operations (read only). // -// This function doesn't support caching. +// This function supports caching, but the cache will only be effective if successive calls for the +// same identifier are for increasing values of (now-lookbackPeriod). func (r *Ring) ShuffleShardWithLookback(identifier string, size int, lookbackPeriod time.Duration, now time.Time) ReadRing { // Nothing to do if the shard size is not smaller then the actual ring. if size <= 0 || r.InstancesCount() <= size { return r } - return r.shuffleShard(identifier, size, lookbackPeriod, now) + if cached := r.getCachedShuffledSubringWithLookback(identifier, size, lookbackPeriod, now); cached != nil { + return cached + } + + result := r.shuffleShard(identifier, size, lookbackPeriod, now) + + if result != r { + r.setCachedShuffledSubringWithLookback(identifier, size, lookbackPeriod, now, result) + } + + return result } func (r *Ring) shuffleShard(identifier string, size int, lookbackPeriod time.Duration, now time.Time) *Ring { @@ -877,6 +904,91 @@ func (r *Ring) setCachedShuffledSubring(identifier string, size int, subring *Ri } } +func (r *Ring) getCachedShuffledSubringWithLookback(identifier string, size int, lookbackPeriod time.Duration, now time.Time) *Ring { + if r.cfg.SubringCacheDisabled { + return nil + } + + r.mtx.RLock() + defer r.mtx.RUnlock() + + cached, ok := r.shuffledSubringWithLookbackCache[subringCacheKey{identifier: identifier, shardSize: size, lookbackPeriod: lookbackPeriod}] + if !ok { + return nil + } + + lookbackWindowStart := now.Add(-lookbackPeriod).Unix() + if lookbackWindowStart < cached.validForLookbackWindowsStartingAfter || lookbackWindowStart > cached.validForLookbackWindowsStartingBefore { + // The cached subring is not valid for the lookback window that has been requested. + return nil + } + + cachedSubring := cached.subring + + // No need to update the cached subring if it is the original ring itself. + if r == cachedSubring { + return cachedSubring + } + + cachedSubring.mtx.Lock() + defer cachedSubring.mtx.Unlock() + + // Update instance states and timestamps. We know that the topology is the same, + // so zones and tokens are equal. + for name, cachedIng := range cachedSubring.ringDesc.Ingesters { + ing := r.ringDesc.Ingesters[name] + cachedIng.State = ing.State + cachedIng.Timestamp = ing.Timestamp + cachedSubring.ringDesc.Ingesters[name] = cachedIng + } + + return cachedSubring +} + +func (r *Ring) setCachedShuffledSubringWithLookback(identifier string, size int, lookbackPeriod time.Duration, now time.Time, subring *Ring) { + if subring == nil || r.cfg.SubringCacheDisabled { + return + } + + lookbackWindowStart := now.Add(-lookbackPeriod).Unix() + validForLookbackWindowsStartingBefore := int64(math.MaxInt64) + + for _, instance := range subring.ringDesc.Ingesters { + registeredDuringLookbackWindow := instance.RegisteredTimestamp >= lookbackWindowStart + + if registeredDuringLookbackWindow && instance.RegisteredTimestamp < validForLookbackWindowsStartingBefore { + validForLookbackWindowsStartingBefore = instance.RegisteredTimestamp + } + } + + r.mtx.Lock() + defer r.mtx.Unlock() + + // Only cache if *this* ring hasn't changed since computing result + // (which can happen between releasing the read lock and getting read-write lock). + // Note that shuffledSubringWithLookbackCache can be only nil when set by test. + if r.shuffledSubringWithLookbackCache == nil { + return + } + + if !r.lastTopologyChange.Equal(subring.lastTopologyChange) { + return + } + + // Only update cache if subring's lookback window starts later than the previously cached subring for this identifier, + // if there is one. This prevents cache thrashing due to different calls competing if their lookback windows start + // before and after the time of an instance registering. + key := subringCacheKey{identifier: identifier, shardSize: size, lookbackPeriod: lookbackPeriod} + + if existingEntry, haveCached := r.shuffledSubringWithLookbackCache[key]; !haveCached || existingEntry.validForLookbackWindowsStartingAfter < lookbackWindowStart { + r.shuffledSubringWithLookbackCache[key] = cachedSubringWithLookback{ + subring: subring, + validForLookbackWindowsStartingAfter: lookbackWindowStart, + validForLookbackWindowsStartingBefore: validForLookbackWindowsStartingBefore, + } + } +} + func (r *Ring) CleanupShuffleShardCache(identifier string) { if r.cfg.SubringCacheDisabled { return @@ -890,6 +1002,12 @@ func (r *Ring) CleanupShuffleShardCache(identifier string) { delete(r.shuffledSubringCache, k) } } + + for k := range r.shuffledSubringWithLookbackCache { + if k.identifier == identifier { + delete(r.shuffledSubringWithLookbackCache, k) + } + } } func (r *Ring) casRing(ctx context.Context, f func(in interface{}) (out interface{}, retry bool, err error)) error { diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go index f4fc88455221..906397815138 100644 --- a/vendor/github.com/prometheus/common/expfmt/decode.go +++ b/vendor/github.com/prometheus/common/expfmt/decode.go @@ -132,7 +132,10 @@ func (d *textDecoder) Decode(v *dto.MetricFamily) error { } // Pick off one MetricFamily per Decode until there's nothing left. for key, fam := range d.fams { - *v = *fam + v.Name = fam.Name + v.Help = fam.Help + v.Type = fam.Type + v.Metric = fam.Metric delete(d.fams, key) return nil } diff --git a/vendor/github.com/prometheus/common/expfmt/encode.go b/vendor/github.com/prometheus/common/expfmt/encode.go index 64dc0eb40c28..7f611ffaad7c 100644 --- a/vendor/github.com/prometheus/common/expfmt/encode.go +++ b/vendor/github.com/prometheus/common/expfmt/encode.go @@ -18,9 +18,9 @@ import ( "io" "net/http" - "github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. "github.com/matttproud/golang_protobuf_extensions/pbutil" "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg" + "google.golang.org/protobuf/encoding/prototext" dto "github.com/prometheus/client_model/go" ) @@ -99,8 +99,11 @@ func NegotiateIncludingOpenMetrics(h http.Header) Format { if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { return FmtText } - if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion || ver == "") { - return FmtOpenMetrics + if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion_0_0_1 || ver == OpenMetricsVersion_1_0_0 || ver == "") { + if ver == OpenMetricsVersion_1_0_0 { + return FmtOpenMetrics_1_0_0 + } + return FmtOpenMetrics_0_0_1 } } return FmtText @@ -133,7 +136,7 @@ func NewEncoder(w io.Writer, format Format) Encoder { case FmtProtoText: return encoderCloser{ encode: func(v *dto.MetricFamily) error { - _, err := fmt.Fprintln(w, proto.MarshalTextString(v)) + _, err := fmt.Fprintln(w, prototext.Format(v)) return err }, close: func() error { return nil }, @@ -146,7 +149,7 @@ func NewEncoder(w io.Writer, format Format) Encoder { }, close: func() error { return nil }, } - case FmtOpenMetrics: + case FmtOpenMetrics_0_0_1, FmtOpenMetrics_1_0_0: return encoderCloser{ encode: func(v *dto.MetricFamily) error { _, err := MetricFamilyToOpenMetrics(w, v) diff --git a/vendor/github.com/prometheus/common/expfmt/expfmt.go b/vendor/github.com/prometheus/common/expfmt/expfmt.go index 0f176fa64f25..c4cb20f0d3ef 100644 --- a/vendor/github.com/prometheus/common/expfmt/expfmt.go +++ b/vendor/github.com/prometheus/common/expfmt/expfmt.go @@ -19,20 +19,22 @@ type Format string // Constants to assemble the Content-Type values for the different wire protocols. const ( - TextVersion = "0.0.4" - ProtoType = `application/vnd.google.protobuf` - ProtoProtocol = `io.prometheus.client.MetricFamily` - ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" - OpenMetricsType = `application/openmetrics-text` - OpenMetricsVersion = "0.0.1" + TextVersion = "0.0.4" + ProtoType = `application/vnd.google.protobuf` + ProtoProtocol = `io.prometheus.client.MetricFamily` + ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" + OpenMetricsType = `application/openmetrics-text` + OpenMetricsVersion_0_0_1 = "0.0.1" + OpenMetricsVersion_1_0_0 = "1.0.0" // The Content-Type values for the different wire protocols. - FmtUnknown Format = `` - FmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8` - FmtProtoDelim Format = ProtoFmt + ` encoding=delimited` - FmtProtoText Format = ProtoFmt + ` encoding=text` - FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text` - FmtOpenMetrics Format = OpenMetricsType + `; version=` + OpenMetricsVersion + `; charset=utf-8` + FmtUnknown Format = `` + FmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8` + FmtProtoDelim Format = ProtoFmt + ` encoding=delimited` + FmtProtoText Format = ProtoFmt + ` encoding=text` + FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text` + FmtOpenMetrics_1_0_0 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_1_0_0 + `; charset=utf-8` + FmtOpenMetrics_0_0_1 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_0_0_1 + `; charset=utf-8` ) const ( diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go index ac2482782c7b..35db1cc9d73c 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -24,8 +24,8 @@ import ( dto "github.com/prometheus/client_model/go" - "github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility. "github.com/prometheus/common/model" + "google.golang.org/protobuf/proto" ) // A stateFn is a function that represents a state in a state machine. By diff --git a/vendor/github.com/sercand/kuberesolver/README.md b/vendor/github.com/sercand/kuberesolver/README.md deleted file mode 100644 index 4035f6202c24..000000000000 --- a/vendor/github.com/sercand/kuberesolver/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# kuberesolver -Grpc Client-Side Load Balancer with Kubernetes name resolver - -```go -// Register kuberesolver to grpc -kuberesolver.RegisterInCluster() -// is same as -resolver.Register(kuberesolver.NewBuilder(nil)) -// you can bring your own k8s client, below is default behaviour -client, err := kuberesolver.NewInClusterK8sClient() -resolver.Register(kuberesolver.NewBuilder(client)) - -// USAGE: -// if schema is 'kubernetes' then grpc will use kuberesolver to resolve addresses -cc, err := grpc.Dial("kubernetes:///service-name.namespace:portname", opts...) -``` - -An url can be one of the following, [grpc naming docs](https://github.com/grpc/grpc/blob/master/doc/naming.md) -``` -kubernetes:///service-name:8080 -kubernetes:///service-name:portname -kubernetes:///service-name.namespace:8080 - -kubernetes://namespace/service-name:8080 -kubernetes://service-name:8080/ -kubernetes://service-name.namespace:8080/ - -``` diff --git a/vendor/github.com/sercand/kuberesolver/.gitignore b/vendor/github.com/sercand/kuberesolver/v4/.gitignore similarity index 100% rename from vendor/github.com/sercand/kuberesolver/.gitignore rename to vendor/github.com/sercand/kuberesolver/v4/.gitignore diff --git a/vendor/github.com/sercand/kuberesolver/LICENSE b/vendor/github.com/sercand/kuberesolver/v4/LICENSE similarity index 100% rename from vendor/github.com/sercand/kuberesolver/LICENSE rename to vendor/github.com/sercand/kuberesolver/v4/LICENSE diff --git a/vendor/github.com/sercand/kuberesolver/v4/README.md b/vendor/github.com/sercand/kuberesolver/v4/README.md new file mode 100644 index 000000000000..0052fd95dcde --- /dev/null +++ b/vendor/github.com/sercand/kuberesolver/v4/README.md @@ -0,0 +1,64 @@ +# kuberesolver + +A Grpc name resolver by using kubernetes API. +It comes with a small ~250 LOC kubernetes client to find service endpoints. Therefore it won't bloat your binaries. + + +### USAGE + +```go + +// Import the module +import "github.com/sercand/kuberesolver/v3" + +// Register kuberesolver to grpc before calling grpc.Dial +kuberesolver.RegisterInCluster() + +// it is same as +resolver.Register(kuberesolver.NewBuilder(nil /*custom kubernetes client*/ , "kubernetes")) + +// if schema is 'kubernetes' then grpc will use kuberesolver to resolve addresses +cc, err := grpc.Dial("kubernetes:///service.namespace:portname", opts...) +``` + +An url can be one of the following, [grpc naming docs](https://github.com/grpc/grpc/blob/master/doc/naming.md) + +``` +kubernetes:///service-name:8080 +kubernetes:///service-name:portname +kubernetes:///service-name.namespace:8080 + +kubernetes://namespace/service-name:8080 +kubernetes://service-name:8080/ +kubernetes://service-name.namespace:8080/ + +``` + +### Using alternative Schema + +Use `RegisterInClusterWithSchema(schema)` instead of `RegisterInCluster` on start. + +### Client Side Load Balancing + +You need to pass grpc.WithBalancerName option to grpc on dial: + +```go +grpc.DialContext(ctx, "kubernetes:///service:grpc", grpc.WithBalancerName("round_robin"), grpc.WithInsecure()) +``` +This will create subconnections for each available service endpoints. + +### How is this different from dialing to `service.namespace:8080` + +Connecting to a service by dialing to `service.namespace:8080` uses DNS and it returns service stable IP. Therefore, gRPC doesn't know the endpoint IP addresses and it fails to reconnect to target services in case of failure. + +Kuberesolver uses kubernetes API to get and watch service endpoint IP addresses. +Since it provides and updates all available service endpoints, together with a client-side balancer you can achive zero downtime deployments. + +### RBAC + +You need give `GET` and `WATCH` access to the `endpoints` if you are using RBAC in your cluster. + + +### Using With TLS + +You need to a certificate with name `service-name.namespace` in order to connect with TLS to your services. diff --git a/vendor/github.com/sercand/kuberesolver/builder.go b/vendor/github.com/sercand/kuberesolver/v4/builder.go similarity index 73% rename from vendor/github.com/sercand/kuberesolver/builder.go rename to vendor/github.com/sercand/kuberesolver/v4/builder.go index aaa84a63eac7..8af14cf232f2 100644 --- a/vendor/github.com/sercand/kuberesolver/builder.go +++ b/vendor/github.com/sercand/kuberesolver/v4/builder.go @@ -1,6 +1,7 @@ package kuberesolver import ( + "context" "fmt" "io" "net" @@ -11,7 +12,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "golang.org/x/net/context" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/resolver" ) @@ -47,19 +47,20 @@ type targetInfo struct { } func (ti targetInfo) String() string { - return fmt.Sprintf("kubernetes:///%s/%s:%s", ti.serviceNamespace, ti.serviceName, ti.port) + return fmt.Sprintf("kubernetes://%s/%s:%s", ti.serviceNamespace, ti.serviceName, ti.port) } -// RegisterInCluster registers the kuberesolver builder to grpc +// RegisterInCluster registers the kuberesolver builder to grpc with kubernetes schema func RegisterInCluster() { RegisterInClusterWithSchema(kubernetesSchema) } +// RegisterInClusterWithSchema registers the kuberesolver builder to the grpc with custom schema func RegisterInClusterWithSchema(schema string) { resolver.Register(NewBuilder(nil, schema)) } -// NewBuilder creates a kubeBuilder which is used to factory Kuberesolvers. +// NewBuilder creates a kubeBuilder which is used by grpc resolver. func NewBuilder(client K8sClient, schema string) resolver.Builder { return &kubeBuilder{ k8sClient: client, @@ -72,56 +73,55 @@ type kubeBuilder struct { schema string } -func parseResolverTarget(target resolver.Target) (targetInfo, error) { - // kubernetes://default/service:port - end := target.Endpoint - snamespace := target.Authority - // kubernetes://service.default:port/ - if end == "" { - end = target.Authority - snamespace = "default" - } - // kubernetes:///service:port - // kubernetes://service:port/ - if snamespace == "" { - snamespace = "default" +func splitServicePortNamespace(hpn string) (service, port, namespace string) { + service = hpn + + colon := strings.LastIndexByte(service, ':') + if colon != -1 { + service, port = service[:colon], service[colon+1:] } - ti := targetInfo{} - if end == "" { - return targetInfo{}, fmt.Errorf("target(%q) is empty", target) + dot := strings.LastIndexByte(service, '.') + if dot != -1 { + service, namespace = service[:dot], service[dot+1:] } - var name string - var port string - if strings.LastIndex(end, ":") < 0 { - name = end - port = "" - ti.useFirstPort = true + + return +} + +func parseResolverTarget(target resolver.Target) (targetInfo, error) { + var service, port, namespace string + if target.URL.Host == "" { + // kubernetes:///service.namespace:port + service, port, namespace = splitServicePortNamespace(target.Endpoint()) + } else if target.URL.Port() == "" && target.Endpoint() != "" { + // kubernetes://namespace/service:port + service, port, _ = splitServicePortNamespace(target.Endpoint()) + namespace = target.URL.Hostname() } else { - var err error - name, port, err = net.SplitHostPort(end) - if err != nil { - return targetInfo{}, fmt.Errorf("target endpoint='%s' is invalid. grpc target is %#v, err=%v", end, target, err) - } + // kubernetes://service.namespace:port + service, port, namespace = splitServicePortNamespace(target.URL.Host) } - namesplit := strings.SplitN(name, ".", 2) - sname := name - if len(namesplit) == 2 { - sname = namesplit[0] - snamespace = namesplit[1] + if service == "" { + return targetInfo{}, fmt.Errorf("target %s must specify a service", &target.URL) } - ti.serviceName = sname - ti.serviceNamespace = snamespace - ti.port = port - if !ti.useFirstPort { - if _, err := strconv.Atoi(ti.port); err != nil { - ti.resolveByPortName = true - } else { - ti.resolveByPortName = false - } + + resolveByPortName := false + useFirstPort := false + if port == "" { + useFirstPort = true + } else if _, err := strconv.Atoi(port); err != nil { + resolveByPortName = true } - return ti, nil + + return targetInfo{ + serviceName: service, + serviceNamespace: namespace, + port: port, + resolveByPortName: resolveByPortName, + useFirstPort: useFirstPort, + }, nil } // Build creates a new resolver for the given target. @@ -140,6 +140,9 @@ func (b *kubeBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts if err != nil { return nil, err } + if ti.serviceNamespace == "" { + ti.serviceNamespace = getCurrentNamespaceOrDefault() + } ctx, cancel := context.WithCancel(context.Background()) r := &kResolver{ target: ti, @@ -224,14 +227,10 @@ func (k *kResolver) makeAddresses(e Endpoints) ([]resolver.Address, string) { } for _, address := range subset.Addresses { - sname := k.target.serviceName - if address.TargetRef != nil { - sname = address.TargetRef.Name - } newAddrs = append(newAddrs, resolver.Address{ Type: resolver.Backend, Addr: net.JoinHostPort(address.IP, port), - ServerName: sname, + ServerName: fmt.Sprintf("%s.%s", k.target.serviceName, k.target.serviceNamespace), Metadata: nil, }) } @@ -264,7 +263,7 @@ func (k *kResolver) resolve() { func (k *kResolver) watch() error { defer k.wg.Done() // watch endpoints lists existing endpoints at start - sw, err := watchEndpoints(k.k8sClient, k.target.serviceNamespace, k.target.serviceName) + sw, err := watchEndpoints(k.ctx, k.k8sClient, k.target.serviceNamespace, k.target.serviceName) if err != nil { return err } diff --git a/vendor/github.com/sercand/kuberesolver/kubernetes.go b/vendor/github.com/sercand/kuberesolver/v4/kubernetes.go similarity index 58% rename from vendor/github.com/sercand/kuberesolver/kubernetes.go rename to vendor/github.com/sercand/kuberesolver/v4/kubernetes.go index 18925eae794e..80520a2d7f7d 100644 --- a/vendor/github.com/sercand/kuberesolver/kubernetes.go +++ b/vendor/github.com/sercand/kuberesolver/v4/kubernetes.go @@ -1,6 +1,7 @@ package kuberesolver import ( + "context" "crypto/tls" "crypto/x509" "encoding/json" @@ -11,12 +12,17 @@ import ( "net/url" "os" "strings" + "sync" "time" + + "github.com/fsnotify/fsnotify" ) const ( - serviceAccountToken = "/var/run/secrets/kubernetes.io/serviceaccount/token" - serviceAccountCACert = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + serviceAccountToken = "/var/run/secrets/kubernetes.io/serviceaccount/token" + serviceAccountCACert = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + kubernetesNamespaceFile = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" + defaultNamespace = "default" ) // K8sClient is minimal kubernetes client interface @@ -29,6 +35,7 @@ type K8sClient interface { type k8sClient struct { host string token string + tokenLck sync.RWMutex httpClient *http.Client } @@ -40,6 +47,8 @@ func (kc *k8sClient) GetRequest(url string) (*http.Request, error) { if err != nil { return nil, err } + kc.tokenLck.RLock() + defer kc.tokenLck.RUnlock() if len(kc.token) > 0 { req.Header.Set("Authorization", "Bearer "+kc.token) } @@ -54,6 +63,12 @@ func (kc *k8sClient) Host() string { return kc.host } +func (kc *k8sClient) setToken(token string) { + kc.tokenLck.Lock() + defer kc.tokenLck.Unlock() + kc.token = token +} + // NewInClusterK8sClient creates K8sClient if it is inside Kubernetes func NewInClusterK8sClient() (K8sClient, error) { host, port := os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT") @@ -76,11 +91,57 @@ func NewInClusterK8sClient() (K8sClient, error) { }} httpClient := &http.Client{Transport: transport, Timeout: time.Nanosecond * 0} - return &k8sClient{ + client := &k8sClient{ host: "https://" + net.JoinHostPort(host, port), token: string(token), httpClient: httpClient, - }, nil + } + + // Create a new file watcher to listen for new Service Account tokens + watcher, err := fsnotify.NewWatcher() + if err != nil { + return nil, err + } + + go func() { + for { + select { + case event, ok := <-watcher.Events: + if !ok { + return + } + // k8s configmaps uses symlinks, we need this workaround. + // original configmap file is removed + if event.Op == fsnotify.Remove || event.Op == fsnotify.Chmod { + // remove watcher since the file is removed + watcher.Remove(event.Name) + // add a new watcher pointing to the new symlink/file + watcher.Add(serviceAccountToken) + token, err := ioutil.ReadFile(serviceAccountToken) + if err == nil { + client.setToken(string(token)) + } + } + if event.Op&fsnotify.Write == fsnotify.Write { + token, err := ioutil.ReadFile(serviceAccountToken) + if err == nil { + client.setToken(string(token)) + } + } + case _, ok := <-watcher.Errors: + if !ok { + return + } + } + } + }() + + err = watcher.Add(serviceAccountToken) + if err != nil { + return nil, err + } + + return client, nil } // NewInsecureK8sClient creates an insecure k8s client which is suitable @@ -108,14 +169,14 @@ func getEndpoints(client K8sClient, namespace, targetName string) (Endpoints, er } defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - return Endpoints{}, fmt.Errorf("invalid response code %d", resp.StatusCode) + return Endpoints{}, fmt.Errorf("invalid response code %d for service %s in namespace %s", resp.StatusCode, targetName, namespace) } result := Endpoints{} err = json.NewDecoder(resp.Body).Decode(&result) return result, err } -func watchEndpoints(client K8sClient, namespace, targetName string) (watchInterface, error) { +func watchEndpoints(ctx context.Context, client K8sClient, namespace, targetName string) (watchInterface, error) { u, err := url.Parse(fmt.Sprintf("%s/api/v1/watch/namespaces/%s/endpoints/%s", client.Host(), namespace, targetName)) if err != nil { @@ -125,13 +186,22 @@ func watchEndpoints(client K8sClient, namespace, targetName string) (watchInterf if err != nil { return nil, err } + req = req.WithContext(ctx) resp, err := client.Do(req) if err != nil { return nil, err } if resp.StatusCode != http.StatusOK { defer resp.Body.Close() - return nil, fmt.Errorf("invalid response code %d", resp.StatusCode) + return nil, fmt.Errorf("invalid response code %d for service %s in namespace %s", resp.StatusCode, targetName, namespace) } return newStreamWatcher(resp.Body), nil } + +func getCurrentNamespaceOrDefault() string { + ns, err := ioutil.ReadFile(kubernetesNamespaceFile) + if err != nil { + return defaultNamespace + } + return string(ns) +} diff --git a/vendor/github.com/sercand/kuberesolver/models.go b/vendor/github.com/sercand/kuberesolver/v4/models.go similarity index 100% rename from vendor/github.com/sercand/kuberesolver/models.go rename to vendor/github.com/sercand/kuberesolver/v4/models.go diff --git a/vendor/github.com/sercand/kuberesolver/stream.go b/vendor/github.com/sercand/kuberesolver/v4/stream.go similarity index 97% rename from vendor/github.com/sercand/kuberesolver/stream.go rename to vendor/github.com/sercand/kuberesolver/v4/stream.go index 30a600ccde95..4701aa95a08b 100644 --- a/vendor/github.com/sercand/kuberesolver/stream.go +++ b/vendor/github.com/sercand/kuberesolver/v4/stream.go @@ -1,6 +1,7 @@ package kuberesolver import ( + "context" "encoding/json" "fmt" "io" @@ -78,6 +79,8 @@ func (sw *streamWatcher) receive() { switch err { case io.EOF: // watch closed normally + case context.Canceled: + // canceled normally case io.ErrUnexpectedEOF: grpclog.Infof("kuberesolver: Unexpected EOF during watch stream event decoding: %v", err) default: diff --git a/vendor/github.com/sercand/kuberesolver/util.go b/vendor/github.com/sercand/kuberesolver/v4/util.go similarity index 100% rename from vendor/github.com/sercand/kuberesolver/util.go rename to vendor/github.com/sercand/kuberesolver/v4/util.go diff --git a/vendor/github.com/soheilhy/cmux/.gitignore b/vendor/github.com/soheilhy/cmux/.gitignore new file mode 100644 index 000000000000..daf913b1b347 --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/soheilhy/cmux/.travis.yml b/vendor/github.com/soheilhy/cmux/.travis.yml new file mode 100644 index 000000000000..4d78a519feb6 --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/.travis.yml @@ -0,0 +1,29 @@ +language: go + +go: + - 1.6 + - 1.7 + - 1.8 + - tip + +matrix: + allow_failures: + - go: tip + +gobuild_args: -race + +before_install: + - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go get -u github.com/kisielk/errcheck; fi + - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go get -u golang.org/x/lint/golint; fi + +before_script: + - '! gofmt -s -l . | read' + - echo $TRAVIS_GO_VERSION + - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then golint ./...; fi + - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then errcheck ./...; fi + - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go tool vet .; fi + - if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go tool vet --shadow .; fi + +script: + - go test -bench . -v ./... + - go test -race -bench . -v ./... diff --git a/vendor/github.com/soheilhy/cmux/CONTRIBUTORS b/vendor/github.com/soheilhy/cmux/CONTRIBUTORS new file mode 100644 index 000000000000..49878f228a12 --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/CONTRIBUTORS @@ -0,0 +1,12 @@ +# The list of people who have contributed code to the cmux repository. +# +# Auto-generated with: +# git log --oneline --pretty=format:'%an <%aE>' | sort -u +# +Andreas Jaekle +Dmitri Shuralyov +Ethan Mosbaugh +Soheil Hassas Yeganeh +Soheil Hassas Yeganeh +Tamir Duberstein +Tamir Duberstein diff --git a/vendor/github.com/soheilhy/cmux/LICENSE b/vendor/github.com/soheilhy/cmux/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/soheilhy/cmux/README.md b/vendor/github.com/soheilhy/cmux/README.md new file mode 100644 index 000000000000..c4191b70b003 --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/README.md @@ -0,0 +1,83 @@ +# cmux: Connection Mux ![Travis Build Status](https://api.travis-ci.org/soheilhy/args.svg?branch=master "Travis Build Status") [![GoDoc](https://godoc.org/github.com/soheilhy/cmux?status.svg)](http://godoc.org/github.com/soheilhy/cmux) + +cmux is a generic Go library to multiplex connections based on +their payload. Using cmux, you can serve gRPC, SSH, HTTPS, HTTP, +Go RPC, and pretty much any other protocol on the same TCP listener. + +## How-To +Simply create your main listener, create a cmux for that listener, +and then match connections: +```go +// Create the main listener. +l, err := net.Listen("tcp", ":23456") +if err != nil { + log.Fatal(err) +} + +// Create a cmux. +m := cmux.New(l) + +// Match connections in order: +// First grpc, then HTTP, and otherwise Go RPC/TCP. +grpcL := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc")) +httpL := m.Match(cmux.HTTP1Fast()) +trpcL := m.Match(cmux.Any()) // Any means anything that is not yet matched. + +// Create your protocol servers. +grpcS := grpc.NewServer() +grpchello.RegisterGreeterServer(grpcS, &server{}) + +httpS := &http.Server{ + Handler: &helloHTTP1Handler{}, +} + +trpcS := rpc.NewServer() +trpcS.Register(&ExampleRPCRcvr{}) + +// Use the muxed listeners for your servers. +go grpcS.Serve(grpcL) +go httpS.Serve(httpL) +go trpcS.Accept(trpcL) + +// Start serving! +m.Serve() +``` + +Take a look at [other examples in the GoDoc](http://godoc.org/github.com/soheilhy/cmux/#pkg-examples). + +## Docs +* [GoDocs](https://godoc.org/github.com/soheilhy/cmux) + +## Performance +There is room for improvment but, since we are only matching +the very first bytes of a connection, the performance overheads on +long-lived connections (i.e., RPCs and pipelined HTTP streams) +is negligible. + +*TODO(soheil)*: Add benchmarks. + +## Limitations +* *TLS*: `net/http` uses a type assertion to identify TLS connections; since +cmux's lookahead-implementing connection wraps the underlying TLS connection, +this type assertion fails. +Because of that, you can serve HTTPS using cmux but `http.Request.TLS` +would not be set in your handlers. + +* *Different Protocols on The Same Connection*: `cmux` matches the connection +when it's accepted. For example, one connection can be either gRPC or REST, but +not both. That is, we assume that a client connection is either used for gRPC +or REST. + +* *Java gRPC Clients*: Java gRPC client blocks until it receives a SETTINGS +frame from the server. If you are using the Java client to connect to a cmux'ed +gRPC server please match with writers: +```go +grpcl := m.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc")) +``` + +# Copyright and License +Copyright 2016 The CMux Authors. All rights reserved. + +See [CONTRIBUTORS](https://github.com/soheilhy/cmux/blob/master/CONTRIBUTORS) +for the CMux Authors. Code is released under +[the Apache 2 license](https://github.com/soheilhy/cmux/blob/master/LICENSE). diff --git a/vendor/github.com/soheilhy/cmux/buffer.go b/vendor/github.com/soheilhy/cmux/buffer.go new file mode 100644 index 000000000000..f8cf30a1e66a --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/buffer.go @@ -0,0 +1,67 @@ +// Copyright 2016 The CMux Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. + +package cmux + +import ( + "bytes" + "io" +) + +// bufferedReader is an optimized implementation of io.Reader that behaves like +// ``` +// io.MultiReader(bytes.NewReader(buffer.Bytes()), io.TeeReader(source, buffer)) +// ``` +// without allocating. +type bufferedReader struct { + source io.Reader + buffer bytes.Buffer + bufferRead int + bufferSize int + sniffing bool + lastErr error +} + +func (s *bufferedReader) Read(p []byte) (int, error) { + if s.bufferSize > s.bufferRead { + // If we have already read something from the buffer before, we return the + // same data and the last error if any. We need to immediately return, + // otherwise we may block for ever, if we try to be smart and call + // source.Read() seeking a little bit of more data. + bn := copy(p, s.buffer.Bytes()[s.bufferRead:s.bufferSize]) + s.bufferRead += bn + return bn, s.lastErr + } else if !s.sniffing && s.buffer.Cap() != 0 { + // We don't need the buffer anymore. + // Reset it to release the internal slice. + s.buffer = bytes.Buffer{} + } + + // If there is nothing more to return in the sniffed buffer, read from the + // source. + sn, sErr := s.source.Read(p) + if sn > 0 && s.sniffing { + s.lastErr = sErr + if wn, wErr := s.buffer.Write(p[:sn]); wErr != nil { + return wn, wErr + } + } + return sn, sErr +} + +func (s *bufferedReader) reset(snif bool) { + s.sniffing = snif + s.bufferRead = 0 + s.bufferSize = s.buffer.Len() +} diff --git a/vendor/github.com/soheilhy/cmux/cmux.go b/vendor/github.com/soheilhy/cmux/cmux.go new file mode 100644 index 000000000000..5ba921e72dc0 --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/cmux.go @@ -0,0 +1,307 @@ +// Copyright 2016 The CMux Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. + +package cmux + +import ( + "errors" + "fmt" + "io" + "net" + "sync" + "time" +) + +// Matcher matches a connection based on its content. +type Matcher func(io.Reader) bool + +// MatchWriter is a match that can also write response (say to do handshake). +type MatchWriter func(io.Writer, io.Reader) bool + +// ErrorHandler handles an error and returns whether +// the mux should continue serving the listener. +type ErrorHandler func(error) bool + +var _ net.Error = ErrNotMatched{} + +// ErrNotMatched is returned whenever a connection is not matched by any of +// the matchers registered in the multiplexer. +type ErrNotMatched struct { + c net.Conn +} + +func (e ErrNotMatched) Error() string { + return fmt.Sprintf("mux: connection %v not matched by an matcher", + e.c.RemoteAddr()) +} + +// Temporary implements the net.Error interface. +func (e ErrNotMatched) Temporary() bool { return true } + +// Timeout implements the net.Error interface. +func (e ErrNotMatched) Timeout() bool { return false } + +type errListenerClosed string + +func (e errListenerClosed) Error() string { return string(e) } +func (e errListenerClosed) Temporary() bool { return false } +func (e errListenerClosed) Timeout() bool { return false } + +// ErrListenerClosed is returned from muxListener.Accept when the underlying +// listener is closed. +var ErrListenerClosed = errListenerClosed("mux: listener closed") + +// ErrServerClosed is returned from muxListener.Accept when mux server is closed. +var ErrServerClosed = errors.New("mux: server closed") + +// for readability of readTimeout +var noTimeout time.Duration + +// New instantiates a new connection multiplexer. +func New(l net.Listener) CMux { + return &cMux{ + root: l, + bufLen: 1024, + errh: func(_ error) bool { return true }, + donec: make(chan struct{}), + readTimeout: noTimeout, + } +} + +// CMux is a multiplexer for network connections. +type CMux interface { + // Match returns a net.Listener that sees (i.e., accepts) only + // the connections matched by at least one of the matcher. + // + // The order used to call Match determines the priority of matchers. + Match(...Matcher) net.Listener + // MatchWithWriters returns a net.Listener that accepts only the + // connections that matched by at least of the matcher writers. + // + // Prefer Matchers over MatchWriters, since the latter can write on the + // connection before the actual handler. + // + // The order used to call Match determines the priority of matchers. + MatchWithWriters(...MatchWriter) net.Listener + // Serve starts multiplexing the listener. Serve blocks and perhaps + // should be invoked concurrently within a go routine. + Serve() error + // Closes cmux server and stops accepting any connections on listener + Close() + // HandleError registers an error handler that handles listener errors. + HandleError(ErrorHandler) + // sets a timeout for the read of matchers + SetReadTimeout(time.Duration) +} + +type matchersListener struct { + ss []MatchWriter + l muxListener +} + +type cMux struct { + root net.Listener + bufLen int + errh ErrorHandler + sls []matchersListener + readTimeout time.Duration + donec chan struct{} + mu sync.Mutex +} + +func matchersToMatchWriters(matchers []Matcher) []MatchWriter { + mws := make([]MatchWriter, 0, len(matchers)) + for _, m := range matchers { + cm := m + mws = append(mws, func(w io.Writer, r io.Reader) bool { + return cm(r) + }) + } + return mws +} + +func (m *cMux) Match(matchers ...Matcher) net.Listener { + mws := matchersToMatchWriters(matchers) + return m.MatchWithWriters(mws...) +} + +func (m *cMux) MatchWithWriters(matchers ...MatchWriter) net.Listener { + ml := muxListener{ + Listener: m.root, + connc: make(chan net.Conn, m.bufLen), + donec: make(chan struct{}), + } + m.sls = append(m.sls, matchersListener{ss: matchers, l: ml}) + return ml +} + +func (m *cMux) SetReadTimeout(t time.Duration) { + m.readTimeout = t +} + +func (m *cMux) Serve() error { + var wg sync.WaitGroup + + defer func() { + m.closeDoneChans() + wg.Wait() + + for _, sl := range m.sls { + close(sl.l.connc) + // Drain the connections enqueued for the listener. + for c := range sl.l.connc { + _ = c.Close() + } + } + }() + + for { + c, err := m.root.Accept() + if err != nil { + if !m.handleErr(err) { + return err + } + continue + } + + wg.Add(1) + go m.serve(c, m.donec, &wg) + } +} + +func (m *cMux) serve(c net.Conn, donec <-chan struct{}, wg *sync.WaitGroup) { + defer wg.Done() + + muc := newMuxConn(c) + if m.readTimeout > noTimeout { + _ = c.SetReadDeadline(time.Now().Add(m.readTimeout)) + } + for _, sl := range m.sls { + for _, s := range sl.ss { + matched := s(muc.Conn, muc.startSniffing()) + if matched { + muc.doneSniffing() + if m.readTimeout > noTimeout { + _ = c.SetReadDeadline(time.Time{}) + } + select { + case sl.l.connc <- muc: + case <-donec: + _ = c.Close() + } + return + } + } + } + + _ = c.Close() + err := ErrNotMatched{c: c} + if !m.handleErr(err) { + _ = m.root.Close() + } +} + +func (m *cMux) Close() { + m.closeDoneChans() +} + +func (m *cMux) closeDoneChans() { + m.mu.Lock() + defer m.mu.Unlock() + + select { + case <-m.donec: + // Already closed. Don't close again + default: + close(m.donec) + } + for _, sl := range m.sls { + select { + case <-sl.l.donec: + // Already closed. Don't close again + default: + close(sl.l.donec) + } + } +} + +func (m *cMux) HandleError(h ErrorHandler) { + m.errh = h +} + +func (m *cMux) handleErr(err error) bool { + if !m.errh(err) { + return false + } + + if ne, ok := err.(net.Error); ok { + return ne.Temporary() + } + + return false +} + +type muxListener struct { + net.Listener + connc chan net.Conn + donec chan struct{} +} + +func (l muxListener) Accept() (net.Conn, error) { + select { + case c, ok := <-l.connc: + if !ok { + return nil, ErrListenerClosed + } + return c, nil + case <-l.donec: + return nil, ErrServerClosed + } +} + +// MuxConn wraps a net.Conn and provides transparent sniffing of connection data. +type MuxConn struct { + net.Conn + buf bufferedReader +} + +func newMuxConn(c net.Conn) *MuxConn { + return &MuxConn{ + Conn: c, + buf: bufferedReader{source: c}, + } +} + +// From the io.Reader documentation: +// +// When Read encounters an error or end-of-file condition after +// successfully reading n > 0 bytes, it returns the number of +// bytes read. It may return the (non-nil) error from the same call +// or return the error (and n == 0) from a subsequent call. +// An instance of this general case is that a Reader returning +// a non-zero number of bytes at the end of the input stream may +// return either err == EOF or err == nil. The next Read should +// return 0, EOF. +func (m *MuxConn) Read(p []byte) (int, error) { + return m.buf.Read(p) +} + +func (m *MuxConn) startSniffing() io.Reader { + m.buf.reset(true) + return &m.buf +} + +func (m *MuxConn) doneSniffing() { + m.buf.reset(false) +} diff --git a/vendor/github.com/soheilhy/cmux/doc.go b/vendor/github.com/soheilhy/cmux/doc.go new file mode 100644 index 000000000000..aaa8f3158998 --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/doc.go @@ -0,0 +1,18 @@ +// Copyright 2016 The CMux Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. + +// Package cmux is a library to multiplex network connections based on +// their payload. Using cmux, you can serve different protocols from the +// same listener. +package cmux diff --git a/vendor/github.com/soheilhy/cmux/matchers.go b/vendor/github.com/soheilhy/cmux/matchers.go new file mode 100644 index 000000000000..878ae98cc3cc --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/matchers.go @@ -0,0 +1,267 @@ +// Copyright 2016 The CMux Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. + +package cmux + +import ( + "bufio" + "crypto/tls" + "io" + "io/ioutil" + "net/http" + "strings" + + "golang.org/x/net/http2" + "golang.org/x/net/http2/hpack" +) + +// Any is a Matcher that matches any connection. +func Any() Matcher { + return func(r io.Reader) bool { return true } +} + +// PrefixMatcher returns a matcher that matches a connection if it +// starts with any of the strings in strs. +func PrefixMatcher(strs ...string) Matcher { + pt := newPatriciaTreeString(strs...) + return pt.matchPrefix +} + +func prefixByteMatcher(list ...[]byte) Matcher { + pt := newPatriciaTree(list...) + return pt.matchPrefix +} + +var defaultHTTPMethods = []string{ + "OPTIONS", + "GET", + "HEAD", + "POST", + "PUT", + "DELETE", + "TRACE", + "CONNECT", +} + +// HTTP1Fast only matches the methods in the HTTP request. +// +// This matcher is very optimistic: if it returns true, it does not mean that +// the request is a valid HTTP response. If you want a correct but slower HTTP1 +// matcher, use HTTP1 instead. +func HTTP1Fast(extMethods ...string) Matcher { + return PrefixMatcher(append(defaultHTTPMethods, extMethods...)...) +} + +// TLS matches HTTPS requests. +// +// By default, any TLS handshake packet is matched. An optional whitelist +// of versions can be passed in to restrict the matcher, for example: +// TLS(tls.VersionTLS11, tls.VersionTLS12) +func TLS(versions ...int) Matcher { + if len(versions) == 0 { + versions = []int{ + tls.VersionSSL30, + tls.VersionTLS10, + tls.VersionTLS11, + tls.VersionTLS12, + } + } + prefixes := [][]byte{} + for _, v := range versions { + prefixes = append(prefixes, []byte{22, byte(v >> 8 & 0xff), byte(v & 0xff)}) + } + return prefixByteMatcher(prefixes...) +} + +const maxHTTPRead = 4096 + +// HTTP1 parses the first line or upto 4096 bytes of the request to see if +// the conection contains an HTTP request. +func HTTP1() Matcher { + return func(r io.Reader) bool { + br := bufio.NewReader(&io.LimitedReader{R: r, N: maxHTTPRead}) + l, part, err := br.ReadLine() + if err != nil || part { + return false + } + + _, _, proto, ok := parseRequestLine(string(l)) + if !ok { + return false + } + + v, _, ok := http.ParseHTTPVersion(proto) + return ok && v == 1 + } +} + +// grabbed from net/http. +func parseRequestLine(line string) (method, uri, proto string, ok bool) { + s1 := strings.Index(line, " ") + s2 := strings.Index(line[s1+1:], " ") + if s1 < 0 || s2 < 0 { + return + } + s2 += s1 + 1 + return line[:s1], line[s1+1 : s2], line[s2+1:], true +} + +// HTTP2 parses the frame header of the first frame to detect whether the +// connection is an HTTP2 connection. +func HTTP2() Matcher { + return hasHTTP2Preface +} + +// HTTP1HeaderField returns a matcher matching the header fields of the first +// request of an HTTP 1 connection. +func HTTP1HeaderField(name, value string) Matcher { + return func(r io.Reader) bool { + return matchHTTP1Field(r, name, func(gotValue string) bool { + return gotValue == value + }) + } +} + +// HTTP1HeaderFieldPrefix returns a matcher matching the header fields of the +// first request of an HTTP 1 connection. If the header with key name has a +// value prefixed with valuePrefix, this will match. +func HTTP1HeaderFieldPrefix(name, valuePrefix string) Matcher { + return func(r io.Reader) bool { + return matchHTTP1Field(r, name, func(gotValue string) bool { + return strings.HasPrefix(gotValue, valuePrefix) + }) + } +} + +// HTTP2HeaderField returns a matcher matching the header fields of the first +// headers frame. +func HTTP2HeaderField(name, value string) Matcher { + return func(r io.Reader) bool { + return matchHTTP2Field(ioutil.Discard, r, name, func(gotValue string) bool { + return gotValue == value + }) + } +} + +// HTTP2HeaderFieldPrefix returns a matcher matching the header fields of the +// first headers frame. If the header with key name has a value prefixed with +// valuePrefix, this will match. +func HTTP2HeaderFieldPrefix(name, valuePrefix string) Matcher { + return func(r io.Reader) bool { + return matchHTTP2Field(ioutil.Discard, r, name, func(gotValue string) bool { + return strings.HasPrefix(gotValue, valuePrefix) + }) + } +} + +// HTTP2MatchHeaderFieldSendSettings matches the header field and writes the +// settings to the server. Prefer HTTP2HeaderField over this one, if the client +// does not block on receiving a SETTING frame. +func HTTP2MatchHeaderFieldSendSettings(name, value string) MatchWriter { + return func(w io.Writer, r io.Reader) bool { + return matchHTTP2Field(w, r, name, func(gotValue string) bool { + return gotValue == value + }) + } +} + +// HTTP2MatchHeaderFieldPrefixSendSettings matches the header field prefix +// and writes the settings to the server. Prefer HTTP2HeaderFieldPrefix over +// this one, if the client does not block on receiving a SETTING frame. +func HTTP2MatchHeaderFieldPrefixSendSettings(name, valuePrefix string) MatchWriter { + return func(w io.Writer, r io.Reader) bool { + return matchHTTP2Field(w, r, name, func(gotValue string) bool { + return strings.HasPrefix(gotValue, valuePrefix) + }) + } +} + +func hasHTTP2Preface(r io.Reader) bool { + var b [len(http2.ClientPreface)]byte + last := 0 + + for { + n, err := r.Read(b[last:]) + if err != nil { + return false + } + + last += n + eq := string(b[:last]) == http2.ClientPreface[:last] + if last == len(http2.ClientPreface) { + return eq + } + if !eq { + return false + } + } +} + +func matchHTTP1Field(r io.Reader, name string, matches func(string) bool) (matched bool) { + req, err := http.ReadRequest(bufio.NewReader(r)) + if err != nil { + return false + } + + return matches(req.Header.Get(name)) +} + +func matchHTTP2Field(w io.Writer, r io.Reader, name string, matches func(string) bool) (matched bool) { + if !hasHTTP2Preface(r) { + return false + } + + done := false + framer := http2.NewFramer(w, r) + hdec := hpack.NewDecoder(uint32(4<<10), func(hf hpack.HeaderField) { + if hf.Name == name { + done = true + if matches(hf.Value) { + matched = true + } + } + }) + for { + f, err := framer.ReadFrame() + if err != nil { + return false + } + + switch f := f.(type) { + case *http2.SettingsFrame: + // Sender acknoweldged the SETTINGS frame. No need to write + // SETTINGS again. + if f.IsAck() { + break + } + if err := framer.WriteSettings(); err != nil { + return false + } + case *http2.ContinuationFrame: + if _, err := hdec.Write(f.HeaderBlockFragment()); err != nil { + return false + } + done = done || f.FrameHeader.Flags&http2.FlagHeadersEndHeaders != 0 + case *http2.HeadersFrame: + if _, err := hdec.Write(f.HeaderBlockFragment()); err != nil { + return false + } + done = done || f.FrameHeader.Flags&http2.FlagHeadersEndHeaders != 0 + } + + if done { + return matched + } + } +} diff --git a/vendor/github.com/soheilhy/cmux/patricia.go b/vendor/github.com/soheilhy/cmux/patricia.go new file mode 100644 index 000000000000..c3e3d85bdeaf --- /dev/null +++ b/vendor/github.com/soheilhy/cmux/patricia.go @@ -0,0 +1,179 @@ +// Copyright 2016 The CMux Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. + +package cmux + +import ( + "bytes" + "io" +) + +// patriciaTree is a simple patricia tree that handles []byte instead of string +// and cannot be changed after instantiation. +type patriciaTree struct { + root *ptNode + maxDepth int // max depth of the tree. +} + +func newPatriciaTree(bs ...[]byte) *patriciaTree { + max := 0 + for _, b := range bs { + if max < len(b) { + max = len(b) + } + } + return &patriciaTree{ + root: newNode(bs), + maxDepth: max + 1, + } +} + +func newPatriciaTreeString(strs ...string) *patriciaTree { + b := make([][]byte, len(strs)) + for i, s := range strs { + b[i] = []byte(s) + } + return newPatriciaTree(b...) +} + +func (t *patriciaTree) matchPrefix(r io.Reader) bool { + buf := make([]byte, t.maxDepth) + n, _ := io.ReadFull(r, buf) + return t.root.match(buf[:n], true) +} + +func (t *patriciaTree) match(r io.Reader) bool { + buf := make([]byte, t.maxDepth) + n, _ := io.ReadFull(r, buf) + return t.root.match(buf[:n], false) +} + +type ptNode struct { + prefix []byte + next map[byte]*ptNode + terminal bool +} + +func newNode(strs [][]byte) *ptNode { + if len(strs) == 0 { + return &ptNode{ + prefix: []byte{}, + terminal: true, + } + } + + if len(strs) == 1 { + return &ptNode{ + prefix: strs[0], + terminal: true, + } + } + + p, strs := splitPrefix(strs) + n := &ptNode{ + prefix: p, + } + + nexts := make(map[byte][][]byte) + for _, s := range strs { + if len(s) == 0 { + n.terminal = true + continue + } + nexts[s[0]] = append(nexts[s[0]], s[1:]) + } + + n.next = make(map[byte]*ptNode) + for first, rests := range nexts { + n.next[first] = newNode(rests) + } + + return n +} + +func splitPrefix(bss [][]byte) (prefix []byte, rest [][]byte) { + if len(bss) == 0 || len(bss[0]) == 0 { + return prefix, bss + } + + if len(bss) == 1 { + return bss[0], [][]byte{{}} + } + + for i := 0; ; i++ { + var cur byte + eq := true + for j, b := range bss { + if len(b) <= i { + eq = false + break + } + + if j == 0 { + cur = b[i] + continue + } + + if cur != b[i] { + eq = false + break + } + } + + if !eq { + break + } + + prefix = append(prefix, cur) + } + + rest = make([][]byte, 0, len(bss)) + for _, b := range bss { + rest = append(rest, b[len(prefix):]) + } + + return prefix, rest +} + +func (n *ptNode) match(b []byte, prefix bool) bool { + l := len(n.prefix) + if l > 0 { + if l > len(b) { + l = len(b) + } + if !bytes.Equal(b[:l], n.prefix) { + return false + } + } + + if n.terminal && (prefix || len(n.prefix) == len(b)) { + return true + } + + if l >= len(b) { + return false + } + + nextN, ok := n.next[b[l]] + if !ok { + return false + } + + if l == len(b) { + b = b[l:l] + } else { + b = b[l+1:] + } + return nextN.match(b, prefix) +} diff --git a/vendor/github.com/weaveworks/common/httpgrpc/server/server.go b/vendor/github.com/weaveworks/common/httpgrpc/server/server.go index 404d53f33a80..25377cc5e7f7 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/server/server.go +++ b/vendor/github.com/weaveworks/common/httpgrpc/server/server.go @@ -9,13 +9,13 @@ import ( "net/http/httptest" "net/url" "strings" - "sync" otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" - "github.com/sercand/kuberesolver" + "github.com/sercand/kuberesolver/v4" "golang.org/x/net/context" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" "github.com/weaveworks/common/httpgrpc" "github.com/weaveworks/common/logging" @@ -70,12 +70,8 @@ func (s Server) Handle(ctx context.Context, r *httpgrpc.HTTPRequest) (*httpgrpc. // Client is a http.Handler that forwards the request over gRPC. type Client struct { - mtx sync.RWMutex - service string - namespace string - port string - client httpgrpc.HTTPClient - conn *grpc.ClientConn + client httpgrpc.HTTPClient + conn *grpc.ClientConn } // ParseURL deals with direct:// style URLs, as well as kubernetes:// urls. @@ -134,7 +130,7 @@ func NewClient(address string) (*Client, error) { dialOptions := []grpc.DialOption{ grpc.WithDefaultServiceConfig(grpcServiceConfig), - grpc.WithInsecure(), + grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithChainUnaryInterceptor( otgrpc.OpenTracingClientInterceptor(opentracing.GlobalTracer()), middleware.ClientUserHeaderInterceptor, diff --git a/vendor/github.com/weaveworks/common/middleware/errorhandler.go b/vendor/github.com/weaveworks/common/middleware/errorhandler.go index 0f7ab6141f37..ab2354fa163c 100644 --- a/vendor/github.com/weaveworks/common/middleware/errorhandler.go +++ b/vendor/github.com/weaveworks/common/middleware/errorhandler.go @@ -51,6 +51,11 @@ func newErrorInterceptor(w http.ResponseWriter, code int) *errorInterceptor { return &i } +// Unwrap method is used by http.ResponseController to get access to original http.ResponseWriter. +func (i *errorInterceptor) Unwrap() http.ResponseWriter { + return i.originalWriter +} + // Header implements http.ResponseWriter func (i *errorInterceptor) Header() http.Header { return i.headers diff --git a/vendor/github.com/weaveworks/common/middleware/logging.go b/vendor/github.com/weaveworks/common/middleware/logging.go index 780c72be56d6..eb07466e7c75 100644 --- a/vendor/github.com/weaveworks/common/middleware/logging.go +++ b/vendor/github.com/weaveworks/common/middleware/logging.go @@ -18,6 +18,31 @@ type Log struct { LogRequestHeaders bool // LogRequestHeaders true -> dump http headers at debug log level LogRequestAtInfoLevel bool // LogRequestAtInfoLevel true -> log requests at info log level SourceIPs *SourceIPExtractor + HttpHeadersToExclude map[string]bool +} + +var defaultExcludedHeaders = map[string]bool{ + "Cookie": true, + "X-Csrf-Token": true, + "Authorization": true, +} + +func NewLogMiddleware(log logging.Interface, logRequestHeaders bool, logRequestAtInfoLevel bool, sourceIPs *SourceIPExtractor, headersList []string) Log { + httpHeadersToExclude := map[string]bool{} + for header := range defaultExcludedHeaders { + httpHeadersToExclude[header] = true + } + for _, header := range headersList { + httpHeadersToExclude[header] = true + } + + return Log{ + Log: log, + LogRequestHeaders: logRequestHeaders, + LogRequestAtInfoLevel: logRequestAtInfoLevel, + SourceIPs: sourceIPs, + HttpHeadersToExclude: httpHeadersToExclude, + } } // logWithRequest information from the request and context as fields. @@ -45,7 +70,7 @@ func (l Log) Wrap(next http.Handler) http.Handler { uri := r.RequestURI // capture the URI before running next, as it may get rewritten requestLog := l.logWithRequest(r) // Log headers before running 'next' in case other interceptors change the data. - headers, err := dumpRequest(r) + headers, err := dumpRequest(r, l.HttpHeadersToExclude) if err != nil { headers = nil requestLog.Errorf("Could not dump request headers: %v", err) @@ -95,15 +120,15 @@ var Logging = Log{ Log: logging.Global(), } -func dumpRequest(req *http.Request) ([]byte, error) { +func dumpRequest(req *http.Request, httpHeadersToExclude map[string]bool) ([]byte, error) { var b bytes.Buffer + // In case users initialize the Log middleware using the exported struct, skip the default headers anyway + if len(httpHeadersToExclude) == 0 { + httpHeadersToExclude = defaultExcludedHeaders + } // Exclude some headers for security, or just that we don't need them when debugging - err := req.Header.WriteSubset(&b, map[string]bool{ - "Cookie": true, - "X-Csrf-Token": true, - "Authorization": true, - }) + err := req.Header.WriteSubset(&b, httpHeadersToExclude) if err != nil { return nil, err } diff --git a/vendor/github.com/weaveworks/common/middleware/response.go b/vendor/github.com/weaveworks/common/middleware/response.go index 61fc4a722dda..2655003c88fc 100644 --- a/vendor/github.com/weaveworks/common/middleware/response.go +++ b/vendor/github.com/weaveworks/common/middleware/response.go @@ -52,6 +52,11 @@ func newBadResponseLoggingWriter(rw http.ResponseWriter, buffer io.Writer) badRe return &b } +// Unwrap method is used by http.ResponseController to get access to original http.ResponseWriter. +func (b *nonFlushingBadResponseLoggingWriter) Unwrap() http.ResponseWriter { + return b.rw +} + // Header returns the header map that will be sent by WriteHeader. // Implements ResponseWriter. func (b *nonFlushingBadResponseLoggingWriter) Header() http.Header { diff --git a/vendor/github.com/weaveworks/common/server/server.go b/vendor/github.com/weaveworks/common/server/server.go index c2ced2a2f2a2..4026516f5eb0 100644 --- a/vendor/github.com/weaveworks/common/server/server.go +++ b/vendor/github.com/weaveworks/common/server/server.go @@ -8,6 +8,7 @@ import ( "net" "net/http" _ "net/http/pprof" // anonymous import to get the pprof handler registered + "strings" "time" "github.com/gorilla/mux" @@ -16,6 +17,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/exporter-toolkit/web" + "github.com/soheilhy/cmux" "golang.org/x/net/context" "golang.org/x/net/netutil" "google.golang.org/grpc" @@ -59,7 +61,13 @@ type TLSConfig struct { // Config for a Server type Config struct { - MetricsNamespace string `yaml:"-"` + MetricsNamespace string `yaml:"-"` + // Set to > 1 to add native histograms to requestDuration. + // See documentation for NativeHistogramBucketFactor in + // https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#HistogramOpts + // for details. A generally useful value is 1.1. + MetricsNativeHistogramFactor float64 `yaml:"-"` + HTTPListenNetwork string `yaml:"http_listen_network"` HTTPListenAddress string `yaml:"http_listen_address"` HTTPListenPort int `yaml:"http_listen_port"` @@ -89,6 +97,7 @@ type Config struct { HTTPMiddleware []middleware.Interface `yaml:"-"` Router *mux.Router `yaml:"-"` DoNotAddDefaultHTTPMiddleware bool `yaml:"-"` + RouteHTTPToGRPC bool `yaml:"-"` GPRCServerMaxRecvMsgSize int `yaml:"grpc_server_max_recv_msg_size"` GRPCServerMaxSendMsgSize int `yaml:"grpc_server_max_send_msg_size"` @@ -101,13 +110,15 @@ type Config struct { GRPCServerMinTimeBetweenPings time.Duration `yaml:"grpc_server_min_time_between_pings"` GRPCServerPingWithoutStreamAllowed bool `yaml:"grpc_server_ping_without_stream_allowed"` - LogFormat logging.Format `yaml:"log_format"` - LogLevel logging.Level `yaml:"log_level"` - Log logging.Interface `yaml:"-"` - LogSourceIPs bool `yaml:"log_source_ips_enabled"` - LogSourceIPsHeader string `yaml:"log_source_ips_header"` - LogSourceIPsRegex string `yaml:"log_source_ips_regex"` - LogRequestAtInfoLevel bool `yaml:"log_request_at_info_level_enabled"` + LogFormat logging.Format `yaml:"log_format"` + LogLevel logging.Level `yaml:"log_level"` + Log logging.Interface `yaml:"-"` + LogSourceIPs bool `yaml:"log_source_ips_enabled"` + LogSourceIPsHeader string `yaml:"log_source_ips_header"` + LogSourceIPsRegex string `yaml:"log_source_ips_regex"` + LogRequestHeaders bool `yaml:"log_request_headers"` + LogRequestAtInfoLevel bool `yaml:"log_request_at_info_level_enabled"` + LogRequestExcludeHeadersList string `yaml:"log_request_exclude_headers_list"` // If not set, default signal handler is used. SignalHandler SignalHandler `yaml:"-"` @@ -162,7 +173,9 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) { f.BoolVar(&cfg.LogSourceIPs, "server.log-source-ips-enabled", false, "Optionally log the source IPs.") f.StringVar(&cfg.LogSourceIPsHeader, "server.log-source-ips-header", "", "Header field storing the source IPs. Only used if server.log-source-ips-enabled is true. If not set the default Forwarded, X-Real-IP and X-Forwarded-For headers are used") f.StringVar(&cfg.LogSourceIPsRegex, "server.log-source-ips-regex", "", "Regex for matching the source IPs. Only used if server.log-source-ips-enabled is true. If not set the default Forwarded, X-Real-IP and X-Forwarded-For headers are used") - f.BoolVar(&cfg.LogRequestAtInfoLevel, "server.log-request-at-info-level-enabled", false, "Optionally log requests at info level instead of debug level.") + f.BoolVar(&cfg.LogRequestHeaders, "server.log-request-headers", false, "Optionally log request headers.") + f.StringVar(&cfg.LogRequestExcludeHeadersList, "server.log-request-headers-exclude-list", "", "Comma separated list of headers to exclude from loggin. Only used if server.log-request-headers is true.") + f.BoolVar(&cfg.LogRequestAtInfoLevel, "server.log-request-at-info-level-enabled", false, "Optionally log requests at info level instead of debug level. Applies to request headers as well if server.log-request-headers is enabled.") } // Server wraps a HTTP and gRPC server, and some common initialization. @@ -174,6 +187,13 @@ type Server struct { grpcListener net.Listener httpListener net.Listener + // These fields are used to support grpc over the http server + // if RouteHTTPToGRPC is set. the fields are kept here + // so they can be initialized in New() and started in Run() + grpchttpmux cmux.CMux + grpcOnHTTPListener net.Listener + GRPCOnHTTPServer *grpc.Server + HTTP *mux.Router HTTPServer *http.Server GRPC *grpc.Server @@ -231,6 +251,15 @@ func New(cfg Config) (*Server, error) { httpListener = netutil.LimitListener(httpListener, cfg.HTTPConnLimit) } + var grpcOnHTTPListener net.Listener + var grpchttpmux cmux.CMux + if cfg.RouteHTTPToGRPC { + grpchttpmux = cmux.New(httpListener) + + httpListener = grpchttpmux.Match(cmux.HTTP1Fast()) + grpcOnHTTPListener = grpchttpmux.Match(cmux.HTTP2()) + } + network = cfg.GRPCListenNetwork if network == "" { network = DefaultNetwork @@ -289,10 +318,13 @@ func New(cfg Config) (*Server, error) { // Prometheus histograms for requests. requestDuration := prometheus.NewHistogramVec(prometheus.HistogramOpts{ - Namespace: cfg.MetricsNamespace, - Name: "request_duration_seconds", - Help: "Time (in seconds) spent serving HTTP requests.", - Buckets: instrument.DefBuckets, + Namespace: cfg.MetricsNamespace, + Name: "request_duration_seconds", + Help: "Time (in seconds) spent serving HTTP requests.", + Buckets: instrument.DefBuckets, + NativeHistogramBucketFactor: cfg.MetricsNativeHistogramFactor, + NativeHistogramMaxBucketNumber: 100, + NativeHistogramMinResetDuration: time.Hour, }, []string{"method", "route", "status_code", "ws"}) reg.MustRegister(requestDuration) @@ -370,6 +402,7 @@ func New(cfg Config) (*Server, error) { grpcOptions = append(grpcOptions, grpc.Creds(grpcCreds)) } grpcServer := grpc.NewServer(grpcOptions...) + grpcOnHttpServer := grpc.NewServer(grpcOptions...) // Setup HTTP server var router *mux.Router @@ -400,11 +433,7 @@ func New(cfg Config) (*Server, error) { RouteMatcher: router, SourceIPs: sourceIPs, }, - middleware.Log{ - Log: log, - SourceIPs: sourceIPs, - LogRequestAtInfoLevel: cfg.LogRequestAtInfoLevel, - }, + middleware.NewLogMiddleware(log, cfg.LogRequestHeaders, cfg.LogRequestAtInfoLevel, sourceIPs, strings.Split(cfg.LogRequestExcludeHeadersList, ",")), middleware.Instrument{ RouteMatcher: router, Duration: requestDuration, @@ -413,7 +442,7 @@ func New(cfg Config) (*Server, error) { InflightRequests: inflightRequests, }, } - httpMiddleware := []middleware.Interface{} + var httpMiddleware []middleware.Interface if cfg.DoNotAddDefaultHTTPMiddleware { httpMiddleware = cfg.HTTPMiddleware } else { @@ -436,17 +465,20 @@ func New(cfg Config) (*Server, error) { } return &Server{ - cfg: cfg, - httpListener: httpListener, - grpcListener: grpcListener, - handler: handler, - - HTTP: router, - HTTPServer: httpServer, - GRPC: grpcServer, - Log: log, - Registerer: reg, - Gatherer: gatherer, + cfg: cfg, + httpListener: httpListener, + grpcListener: grpcListener, + grpcOnHTTPListener: grpcOnHTTPListener, + handler: handler, + grpchttpmux: grpchttpmux, + + HTTP: router, + HTTPServer: httpServer, + GRPC: grpcServer, + GRPCOnHTTPServer: grpcOnHttpServer, + Log: log, + Registerer: reg, + Gatherer: gatherer, }, nil } @@ -499,19 +531,37 @@ func (s *Server) Run() error { go func() { err := s.GRPC.Serve(s.grpcListener) - if err == grpc.ErrServerStopped { - err = nil - } - - select { - case errChan <- err: - default: - } + handleGRPCError(err, errChan) }() + // grpchttpmux will only be set if grpchttpmux RouteHTTPToGRPC is set + if s.grpchttpmux != nil { + go func() { + err := s.grpchttpmux.Serve() + handleGRPCError(err, errChan) + }() + go func() { + err := s.GRPCOnHTTPServer.Serve(s.grpcOnHTTPListener) + handleGRPCError(err, errChan) + }() + } + return <-errChan } +// handleGRPCError consolidates GRPC Server error handling by sending +// any error to errChan except for grpc.ErrServerStopped which is ignored. +func handleGRPCError(err error, errChan chan error) { + if err == grpc.ErrServerStopped { + err = nil + } + + select { + case errChan <- err: + default: + } +} + // HTTPListenAddr exposes `net.Addr` that `Server` is listening to for HTTP connections. func (s *Server) HTTPListenAddr() net.Addr { return s.httpListener.Addr() diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md index 1473e1296d09..781770c20464 100644 --- a/vendor/golang.org/x/oauth2/README.md +++ b/vendor/golang.org/x/oauth2/README.md @@ -19,7 +19,7 @@ See pkg.go.dev for further documentation and examples. * [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) * [pkg.go.dev/golang.org/x/oauth2/google](https://pkg.go.dev/golang.org/x/oauth2/google) -## Policy for new packages +## Policy for new endpoints We no longer accept new provider-specific packages in this repo if all they do is add a single endpoint variable. If you just want to add a @@ -29,8 +29,12 @@ package. ## Report Issues / Send Patches -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - The main issue tracker for the oauth2 repository is located at https://github.com/golang/oauth2/issues. + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. In particular: + +* Excluding trivial changes, all contributions should be connected to an existing issue. +* API changes must go through the [change proposal process](https://go.dev/s/proposal-process) before they can be accepted. +* The code owners are listed at [dev.golang.org/owners](https://dev.golang.org/owners#:~:text=x/oauth2). diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go index db6b19e93dc8..b3e8783cc594 100644 --- a/vendor/golang.org/x/oauth2/google/default.go +++ b/vendor/golang.org/x/oauth2/google/default.go @@ -13,12 +13,15 @@ import ( "os" "path/filepath" "runtime" + "time" "cloud.google.com/go/compute/metadata" "golang.org/x/oauth2" "golang.org/x/oauth2/authhandler" ) +const adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc" + // Credentials holds Google credentials, including "Application Default Credentials". // For more details, see: // https://developers.google.com/accounts/docs/application-default-credentials @@ -66,6 +69,14 @@ type CredentialsParams struct { // The OAuth2 TokenURL default override. This value overrides the default TokenURL, // unless explicitly specified by the credentials config file. Optional. TokenURL string + + // EarlyTokenRefresh is the amount of time before a token expires that a new + // token will be preemptively fetched. If unset the default value is 10 + // seconds. + // + // Note: This option is currently only respected when using credentials + // fetched from the GCE metadata server. + EarlyTokenRefresh time.Duration } func (params CredentialsParams) deepCopy() CredentialsParams { @@ -153,13 +164,12 @@ func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsPar id, _ := metadata.ProjectID() return &Credentials{ ProjectID: id, - TokenSource: ComputeTokenSource("", params.Scopes...), + TokenSource: computeTokenSource("", params.EarlyTokenRefresh, params.Scopes...), }, nil } // None are found; return helpful error. - const url = "https://developers.google.com/accounts/docs/application-default-credentials" - return nil, fmt.Errorf("google: could not find default credentials. See %v for more information.", url) + return nil, fmt.Errorf("google: could not find default credentials. See %v for more information", adcSetupURL) } // FindDefaultCredentials invokes FindDefaultCredentialsWithParams with the specified scopes. diff --git a/vendor/golang.org/x/oauth2/google/doc.go b/vendor/golang.org/x/oauth2/google/doc.go index 8a3349fc2ceb..ca717634a3f9 100644 --- a/vendor/golang.org/x/oauth2/google/doc.go +++ b/vendor/golang.org/x/oauth2/google/doc.go @@ -26,7 +26,7 @@ // // Using workload identity federation, your application can access Google Cloud // resources from Amazon Web Services (AWS), Microsoft Azure or any identity -// provider that supports OpenID Connect (OIDC). +// provider that supports OpenID Connect (OIDC) or SAML 2.0. // Traditionally, applications running outside Google Cloud have used service // account keys to access Google Cloud resources. Using identity federation, // you can allow your workload to impersonate a service account. @@ -36,26 +36,70 @@ // Follow the detailed instructions on how to configure Workload Identity Federation // in various platforms: // -// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws -// Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure -// OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc +// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#aws +// Microsoft Azure: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#azure +// OIDC identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#oidc +// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#saml // // For OIDC and SAML providers, the library can retrieve tokens in three ways: // from a local file location (file-sourced credentials), from a server // (URL-sourced credentials), or from a local executable (executable-sourced // credentials). // For file-sourced credentials, a background process needs to be continuously -// refreshing the file location with a new OIDC token prior to expiration. +// refreshing the file location with a new OIDC/SAML token prior to expiration. // For tokens with one hour lifetimes, the token needs to be updated in the file // every hour. The token can be stored directly as plain text or in JSON format. // For URL-sourced credentials, a local server needs to host a GET endpoint to -// return the OIDC token. The response can be in plain text or JSON. +// return the OIDC/SAML token. The response can be in plain text or JSON. // Additional required request headers can also be specified. // For executable-sourced credentials, an application needs to be available to -// output the OIDC token and other information in a JSON format. +// output the OIDC/SAML token and other information in a JSON format. // For more information on how these work (and how to implement // executable-sourced credentials), please check out: -// https://cloud.google.com/iam/docs/using-workload-identity-federation#oidc +// https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration +// +// Note that this library does not perform any validation on the token_url, token_info_url, +// or service_account_impersonation_url fields of the credential configuration. +// It is not recommended to use a credential configuration that you did not generate with +// the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. +// +// # Workforce Identity Federation +// +// Workforce identity federation lets you use an external identity provider (IdP) to +// authenticate and authorize a workforce—a group of users, such as employees, partners, +// and contractors—using IAM, so that the users can access Google Cloud services. +// Workforce identity federation extends Google Cloud's identity capabilities to support +// syncless, attribute-based single sign on. +// +// With workforce identity federation, your workforce can access Google Cloud resources +// using an external identity provider (IdP) that supports OpenID Connect (OIDC) or +// SAML 2.0 such as Azure Active Directory (Azure AD), Active Directory Federation +// Services (AD FS), Okta, and others. +// +// Follow the detailed instructions on how to configure Workload Identity Federation +// in various platforms: +// +// Azure AD: https://cloud.google.com/iam/docs/workforce-sign-in-azure-ad +// Okta: https://cloud.google.com/iam/docs/workforce-sign-in-okta +// OIDC identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#oidc +// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#saml +// +// For workforce identity federation, the library can retrieve tokens in three ways: +// from a local file location (file-sourced credentials), from a server +// (URL-sourced credentials), or from a local executable (executable-sourced +// credentials). +// For file-sourced credentials, a background process needs to be continuously +// refreshing the file location with a new OIDC/SAML token prior to expiration. +// For tokens with one hour lifetimes, the token needs to be updated in the file +// every hour. The token can be stored directly as plain text or in JSON format. +// For URL-sourced credentials, a local server needs to host a GET endpoint to +// return the OIDC/SAML token. The response can be in plain text or JSON. +// Additional required request headers can also be specified. +// For executable-sourced credentials, an application needs to be available to +// output the OIDC/SAML token and other information in a JSON format. +// For more information on how these work (and how to implement +// executable-sourced credentials), please check out: +// https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in // // Note that this library does not perform any validation on the token_url, token_info_url, // or service_account_impersonation_url fields of the credential configuration. @@ -86,5 +130,4 @@ // same as the one obtained from the oauth2.Config returned from ConfigFromJSON or // JWTConfigFromJSON, but the Credentials may contain additional information // that is useful is some circumstances. -// package google // import "golang.org/x/oauth2/google" diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go index a1b629a2eb6b..cc1223889e2e 100644 --- a/vendor/golang.org/x/oauth2/google/google.go +++ b/vendor/golang.org/x/oauth2/google/google.go @@ -231,7 +231,11 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar // Further information about retrieving access tokens from the GCE metadata // server can be found at https://cloud.google.com/compute/docs/authentication. func ComputeTokenSource(account string, scope ...string) oauth2.TokenSource { - return oauth2.ReuseTokenSource(nil, computeSource{account: account, scopes: scope}) + return computeTokenSource(account, 0, scope...) +} + +func computeTokenSource(account string, earlyExpiry time.Duration, scope ...string) oauth2.TokenSource { + return oauth2.ReuseTokenSourceWithExpiry(nil, computeSource{account: account, scopes: scope}, earlyExpiry) } type computeSource struct { diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 291df5c833f9..9085fabe34ea 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -16,6 +16,7 @@ import ( "net/url" "strings" "sync" + "time" "golang.org/x/oauth2/internal" ) @@ -140,7 +141,7 @@ func SetAuthURLParam(key, value string) AuthCodeOption { // // State is a token to protect the user from CSRF attacks. You must // always provide a non-empty string and validate that it matches the -// the state query parameter on your redirect callback. +// state query parameter on your redirect callback. // See http://tools.ietf.org/html/rfc6749#section-10.12 for more info. // // Opts may include AccessTypeOnline or AccessTypeOffline, as well @@ -290,6 +291,8 @@ type reuseTokenSource struct { mu sync.Mutex // guards t t *Token + + expiryDelta time.Duration } // Token returns the current token if it's still valid, else will @@ -305,6 +308,7 @@ func (s *reuseTokenSource) Token() (*Token, error) { if err != nil { return nil, err } + t.expiryDelta = s.expiryDelta s.t = t return t, nil } @@ -379,3 +383,30 @@ func ReuseTokenSource(t *Token, src TokenSource) TokenSource { new: src, } } + +// ReuseTokenSource returns a TokenSource that acts in the same manner as the +// TokenSource returned by ReuseTokenSource, except the expiry buffer is +// configurable. The expiration time of a token is calculated as +// t.Expiry.Add(-earlyExpiry). +func ReuseTokenSourceWithExpiry(t *Token, src TokenSource, earlyExpiry time.Duration) TokenSource { + // Don't wrap a reuseTokenSource in itself. That would work, + // but cause an unnecessary number of mutex operations. + // Just build the equivalent one. + if rt, ok := src.(*reuseTokenSource); ok { + if t == nil { + // Just use it directly, but set the expiryDelta to earlyExpiry, + // so the behavior matches what the user expects. + rt.expiryDelta = earlyExpiry + return rt + } + src = rt.new + } + if t != nil { + t.expiryDelta = earlyExpiry + } + return &reuseTokenSource{ + t: t, + new: src, + expiryDelta: earlyExpiry, + } +} diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go index 822720341af1..7c64006de693 100644 --- a/vendor/golang.org/x/oauth2/token.go +++ b/vendor/golang.org/x/oauth2/token.go @@ -16,10 +16,10 @@ import ( "golang.org/x/oauth2/internal" ) -// expiryDelta determines how earlier a token should be considered +// defaultExpiryDelta determines how earlier a token should be considered // expired than its actual expiration time. It is used to avoid late // expirations due to client-server time mismatches. -const expiryDelta = 10 * time.Second +const defaultExpiryDelta = 10 * time.Second // Token represents the credentials used to authorize // the requests to access protected resources on the OAuth 2.0 @@ -52,6 +52,11 @@ type Token struct { // raw optionally contains extra metadata from the server // when updating a token. raw interface{} + + // expiryDelta is used to calculate when a token is considered + // expired, by subtracting from Expiry. If zero, defaultExpiryDelta + // is used. + expiryDelta time.Duration } // Type returns t.TokenType if non-empty, else "Bearer". @@ -127,6 +132,11 @@ func (t *Token) expired() bool { if t.Expiry.IsZero() { return false } + + expiryDelta := defaultExpiryDelta + if t.expiryDelta != 0 { + expiryDelta = t.expiryDelta + } return t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow()) } diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index 392b21fb2d8e..09d61dd1b55b 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -279,6 +279,14 @@ type PickResult struct { // type, Done may not be called. May be nil if the balancer does not wish // to be notified when the RPC completes. Done func(DoneInfo) + + // Metadata provides a way for LB policies to inject arbitrary per-call + // metadata. Any metadata returned here will be merged with existing + // metadata added by the client application. + // + // LB policies with child policies are responsible for propagating metadata + // injected by their children to the ClientConn, as part of Pick(). + Metatada metadata.MD } // TransientFailureError returns e. It exists for backward compatibility and diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go index dd15810d0aeb..6d698229a342 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go @@ -136,8 +136,8 @@ func (b *lbBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions) bal lb := &lbBalancer{ cc: newLBCacheClientConn(cc), - dialTarget: opt.Target.Endpoint, - target: opt.Target.Endpoint, + dialTarget: opt.Target.Endpoint(), + target: opt.Target.Endpoint(), opt: opt, fallbackTimeout: b.fallbackTimeout, doneCh: make(chan struct{}), diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go index dab1959418e1..e56006d7131a 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb_remote_balancer.go @@ -332,7 +332,7 @@ func (ccw *remoteBalancerCCWrapper) callRemoteBalancer(ctx context.Context) (bac lbClient := &loadBalancerClient{cc: ccw.cc} stream, err := lbClient.BalanceLoad(ctx, grpc.WaitForReady(true)) if err != nil { - return true, fmt.Errorf("grpclb: failed to perform RPC to the remote balancer %v", err) + return true, fmt.Errorf("grpclb: failed to perform RPC to the remote balancer: %v", err) } ccw.lb.mu.Lock() ccw.lb.remoteBalancerConnected = true diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 045668904519..d607d4e9e243 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -256,7 +256,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * if err != nil { return nil, err } - cc.authority, err = determineAuthority(cc.parsedTarget.Endpoint, cc.target, cc.dopts) + cc.authority, err = determineAuthority(cc.parsedTarget.Endpoint(), cc.target, cc.dopts) if err != nil { return nil, err } @@ -934,7 +934,7 @@ func (cc *ClientConn) healthCheckConfig() *healthCheckConfig { return cc.sc.healthCheckConfig } -func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, func(balancer.DoneInfo), error) { +func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, balancer.PickResult, error) { return cc.blockingpicker.pick(ctx, failfast, balancer.PickInfo{ Ctx: ctx, FullMethodName: method, @@ -1237,9 +1237,11 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne addr.ServerName = ac.cc.getServerName(addr) hctx, hcancel := context.WithCancel(ac.ctx) - onClose := grpcsync.OnceFunc(func() { + onClose := func(r transport.GoAwayReason) { ac.mu.Lock() defer ac.mu.Unlock() + // adjust params based on GoAwayReason + ac.adjustParams(r) if ac.state == connectivity.Shutdown { // Already shut down. tearDown() already cleared the transport and // canceled hctx via ac.ctx, and we expected this connection to be @@ -1260,19 +1262,13 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne // Always go idle and wait for the LB policy to initiate a new // connection attempt. ac.updateConnectivityState(connectivity.Idle, nil) - }) - onGoAway := func(r transport.GoAwayReason) { - ac.mu.Lock() - ac.adjustParams(r) - ac.mu.Unlock() - onClose() } connectCtx, cancel := context.WithDeadline(ac.ctx, connectDeadline) defer cancel() copts.ChannelzParentID = ac.channelzID - newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onGoAway, onClose) + newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onClose) if err != nil { if logger.V(2) { logger.Infof("Creating new client transport to %q: %v", addr, err) @@ -1380,7 +1376,7 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) { if status.Code(err) == codes.Unimplemented { channelz.Error(logger, ac.channelzID, "Subchannel health check is unimplemented at server side, thus health check is disabled") } else { - channelz.Errorf(logger, ac.channelzID, "HealthCheckFunc exits with unexpected error %v", err) + channelz.Errorf(logger, ac.channelzID, "Health checking failed: %v", err) } } }() @@ -1591,30 +1587,17 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { } // parseTarget uses RFC 3986 semantics to parse the given target into a -// resolver.Target struct containing scheme, authority and endpoint. Query +// resolver.Target struct containing scheme, authority and url. Query // params are stripped from the endpoint. func parseTarget(target string) (resolver.Target, error) { u, err := url.Parse(target) if err != nil { return resolver.Target{}, err } - // For targets of the form "[scheme]://[authority]/endpoint, the endpoint - // value returned from url.Parse() contains a leading "/". Although this is - // in accordance with RFC 3986, we do not want to break existing resolver - // implementations which expect the endpoint without the leading "/". So, we - // end up stripping the leading "/" here. But this will result in an - // incorrect parsing for something like "unix:///path/to/socket". Since we - // own the "unix" resolver, we can workaround in the unix resolver by using - // the `URL` field instead of the `Endpoint` field. - endpoint := u.Path - if endpoint == "" { - endpoint = u.Opaque - } - endpoint = strings.TrimPrefix(endpoint, "/") + return resolver.Target{ Scheme: u.Scheme, Authority: u.Host, - Endpoint: endpoint, URL: *u, }, nil } diff --git a/vendor/google.golang.org/grpc/credentials/oauth/oauth.go b/vendor/google.golang.org/grpc/credentials/oauth/oauth.go index c748fd21ce2b..d475cbc0894c 100644 --- a/vendor/google.golang.org/grpc/credentials/oauth/oauth.go +++ b/vendor/google.golang.org/grpc/credentials/oauth/oauth.go @@ -22,8 +22,8 @@ package oauth import ( "context" "fmt" - "io/ioutil" "net/url" + "os" "sync" "golang.org/x/oauth2" @@ -73,7 +73,7 @@ type jwtAccess struct { // NewJWTAccessFromFile creates PerRPCCredentials from the given keyFile. func NewJWTAccessFromFile(keyFile string) (credentials.PerRPCCredentials, error) { - jsonKey, err := ioutil.ReadFile(keyFile) + jsonKey, err := os.ReadFile(keyFile) if err != nil { return nil, fmt.Errorf("credentials: failed to read the service account key file: %v", err) } @@ -121,6 +121,8 @@ type oauthAccess struct { } // NewOauthAccess constructs the PerRPCCredentials using a given token. +// +// Deprecated: use oauth.TokenSource instead. func NewOauthAccess(token *oauth2.Token) credentials.PerRPCCredentials { return oauthAccess{token: *token} } @@ -190,7 +192,7 @@ func NewServiceAccountFromKey(jsonKey []byte, scope ...string) (credentials.PerR // NewServiceAccountFromFile constructs the PerRPCCredentials using the JSON key file // of a Google Developers service account. func NewServiceAccountFromFile(keyFile string, scope ...string) (credentials.PerRPCCredentials, error) { - jsonKey, err := ioutil.ReadFile(keyFile) + jsonKey, err := os.ReadFile(keyFile) if err != nil { return nil, fmt.Errorf("credentials: failed to read the service account key file: %v", err) } diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index ce2bbc10a142..877b7cd21af7 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -23,9 +23,9 @@ import ( "crypto/tls" "crypto/x509" "fmt" - "io/ioutil" "net" "net/url" + "os" credinternal "google.golang.org/grpc/internal/credentials" ) @@ -166,7 +166,7 @@ func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) Transpor // it will override the virtual host name of authority (e.g. :authority header // field) in requests. func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) { - b, err := ioutil.ReadFile(certFile) + b, err := os.ReadFile(certFile) if err != nil { return nil, err } diff --git a/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/watcher.go b/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/watcher.go index 3c62491f7be8..7ed5c53ba404 100644 --- a/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/watcher.go +++ b/vendor/google.golang.org/grpc/credentials/tls/certprovider/pemfile/watcher.go @@ -32,7 +32,7 @@ import ( "crypto/x509" "errors" "fmt" - "io/ioutil" + "os" "path/filepath" "time" @@ -154,12 +154,12 @@ func (w *watcher) updateIdentityDistributor() { return } - certFileContents, err := ioutil.ReadFile(w.opts.CertFile) + certFileContents, err := os.ReadFile(w.opts.CertFile) if err != nil { logger.Warningf("certFile (%s) read failed: %v", w.opts.CertFile, err) return } - keyFileContents, err := ioutil.ReadFile(w.opts.KeyFile) + keyFileContents, err := os.ReadFile(w.opts.KeyFile) if err != nil { logger.Warningf("keyFile (%s) read failed: %v", w.opts.KeyFile, err) return @@ -191,7 +191,7 @@ func (w *watcher) updateRootDistributor() { return } - rootFileContents, err := ioutil.ReadFile(w.opts.RootFile) + rootFileContents, err := os.ReadFile(w.opts.RootFile) if err != nil { logger.Warningf("rootFile (%s) read failed: %v", w.opts.RootFile, err) return diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index 8f5b536f11eb..4866da101c60 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -44,6 +44,7 @@ func init() { extraDialOptions = nil } internal.WithBinaryLogger = withBinaryLogger + internal.JoinDialOptions = newJoinDialOption } // dialOptions configure a Dial call. dialOptions are set by the DialOption @@ -111,6 +112,20 @@ func newFuncDialOption(f func(*dialOptions)) *funcDialOption { } } +type joinDialOption struct { + opts []DialOption +} + +func (jdo *joinDialOption) apply(do *dialOptions) { + for _, opt := range jdo.opts { + opt.apply(do) + } +} + +func newJoinDialOption(opts ...DialOption) DialOption { + return &joinDialOption{opts: opts} +} + // WithWriteBufferSize determines how much data can be batched before doing a // write on the wire. The corresponding memory allocation for this buffer will // be twice the size to keep syscalls low. The default value for this buffer is diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 711763d54fb7..07a5861352a6 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -75,7 +75,9 @@ var registeredCompressor = make(map[string]Compressor) // registered with the same name, the one registered last will take effect. func RegisterCompressor(c Compressor) { registeredCompressor[c.Name()] = c - grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) + if !grpcutil.IsCompressorNameRegistered(c.Name()) { + grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) + } } // GetCompressor returns Compressor for the given compressor name. diff --git a/vendor/google.golang.org/grpc/encoding/gzip/gzip.go b/vendor/google.golang.org/grpc/encoding/gzip/gzip.go index ca820bd47d44..a3bb173c24ac 100644 --- a/vendor/google.golang.org/grpc/encoding/gzip/gzip.go +++ b/vendor/google.golang.org/grpc/encoding/gzip/gzip.go @@ -30,7 +30,6 @@ import ( "encoding/binary" "fmt" "io" - "io/ioutil" "sync" "google.golang.org/grpc/encoding" @@ -42,7 +41,7 @@ const Name = "gzip" func init() { c := &compressor{} c.poolCompressor.New = func() interface{} { - return &writer{Writer: gzip.NewWriter(ioutil.Discard), pool: &c.poolCompressor} + return &writer{Writer: gzip.NewWriter(io.Discard), pool: &c.poolCompressor} } encoding.RegisterCompressor(c) } @@ -63,7 +62,7 @@ func SetLevel(level int) error { } c := encoding.GetCompressor(Name).(*compressor) c.poolCompressor.New = func() interface{} { - w, err := gzip.NewWriterLevel(ioutil.Discard, level) + w, err := gzip.NewWriterLevel(io.Discard, level) if err != nil { panic(err) } diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go index b5560b47ec4b..5de66e40d365 100644 --- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -22,7 +22,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "os" "strconv" @@ -140,9 +139,9 @@ func newLoggerV2WithConfig(infoW, warningW, errorW io.Writer, c loggerV2Config) // newLoggerV2 creates a loggerV2 to be used as default logger. // All logs are written to stderr. func newLoggerV2() LoggerV2 { - errorW := ioutil.Discard - warningW := ioutil.Discard - infoW := ioutil.Discard + errorW := io.Discard + warningW := io.Discard + infoW := io.Discard logLevel := os.Getenv("GRPC_GO_LOG_SEVERITY_LEVEL") switch logLevel { diff --git a/vendor/google.golang.org/grpc/internal/balancergroup/balancergroup.go b/vendor/google.golang.org/grpc/internal/balancergroup/balancergroup.go index ae17801fe2f0..c1f7e75c3ec8 100644 --- a/vendor/google.golang.org/grpc/internal/balancergroup/balancergroup.go +++ b/vendor/google.golang.org/grpc/internal/balancergroup/balancergroup.go @@ -175,6 +175,9 @@ func (sbc *subBalancerWrapper) gracefulSwitch(builder balancer.Builder) { } func (sbc *subBalancerWrapper) stopBalancer() { + if sbc.balancer == nil { + return + } sbc.balancer.Close() sbc.balancer = nil } @@ -393,13 +396,15 @@ func (bg *BalancerGroup) Remove(id string) { if sbToRemove, ok := bg.idToBalancerConfig[id]; ok { if bg.outgoingStarted { bg.balancerCache.Add(id, sbToRemove, func() { - // After timeout, when sub-balancer is removed from cache, need - // to close the underlying sub-balancer, and remove all its - // subconns. + // A sub-balancer evicted from the timeout cache needs to closed + // and its subConns need to removed, unconditionally. There is a + // possibility that a sub-balancer might be removed (thereby + // moving it to the cache) around the same time that the + // balancergroup is closed, and by the time we get here the + // balancergroup might be closed. Check for `outgoingStarted == + // true` at that point can lead to a leaked sub-balancer. bg.outgoingMu.Lock() - if bg.outgoingStarted { - sbToRemove.stopBalancer() - } + sbToRemove.stopBalancer() bg.outgoingMu.Unlock() bg.cleanupSubConns(sbToRemove) }) diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index 85e3ff2816ae..d71e441778f4 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -26,7 +26,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" - pb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -79,7 +79,7 @@ func NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger { // Build is an internal only method for building the proto message out of the // input event. It's made public to enable other library to reuse as much logic // in TruncatingMethodLogger as possible. -func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry { +func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *binlogpb.GrpcLogEntry { m := c.toProto() timestamp, _ := ptypes.TimestampProto(time.Now()) m.Timestamp = timestamp @@ -87,11 +87,11 @@ func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry { m.SequenceIdWithinCall = ml.idWithinCallGen.next() switch pay := m.Payload.(type) { - case *pb.GrpcLogEntry_ClientHeader: + case *binlogpb.GrpcLogEntry_ClientHeader: m.PayloadTruncated = ml.truncateMetadata(pay.ClientHeader.GetMetadata()) - case *pb.GrpcLogEntry_ServerHeader: + case *binlogpb.GrpcLogEntry_ServerHeader: m.PayloadTruncated = ml.truncateMetadata(pay.ServerHeader.GetMetadata()) - case *pb.GrpcLogEntry_Message: + case *binlogpb.GrpcLogEntry_Message: m.PayloadTruncated = ml.truncateMessage(pay.Message) } return m @@ -102,7 +102,7 @@ func (ml *TruncatingMethodLogger) Log(c LogEntryConfig) { ml.sink.Write(ml.Build(c)) } -func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) { +func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *binlogpb.Metadata) (truncated bool) { if ml.headerMaxLen == maxUInt { return false } @@ -132,7 +132,7 @@ func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated return truncated } -func (ml *TruncatingMethodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) { +func (ml *TruncatingMethodLogger) truncateMessage(msgPb *binlogpb.Message) (truncated bool) { if ml.messageMaxLen == maxUInt { return false } @@ -145,7 +145,7 @@ func (ml *TruncatingMethodLogger) truncateMessage(msgPb *pb.Message) (truncated // LogEntryConfig represents the configuration for binary log entry. type LogEntryConfig interface { - toProto() *pb.GrpcLogEntry + toProto() *binlogpb.GrpcLogEntry } // ClientHeader configs the binary log entry to be a ClientHeader entry. @@ -159,10 +159,10 @@ type ClientHeader struct { PeerAddr net.Addr } -func (c *ClientHeader) toProto() *pb.GrpcLogEntry { +func (c *ClientHeader) toProto() *binlogpb.GrpcLogEntry { // This function doesn't need to set all the fields (e.g. seq ID). The Log // function will set the fields when necessary. - clientHeader := &pb.ClientHeader{ + clientHeader := &binlogpb.ClientHeader{ Metadata: mdToMetadataProto(c.Header), MethodName: c.MethodName, Authority: c.Authority, @@ -170,16 +170,16 @@ func (c *ClientHeader) toProto() *pb.GrpcLogEntry { if c.Timeout > 0 { clientHeader.Timeout = ptypes.DurationProto(c.Timeout) } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER, - Payload: &pb.GrpcLogEntry_ClientHeader{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER, + Payload: &binlogpb.GrpcLogEntry_ClientHeader{ ClientHeader: clientHeader, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -195,19 +195,19 @@ type ServerHeader struct { PeerAddr net.Addr } -func (c *ServerHeader) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER, - Payload: &pb.GrpcLogEntry_ServerHeader{ - ServerHeader: &pb.ServerHeader{ +func (c *ServerHeader) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER, + Payload: &binlogpb.GrpcLogEntry_ServerHeader{ + ServerHeader: &binlogpb.ServerHeader{ Metadata: mdToMetadataProto(c.Header), }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -223,7 +223,7 @@ type ClientMessage struct { Message interface{} } -func (c *ClientMessage) toProto() *pb.GrpcLogEntry { +func (c *ClientMessage) toProto() *binlogpb.GrpcLogEntry { var ( data []byte err error @@ -238,19 +238,19 @@ func (c *ClientMessage) toProto() *pb.GrpcLogEntry { } else { grpclogLogger.Infof("binarylogging: message to log is neither proto.message nor []byte") } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE, - Payload: &pb.GrpcLogEntry_Message{ - Message: &pb.Message{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE, + Payload: &binlogpb.GrpcLogEntry_Message{ + Message: &binlogpb.Message{ Length: uint32(len(data)), Data: data, }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -263,7 +263,7 @@ type ServerMessage struct { Message interface{} } -func (c *ServerMessage) toProto() *pb.GrpcLogEntry { +func (c *ServerMessage) toProto() *binlogpb.GrpcLogEntry { var ( data []byte err error @@ -278,19 +278,19 @@ func (c *ServerMessage) toProto() *pb.GrpcLogEntry { } else { grpclogLogger.Infof("binarylogging: message to log is neither proto.message nor []byte") } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE, - Payload: &pb.GrpcLogEntry_Message{ - Message: &pb.Message{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE, + Payload: &binlogpb.GrpcLogEntry_Message{ + Message: &binlogpb.Message{ Length: uint32(len(data)), Data: data, }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -300,15 +300,15 @@ type ClientHalfClose struct { OnClientSide bool } -func (c *ClientHalfClose) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE, +func (c *ClientHalfClose) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE, Payload: nil, // No payload here. } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -324,7 +324,7 @@ type ServerTrailer struct { PeerAddr net.Addr } -func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { +func (c *ServerTrailer) toProto() *binlogpb.GrpcLogEntry { st, ok := status.FromError(c.Err) if !ok { grpclogLogger.Info("binarylogging: error in trailer is not a status error") @@ -340,10 +340,10 @@ func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { grpclogLogger.Infof("binarylogging: failed to marshal status proto: %v", err) } } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER, - Payload: &pb.GrpcLogEntry_Trailer{ - Trailer: &pb.Trailer{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER, + Payload: &binlogpb.GrpcLogEntry_Trailer{ + Trailer: &binlogpb.Trailer{ Metadata: mdToMetadataProto(c.Trailer), StatusCode: uint32(st.Code()), StatusMessage: st.Message(), @@ -352,9 +352,9 @@ func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -367,15 +367,15 @@ type Cancel struct { OnClientSide bool } -func (c *Cancel) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CANCEL, +func (c *Cancel) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CANCEL, Payload: nil, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -392,15 +392,15 @@ func metadataKeyOmit(key string) bool { return strings.HasPrefix(key, "grpc-") } -func mdToMetadataProto(md metadata.MD) *pb.Metadata { - ret := &pb.Metadata{} +func mdToMetadataProto(md metadata.MD) *binlogpb.Metadata { + ret := &binlogpb.Metadata{} for k, vv := range md { if metadataKeyOmit(k) { continue } for _, v := range vv { ret.Entry = append(ret.Entry, - &pb.MetadataEntry{ + &binlogpb.MetadataEntry{ Key: k, Value: []byte(v), }, @@ -410,26 +410,26 @@ func mdToMetadataProto(md metadata.MD) *pb.Metadata { return ret } -func addrToProto(addr net.Addr) *pb.Address { - ret := &pb.Address{} +func addrToProto(addr net.Addr) *binlogpb.Address { + ret := &binlogpb.Address{} switch a := addr.(type) { case *net.TCPAddr: if a.IP.To4() != nil { - ret.Type = pb.Address_TYPE_IPV4 + ret.Type = binlogpb.Address_TYPE_IPV4 } else if a.IP.To16() != nil { - ret.Type = pb.Address_TYPE_IPV6 + ret.Type = binlogpb.Address_TYPE_IPV6 } else { - ret.Type = pb.Address_TYPE_UNKNOWN + ret.Type = binlogpb.Address_TYPE_UNKNOWN // Do not set address and port fields. break } ret.Address = a.IP.String() ret.IpPort = uint32(a.Port) case *net.UnixAddr: - ret.Type = pb.Address_TYPE_UNIX + ret.Type = binlogpb.Address_TYPE_UNIX ret.Address = a.String() default: - ret.Type = pb.Address_TYPE_UNKNOWN + ret.Type = binlogpb.Address_TYPE_UNKNOWN } return ret } diff --git a/vendor/google.golang.org/grpc/internal/binarylog/sink.go b/vendor/google.golang.org/grpc/internal/binarylog/sink.go index c2fdd58b3198..264de387c2a5 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/sink.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/sink.go @@ -26,7 +26,7 @@ import ( "time" "github.com/golang/protobuf/proto" - pb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" ) var ( @@ -42,15 +42,15 @@ type Sink interface { // Write will be called to write the log entry into the sink. // // It should be thread-safe so it can be called in parallel. - Write(*pb.GrpcLogEntry) error + Write(*binlogpb.GrpcLogEntry) error // Close will be called when the Sink is replaced by a new Sink. Close() error } type noopSink struct{} -func (ns *noopSink) Write(*pb.GrpcLogEntry) error { return nil } -func (ns *noopSink) Close() error { return nil } +func (ns *noopSink) Write(*binlogpb.GrpcLogEntry) error { return nil } +func (ns *noopSink) Close() error { return nil } // newWriterSink creates a binary log sink with the given writer. // @@ -66,7 +66,7 @@ type writerSink struct { out io.Writer } -func (ws *writerSink) Write(e *pb.GrpcLogEntry) error { +func (ws *writerSink) Write(e *binlogpb.GrpcLogEntry) error { b, err := proto.Marshal(e) if err != nil { grpclogLogger.Errorf("binary logging: failed to marshal proto message: %v", err) @@ -96,7 +96,7 @@ type bufferedSink struct { done chan struct{} } -func (fs *bufferedSink) Write(e *pb.GrpcLogEntry) error { +func (fs *bufferedSink) Write(e *binlogpb.GrpcLogEntry) error { fs.mu.Lock() defer fs.mu.Unlock() if !fs.flusherStarted { diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 7edd196bd3da..5ba9d94d49c2 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -21,19 +21,42 @@ package envconfig import ( "os" + "strconv" "strings" ) -const ( - prefix = "GRPC_GO_" - txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" - advertiseCompressorsStr = prefix + "ADVERTISE_COMPRESSORS" -) - var ( // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). - TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false") + TXTErrIgnore = boolFromEnv("GRPC_GO_IGNORE_TXT_ERRORS", true) // AdvertiseCompressors is set if registered compressor should be advertised // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false"). - AdvertiseCompressors = !strings.EqualFold(os.Getenv(advertiseCompressorsStr), "false") + AdvertiseCompressors = boolFromEnv("GRPC_GO_ADVERTISE_COMPRESSORS", true) + // RingHashCap indicates the maximum ring size which defaults to 4096 + // entries but may be overridden by setting the environment variable + // "GRPC_RING_HASH_CAP". This does not override the default bounds + // checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M). + RingHashCap = uint64FromEnv("GRPC_RING_HASH_CAP", 4096, 1, 8*1024*1024) ) + +func boolFromEnv(envVar string, def bool) bool { + if def { + // The default is true; return true unless the variable is "false". + return !strings.EqualFold(os.Getenv(envVar), "false") + } + // The default is false; return false unless the variable is "true". + return strings.EqualFold(os.Getenv(envVar), "true") +} + +func uint64FromEnv(envVar string, def, min, max uint64) uint64 { + v, err := strconv.ParseUint(os.Getenv(envVar), 10, 64) + if err != nil { + return def + } + if v < min { + return min + } + if v > max { + return max + } + return v +} diff --git a/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/vendor/google.golang.org/grpc/internal/envconfig/xds.go index af09711a3e88..04136882c7bc 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/xds.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/xds.go @@ -20,7 +20,6 @@ package envconfig import ( "os" - "strings" ) const ( @@ -36,16 +35,6 @@ const ( // // When both bootstrap FileName and FileContent are set, FileName is used. XDSBootstrapFileContentEnv = "GRPC_XDS_BOOTSTRAP_CONFIG" - - ringHashSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" - clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT" - aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" - rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC" - outlierDetectionSupportEnv = "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" - federationEnv = "GRPC_EXPERIMENTAL_XDS_FEDERATION" - rlsInXDSEnv = "GRPC_EXPERIMENTAL_XDS_RLS_LB" - - c2pResolverTestOnlyTrafficDirectorURIEnv = "GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI" ) var ( @@ -64,38 +53,40 @@ var ( // XDSRingHash indicates whether ring hash support is enabled, which can be // disabled by setting the environment variable // "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" to "false". - XDSRingHash = !strings.EqualFold(os.Getenv(ringHashSupportEnv), "false") + XDSRingHash = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH", true) // XDSClientSideSecurity is used to control processing of security // configuration on the client-side. // // Note that there is no env var protection for the server-side because we // have a brand new API on the server-side and users explicitly need to use // the new API to get security integration on the server. - XDSClientSideSecurity = !strings.EqualFold(os.Getenv(clientSideSecuritySupportEnv), "false") + XDSClientSideSecurity = boolFromEnv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT", true) // XDSAggregateAndDNS indicates whether processing of aggregated cluster // and DNS cluster is enabled, which can be enabled by setting the // environment variable // "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" to // "true". - XDSAggregateAndDNS = !strings.EqualFold(os.Getenv(aggregateAndDNSSupportEnv), "false") + XDSAggregateAndDNS = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER", true) // XDSRBAC indicates whether xDS configured RBAC HTTP Filter is enabled, // which can be disabled by setting the environment variable // "GRPC_XDS_EXPERIMENTAL_RBAC" to "false". - XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false") + XDSRBAC = boolFromEnv("GRPC_XDS_EXPERIMENTAL_RBAC", true) // XDSOutlierDetection indicates whether outlier detection support is // enabled, which can be disabled by setting the environment variable // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "false". - XDSOutlierDetection = !strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "false") - // XDSFederation indicates whether federation support is enabled. - XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true") + XDSOutlierDetection = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION", true) + // XDSFederation indicates whether federation support is enabled, which can + // be enabled by setting the environment variable + // "GRPC_EXPERIMENTAL_XDS_FEDERATION" to "true". + XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", false) // XDSRLS indicates whether processing of Cluster Specifier plugins and // support for the RLS CLuster Specifier is enabled, which can be enabled by // setting the environment variable "GRPC_EXPERIMENTAL_XDS_RLS_LB" to // "true". - XDSRLS = strings.EqualFold(os.Getenv(rlsInXDSEnv), "true") + XDSRLS = boolFromEnv("GRPC_EXPERIMENTAL_XDS_RLS_LB", false) // C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing. - C2PResolverTestOnlyTrafficDirectorURI = os.Getenv(c2pResolverTestOnlyTrafficDirectorURIEnv) + C2PResolverTestOnlyTrafficDirectorURI = os.Getenv("GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI") ) diff --git a/vendor/google.golang.org/grpc/internal/googlecloud/manufacturer_linux.go b/vendor/google.golang.org/grpc/internal/googlecloud/manufacturer_linux.go index e53b8ffc837f..6e455fb0a822 100644 --- a/vendor/google.golang.org/grpc/internal/googlecloud/manufacturer_linux.go +++ b/vendor/google.golang.org/grpc/internal/googlecloud/manufacturer_linux.go @@ -18,10 +18,10 @@ package googlecloud -import "io/ioutil" +import "os" const linuxProductNameFile = "/sys/class/dmi/id/product_name" func manufacturer() ([]byte, error) { - return ioutil.ReadFile(linuxProductNameFile) + return os.ReadFile(linuxProductNameFile) } diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index fd0ee3dcaf1e..0a76d9de6e02 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -77,6 +77,9 @@ var ( // ClearGlobalDialOptions clears the array of extra DialOption. This // method is useful in testing and benchmarking. ClearGlobalDialOptions func() + // JoinDialOptions combines the dial options passed as arguments into a + // single dial option. + JoinDialOptions interface{} // func(...grpc.DialOption) grpc.DialOption // JoinServerOptions combines the server options passed as arguments into a // single server option. JoinServerOptions interface{} // func(...grpc.ServerOption) grpc.ServerOption diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index b08ac30adfef..09a667f33cb0 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -116,7 +116,7 @@ type dnsBuilder struct{} // Build creates and starts a DNS resolver that watches the name resolution of the target. func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - host, port, err := parseTarget(target.Endpoint, defaultPort) + host, port, err := parseTarget(target.Endpoint(), defaultPort) if err != nil { return nil, err } diff --git a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go index c6e08221ff64..afac56572ad5 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go +++ b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go @@ -31,7 +31,7 @@ const scheme = "passthrough" type passthroughBuilder struct{} func (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - if target.Endpoint == "" && opts.Dialer == nil { + if target.Endpoint() == "" && opts.Dialer == nil { return nil, errors.New("passthrough: received empty target in Build()") } r := &passthroughResolver{ @@ -52,7 +52,7 @@ type passthroughResolver struct { } func (r *passthroughResolver) start() { - r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint}}}) + r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint()}}}) } func (*passthroughResolver) ResolveNow(o resolver.ResolveNowOptions) {} diff --git a/vendor/google.golang.org/grpc/internal/testutils/balancer.go b/vendor/google.golang.org/grpc/internal/testutils/balancer.go new file mode 100644 index 000000000000..8927823d09da --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/balancer.go @@ -0,0 +1,372 @@ +/* + * + * Copyright 2020 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package testutils + +import ( + "context" + "errors" + "fmt" + "testing" + + "google.golang.org/grpc/balancer" + "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/resolver" +) + +// TestSubConnsCount is the number of TestSubConns initialized as part of +// package init. +const TestSubConnsCount = 16 + +// testingLogger wraps the logging methods from testing.T. +type testingLogger interface { + Log(args ...interface{}) + Logf(format string, args ...interface{}) +} + +// TestSubConns contains a list of SubConns to be used in tests. +var TestSubConns []*TestSubConn + +func init() { + for i := 0; i < TestSubConnsCount; i++ { + TestSubConns = append(TestSubConns, &TestSubConn{ + id: fmt.Sprintf("sc%d", i), + ConnectCh: make(chan struct{}, 1), + }) + } +} + +// TestSubConn implements the SubConn interface, to be used in tests. +type TestSubConn struct { + id string + ConnectCh chan struct{} +} + +// UpdateAddresses is a no-op. +func (tsc *TestSubConn) UpdateAddresses([]resolver.Address) {} + +// Connect is a no-op. +func (tsc *TestSubConn) Connect() { + select { + case tsc.ConnectCh <- struct{}{}: + default: + } +} + +// GetOrBuildProducer is a no-op. +func (tsc *TestSubConn) GetOrBuildProducer(balancer.ProducerBuilder) (balancer.Producer, func()) { + return nil, nil +} + +// String implements stringer to print human friendly error message. +func (tsc *TestSubConn) String() string { + return tsc.id +} + +// TestClientConn is a mock balancer.ClientConn used in tests. +type TestClientConn struct { + logger testingLogger + + NewSubConnAddrsCh chan []resolver.Address // the last 10 []Address to create subconn. + NewSubConnCh chan balancer.SubConn // the last 10 subconn created. + RemoveSubConnCh chan balancer.SubConn // the last 10 subconn removed. + UpdateAddressesAddrsCh chan []resolver.Address // last updated address via UpdateAddresses(). + + NewPickerCh chan balancer.Picker // the last picker updated. + NewStateCh chan connectivity.State // the last state. + ResolveNowCh chan resolver.ResolveNowOptions // the last ResolveNow(). + + subConnIdx int +} + +// NewTestClientConn creates a TestClientConn. +func NewTestClientConn(t *testing.T) *TestClientConn { + return &TestClientConn{ + logger: t, + + NewSubConnAddrsCh: make(chan []resolver.Address, 10), + NewSubConnCh: make(chan balancer.SubConn, 10), + RemoveSubConnCh: make(chan balancer.SubConn, 10), + UpdateAddressesAddrsCh: make(chan []resolver.Address, 1), + + NewPickerCh: make(chan balancer.Picker, 1), + NewStateCh: make(chan connectivity.State, 1), + ResolveNowCh: make(chan resolver.ResolveNowOptions, 1), + } +} + +// NewSubConn creates a new SubConn. +func (tcc *TestClientConn) NewSubConn(a []resolver.Address, o balancer.NewSubConnOptions) (balancer.SubConn, error) { + sc := TestSubConns[tcc.subConnIdx] + tcc.subConnIdx++ + + tcc.logger.Logf("testClientConn: NewSubConn(%v, %+v) => %s", a, o, sc) + select { + case tcc.NewSubConnAddrsCh <- a: + default: + } + + select { + case tcc.NewSubConnCh <- sc: + default: + } + + return sc, nil +} + +// RemoveSubConn removes the SubConn. +func (tcc *TestClientConn) RemoveSubConn(sc balancer.SubConn) { + tcc.logger.Logf("testClientConn: RemoveSubConn(%s)", sc) + select { + case tcc.RemoveSubConnCh <- sc: + default: + } +} + +// UpdateAddresses updates the addresses on the SubConn. +func (tcc *TestClientConn) UpdateAddresses(sc balancer.SubConn, addrs []resolver.Address) { + tcc.logger.Logf("testClientConn: UpdateAddresses(%v, %+v)", sc, addrs) + select { + case tcc.UpdateAddressesAddrsCh <- addrs: + default: + } +} + +// UpdateState updates connectivity state and picker. +func (tcc *TestClientConn) UpdateState(bs balancer.State) { + tcc.logger.Logf("testClientConn: UpdateState(%v)", bs) + select { + case <-tcc.NewStateCh: + default: + } + tcc.NewStateCh <- bs.ConnectivityState + + select { + case <-tcc.NewPickerCh: + default: + } + tcc.NewPickerCh <- bs.Picker +} + +// ResolveNow panics. +func (tcc *TestClientConn) ResolveNow(o resolver.ResolveNowOptions) { + select { + case <-tcc.ResolveNowCh: + default: + } + tcc.ResolveNowCh <- o +} + +// Target panics. +func (tcc *TestClientConn) Target() string { + panic("not implemented") +} + +// WaitForErrPicker waits until an error picker is pushed to this ClientConn. +// Returns error if the provided context expires or a non-error picker is pushed +// to the ClientConn. +func (tcc *TestClientConn) WaitForErrPicker(ctx context.Context) error { + select { + case <-ctx.Done(): + return errors.New("timeout when waiting for an error picker") + case picker := <-tcc.NewPickerCh: + if _, perr := picker.Pick(balancer.PickInfo{}); perr == nil { + return fmt.Errorf("balancer returned a picker which is not an error picker") + } + } + return nil +} + +// WaitForPickerWithErr waits until an error picker is pushed to this +// ClientConn with the error matching the wanted error. Returns an error if +// the provided context expires, including the last received picker error (if +// any). +func (tcc *TestClientConn) WaitForPickerWithErr(ctx context.Context, want error) error { + lastErr := errors.New("received no picker") + for { + select { + case <-ctx.Done(): + return fmt.Errorf("timeout when waiting for an error picker with %v; last picker error: %v", want, lastErr) + case picker := <-tcc.NewPickerCh: + if _, lastErr = picker.Pick(balancer.PickInfo{}); lastErr != nil && lastErr.Error() == want.Error() { + return nil + } + } + } +} + +// WaitForConnectivityState waits until the state pushed to this ClientConn +// matches the wanted state. Returns an error if the provided context expires, +// including the last received state (if any). +func (tcc *TestClientConn) WaitForConnectivityState(ctx context.Context, want connectivity.State) error { + var lastState connectivity.State = -1 + for { + select { + case <-ctx.Done(): + return fmt.Errorf("timeout when waiting for state to be %s; last state: %s", want, lastState) + case s := <-tcc.NewStateCh: + if s == want { + return nil + } + lastState = s + } + } +} + +// WaitForRoundRobinPicker waits for a picker that passes IsRoundRobin. Also +// drains the matching state channel and requires it to be READY (if an entry +// is pending) to be considered. Returns an error if the provided context +// expires, including the last received error from IsRoundRobin or the picker +// (if any). +func (tcc *TestClientConn) WaitForRoundRobinPicker(ctx context.Context, want ...balancer.SubConn) error { + lastErr := errors.New("received no picker") + for { + select { + case <-ctx.Done(): + return fmt.Errorf("timeout when waiting for round robin picker with %v; last error: %v", want, lastErr) + case p := <-tcc.NewPickerCh: + s := connectivity.Ready + select { + case s = <-tcc.NewStateCh: + default: + } + if s != connectivity.Ready { + lastErr = fmt.Errorf("received state %v instead of ready", s) + break + } + var pickerErr error + if err := IsRoundRobin(want, func() balancer.SubConn { + sc, err := p.Pick(balancer.PickInfo{}) + if err != nil { + pickerErr = err + } else if sc.Done != nil { + sc.Done(balancer.DoneInfo{}) + } + return sc.SubConn + }); pickerErr != nil { + lastErr = pickerErr + continue + } else if err != nil { + lastErr = err + continue + } + return nil + } + } +} + +// WaitForPicker waits for a picker that results in f returning nil. If the +// context expires, returns the last error returned by f (if any). +func (tcc *TestClientConn) WaitForPicker(ctx context.Context, f func(balancer.Picker) error) error { + lastErr := errors.New("received no picker") + for { + select { + case <-ctx.Done(): + return fmt.Errorf("timeout when waiting for picker; last error: %v", lastErr) + case p := <-tcc.NewPickerCh: + if err := f(p); err != nil { + lastErr = err + continue + } + return nil + } + } +} + +// IsRoundRobin checks whether f's return value is roundrobin of elements from +// want. But it doesn't check for the order. Note that want can contain +// duplicate items, which makes it weight-round-robin. +// +// Step 1. the return values of f should form a permutation of all elements in +// want, but not necessary in the same order. E.g. if want is {a,a,b}, the check +// fails if f returns: +// - {a,a,a}: third a is returned before b +// - {a,b,b}: second b is returned before the second a +// +// If error is found in this step, the returned error contains only the first +// iteration until where it goes wrong. +// +// Step 2. the return values of f should be repetitions of the same permutation. +// E.g. if want is {a,a,b}, the check failes if f returns: +// - {a,b,a,b,a,a}: though it satisfies step 1, the second iteration is not +// repeating the first iteration. +// +// If error is found in this step, the returned error contains the first +// iteration + the second iteration until where it goes wrong. +func IsRoundRobin(want []balancer.SubConn, f func() balancer.SubConn) error { + wantSet := make(map[balancer.SubConn]int) // SubConn -> count, for weighted RR. + for _, sc := range want { + wantSet[sc]++ + } + + // The first iteration: makes sure f's return values form a permutation of + // elements in want. + // + // Also keep the returns values in a slice, so we can compare the order in + // the second iteration. + gotSliceFirstIteration := make([]balancer.SubConn, 0, len(want)) + for range want { + got := f() + gotSliceFirstIteration = append(gotSliceFirstIteration, got) + wantSet[got]-- + if wantSet[got] < 0 { + return fmt.Errorf("non-roundrobin want: %v, result: %v", want, gotSliceFirstIteration) + } + } + + // The second iteration should repeat the first iteration. + var gotSliceSecondIteration []balancer.SubConn + for i := 0; i < 2; i++ { + for _, w := range gotSliceFirstIteration { + g := f() + gotSliceSecondIteration = append(gotSliceSecondIteration, g) + if w != g { + return fmt.Errorf("non-roundrobin, first iter: %v, second iter: %v", gotSliceFirstIteration, gotSliceSecondIteration) + } + } + } + + return nil +} + +// SubConnFromPicker returns a function which returns a SubConn by calling the +// Pick() method of the provided picker. There is no caching of SubConns here. +// Every invocation of the returned function results in a new pick. +func SubConnFromPicker(p balancer.Picker) func() balancer.SubConn { + return func() balancer.SubConn { + scst, _ := p.Pick(balancer.PickInfo{}) + return scst.SubConn + } +} + +// ErrTestConstPicker is error returned by test const picker. +var ErrTestConstPicker = fmt.Errorf("const picker error") + +// TestConstPicker is a const picker for tests. +type TestConstPicker struct { + Err error + SC balancer.SubConn +} + +// Pick returns the const SubConn or the error. +func (tcp *TestConstPicker) Pick(info balancer.PickInfo) (balancer.PickResult, error) { + if tcp.Err != nil { + return balancer.PickResult{}, tcp.Err + } + return balancer.PickResult{SubConn: tcp.SC}, nil +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/channel.go b/vendor/google.golang.org/grpc/internal/testutils/channel.go new file mode 100644 index 000000000000..6a08a94a099f --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/channel.go @@ -0,0 +1,104 @@ +/* + * + * Copyright 2020 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package testutils + +import ( + "context" +) + +// DefaultChanBufferSize is the default buffer size of the underlying channel. +const DefaultChanBufferSize = 1 + +// Channel wraps a generic channel and provides a timed receive operation. +type Channel struct { + ch chan interface{} +} + +// Send sends value on the underlying channel. +func (c *Channel) Send(value interface{}) { + c.ch <- value +} + +// SendContext sends value on the underlying channel, or returns an error if +// the context expires. +func (c *Channel) SendContext(ctx context.Context, value interface{}) error { + select { + case c.ch <- value: + return nil + case <-ctx.Done(): + return ctx.Err() + } +} + +// SendOrFail attempts to send value on the underlying channel. Returns true +// if successful or false if the channel was full. +func (c *Channel) SendOrFail(value interface{}) bool { + select { + case c.ch <- value: + return true + default: + return false + } +} + +// ReceiveOrFail returns the value on the underlying channel and true, or nil +// and false if the channel was empty. +func (c *Channel) ReceiveOrFail() (interface{}, bool) { + select { + case got := <-c.ch: + return got, true + default: + return nil, false + } +} + +// Receive returns the value received on the underlying channel, or the error +// returned by ctx if it is closed or cancelled. +func (c *Channel) Receive(ctx context.Context) (interface{}, error) { + select { + case <-ctx.Done(): + return nil, ctx.Err() + case got := <-c.ch: + return got, nil + } +} + +// Replace clears the value on the underlying channel, and sends the new value. +// +// It's expected to be used with a size-1 channel, to only keep the most +// up-to-date item. This method is inherently racy when invoked concurrently +// from multiple goroutines. +func (c *Channel) Replace(value interface{}) { + for { + select { + case c.ch <- value: + return + case <-c.ch: + } + } +} + +// NewChannel returns a new Channel. +func NewChannel() *Channel { + return NewChannelWithSize(DefaultChanBufferSize) +} + +// NewChannelWithSize returns a new Channel with a buffer of bufSize. +func NewChannelWithSize(bufSize int) *Channel { + return &Channel{ch: make(chan interface{}, bufSize)} +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/http_client.go b/vendor/google.golang.org/grpc/internal/testutils/http_client.go new file mode 100644 index 000000000000..9832bf305756 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/http_client.go @@ -0,0 +1,63 @@ +/* + * + * Copyright 2020 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package testutils + +import ( + "context" + "net/http" + "time" +) + +// DefaultHTTPRequestTimeout is the default timeout value for the amount of time +// this client waits for a response to be pushed on RespChan before it fails the +// Do() call. +const DefaultHTTPRequestTimeout = 1 * time.Second + +// FakeHTTPClient helps mock out HTTP calls made by the code under test. It +// makes HTTP requests made by the code under test available through a channel, +// and makes it possible to inject various responses. +type FakeHTTPClient struct { + // ReqChan exposes the HTTP.Request made by the code under test. + ReqChan *Channel + // RespChan is a channel on which this fake client accepts responses to be + // sent to the code under test. + RespChan *Channel + // Err, if set, is returned by Do(). + Err error + // RecvTimeout is the amount of the time this client waits for a response to + // be pushed on RespChan before it fails the Do() call. If this field is + // left unspecified, DefaultHTTPRequestTimeout is used. + RecvTimeout time.Duration +} + +// Do pushes req on ReqChan and returns the response available on RespChan. +func (fc *FakeHTTPClient) Do(req *http.Request) (*http.Response, error) { + fc.ReqChan.Send(req) + + timeout := fc.RecvTimeout + if timeout == 0 { + timeout = DefaultHTTPRequestTimeout + } + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + val, err := fc.RespChan.Receive(ctx) + if err != nil { + return nil, err + } + return val.(*http.Response), fc.Err +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/local_listener.go b/vendor/google.golang.org/grpc/internal/testutils/local_listener.go new file mode 100644 index 000000000000..f831b95f4133 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/local_listener.go @@ -0,0 +1,26 @@ +/* + * + * Copyright 2020 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package testutils + +import "net" + +// LocalTCPListener returns a net.Listener listening on local address and port. +func LocalTCPListener() (net.Listener, error) { + return net.Listen("tcp", "localhost:0") +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/marshal_any.go b/vendor/google.golang.org/grpc/internal/testutils/marshal_any.go new file mode 100644 index 000000000000..9ddef6de15d6 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/marshal_any.go @@ -0,0 +1,36 @@ +/* + * + * Copyright 2021 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package testutils + +import ( + "fmt" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" +) + +// MarshalAny is a convenience function to marshal protobuf messages into any +// protos. It will panic if the marshaling fails. +func MarshalAny(m proto.Message) *anypb.Any { + a, err := ptypes.MarshalAny(m) + if err != nil { + panic(fmt.Sprintf("ptypes.MarshalAny(%+v) failed: %v", m, err)) + } + return a +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/parse_url.go b/vendor/google.golang.org/grpc/internal/testutils/parse_url.go new file mode 100644 index 000000000000..ff276e4d0c38 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/parse_url.go @@ -0,0 +1,34 @@ +/* + * + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package testutils + +import ( + "fmt" + "net/url" +) + +// MustParseURL attempts to parse the provided target using url.Parse() +// and panics if parsing fails. +func MustParseURL(target string) *url.URL { + u, err := url.Parse(target) + if err != nil { + panic(fmt.Sprintf("Error parsing target(%s): %v", target, err)) + } + return u +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/pipe_listener.go b/vendor/google.golang.org/grpc/internal/testutils/pipe_listener.go new file mode 100644 index 000000000000..6bd3bc0bea12 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/pipe_listener.go @@ -0,0 +1,96 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Package testutils contains testing helpers. +package testutils + +import ( + "errors" + "net" + "time" +) + +var errClosed = errors.New("closed") + +type pipeAddr struct{} + +func (p pipeAddr) Network() string { return "pipe" } +func (p pipeAddr) String() string { return "pipe" } + +// PipeListener is a listener with an unbuffered pipe. Each write will complete only once the other side reads. It +// should only be created using NewPipeListener. +type PipeListener struct { + c chan chan<- net.Conn + done chan struct{} +} + +// NewPipeListener creates a new pipe listener. +func NewPipeListener() *PipeListener { + return &PipeListener{ + c: make(chan chan<- net.Conn), + done: make(chan struct{}), + } +} + +// Accept accepts a connection. +func (p *PipeListener) Accept() (net.Conn, error) { + var connChan chan<- net.Conn + select { + case <-p.done: + return nil, errClosed + case connChan = <-p.c: + select { + case <-p.done: + close(connChan) + return nil, errClosed + default: + } + } + c1, c2 := net.Pipe() + connChan <- c1 + close(connChan) + return c2, nil +} + +// Close closes the listener. +func (p *PipeListener) Close() error { + close(p.done) + return nil +} + +// Addr returns a pipe addr. +func (p *PipeListener) Addr() net.Addr { + return pipeAddr{} +} + +// Dialer dials a connection. +func (p *PipeListener) Dialer() func(string, time.Duration) (net.Conn, error) { + return func(string, time.Duration) (net.Conn, error) { + connChan := make(chan net.Conn) + select { + case p.c <- connChan: + case <-p.done: + return nil, errClosed + } + conn, ok := <-connChan + if !ok { + return nil, errClosed + } + return conn, nil + } +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/restartable_listener.go b/vendor/google.golang.org/grpc/internal/testutils/restartable_listener.go new file mode 100644 index 000000000000..efe4019a08c2 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/restartable_listener.go @@ -0,0 +1,98 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package testutils + +import ( + "net" + "sync" +) + +type tempError struct{} + +func (*tempError) Error() string { + return "restartable listener temporary error" +} +func (*tempError) Temporary() bool { + return true +} + +// RestartableListener wraps a net.Listener and supports stopping and restarting +// the latter. +type RestartableListener struct { + lis net.Listener + + mu sync.Mutex + stopped bool + conns []net.Conn +} + +// NewRestartableListener returns a new RestartableListener wrapping l. +func NewRestartableListener(l net.Listener) *RestartableListener { + return &RestartableListener{lis: l} +} + +// Accept waits for and returns the next connection to the listener. +// +// If the listener is currently not accepting new connections, because `Stop` +// was called on it, the connection is immediately closed after accepting +// without any bytes being sent on it. +func (l *RestartableListener) Accept() (net.Conn, error) { + conn, err := l.lis.Accept() + if err != nil { + return nil, err + } + + l.mu.Lock() + defer l.mu.Unlock() + if l.stopped { + conn.Close() + return nil, &tempError{} + } + l.conns = append(l.conns, conn) + return conn, nil +} + +// Close closes the listener. +func (l *RestartableListener) Close() error { + return l.lis.Close() +} + +// Addr returns the listener's network address. +func (l *RestartableListener) Addr() net.Addr { + return l.lis.Addr() +} + +// Stop closes existing connections on the listener and prevents new connections +// from being accepted. +func (l *RestartableListener) Stop() { + l.mu.Lock() + l.stopped = true + for _, conn := range l.conns { + conn.Close() + } + l.conns = nil + l.mu.Unlock() +} + +// Restart gets a previously stopped listener to start accepting connections. +func (l *RestartableListener) Restart() { + l.mu.Lock() + l.stopped = false + l.mu.Unlock() +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/status_equal.go b/vendor/google.golang.org/grpc/internal/testutils/status_equal.go new file mode 100644 index 000000000000..dfd647336df8 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/status_equal.go @@ -0,0 +1,38 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package testutils + +import ( + "github.com/golang/protobuf/proto" + "google.golang.org/grpc/status" +) + +// StatusErrEqual returns true iff both err1 and err2 wrap status.Status errors +// and their underlying status protos are equal. +func StatusErrEqual(err1, err2 error) bool { + status1, ok := status.FromError(err1) + if !ok { + return false + } + status2, ok := status.FromError(err2) + if !ok { + return false + } + return proto.Equal(status1.Proto(), status2.Proto()) +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/wrappers.go b/vendor/google.golang.org/grpc/internal/testutils/wrappers.go new file mode 100644 index 000000000000..c9b596d8851c --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/wrappers.go @@ -0,0 +1,74 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package testutils + +import ( + "net" + "testing" +) + +// ConnWrapper wraps a net.Conn and pushes on a channel when closed. +type ConnWrapper struct { + net.Conn + CloseCh *Channel +} + +// Close closes the connection and sends a value on the close channel. +func (cw *ConnWrapper) Close() error { + err := cw.Conn.Close() + cw.CloseCh.Replace(nil) + return err +} + +// ListenerWrapper wraps a net.Listener and the returned net.Conn. +// +// It pushes on a channel whenever it accepts a new connection. +type ListenerWrapper struct { + net.Listener + NewConnCh *Channel +} + +// Accept wraps the Listener Accept and sends the accepted connection on a +// channel. +func (l *ListenerWrapper) Accept() (net.Conn, error) { + c, err := l.Listener.Accept() + if err != nil { + return nil, err + } + closeCh := NewChannel() + conn := &ConnWrapper{Conn: c, CloseCh: closeCh} + l.NewConnCh.Send(conn) + return conn, nil +} + +// NewListenerWrapper returns a ListenerWrapper. +func NewListenerWrapper(t *testing.T, lis net.Listener) *ListenerWrapper { + if lis == nil { + var err error + lis, err = LocalTCPListener() + if err != nil { + t.Fatal(err) + } + } + + return &ListenerWrapper{ + Listener: lis, + NewConnCh: NewChannel(), + } +} diff --git a/vendor/google.golang.org/grpc/internal/testutils/wrr.go b/vendor/google.golang.org/grpc/internal/testutils/wrr.go new file mode 100644 index 000000000000..6c9486329d41 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/testutils/wrr.go @@ -0,0 +1,73 @@ +/* + * + * Copyright 2020 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package testutils + +import ( + "fmt" + "sync" + + "google.golang.org/grpc/internal/wrr" +) + +// testWRR is a deterministic WRR implementation. +// +// The real implementation does random WRR. testWRR makes the balancer behavior +// deterministic and easier to test. +// +// With {a: 2, b: 3}, the Next() results will be {a, a, b, b, b}. +type testWRR struct { + itemsWithWeight []struct { + item interface{} + weight int64 + } + length int + + mu sync.Mutex + idx int // The index of the item that will be picked + count int64 // The number of times the current item has been picked. +} + +// NewTestWRR return a WRR for testing. It's deterministic instead of random. +func NewTestWRR() wrr.WRR { + return &testWRR{} +} + +func (twrr *testWRR) Add(item interface{}, weight int64) { + twrr.itemsWithWeight = append(twrr.itemsWithWeight, struct { + item interface{} + weight int64 + }{item: item, weight: weight}) + twrr.length++ +} + +func (twrr *testWRR) Next() interface{} { + twrr.mu.Lock() + iww := twrr.itemsWithWeight[twrr.idx] + twrr.count++ + if twrr.count >= iww.weight { + twrr.idx = (twrr.idx + 1) % twrr.length + twrr.count = 0 + } + twrr.mu.Unlock() + return iww.item +} + +func (twrr *testWRR) String() string { + return fmt.Sprint(twrr.itemsWithWeight) +} diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index aaa9c859a349..9097385e1a6a 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -527,6 +527,9 @@ const minBatchSize = 1000 // As an optimization, to increase the batch size for each flush, loopy yields the processor, once // if the batch size is too low to give stream goroutines a chance to fill it up. func (l *loopyWriter) run() (err error) { + // Always flush the writer before exiting in case there are pending frames + // to be sent. + defer l.framer.writer.Flush() for { it, err := l.cbuf.get(true) if err != nil { @@ -650,16 +653,18 @@ func (l *loopyWriter) headerHandler(h *headerFrame) error { itl: &itemList{}, wq: h.wq, } - str.itl.enqueue(h) - return l.originateStream(str) + return l.originateStream(str, h) } -func (l *loopyWriter) originateStream(str *outStream) error { - hdr := str.itl.dequeue().(*headerFrame) +func (l *loopyWriter) originateStream(str *outStream, hdr *headerFrame) error { + // l.draining is set when handling GoAway. In which case, we want to avoid + // creating new streams. + if l.draining { + // TODO: provide a better error with the reason we are in draining. + hdr.onOrphaned(errStreamDrain) + return nil + } if err := hdr.initStream(str.id); err != nil { - if err == errStreamDrain { // errStreamDrain need not close transport - return nil - } return err } if err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { @@ -757,7 +762,7 @@ func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error { return err } } - if l.side == clientSide && l.draining && len(l.estdStreams) == 0 { + if l.draining && len(l.estdStreams) == 0 { return errors.New("finished processing active streams while in draining mode") } return nil @@ -812,7 +817,6 @@ func (l *loopyWriter) goAwayHandler(g *goAway) error { } func (l *loopyWriter) closeConnectionHandler() error { - l.framer.writer.Flush() // Exit loopyWriter entirely by returning an error here. This will lead to // the transport closing the connection, and, ultimately, transport // closure. diff --git a/vendor/google.golang.org/grpc/internal/transport/defaults.go b/vendor/google.golang.org/grpc/internal/transport/defaults.go index 9fa306b2e07a..bc8ee0747496 100644 --- a/vendor/google.golang.org/grpc/internal/transport/defaults.go +++ b/vendor/google.golang.org/grpc/internal/transport/defaults.go @@ -47,3 +47,9 @@ const ( defaultClientMaxHeaderListSize = uint32(16 << 20) defaultServerMaxHeaderListSize = uint32(16 << 20) ) + +// MaxStreamID is the upper bound for the stream ID before the current +// transport gracefully closes and new transport is created for subsequent RPCs. +// This is set to 75% of 2^31-1. Streams are identified with an unsigned 31-bit +// integer. It's exported so that tests can override it. +var MaxStreamID = uint32(math.MaxInt32 * 3 / 4) diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index ebe8bfe330a5..e6626bf96e7c 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -65,7 +65,7 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s contentSubtype, validContentType := grpcutil.ContentSubtype(contentType) if !validContentType { msg := fmt.Sprintf("invalid gRPC request content-type %q", contentType) - http.Error(w, msg, http.StatusBadRequest) + http.Error(w, msg, http.StatusUnsupportedMediaType) return nil, errors.New(msg) } if _, ok := w.(http.Flusher); !ok { @@ -87,7 +87,7 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s if v := r.Header.Get("grpc-timeout"); v != "" { to, err := decodeTimeout(v) if err != nil { - msg := fmt.Sprintf("malformed time-out: %v", err) + msg := fmt.Sprintf("malformed grpc-timeout: %v", err) http.Error(w, msg, http.StatusBadRequest) return nil, status.Error(codes.Internal, msg) } diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 3e582a2853c6..79ee8aea0a21 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -140,8 +140,7 @@ type http2Client struct { channelzID *channelz.Identifier czData *channelzData - onGoAway func(GoAwayReason) - onClose func() + onClose func(GoAwayReason) bufferPool *bufferPool @@ -197,7 +196,7 @@ func isTemporary(err error) bool { // newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2 // and starts to receive messages on it. Non-nil error returns if construction // fails. -func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { +func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (_ *http2Client, err error) { scheme := "http" ctx, cancel := context.WithCancel(ctx) defer func() { @@ -217,7 +216,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts if opts.FailOnNonTempDialError { return nil, connectionErrorf(isTemporary(err), err, "transport: error while dialing: %v", err) } - return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err) + return nil, connectionErrorf(true, err, "transport: Error while dialing: %v", err) } // Any further errors will close the underlying connection @@ -343,7 +342,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), czData: new(channelzData), - onGoAway: onGoAway, keepaliveEnabled: keepaliveEnabled, bufferPool: newBufferPool(), onClose: onClose, @@ -744,15 +742,12 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, endStream: false, initStream: func(id uint32) error { t.mu.Lock() - if state := t.state; state != reachable { + // TODO: handle transport closure in loopy instead and remove this + // initStream is never called when transport is draining. + if t.state == closing { t.mu.Unlock() - // Do a quick cleanup. - err := error(errStreamDrain) - if state == closing { - err = ErrConnClosing - } - cleanup(err) - return err + cleanup(ErrConnClosing) + return ErrConnClosing } if channelz.IsOn() { atomic.AddInt64(&t.czData.streamsStarted, 1) @@ -770,6 +765,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, } firstTry := true var ch chan struct{} + transportDrainRequired := false checkForStreamQuota := func(it interface{}) bool { if t.streamQuota <= 0 { // Can go negative if server decreases it. if firstTry { @@ -785,6 +781,11 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, h := it.(*headerFrame) h.streamID = t.nextID t.nextID += 2 + + // Drain client transport if nextID > MaxStreamID which signals gRPC that + // the connection is closed and a new one must be created for subsequent RPCs. + transportDrainRequired = t.nextID > MaxStreamID + s.id = h.streamID s.fc = &inFlow{limit: uint32(t.initialWindowSize)} t.mu.Lock() @@ -864,6 +865,12 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, sh.HandleRPC(s.ctx, outHeader) } } + if transportDrainRequired { + if logger.V(logLevel) { + logger.Infof("transport: t.nextID > MaxStreamID. Draining") + } + t.GracefulClose() + } return s, nil } @@ -957,7 +964,9 @@ func (t *http2Client) Close(err error) { } // Call t.onClose ASAP to prevent the client from attempting to create new // streams. - t.onClose() + if t.state != draining { + t.onClose(GoAwayInvalid) + } t.state = closing streams := t.activeStreams t.activeStreams = nil @@ -1010,6 +1019,7 @@ func (t *http2Client) GracefulClose() { if logger.V(logLevel) { logger.Infof("transport: GracefulClose called") } + t.onClose(GoAwayInvalid) t.state = draining active := len(t.activeStreams) t.mu.Unlock() @@ -1172,7 +1182,7 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { statusCode, ok := http2ErrConvTab[f.ErrCode] if !ok { if logger.V(logLevel) { - logger.Warningf("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error %v", f.ErrCode) + logger.Warningf("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error: %v", f.ErrCode) } statusCode = codes.Unknown } @@ -1290,8 +1300,10 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { // Notify the clientconn about the GOAWAY before we set the state to // draining, to allow the client to stop attempting to create streams // before disallowing new streams on this connection. - t.onGoAway(t.goAwayReason) - t.state = draining + if t.state != draining { + t.onClose(t.goAwayReason) + t.state = draining + } } // All streams with IDs greater than the GoAwayId // and smaller than the previous GoAway ID should be killed. @@ -1780,3 +1792,9 @@ func (t *http2Client) getOutFlowWindow() int64 { return -2 } } + +func (t *http2Client) stateForTesting() transportState { + t.mu.Lock() + defer t.mu.Unlock() + return t.state +} diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 37e089bc8433..bc3da706726d 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -380,13 +380,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( fc: &inFlow{limit: uint32(t.initialWindowSize)}, } var ( - // If a gRPC Response-Headers has already been received, then it means - // that the peer is speaking gRPC and we are in gRPC mode. - isGRPC = false - mdata = make(map[string][]string) - httpMethod string - // headerError is set if an error is encountered while parsing the headers - headerError bool + // if false, content-type was missing or invalid + isGRPC = false + contentType = "" + mdata = make(map[string][]string) + httpMethod string + // these are set if an error is encountered while parsing the headers + protocolError bool + headerError *status.Status timeoutSet bool timeout time.Duration @@ -397,6 +398,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( case "content-type": contentSubtype, validContentType := grpcutil.ContentSubtype(hf.Value) if !validContentType { + contentType = hf.Value break } mdata[hf.Name] = append(mdata[hf.Name], hf.Value) @@ -412,7 +414,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( timeoutSet = true var err error if timeout, err = decodeTimeout(hf.Value); err != nil { - headerError = true + headerError = status.Newf(codes.Internal, "malformed grpc-timeout: %v", err) } // "Transports must consider requests containing the Connection header // as malformed." - A41 @@ -420,14 +422,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( if logger.V(logLevel) { logger.Errorf("transport: http2Server.operateHeaders parsed a :connection header which makes a request malformed as per the HTTP/2 spec") } - headerError = true + protocolError = true default: if isReservedHeader(hf.Name) && !isWhitelistedHeader(hf.Name) { break } v, err := decodeMetadataHeader(hf.Name, hf.Value) if err != nil { - headerError = true + headerError = status.Newf(codes.Internal, "malformed binary metadata %q in header %q: %v", hf.Value, hf.Name, err) logger.Warningf("Failed to decode metadata header (%q, %q): %v", hf.Name, hf.Value, err) break } @@ -446,7 +448,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( logger.Errorf("transport: %v", errMsg) } t.controlBuf.put(&earlyAbortStream{ - httpStatus: 400, + httpStatus: http.StatusBadRequest, streamID: streamID, contentSubtype: s.contentSubtype, status: status.New(codes.Internal, errMsg), @@ -455,7 +457,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( return nil } - if !isGRPC || headerError { + if protocolError { t.controlBuf.put(&cleanupStream{ streamID: streamID, rst: true, @@ -464,6 +466,26 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( }) return nil } + if !isGRPC { + t.controlBuf.put(&earlyAbortStream{ + httpStatus: http.StatusUnsupportedMediaType, + streamID: streamID, + contentSubtype: s.contentSubtype, + status: status.Newf(codes.InvalidArgument, "invalid gRPC request content-type %q", contentType), + rst: !frame.StreamEnded(), + }) + return nil + } + if headerError != nil { + t.controlBuf.put(&earlyAbortStream{ + httpStatus: http.StatusBadRequest, + streamID: streamID, + contentSubtype: s.contentSubtype, + status: headerError, + rst: !frame.StreamEnded(), + }) + return nil + } // "If :authority is missing, Host must be renamed to :authority." - A41 if len(mdata[":authority"]) == 0 { diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index 6cff20c8e022..0ac77ea4f8c7 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -583,8 +583,8 @@ type ConnectOptions struct { // NewClientTransport establishes the transport with the required ConnectOptions // and returns it to the caller. -func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { - return newHTTP2Client(connectCtx, ctx, addr, opts, onGoAway, onClose) +func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (ClientTransport, error) { + return newHTTP2Client(connectCtx, ctx, addr, opts, onClose) } // Options provides additional hints and information for message diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index a5d5516ee060..c525dc070fc6 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -58,12 +58,18 @@ func (pw *pickerWrapper) updatePicker(p balancer.Picker) { pw.mu.Unlock() } -func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) func(balancer.DoneInfo) { +// doneChannelzWrapper performs the following: +// - increments the calls started channelz counter +// - wraps the done function in the passed in result to increment the calls +// failed or calls succeeded channelz counter before invoking the actual +// done function. +func doneChannelzWrapper(acw *acBalancerWrapper, result *balancer.PickResult) { acw.mu.Lock() ac := acw.ac acw.mu.Unlock() ac.incrCallsStarted() - return func(b balancer.DoneInfo) { + done := result.Done + result.Done = func(b balancer.DoneInfo) { if b.Err != nil && b.Err != io.EOF { ac.incrCallsFailed() } else { @@ -82,7 +88,7 @@ func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) f // - the current picker returns other errors and failfast is false. // - the subConn returned by the current picker is not READY // When one of these situations happens, pick blocks until the picker gets updated. -func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, func(balancer.DoneInfo), error) { +func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, balancer.PickResult, error) { var ch chan struct{} var lastPickErr error @@ -90,7 +96,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. pw.mu.Lock() if pw.done { pw.mu.Unlock() - return nil, nil, ErrClientConnClosing + return nil, balancer.PickResult{}, ErrClientConnClosing } if pw.picker == nil { @@ -111,9 +117,9 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. } switch ctx.Err() { case context.DeadlineExceeded: - return nil, nil, status.Error(codes.DeadlineExceeded, errStr) + return nil, balancer.PickResult{}, status.Error(codes.DeadlineExceeded, errStr) case context.Canceled: - return nil, nil, status.Error(codes.Canceled, errStr) + return nil, balancer.PickResult{}, status.Error(codes.Canceled, errStr) } case <-ch: } @@ -125,7 +131,6 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. pw.mu.Unlock() pickResult, err := p.Pick(info) - if err != nil { if err == balancer.ErrNoSubConnAvailable { continue @@ -136,7 +141,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. if istatus.IsRestrictedControlPlaneCode(st) { err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err) } - return nil, nil, dropError{error: err} + return nil, balancer.PickResult{}, dropError{error: err} } // For all other errors, wait for ready RPCs should block and other // RPCs should fail with unavailable. @@ -144,7 +149,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. lastPickErr = err continue } - return nil, nil, status.Error(codes.Unavailable, err.Error()) + return nil, balancer.PickResult{}, status.Error(codes.Unavailable, err.Error()) } acw, ok := pickResult.SubConn.(*acBalancerWrapper) @@ -154,9 +159,10 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. } if t := acw.getAddrConn().getReadyTransport(); t != nil { if channelz.IsOn() { - return t, doneChannelzWrapper(acw, pickResult.Done), nil + doneChannelzWrapper(acw, &pickResult) + return t, pickResult, nil } - return t, pickResult.Done, nil + return t, pickResult, nil } if pickResult.Done != nil { // Calling done with nil error, no bytes sent and no bytes received. diff --git a/vendor/google.golang.org/grpc/pickfirst.go b/vendor/google.golang.org/grpc/pickfirst.go index b3a55481b944..fc91b4d266de 100644 --- a/vendor/google.golang.org/grpc/pickfirst.go +++ b/vendor/google.golang.org/grpc/pickfirst.go @@ -51,7 +51,7 @@ type pickfirstBalancer struct { func (b *pickfirstBalancer) ResolverError(err error) { if logger.V(2) { - logger.Infof("pickfirstBalancer: ResolverError called with error %v", err) + logger.Infof("pickfirstBalancer: ResolverError called with error: %v", err) } if b.subConn == nil { b.state = connectivity.TransientFailure diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index 967cbc7373ab..654e9ce69f4a 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -24,6 +24,7 @@ import ( "context" "net" "net/url" + "strings" "google.golang.org/grpc/attributes" "google.golang.org/grpc/credentials" @@ -247,9 +248,6 @@ type Target struct { Scheme string // Deprecated: use URL.Host instead. Authority string - // Deprecated: use URL.Path or URL.Opaque instead. The latter is set when - // the former is empty. - Endpoint string // URL contains the parsed dial target with an optional default scheme added // to it if the original dial target contained no scheme or contained an // unregistered scheme. Any query params specified in the original dial @@ -257,6 +255,24 @@ type Target struct { URL url.URL } +// Endpoint retrieves endpoint without leading "/" from either `URL.Path` +// or `URL.Opaque`. The latter is used when the former is empty. +func (t Target) Endpoint() string { + endpoint := t.URL.Path + if endpoint == "" { + endpoint = t.URL.Opaque + } + // For targets of the form "[scheme]://[authority]/endpoint, the endpoint + // value returned from url.Parse() contains a leading "/". Although this is + // in accordance with RFC 3986, we do not want to break existing resolver + // implementations which expect the endpoint without the leading "/". So, we + // end up stripping the leading "/" here. But this will result in an + // incorrect parsing for something like "unix:///path/to/socket". Since we + // own the "unix" resolver, we can workaround in the unix resolver by using + // the `URL` field. + return strings.TrimPrefix(endpoint, "/") +} + // Builder creates a resolver that will be used to watch name resolution updates. type Builder interface { // Build creates a new resolver for the given target. diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 934fc1aa015e..cb7020ebecd7 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -25,7 +25,6 @@ import ( "encoding/binary" "fmt" "io" - "io/ioutil" "math" "strings" "sync" @@ -77,7 +76,7 @@ func NewGZIPCompressorWithLevel(level int) (Compressor, error) { return &gzipCompressor{ pool: sync.Pool{ New: func() interface{} { - w, err := gzip.NewWriterLevel(ioutil.Discard, level) + w, err := gzip.NewWriterLevel(io.Discard, level) if err != nil { panic(err) } @@ -143,7 +142,7 @@ func (d *gzipDecompressor) Do(r io.Reader) ([]byte, error) { z.Close() d.pool.Put(z) }() - return ioutil.ReadAll(z) + return io.ReadAll(z) } func (d *gzipDecompressor) Type() string { @@ -297,7 +296,8 @@ func (o FailFastCallOption) before(c *callInfo) error { func (o FailFastCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxCallRecvMsgSize returns a CallOption which sets the maximum message size -// in bytes the client can receive. +// in bytes the client can receive. If this is not set, gRPC uses the default +// 4MB. func MaxCallRecvMsgSize(bytes int) CallOption { return MaxRecvMsgSizeCallOption{MaxRecvMsgSize: bytes} } @@ -320,7 +320,8 @@ func (o MaxRecvMsgSizeCallOption) before(c *callInfo) error { func (o MaxRecvMsgSizeCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxCallSendMsgSize returns a CallOption which sets the maximum message size -// in bytes the client can send. +// in bytes the client can send. If this is not set, gRPC uses the default +// `math.MaxInt32`. func MaxCallSendMsgSize(bytes int) CallOption { return MaxSendMsgSizeCallOption{MaxSendMsgSize: bytes} } @@ -711,7 +712,7 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei d, size, err = decompress(compressor, d, maxReceiveMessageSize) } if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) + return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) } if size > maxReceiveMessageSize { // TODO: Revisit the error code. Currently keep it consistent with java @@ -746,7 +747,7 @@ func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize } // Read from LimitReader with limit max+1. So if the underlying // reader is over limit, the result will be bigger than max. - d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + d, err = io.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) return d, len(d), err } @@ -759,7 +760,7 @@ func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m interf return err } if err := c.Unmarshal(d, m); err != nil { - return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message %v", err) + return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message: %v", err) } if payInfo != nil { payInfo.uncompressedBytes = d diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 2808b7c83e80..d5a6e78be44d 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -1299,7 +1299,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. d, err := recvAndDecompress(&parser{r: stream}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp) if err != nil { if e := t.WriteStatus(stream, status.Convert(err)); e != nil { - channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status %v", e) + channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e) } return err } diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go index 01bbb2025aed..f22acace4253 100644 --- a/vendor/google.golang.org/grpc/service_config.go +++ b/vendor/google.golang.org/grpc/service_config.go @@ -226,7 +226,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { var rsc jsonSC err := json.Unmarshal([]byte(js), &rsc) if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } sc := ServiceConfig{ @@ -254,7 +254,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { } d, err := parseDuration(m.Timeout) if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } @@ -263,7 +263,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { Timeout: d, } if mc.RetryPolicy, err = convertRetryPolicy(m.RetryPolicy); err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } if m.MaxRequestMessageBytes != nil { @@ -283,13 +283,13 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { for i, n := range *m.Name { path, err := n.generatePath() if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } if _, ok := paths[path]; ok { err = errDuplicatedName - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } paths[path] = struct{}{} diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 0f8e6c0149da..93231af2ac56 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -438,7 +438,7 @@ func (a *csAttempt) getTransport() error { cs := a.cs var err error - a.t, a.done, err = cs.cc.getTransport(a.ctx, cs.callInfo.failFast, cs.callHdr.Method) + a.t, a.pickResult, err = cs.cc.getTransport(a.ctx, cs.callInfo.failFast, cs.callHdr.Method) if err != nil { if de, ok := err.(dropError); ok { err = de.error @@ -455,6 +455,25 @@ func (a *csAttempt) getTransport() error { func (a *csAttempt) newStream() error { cs := a.cs cs.callHdr.PreviousAttempts = cs.numRetries + + // Merge metadata stored in PickResult, if any, with existing call metadata. + // It is safe to overwrite the csAttempt's context here, since all state + // maintained in it are local to the attempt. When the attempt has to be + // retried, a new instance of csAttempt will be created. + if a.pickResult.Metatada != nil { + // We currently do not have a function it the metadata package which + // merges given metadata with existing metadata in a context. Existing + // function `AppendToOutgoingContext()` takes a variadic argument of key + // value pairs. + // + // TODO: Make it possible to retrieve key value pairs from metadata.MD + // in a form passable to AppendToOutgoingContext(), or create a version + // of AppendToOutgoingContext() that accepts a metadata.MD. + md, _ := metadata.FromOutgoingContext(a.ctx) + md = metadata.Join(md, a.pickResult.Metatada) + a.ctx = metadata.NewOutgoingContext(a.ctx, md) + } + s, err := a.t.NewStream(a.ctx, cs.callHdr) if err != nil { nse, ok := err.(*transport.NewStreamError) @@ -529,12 +548,12 @@ type clientStream struct { // csAttempt implements a single transport stream attempt within a // clientStream. type csAttempt struct { - ctx context.Context - cs *clientStream - t transport.ClientTransport - s *transport.Stream - p *parser - done func(balancer.DoneInfo) + ctx context.Context + cs *clientStream + t transport.ClientTransport + s *transport.Stream + p *parser + pickResult balancer.PickResult finished bool dc Decompressor @@ -1103,12 +1122,12 @@ func (a *csAttempt) finish(err error) { tr = a.s.Trailer() } - if a.done != nil { + if a.pickResult.Done != nil { br := false if a.s != nil { br = a.s.BytesReceived() } - a.done(balancer.DoneInfo{ + a.pickResult.Done(balancer.DoneInfo{ Err: err, Trailer: tr, BytesSent: a.s != nil, @@ -1464,6 +1483,9 @@ type ServerStream interface { // It is safe to have a goroutine calling SendMsg and another goroutine // calling RecvMsg on the same stream at the same time, but it is not safe // to call SendMsg on the same stream in different goroutines. + // + // It is not safe to modify the message after calling SendMsg. Tracing + // libraries and stats handlers may use the message lazily. SendMsg(m interface{}) error // RecvMsg blocks until it receives a message into m or the stream is // done. It returns io.EOF when the client has performed a CloseSend. On diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 6410a0b96c92..fe552c315be2 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.52.3" +const Version = "1.53.0" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index 1d03c0914810..3728aed04fc7 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -66,6 +66,17 @@ elif [[ "$#" -ne 0 ]]; then die "Unknown argument(s): $*" fi +# - Check that generated proto files are up to date. +if [[ -z "${VET_SKIP_PROTO}" ]]; then + PATH="/home/travis/bin:${PATH}" make proto && \ + git status --porcelain 2>&1 | fail_on_output || \ + (git status; git --no-pager diff; exit 1) +fi + +if [[ -n "${VET_ONLY_PROTO}" ]]; then + exit 0 +fi + # - Ensure all source files contain a copyright message. # (Done in two parts because Darwin "git grep" has broken support for compound # exclusion matches.) @@ -93,13 +104,6 @@ git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*. misspell -error . -# - Check that generated proto files are up to date. -if [[ -z "${VET_SKIP_PROTO}" ]]; then - PATH="/home/travis/bin:${PATH}" make proto && \ - git status --porcelain 2>&1 | fail_on_output || \ - (git status; git --no-pager diff; exit 1) -fi - # - gofmt, goimports, golint (with exceptions for generated code), go vet, # go mod tidy. # Perform these checks on each module inside gRPC. @@ -111,7 +115,7 @@ for MOD_FILE in $(find . -name 'go.mod'); do goimports -l . 2>&1 | not grep -vE "\.pb\.go" golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" - go mod tidy + go mod tidy -compat=1.17 git status --porcelain 2>&1 | fail_on_output || \ (git status; git --no-pager diff; exit 1) popd diff --git a/vendor/google.golang.org/grpc/xds/csds/csds.go b/vendor/google.golang.org/grpc/xds/csds/csds.go index 0d71f8f8577a..551757b80069 100644 --- a/vendor/google.golang.org/grpc/xds/csds/csds.go +++ b/vendor/google.golang.org/grpc/xds/csds/csds.go @@ -25,55 +25,59 @@ package csds import ( "context" + "fmt" "io" + "sync" - v3adminpb "github.com/envoyproxy/go-control-plane/envoy/admin/v3" - v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3" - v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3" "github.com/golang/protobuf/proto" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + internalgrpclog "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/status" "google.golang.org/grpc/xds/internal/xdsclient" "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" "google.golang.org/protobuf/types/known/timestamppb" - _ "google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2" // Register v2 xds_client. - _ "google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3" // Register v3 xds_client. + v3adminpb "github.com/envoyproxy/go-control-plane/envoy/admin/v3" + v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" + v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3" + v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3" ) -var ( - logger = grpclog.Component("xds") - newXDSClient = func() xdsclient.XDSClient { - c, err := xdsclient.New() - if err != nil { - logger.Warningf("failed to create xds client: %v", err) - return nil - } - return c - } -) +var logger = grpclog.Component("xds") -const ( - listenerTypeURL = "envoy.config.listener.v3.Listener" - routeConfigTypeURL = "envoy.config.route.v3.RouteConfiguration" - clusterTypeURL = "envoy.config.cluster.v3.Cluster" - endpointsTypeURL = "envoy.config.endpoint.v3.ClusterLoadAssignment" -) +const prefix = "[csds-server %p] " -// ClientStatusDiscoveryServer implementations interface ClientStatusDiscoveryServiceServer. +func prefixLogger(s *ClientStatusDiscoveryServer) *internalgrpclog.PrefixLogger { + return internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf(prefix, s)) +} + +// ClientStatusDiscoveryServer provides an implementation of the Client Status +// Discovery Service (CSDS) for exposing the xDS config of a given client. See +// https://github.com/envoyproxy/envoy/blob/main/api/envoy/service/status/v3/csds.proto. +// +// For more details about the gRPC implementation of CSDS, refer to gRPC A40 at: +// https://github.com/grpc/proposal/blob/master/A40-csds-support.md. type ClientStatusDiscoveryServer struct { - // xdsClient will always be the same in practice. But we keep a copy in each - // server instance for testing. - xdsClient xdsclient.XDSClient + logger *internalgrpclog.PrefixLogger + + mu sync.Mutex + xdsClient xdsclient.XDSClient + xdsClientClose func() } -// NewClientStatusDiscoveryServer returns an implementation of the CSDS server that can be -// registered on a gRPC server. +// NewClientStatusDiscoveryServer returns an implementation of the CSDS server +// that can be registered on a gRPC server. func NewClientStatusDiscoveryServer() (*ClientStatusDiscoveryServer, error) { - return &ClientStatusDiscoveryServer{xdsClient: newXDSClient()}, nil + c, close, err := xdsclient.New() + if err != nil { + logger.Warningf("Failed to create xDS client: %v", err) + } + s := &ClientStatusDiscoveryServer{xdsClient: c, xdsClientClose: close} + s.logger = prefixLogger(s) + s.logger.Infof("Created CSDS server, with xdsClient %p", c) + return s, nil } // StreamClientStatus implementations interface ClientStatusDiscoveryServiceServer. @@ -106,6 +110,9 @@ func (s *ClientStatusDiscoveryServer) FetchClientStatus(_ context.Context, req * // // If it returns an error, the error is a status error. func (s *ClientStatusDiscoveryServer) buildClientStatusRespForReq(req *v3statuspb.ClientStatusRequest) (*v3statuspb.ClientStatusResponse, error) { + s.mu.Lock() + defer s.mu.Unlock() + if s.xdsClient == nil { return &v3statuspb.ClientStatusResponse{}, nil } @@ -115,21 +122,12 @@ func (s *ClientStatusDiscoveryServer) buildClientStatusRespForReq(req *v3statusp return nil, status.Errorf(codes.InvalidArgument, "node_matchers are not supported, request contains node_matchers: %v", req.NodeMatchers) } - lds := dumpToGenericXdsConfig(listenerTypeURL, s.xdsClient.DumpLDS) - rds := dumpToGenericXdsConfig(routeConfigTypeURL, s.xdsClient.DumpRDS) - cds := dumpToGenericXdsConfig(clusterTypeURL, s.xdsClient.DumpCDS) - eds := dumpToGenericXdsConfig(endpointsTypeURL, s.xdsClient.DumpEDS) - configs := make([]*v3statuspb.ClientConfig_GenericXdsConfig, 0, len(lds)+len(rds)+len(cds)+len(eds)) - configs = append(configs, lds...) - configs = append(configs, rds...) - configs = append(configs, cds...) - configs = append(configs, eds...) - + dump := s.xdsClient.DumpResources() ret := &v3statuspb.ClientStatusResponse{ Config: []*v3statuspb.ClientConfig{ { - Node: nodeProtoToV3(s.xdsClient.BootstrapConfig().XDSServer.NodeProto), - GenericXdsConfigs: configs, + Node: nodeProtoToV3(s.xdsClient.BootstrapConfig().XDSServer.NodeProto, s.logger), + GenericXdsConfigs: dumpToGenericXdsConfig(dump), }, }, } @@ -138,8 +136,8 @@ func (s *ClientStatusDiscoveryServer) buildClientStatusRespForReq(req *v3statusp // Close cleans up the resources. func (s *ClientStatusDiscoveryServer) Close() { - if s.xdsClient != nil { - s.xdsClient.Close() + if s.xdsClientClose != nil { + s.xdsClientClose() } } @@ -153,7 +151,7 @@ func (s *ClientStatusDiscoveryServer) Close() { // The default case (not v2 or v3) is nil, instead of error, because the // resources in the response are more important than the node. The worst case is // that the user will receive no Node info, but will still get resources. -func nodeProtoToV3(n proto.Message) *v3corepb.Node { +func nodeProtoToV3(n proto.Message, logger *internalgrpclog.PrefixLogger) *v3corepb.Node { var node *v3corepb.Node switch nn := n.(type) { case *v3corepb.Node: @@ -174,26 +172,27 @@ func nodeProtoToV3(n proto.Message) *v3corepb.Node { return node } -func dumpToGenericXdsConfig(typeURL string, dumpF func() map[string]xdsresource.UpdateWithMD) []*v3statuspb.ClientConfig_GenericXdsConfig { - dump := dumpF() - ret := make([]*v3statuspb.ClientConfig_GenericXdsConfig, 0, len(dump)) - for name, d := range dump { - config := &v3statuspb.ClientConfig_GenericXdsConfig{ - TypeUrl: typeURL, - Name: name, - VersionInfo: d.MD.Version, - XdsConfig: d.Raw, - LastUpdated: timestamppb.New(d.MD.Timestamp), - ClientStatus: serviceStatusToProto(d.MD.Status), - } - if errState := d.MD.ErrState; errState != nil { - config.ErrorState = &v3adminpb.UpdateFailureState{ - LastUpdateAttempt: timestamppb.New(errState.Timestamp), - Details: errState.Err.Error(), - VersionInfo: errState.Version, +func dumpToGenericXdsConfig(dump map[string]map[string]xdsresource.UpdateWithMD) []*v3statuspb.ClientConfig_GenericXdsConfig { + var ret []*v3statuspb.ClientConfig_GenericXdsConfig + for typeURL, updates := range dump { + for name, update := range updates { + config := &v3statuspb.ClientConfig_GenericXdsConfig{ + TypeUrl: typeURL, + Name: name, + VersionInfo: update.MD.Version, + XdsConfig: update.Raw, + LastUpdated: timestamppb.New(update.MD.Timestamp), + ClientStatus: serviceStatusToProto(update.MD.Status), + } + if errState := update.MD.ErrState; errState != nil { + config.ErrorState = &v3adminpb.UpdateFailureState{ + LastUpdateAttempt: timestamppb.New(errState.Timestamp), + Details: errState.Err.Error(), + VersionInfo: errState.Version, + } } + ret = append(ret, config) } - ret = append(ret, config) } return ret } diff --git a/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go b/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go index 669c4fc1c483..5bc17b03e5b2 100644 --- a/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go +++ b/vendor/google.golang.org/grpc/xds/googledirectpath/googlec2p.go @@ -70,7 +70,7 @@ const ( var ( onGCE = googlecloud.OnGCE - newClientWithConfig = func(config *bootstrap.Config) (xdsclient.XDSClient, error) { + newClientWithConfig = func(config *bootstrap.Config) (xdsclient.XDSClient, func(), error) { return xdsclient.NewWithConfig(config) } @@ -135,7 +135,7 @@ func (c2pResolverBuilder) Build(t resolver.Target, cc resolver.ClientConn, opts // Create singleton xds client with this config. The xds client will be // used by the xds resolver later. - xdsC, err := newClientWithConfig(config) + _, close, err := newClientWithConfig(config) if err != nil { return nil, fmt.Errorf("failed to start xDS client: %v", err) } @@ -154,12 +154,12 @@ func (c2pResolverBuilder) Build(t resolver.Target, cc resolver.ClientConn, opts } xdsR, err := resolver.Get(xdsName).Build(t, cc, opts) if err != nil { - xdsC.Close() + close() return nil, err } return &c2pResolver{ - Resolver: xdsR, - client: xdsC, + Resolver: xdsR, + clientCloseFunc: close, }, nil } @@ -169,12 +169,12 @@ func (b c2pResolverBuilder) Scheme() string { type c2pResolver struct { resolver.Resolver - client xdsclient.XDSClient + clientCloseFunc func() } func (r *c2pResolver) Close() { r.Resolver.Close() - r.client.Close() + r.clientCloseFunc() } var ipv6EnabledMetadata = &structpb.Struct{ diff --git a/vendor/google.golang.org/grpc/xds/googledirectpath/utils.go b/vendor/google.golang.org/grpc/xds/googledirectpath/utils.go index 600441979785..de33cf48d0e5 100644 --- a/vendor/google.golang.org/grpc/xds/googledirectpath/utils.go +++ b/vendor/google.golang.org/grpc/xds/googledirectpath/utils.go @@ -21,7 +21,7 @@ package googledirectpath import ( "bytes" "fmt" - "io/ioutil" + "io" "net/http" "net/url" "sync" @@ -47,7 +47,7 @@ func getFromMetadata(timeout time.Duration, urlStr string) ([]byte, error) { if resp.StatusCode != http.StatusOK { return nil, fmt.Errorf("metadata server returned resp with non-OK: %v", resp) } - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { return nil, fmt.Errorf("failed reading from metadata server: %v", err) } diff --git a/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go b/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go index 14c1c2e769aa..4a0beab131d1 100644 --- a/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go +++ b/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go @@ -349,7 +349,7 @@ func (b *cdsBalancer) handleWatchUpdate(update clusterHandlerUpdate) { if b.childLB == nil { childLB, err := newChildBalancer(b.ccw, b.bOpts) if err != nil { - b.logger.Errorf("Failed to create child policy of type %s, %v", clusterresolver.Name, err) + b.logger.Errorf("Failed to create child policy of type %s: %v", clusterresolver.Name, err) return } b.childLB = childLB diff --git a/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_dns.go b/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_dns.go index 7a639f51a5d9..703b00811dfa 100644 --- a/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_dns.go +++ b/vendor/google.golang.org/grpc/xds/internal/balancer/clusterresolver/resource_resolver_dns.go @@ -21,6 +21,7 @@ package clusterresolver import ( "fmt" + "google.golang.org/grpc/internal/testutils" "google.golang.org/grpc/resolver" "google.golang.org/grpc/serviceconfig" ) @@ -50,7 +51,7 @@ func newDNSResolver(target string, topLevelResolver *resourceResolver) *dnsDisco target: target, topLevelResolver: topLevelResolver, } - r, err := newDNS(resolver.Target{Scheme: "dns", Endpoint: target}, ret, resolver.BuildOptions{}) + r, err := newDNS(resolver.Target{Scheme: "dns", URL: *testutils.MustParseURL("dns:///" + target)}, ret, resolver.BuildOptions{}) if err != nil { select { case <-topLevelResolver.updateChannel: diff --git a/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer.go b/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer.go index 17f57a576d33..28062c51ee93 100644 --- a/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer.go +++ b/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer.go @@ -105,7 +105,7 @@ type priorityBalancer struct { } func (b *priorityBalancer) UpdateClientConnState(s balancer.ClientConnState) error { - b.logger.Infof("Received update from resolver, balancer config: %+v", pretty.ToJSON(s.BalancerConfig)) + b.logger.Debugf("Received an update with balancer config: %+v", pretty.ToJSON(s.BalancerConfig)) newConfig, ok := s.BalancerConfig.(*LBConfig) if !ok { return fmt.Errorf("unexpected balancer config with type: %T", s.BalancerConfig) diff --git a/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_child.go b/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_child.go index ea7778bb56f8..7e8ccbd335e9 100644 --- a/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_child.go +++ b/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_child.go @@ -115,7 +115,7 @@ func (cb *childBalancer) sendUpdate() { BalancerConfig: cb.config, }) if err != nil { - cb.parent.logger.Warningf("failed to update ClientConn state for child %v: %v", cb.name, err) + cb.parent.logger.Warningf("Failed to update state for child policy %q: %v", cb.name, err) } } diff --git a/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_priority.go b/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_priority.go index 916f94ec0c02..4655bf418474 100644 --- a/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_priority.go +++ b/vendor/google.golang.org/grpc/xds/internal/balancer/priority/balancer_priority.go @@ -83,13 +83,13 @@ var ( // Caller must hold b.mu. func (b *priorityBalancer) syncPriority(childUpdating string) { if b.inhibitPickerUpdates { - b.logger.Infof("Skipping update from child with name %q", childUpdating) + b.logger.Debugf("Skipping update from child policy %q", childUpdating) return } for p, name := range b.priorities { child, ok := b.children[name] if !ok { - b.logger.Warningf("child with name %q is not found in children", name) + b.logger.Warningf("Priority name %q is not found in list of child policies", name) continue } @@ -99,12 +99,12 @@ func (b *priorityBalancer) syncPriority(childUpdating string) { (child.state.ConnectivityState == connectivity.Connecting && child.initTimer != nil) || p == len(b.priorities)-1 { if b.childInUse != child.name || child.name == childUpdating { - b.logger.Warningf("childInUse, childUpdating: %q, %q", b.childInUse, child.name) + b.logger.Debugf("childInUse, childUpdating: %q, %q", b.childInUse, child.name) // If we switch children or the child in use just updated its // picker, push the child's picker to the parent. b.cc.UpdateState(child.state) } - b.logger.Infof("switching to (%q, %v) in syncPriority", child.name, p) + b.logger.Debugf("Switching to (%q, %v) in syncPriority", child.name, p) b.switchToChild(child, p) break } @@ -119,7 +119,7 @@ func (b *priorityBalancer) stopSubBalancersLowerThanPriority(p int) { name := b.priorities[i] child, ok := b.children[name] if !ok { - b.logger.Warningf("child with name %q is not found in children", name) + b.logger.Warningf("Priority name %q is not found in list of child policies", name) continue } child.stop() @@ -173,11 +173,11 @@ func (b *priorityBalancer) handleChildStateUpdate(childName string, s balancer.S // necessary. child, ok := b.children[childName] if !ok { - b.logger.Warningf("priority: child balancer not found for child %v", childName) + b.logger.Warningf("Child policy not found for %q", childName) return } if !child.started { - b.logger.Warningf("priority: ignoring update from child %q which is not in started state: %+v", childName, s) + b.logger.Warningf("Ignoring update from child policy %q which is not in started state: %+v", childName, s) return } child.state = s diff --git a/vendor/google.golang.org/grpc/xds/internal/balancer/ringhash/config.go b/vendor/google.golang.org/grpc/xds/internal/balancer/ringhash/config.go index 4278b0636c7d..4763120fa649 100644 --- a/vendor/google.golang.org/grpc/xds/internal/balancer/ringhash/config.go +++ b/vendor/google.golang.org/grpc/xds/internal/balancer/ringhash/config.go @@ -22,6 +22,7 @@ import ( "encoding/json" "fmt" + "google.golang.org/grpc/internal/envconfig" "google.golang.org/grpc/serviceconfig" ) @@ -36,8 +37,6 @@ type LBConfig struct { const ( defaultMinSize = 1024 defaultMaxSize = 4096 - // TODO(apolcyn): make makeRingSizeCap configurable, with either a dial option or global setting - maxRingSizeCap = 4096 ) func parseConfig(c json.RawMessage) (*LBConfig, error) { @@ -51,14 +50,14 @@ func parseConfig(c json.RawMessage) (*LBConfig, error) { if cfg.MaxRingSize == 0 { cfg.MaxRingSize = defaultMaxSize } - if cfg.MinRingSize > maxRingSizeCap { - cfg.MinRingSize = maxRingSizeCap - } - if cfg.MaxRingSize > maxRingSizeCap { - cfg.MaxRingSize = maxRingSizeCap - } if cfg.MinRingSize > cfg.MaxRingSize { return nil, fmt.Errorf("min %v is greater than max %v", cfg.MinRingSize, cfg.MaxRingSize) } + if cfg.MinRingSize > envconfig.RingHashCap { + cfg.MinRingSize = envconfig.RingHashCap + } + if cfg.MaxRingSize > envconfig.RingHashCap { + cfg.MaxRingSize = envconfig.RingHashCap + } return &cfg, nil } diff --git a/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/rls/rls.go b/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/rls/rls.go index a167cc5fa2c9..4c39e85739db 100644 --- a/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/rls/rls.go +++ b/vendor/google.golang.org/grpc/xds/internal/clusterspecifier/rls/rls.go @@ -102,7 +102,7 @@ func (rls) ParseClusterSpecifierConfig(cfg proto.Message) (clusterspecifier.Bala return nil, fmt.Errorf("RLS LB policy not registered") } if _, err = rlsBB.(balancer.ConfigParser).ParseConfig(rawJSON); err != nil { - return nil, fmt.Errorf("rls_csp: validation error from rls lb policy parsing %v", err) + return nil, fmt.Errorf("rls_csp: validation error from rls lb policy parsing: %v", err) } return clusterspecifier.BalancerConfig{{internal.RLSLoadBalancingPolicyName: lbCfgJSON}}, nil diff --git a/vendor/google.golang.org/grpc/xds/internal/resolver/xds_resolver.go b/vendor/google.golang.org/grpc/xds/internal/resolver/xds_resolver.go index f473fcbaa733..09b3356301db 100644 --- a/vendor/google.golang.org/grpc/xds/internal/resolver/xds_resolver.go +++ b/vendor/google.golang.org/grpc/xds/internal/resolver/xds_resolver.go @@ -44,14 +44,14 @@ const xdsScheme = "xds" // ClientConns at the same time. func newBuilderForTesting(config []byte) (resolver.Builder, error) { return &xdsResolverBuilder{ - newXDSClient: func() (xdsclient.XDSClient, error) { + newXDSClient: func() (xdsclient.XDSClient, func(), error) { return xdsclient.NewWithBootstrapContentsForTesting(config) }, }, nil } // For overriding in unittests. -var newXDSClient = func() (xdsclient.XDSClient, error) { return xdsclient.New() } +var newXDSClient = func() (xdsclient.XDSClient, func(), error) { return xdsclient.New() } func init() { resolver.Register(&xdsResolverBuilder{}) @@ -59,7 +59,7 @@ func init() { } type xdsResolverBuilder struct { - newXDSClient func() (xdsclient.XDSClient, error) + newXDSClient func() (xdsclient.XDSClient, func(), error) } // Build helps implement the resolver.Builder interface. @@ -87,11 +87,12 @@ func (b *xdsResolverBuilder) Build(target resolver.Target, cc resolver.ClientCon newXDSClient = b.newXDSClient } - client, err := newXDSClient() + client, close, err := newXDSClient() if err != nil { return nil, fmt.Errorf("xds: failed to create xds-client: %v", err) } - r.client = client + r.xdsClient = client + r.xdsClientClose = close bootstrapConfig := client.BootstrapConfig() if bootstrapConfig == nil { return nil, errors.New("bootstrap configuration is empty") @@ -138,11 +139,11 @@ func (b *xdsResolverBuilder) Build(target resolver.Target, cc resolver.ClientCon r.ldsResourceName = bootstrap.PopulateResourceTemplate(template, endpoint) // Register a watch on the xdsClient for the resource name determined above. - cancelWatch := watchService(r.client, r.ldsResourceName, r.handleServiceUpdate, r.logger) - r.logger.Infof("Watch started on resource name %v with xds-client %p", r.ldsResourceName, r.client) + cancelWatch := watchService(r.xdsClient, r.ldsResourceName, r.handleServiceUpdate, r.logger) + r.logger.Infof("Watch started on resource name %v with xds-client %p", r.ldsResourceName, r.xdsClient) r.cancelWatch = func() { cancelWatch() - r.logger.Infof("Watch cancel on resource name %v with xds-client %p", r.ldsResourceName, r.client) + r.logger.Infof("Watch cancel on resource name %v with xds-client %p", r.ldsResourceName, r.xdsClient) } go r.run() @@ -174,7 +175,8 @@ type xdsResolver struct { ldsResourceName string // The underlying xdsClient which performs all xDS requests and responses. - client xdsclient.XDSClient + xdsClient xdsclient.XDSClient + xdsClientClose func() // A channel for the watch API callback to write service updates on to. The // updates are read by the run goroutine and passed on to the ClientConn. updateCh chan suWithError @@ -218,13 +220,13 @@ func (r *xdsResolver) sendNewServiceConfig(cs *configSelector) bool { r.cc.ReportError(err) return false } - r.logger.Infof("Received update on resource %v from xds-client %p, generated service config: %v", r.ldsResourceName, r.client, pretty.FormatJSON(sc)) + r.logger.Infof("Received update on resource %v from xds-client %p, generated service config: %v", r.ldsResourceName, r.xdsClient, pretty.FormatJSON(sc)) // Send the update to the ClientConn. state := iresolver.SetConfigSelector(resolver.State{ ServiceConfig: r.cc.ParseServiceConfig(string(sc)), }, cs) - r.cc.UpdateState(xdsclient.SetClient(state, r.client)) + r.cc.UpdateState(xdsclient.SetClient(state, r.xdsClient)) return true } @@ -237,7 +239,7 @@ func (r *xdsResolver) run() { return case update := <-r.updateCh: if update.err != nil { - r.logger.Warningf("Watch error on resource %v from xds-client %p, %v", r.ldsResourceName, r.client, update.err) + r.logger.Warningf("Watch error on resource %v from xds-client %p, %v", r.ldsResourceName, r.xdsClient, update.err) if xdsresource.ErrType(update.err) == xdsresource.ErrorTypeResourceNotFound { // If error is resource-not-found, it means the LDS // resource was removed. Ultimately send an empty service @@ -265,7 +267,7 @@ func (r *xdsResolver) run() { // Create the config selector for this update. cs, err := r.newConfigSelector(update.su) if err != nil { - r.logger.Warningf("Error parsing update on resource %v from xds-client %p: %v", r.ldsResourceName, r.client, err) + r.logger.Warningf("Error parsing update on resource %v from xds-client %p: %v", r.ldsResourceName, r.xdsClient, err) r.cc.ReportError(err) continue } @@ -313,8 +315,8 @@ func (r *xdsResolver) Close() { if r.cancelWatch != nil { r.cancelWatch() } - if r.client != nil { - r.client.Close() + if r.xdsClientClose != nil { + r.xdsClientClose() } r.closed.Fire() r.logger.Infof("Shutdown") diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/authority.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/authority.go index 817cb7338f5a..3d4f99e88d5c 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/authority.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/authority.go @@ -18,102 +18,439 @@ package xdsclient import ( + "context" + "fmt" + "sync" + "time" + + "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/xds/internal/xdsclient/bootstrap" "google.golang.org/grpc/xds/internal/xdsclient/load" - "google.golang.org/grpc/xds/internal/xdsclient/pubsub" + "google.golang.org/grpc/xds/internal/xdsclient/transport" "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" + "google.golang.org/protobuf/types/known/anypb" ) -// authority is a combination of pubsub and the controller for this authority. +type watchState int + +const ( + watchStateStarted watchState = iota + watchStateRespReceived + watchStateTimeout + watchStateCanceled +) + +type resourceState struct { + watchers map[xdsresource.ResourceWatcher]bool // Set of watchers for this resource + cache xdsresource.ResourceData // Most recent ACKed update for this resource + md xdsresource.UpdateMetadata // Metadata for the most recent update + + // Common watch state for all watchers of this resource. + wTimer *time.Timer // Expiry timer + wState watchState // State of the watch +} + +// authority wraps all state associated with a single management server. It +// contains the transport used to communicate with the management server and a +// cache of resource state for resources requested from the management server. // -// Note that it might make sense to use one pubsub for all the resources (for -// all the controllers). One downside is the handling of StoW APIs (LDS/CDS). -// These responses contain all the resources from that control plane, so pubsub -// will need to keep lists of resources from each control plane, to know what -// are removed. +// Bootstrap configuration could contain multiple entries in the authorities map +// that share the same server config (server address and credentials to use). We +// share the same authority instance amongst these entries, and the reference +// counting is taken care of by the `clientImpl` type. type authority struct { - config *bootstrap.ServerConfig - pubsub *pubsub.Pubsub - controller controllerInterface - refCount int + serverCfg *bootstrap.ServerConfig // Server config for this authority + bootstrapCfg *bootstrap.Config // Full bootstrap configuration + refCount int // Reference count of watches referring to this authority + serializer *callbackSerializer // Callback serializer for invoking watch callbacks + resourceTypeGetter func(string) xdsresource.Type // ResourceType registry lookup + transport *transport.Transport // Underlying xDS transport to the management server + watchExpiryTimeout time.Duration // Resource watch expiry timeout + logger *grpclog.PrefixLogger + + // A two level map containing the state of all the resources being watched. + // + // The first level map key is the ResourceType (Listener, Route etc). This + // allows us to have a single map for all resources instead of having per + // resource-type maps. + // + // The second level map key is the resource name, with the value being the + // actual state of the resource. + resourcesMu sync.Mutex + resources map[xdsresource.Type]map[string]*resourceState } -// caller must hold parent's authorityMu. -func (a *authority) ref() { - a.refCount++ +// authorityArgs is a convenience struct to wrap arguments required to create a +// new authority. All fields here correspond directly to appropriate fields +// stored in the authority struct. +type authorityArgs struct { + // The reason for passing server config and bootstrap config separately + // (although the former is part of the latter) is because authorities in the + // bootstrap config might contain an empty server config, and in this case, + // the top-level server config is to be used. + // + // There are two code paths from where a new authority struct might be + // created. One is when a watch is registered for a resource, and one is + // when load reporting needs to be started. We have the authority name in + // the first case, but do in the second. We only have the server config in + // the second case. + serverCfg *bootstrap.ServerConfig + bootstrapCfg *bootstrap.Config + serializer *callbackSerializer + resourceTypeGetter func(string) xdsresource.Type + watchExpiryTimeout time.Duration + logger *grpclog.PrefixLogger } -// caller must hold parent's authorityMu. -func (a *authority) unref() int { - a.refCount-- - return a.refCount +func newAuthority(args authorityArgs) (*authority, error) { + ret := &authority{ + serverCfg: args.serverCfg, + bootstrapCfg: args.bootstrapCfg, + serializer: args.serializer, + resourceTypeGetter: args.resourceTypeGetter, + watchExpiryTimeout: args.watchExpiryTimeout, + logger: args.logger, + resources: make(map[xdsresource.Type]map[string]*resourceState), + } + + tr, err := transport.New(transport.Options{ + ServerCfg: *args.serverCfg, + UpdateHandler: ret.handleResourceUpdate, + StreamErrorHandler: ret.newConnectionError, + Logger: args.logger, + }) + if err != nil { + return nil, fmt.Errorf("creating new transport to %q: %v", args.serverCfg, err) + } + ret.transport = tr + return ret, nil + } -func (a *authority) close() { - if a.pubsub != nil { - a.pubsub.Close() +func (a *authority) handleResourceUpdate(resourceUpdate transport.ResourceUpdate) error { + rType := a.resourceTypeGetter(resourceUpdate.URL) + if rType == nil { + return xdsresource.NewErrorf(xdsresource.ErrorTypeResourceTypeUnsupported, "Resource URL %v unknown in response from server", resourceUpdate.URL) } - if a.controller != nil { - a.controller.Close() + + opts := &xdsresource.DecodeOptions{ + BootstrapConfig: a.bootstrapCfg, + Logger: a.logger, } + updates, md, err := decodeAllResources(opts, rType, resourceUpdate) + a.updateResourceStateAndScheduleCallbacks(rType, updates, md) + return err } -func (a *authority) watchListener(serviceName string, cb func(xdsresource.ListenerUpdate, error)) (cancel func()) { - first, cancelF := a.pubsub.WatchListener(serviceName, cb) - if first { - a.controller.AddWatch(xdsresource.ListenerResource, serviceName) +func (a *authority) updateResourceStateAndScheduleCallbacks(rType xdsresource.Type, updates map[string]resourceDataErrTuple, md xdsresource.UpdateMetadata) { + a.resourcesMu.Lock() + defer a.resourcesMu.Unlock() + + resourceStates := a.resources[rType] + for name, uErr := range updates { + if state, ok := resourceStates[name]; ok { + // Cancel the expiry timer associated with the resource once a + // response is received, irrespective of whether the update is a + // good one or not. + state.wTimer.Stop() + state.wState = watchStateRespReceived + + if uErr.err != nil { + // On error, keep previous version of the resource. But update + // status and error. + state.md.ErrState = md.ErrState + state.md.Status = md.Status + for watcher := range state.watchers { + watcher := watcher + err := uErr.err + a.serializer.Schedule(func(context.Context) { watcher.OnError(err) }) + } + continue + } + // If we get here, it means that the update is a valid one. Notify + // watchers only if this is a first time update or it is different + // from the one currently cached. + if state.cache == nil || !state.cache.Equal(uErr.resource) { + for watcher := range state.watchers { + watcher := watcher + resource := uErr.resource + a.serializer.Schedule(func(context.Context) { watcher.OnUpdate(resource) }) + } + } + // Sync cache. + a.logger.Debugf("Resource type %q with name %q, value %s added to cache", rType.TypeEnum().String(), name, uErr.resource.ToJSON()) + state.cache = uErr.resource + // Set status to ACK, and clear error state. The metadata might be a + // NACK metadata because some other resources in the same response + // are invalid. + state.md = md + state.md.ErrState = nil + state.md.Status = xdsresource.ServiceStatusACKed + if md.ErrState != nil { + state.md.Version = md.ErrState.Version + } + } } - return func() { - if cancelF() { - a.controller.RemoveWatch(xdsresource.ListenerResource, serviceName) + + // If this resource type requires that all resources be present in every + // SotW response from the server, a response that does not include a + // previously seen resource will be interpreted as a deletion of that + // resource. + if !rType.AllResourcesRequiredInSotW() { + return + } + for name, state := range resourceStates { + if state.cache == nil { + // If the resource state does not contain a cached update, which can + // happen when: + // - resource was newly requested but has not yet been received, or, + // - resource was removed as part of a previous update, + // we don't want to generate an error for the watchers. + // + // For the first of the above two conditions, this ADS response may + // be in reaction to an earlier request that did not yet request the + // new resource, so its absence from the response does not + // necessarily indicate that the resource does not exist. For that + // case, we rely on the request timeout instead. + // + // For the second of the above two conditions, we already generated + // an error when we received the first response which removed this + // resource. So, there is no need to generate another one. + continue + } + if _, ok := updates[name]; !ok { + // The metadata status is set to "ServiceStatusNotExist" if a + // previous update deleted this resource, in which case we do not + // want to repeatedly call the watch callbacks with a + // "resource-not-found" error. + if state.md.Status == xdsresource.ServiceStatusNotExist { + continue + } + + // If resource exists in cache, but not in the new update, delete + // the resource from cache, and also send a resource not found error + // to indicate resource removed. Metadata for the resource is still + // maintained, as this is required by CSDS. + state.cache = nil + state.md = xdsresource.UpdateMetadata{Status: xdsresource.ServiceStatusNotExist} + for watcher := range state.watchers { + watcher := watcher + a.serializer.Schedule(func(context.Context) { watcher.OnResourceDoesNotExist() }) + } } } } -func (a *authority) watchRouteConfig(routeName string, cb func(xdsresource.RouteConfigUpdate, error)) (cancel func()) { - first, cancelF := a.pubsub.WatchRouteConfig(routeName, cb) - if first { - a.controller.AddWatch(xdsresource.RouteConfigResource, routeName) +type resourceDataErrTuple struct { + resource xdsresource.ResourceData + err error +} + +func decodeAllResources(opts *xdsresource.DecodeOptions, rType xdsresource.Type, update transport.ResourceUpdate) (map[string]resourceDataErrTuple, xdsresource.UpdateMetadata, error) { + timestamp := time.Now() + md := xdsresource.UpdateMetadata{ + Version: update.Version, + Timestamp: timestamp, } - return func() { - if cancelF() { - a.controller.RemoveWatch(xdsresource.RouteConfigResource, routeName) + + topLevelErrors := make([]error, 0) // Tracks deserialization errors, where we don't have a resource name. + perResourceErrors := make(map[string]error) // Tracks resource validation errors, where we have a resource name. + ret := make(map[string]resourceDataErrTuple) // Return result, a map from resource name to either resource data or error. + for _, r := range update.Resources { + result, err := rType.Decode(opts, r) + + // Name field of the result is left unpopulated only when resource + // deserialization fails. + name := "" + if result != nil { + name = xdsresource.ParseName(result.Name).String() + } + if err == nil { + ret[name] = resourceDataErrTuple{resource: result.Resource} + continue + } + if name == "" { + topLevelErrors = append(topLevelErrors, err) + continue } + perResourceErrors[name] = err + // Add place holder in the map so we know this resource name was in + // the response. + ret[name] = resourceDataErrTuple{err: err} } -} -func (a *authority) watchCluster(clusterName string, cb func(xdsresource.ClusterUpdate, error)) (cancel func()) { - first, cancelF := a.pubsub.WatchCluster(clusterName, cb) - if first { - a.controller.AddWatch(xdsresource.ClusterResource, clusterName) + if len(topLevelErrors) == 0 && len(perResourceErrors) == 0 { + md.Status = xdsresource.ServiceStatusACKed + return ret, md, nil } - return func() { - if cancelF() { - a.controller.RemoveWatch(xdsresource.ClusterResource, clusterName) + + typeStr := rType.TypeEnum().String() + md.Status = xdsresource.ServiceStatusNACKed + errRet := xdsresource.CombineErrors(typeStr, topLevelErrors, perResourceErrors) + md.ErrState = &xdsresource.UpdateErrorMetadata{ + Version: update.Version, + Err: errRet, + Timestamp: timestamp, + } + return ret, md, errRet +} + +// newConnectionError is called by the underlying transport when it receives a +// connection error. The error will be forwarded to all the resource watchers. +func (a *authority) newConnectionError(err error) { + a.resourcesMu.Lock() + defer a.resourcesMu.Unlock() + + // For all resource types, for all resources within each resource type, and + // for all the watchers for every resource, propagate the connection error + // from the transport layer. + for _, rType := range a.resources { + for _, state := range rType { + for watcher := range state.watchers { + watcher := watcher + a.serializer.Schedule(func(context.Context) { + watcher.OnError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err)) + }) + } } } } -func (a *authority) watchEndpoints(clusterName string, cb func(xdsresource.EndpointsUpdate, error)) (cancel func()) { - first, cancelF := a.pubsub.WatchEndpoints(clusterName, cb) - if first { - a.controller.AddWatch(xdsresource.EndpointsResource, clusterName) +// Increments the reference count. Caller must hold parent's authorityMu. +func (a *authority) refLocked() { + a.refCount++ +} + +// Decrements the reference count. Caller must hold parent's authorityMu. +func (a *authority) unrefLocked() int { + a.refCount-- + return a.refCount +} + +func (a *authority) close() { + a.transport.Close() +} + +func (a *authority) watchResource(rType xdsresource.Type, resourceName string, watcher xdsresource.ResourceWatcher) func() { + a.logger.Debugf("New watch for type %q, resource name %q", rType.TypeEnum(), resourceName) + a.resourcesMu.Lock() + defer a.resourcesMu.Unlock() + + // Lookup the ResourceType specific resources from the top-level map. If + // there is no entry for this ResourceType, create one. + resources := a.resources[rType] + if resources == nil { + resources = make(map[string]*resourceState) + a.resources[rType] = resources } + + // Lookup the resourceState for the particular resource that the watch is + // being registered for. If this is the first watch for this resource, + // instruct the transport layer to send a DiscoveryRequest for the same. + state := resources[resourceName] + if state == nil { + a.logger.Debugf("First watch for type %q, resource name %q", rType.TypeEnum(), resourceName) + state = &resourceState{ + watchers: make(map[xdsresource.ResourceWatcher]bool), + md: xdsresource.UpdateMetadata{Status: xdsresource.ServiceStatusRequested}, + wState: watchStateStarted, + } + state.wTimer = time.AfterFunc(a.watchExpiryTimeout, func() { + a.handleWatchTimerExpiry(rType, resourceName, state) + }) + resources[resourceName] = state + a.sendDiscoveryRequestLocked(rType, resources) + } + // Always add the new watcher to the set of watchers. + state.watchers[watcher] = true + + // If we have a cached copy of the resource, notify the new watcher. + if state.cache != nil { + a.logger.Debugf("Resource type %q with resource name %q found in cache: %s", rType.TypeEnum(), resourceName, state.cache.ToJSON()) + resource := state.cache + a.serializer.Schedule(func(context.Context) { watcher.OnUpdate(resource) }) + } + return func() { - if cancelF() { - a.controller.RemoveWatch(xdsresource.EndpointsResource, clusterName) + a.resourcesMu.Lock() + defer a.resourcesMu.Unlock() + + // We already have a reference to the resourceState for this particular + // resource. Avoid indexing into the two-level map to figure this out. + + // Delete this particular watcher from the list of watchers, so that its + // callback will not be invoked in the future. + state.wState = watchStateCanceled + delete(state.watchers, watcher) + if len(state.watchers) > 0 { + return } + + // There are no more watchers for this resource, delete the state + // associated with it, and instruct the transport to send a request + // which does not include this resource name. + delete(resources, resourceName) + a.sendDiscoveryRequestLocked(rType, resources) } } +func (a *authority) handleWatchTimerExpiry(rType xdsresource.Type, resourceName string, state *resourceState) { + a.logger.Warningf("Watch for resource %q of type %s timed out", resourceName, rType.TypeEnum().String()) + a.resourcesMu.Lock() + defer a.resourcesMu.Unlock() + + if state.wState == watchStateCanceled { + return + } + + state.wState = watchStateTimeout + // With the watch timer firing, it is safe to assume that the resource does + // not exist on the management server. + state.cache = nil + state.md = xdsresource.UpdateMetadata{Status: xdsresource.ServiceStatusNotExist} + for watcher := range state.watchers { + watcher := watcher + a.serializer.Schedule(func(context.Context) { watcher.OnResourceDoesNotExist() }) + } +} + +// sendDiscoveryRequestLocked sends a discovery request for the specified +// resource type and resource names. Even though this method does not directly +// access the resource cache, it is important that `resourcesMu` be beld when +// calling this method to ensure that a consistent snapshot of resource names is +// being requested. +func (a *authority) sendDiscoveryRequestLocked(rType xdsresource.Type, resources map[string]*resourceState) { + resourcesToRequest := make([]string, len(resources)) + i := 0 + for name := range resources { + resourcesToRequest[i] = name + i++ + } + a.transport.SendRequest(rType.TypeURL(), resourcesToRequest) +} + func (a *authority) reportLoad() (*load.Store, func()) { - // An empty string means to report load to the same same used for ADS. There - // should never be a need to specify a string other than an empty string. If - // a different server is to be used, a different authority (controller) will - // be created. - return a.controller.ReportLoad("") + return a.transport.ReportLoad() } -func (a *authority) dump(t xdsresource.ResourceType) map[string]xdsresource.UpdateWithMD { - return a.pubsub.Dump(t) +func (a *authority) dumpResources() map[string]map[string]xdsresource.UpdateWithMD { + a.resourcesMu.Lock() + defer a.resourcesMu.Unlock() + + dump := make(map[string]map[string]xdsresource.UpdateWithMD) + for rType, resourceStates := range a.resources { + states := make(map[string]xdsresource.UpdateWithMD) + for name, state := range resourceStates { + var raw *anypb.Any + if state.cache != nil { + raw = state.cache.Raw() + } + states[name] = xdsresource.UpdateWithMD{ + MD: state.md, + Raw: raw, + } + } + dump[rType.TypeURL()] = states + } + return dump } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/bootstrap/bootstrap.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/bootstrap/bootstrap.go index 97fe4a8b0792..23eff2d63907 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/bootstrap/bootstrap.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/bootstrap/bootstrap.go @@ -24,8 +24,8 @@ import ( "bytes" "encoding/json" "fmt" - "io/ioutil" "net/url" + "os" "strings" "github.com/golang/protobuf/jsonpb" @@ -64,7 +64,7 @@ func init() { var gRPCVersion = fmt.Sprintf("%s %s", gRPCUserAgentName, grpc.Version) // For overriding in unit tests. -var bootstrapFileReadFunc = ioutil.ReadFile +var bootstrapFileReadFunc = os.ReadFile // insecureCredsBuilder implements the `Credentials` interface defined in // package `xds/bootstrap` and encapsulates an insecure credential. @@ -366,7 +366,7 @@ func newConfigFromContents(data []byte) (*Config, error) { var jsonData map[string]json.RawMessage if err := json.Unmarshal(data, &jsonData); err != nil { - return nil, fmt.Errorf("xds: Failed to parse bootstrap config: %v", err) + return nil, fmt.Errorf("xds: failed to parse bootstrap config: %v", err) } var node *v3corepb.Node @@ -414,7 +414,7 @@ func newConfigFromContents(data []byte) (*Config, error) { } bc, err := parser.ParseConfig(nameAndConfig.Config) if err != nil { - return nil, fmt.Errorf("xds: Config parsing for plugin %q failed: %v", name, err) + return nil, fmt.Errorf("xds: config parsing for plugin %q failed: %v", name, err) } configs[instance] = bc } @@ -452,13 +452,13 @@ func newConfigFromContents(data []byte) (*Config, error) { config.ClientDefaultListenerResourceNameTemplate = "%s" } if config.XDSServer == nil { - return nil, fmt.Errorf("xds: Required field %q not found in bootstrap %s", "xds_servers", jsonData["xds_servers"]) + return nil, fmt.Errorf("xds: required field %q not found in bootstrap %s", "xds_servers", jsonData["xds_servers"]) } if config.XDSServer.ServerURI == "" { - return nil, fmt.Errorf("xds: Required field %q not found in bootstrap %s", "xds_servers.server_uri", jsonData["xds_servers"]) + return nil, fmt.Errorf("xds: required field %q not found in bootstrap %s", "xds_servers.server_uri", jsonData["xds_servers"]) } if config.XDSServer.Creds == nil { - return nil, fmt.Errorf("xds: Required field %q doesn't contain valid value in bootstrap %s", "xds_servers.channel_creds", jsonData["xds_servers"]) + return nil, fmt.Errorf("xds: required field %q doesn't contain valid value in bootstrap %s", "xds_servers.channel_creds", jsonData["xds_servers"]) } // Post-process the authorities' client listener resource template field: // - if set, it must start with "xdstp:///" diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/client.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/client.go index 976b86fe34d7..6e380b27d543 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/client.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/client.go @@ -34,7 +34,6 @@ type XDSClient interface { WatchRouteConfig(string, func(xdsresource.RouteConfigUpdate, error)) func() WatchCluster(string, func(xdsresource.ClusterUpdate, error)) func() WatchEndpoints(string, func(xdsresource.EndpointsUpdate, error)) func() - ReportLoad(*bootstrap.ServerConfig) (*load.Store, func()) // WatchResource uses xDS to discover the resource associated with the // provided resource name. The resource type implementation determines how @@ -50,11 +49,11 @@ type XDSClient interface { // delete the resource type specific watch APIs on this interface. WatchResource(rType xdsresource.Type, resourceName string, watcher xdsresource.ResourceWatcher) (cancel func()) - DumpLDS() map[string]xdsresource.UpdateWithMD - DumpRDS() map[string]xdsresource.UpdateWithMD - DumpCDS() map[string]xdsresource.UpdateWithMD - DumpEDS() map[string]xdsresource.UpdateWithMD + // DumpResources returns the status of the xDS resources. Returns a map of + // resource type URLs to a map of resource names to resource state. + DumpResources() map[string]map[string]xdsresource.UpdateWithMD + + ReportLoad(*bootstrap.ServerConfig) (*load.Store, func()) BootstrapConfig() *bootstrap.Config - Close() } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/client_new.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/client_new.go index 4b2b8cfd39eb..8335f9a88a8f 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/client_new.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/client_new.go @@ -37,20 +37,28 @@ import ( // The returned client is a reference counted singleton instance. This function // creates a new client only when one doesn't already exist. // -// Note that the first invocation of New() or NewWithConfig() sets the client -// singleton. The following calls will return the singleton client without -// checking or using the config. -func New() (XDSClient, error) { +// The second return value represents a close function which releases the +// caller's reference on the returned client. The caller is expected to invoke +// it once they are done using the client. The underlying client will be closed +// only when all references are released, and it is safe for the caller to +// invoke this close function multiple times. +func New() (XDSClient, func(), error) { return newRefCountedWithConfig(nil) } // NewWithConfig returns a new xDS client configured by the given config. // -// Internal/Testing Only +// The second return value represents a close function which releases the +// caller's reference on the returned client. The caller is expected to invoke +// it once they are done using the client. The underlying client will be closed +// only when all references are released, and it is safe for the caller to +// invoke this close function multiple times. +// +// # Internal/Testing Only // // This function should ONLY be used for internal (c2p resolver) and/or testing // purposese. DO NOT use this elsewhere. Use New() instead. -func NewWithConfig(config *bootstrap.Config) (XDSClient, error) { +func NewWithConfig(config *bootstrap.Config) (XDSClient, func(), error) { return newRefCountedWithConfig(config) } @@ -69,66 +77,86 @@ func newWithConfig(config *bootstrap.Config, watchExpiryTimeout time.Duration, i } c.logger = prefixLogger(c) - c.logger.Infof("Created ClientConn to xDS management server: %s", config.XDSServer) - c.logger.Infof("Created") + c.logger.Infof("Created client to xDS management server: %s", config.XDSServer) return c, nil } // NewWithConfigForTesting returns an xDS client for the specified bootstrap // config, separate from the global singleton. // +// The second return value represents a close function which the caller is +// expected to invoke once they are done using the client. It is safe for the +// caller to invoke this close function multiple times. +// // # Testing Only // // This function should ONLY be used for testing purposes. -func NewWithConfigForTesting(config *bootstrap.Config, watchExpiryTimeout, authorityIdleTimeout time.Duration) (XDSClient, error) { +// TODO(easwars): Document the new close func. +func NewWithConfigForTesting(config *bootstrap.Config, watchExpiryTimeout, authorityIdleTimeout time.Duration) (XDSClient, func(), error) { cl, err := newWithConfig(config, watchExpiryTimeout, authorityIdleTimeout) if err != nil { - return nil, err + return nil, nil, err } - return &clientRefCounted{clientImpl: cl, refCount: 1}, nil + return cl, grpcsync.OnceFunc(cl.close), nil } // NewWithBootstrapContentsForTesting returns an xDS client for this config, // separate from the global singleton. // +// The second return value represents a close function which the caller is +// expected to invoke once they are done using the client. It is safe for the +// caller to invoke this close function multiple times. +// // # Testing Only // // This function should ONLY be used for testing purposes. -func NewWithBootstrapContentsForTesting(contents []byte) (XDSClient, error) { +func NewWithBootstrapContentsForTesting(contents []byte) (XDSClient, func(), error) { // Normalize the contents buf := bytes.Buffer{} err := json.Indent(&buf, contents, "", "") if err != nil { - return nil, fmt.Errorf("xds: error normalizing JSON: %v", err) + return nil, nil, fmt.Errorf("xds: error normalizing JSON: %v", err) } contents = bytes.TrimSpace(buf.Bytes()) + c, err := getOrMakeClientForTesting(contents) + if err != nil { + return nil, nil, err + } + return c, grpcsync.OnceFunc(func() { + clientsMu.Lock() + defer clientsMu.Unlock() + if c.decrRef() == 0 { + c.close() + delete(clients, string(contents)) + } + }), nil +} + +// getOrMakeClientForTesting creates a new reference counted client (separate +// from the global singleton) for the given config, or returns an existing one. +// It takes care of incrementing the reference count for the returned client, +// and leaves the caller responsible for decrementing the reference count once +// the client is no longer needed. +func getOrMakeClientForTesting(config []byte) (*clientRefCounted, error) { clientsMu.Lock() defer clientsMu.Unlock() - if c := clients[string(contents)]; c != nil { - c.mu.Lock() - // Since we don't remove the *Client from the map when it is closed, we - // need to recreate the impl if the ref count dropped to zero. - if c.refCount > 0 { - c.refCount++ - c.mu.Unlock() - return c, nil - } - c.mu.Unlock() + + if c := clients[string(config)]; c != nil { + c.incrRef() + return c, nil } - bcfg, err := bootstrap.NewConfigFromContentsForTesting(contents) + bcfg, err := bootstrap.NewConfigFromContentsForTesting(config) if err != nil { - return nil, fmt.Errorf("xds: error with bootstrap config: %v", err) + return nil, fmt.Errorf("bootstrap config %s: %v", string(config), err) } - cImpl, err := newWithConfig(bcfg, defaultWatchExpiryTimeout, defaultIdleAuthorityDeleteTimeout) if err != nil { - return nil, err + return nil, fmt.Errorf("creating xDS client: %v", err) } - c := &clientRefCounted{clientImpl: cImpl, refCount: 1} - clients[string(contents)] = c + clients[string(config)] = c return c, nil } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl.go index e9224cb1a31b..261b6bf48f9a 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl.go @@ -68,11 +68,8 @@ func (c *clientImpl) BootstrapConfig() *bootstrap.Config { return c.config } -// Close closes the gRPC connection to the management server. -// -// TODO: ensure that all underlying transports are closed before this function -// returns. -func (c *clientImpl) Close() { +// close closes the gRPC connection to the management server. +func (c *clientImpl) close() { if c.done.HasFired() { return } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_authority.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_authority.go index 623420ccc78f..2531b39472f5 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_authority.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_authority.go @@ -20,30 +20,11 @@ package xdsclient import ( "errors" "fmt" - "time" - "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/xds/internal/xdsclient/bootstrap" - "google.golang.org/grpc/xds/internal/xdsclient/controller" - "google.golang.org/grpc/xds/internal/xdsclient/load" - "google.golang.org/grpc/xds/internal/xdsclient/pubsub" "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" - - v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" ) -type controllerInterface interface { - AddWatch(resourceType xdsresource.ResourceType, resourceName string) - RemoveWatch(resourceType xdsresource.ResourceType, resourceName string) - ReportLoad(server string) (*load.Store, func()) - Close() -} - -var newController = func(config *bootstrap.ServerConfig, pubsub *pubsub.Pubsub, validator xdsresource.UpdateValidatorFunc, logger *grpclog.PrefixLogger, boff func(int) time.Duration) (controllerInterface, error) { - return controller.New(config, pubsub, validator, logger, boff) -} - // findAuthority returns the authority for this name. If it doesn't already // exist, one will be created. // @@ -88,12 +69,13 @@ func (c *clientImpl) findAuthority(n *xdsresource.Name) (_ *authority, unref fun // authority. // // unref() will be done when the watch is canceled. - a.ref() + a.refLocked() return a, func() { c.unrefAuthority(a) }, nil } -// newAuthorityLocked creates a new authority for the config. But before that, it -// checks the cache to see if an authority for this config already exists. +// newAuthorityLocked creates a new authority for the given config. If an +// authority for the given config exists in the cache, it is returned instead of +// creating a new one. // // The caller must take a reference of the returned authority before using, and // unref afterwards. @@ -121,23 +103,17 @@ func (c *clientImpl) newAuthorityLocked(config *bootstrap.ServerConfig) (_ *auth } // Make a new authority since there's no existing authority for this config. - nodeID := "" - if v3, ok := c.config.XDSServer.NodeProto.(*v3corepb.Node); ok { - nodeID = v3.GetId() - } else if v2, ok := c.config.XDSServer.NodeProto.(*v2corepb.Node); ok { - nodeID = v2.GetId() - } - ret := &authority{config: config, pubsub: pubsub.New(c.watchExpiryTimeout, nodeID, c.logger)} - defer func() { - if retErr != nil { - ret.close() - } - }() - ctr, err := newController(config, ret.pubsub, c.updateValidator, c.logger, nil) + ret, err := newAuthority(authorityArgs{ + serverCfg: config, + bootstrapCfg: c.config, + serializer: c.serializer, + resourceTypeGetter: c.resourceTypes.get, + watchExpiryTimeout: c.watchExpiryTimeout, + logger: c.logger, + }) if err != nil { - return nil, err + return nil, fmt.Errorf("creating new authority for config %q: %v", config.String(), err) } - ret.controller = ctr // Add it to the cache, so it will be reused. c.authorities[configStr] = ret return ret, nil @@ -153,10 +129,10 @@ func (c *clientImpl) newAuthorityLocked(config *bootstrap.ServerConfig) (_ *auth func (c *clientImpl) unrefAuthority(a *authority) { c.authorityMu.Lock() defer c.authorityMu.Unlock() - if a.unref() > 0 { + if a.unrefLocked() > 0 { return } - configStr := a.config.String() + configStr := a.serverCfg.String() delete(c.authorities, configStr) c.idleAuthorities.Add(configStr, a, func() { a.close() diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_dump.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_dump.go index 69407d20cafd..b9d0499301a2 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_dump.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_dump.go @@ -22,42 +22,32 @@ import ( "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" ) -func mergeMaps(maps []map[string]xdsresource.UpdateWithMD) map[string]xdsresource.UpdateWithMD { - ret := make(map[string]xdsresource.UpdateWithMD) - for _, m := range maps { - for k, v := range m { - ret[k] = v +func appendMaps(dst, src map[string]map[string]xdsresource.UpdateWithMD) { + // Iterate through the resource types. + for rType, srcResources := range src { + // Lookup/create the resource type specific map in the destination. + dstResources := dst[rType] + if dstResources == nil { + dstResources = make(map[string]xdsresource.UpdateWithMD) + dst[rType] = dstResources + } + + // Iterate through the resources within the resource type in the source, + // and copy them over to the destination. + for name, update := range srcResources { + dstResources[name] = update } } - return ret } -func (c *clientImpl) dump(t xdsresource.ResourceType) map[string]xdsresource.UpdateWithMD { +// DumpResources returns the status and contents of all xDS resources. +func (c *clientImpl) DumpResources() map[string]map[string]xdsresource.UpdateWithMD { c.authorityMu.Lock() defer c.authorityMu.Unlock() - maps := make([]map[string]xdsresource.UpdateWithMD, 0, len(c.authorities)) + dumps := make(map[string]map[string]xdsresource.UpdateWithMD) for _, a := range c.authorities { - maps = append(maps, a.dump(t)) + dump := a.dumpResources() + appendMaps(dumps, dump) } - return mergeMaps(maps) -} - -// DumpLDS returns the status and contents of LDS. -func (c *clientImpl) DumpLDS() map[string]xdsresource.UpdateWithMD { - return c.dump(xdsresource.ListenerResource) -} - -// DumpRDS returns the status and contents of RDS. -func (c *clientImpl) DumpRDS() map[string]xdsresource.UpdateWithMD { - return c.dump(xdsresource.RouteConfigResource) -} - -// DumpCDS returns the status and contents of CDS. -func (c *clientImpl) DumpCDS() map[string]xdsresource.UpdateWithMD { - return c.dump(xdsresource.ClusterResource) -} - -// DumpEDS returns the status and contents of EDS. -func (c *clientImpl) DumpEDS() map[string]xdsresource.UpdateWithMD { - return c.dump(xdsresource.EndpointsResource) + return dumps } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_loadreport.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_loadreport.go index cba5afd454a7..e53df3f1edd9 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_loadreport.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_loadreport.go @@ -30,13 +30,15 @@ import ( func (c *clientImpl) ReportLoad(server *bootstrap.ServerConfig) (*load.Store, func()) { c.authorityMu.Lock() a, err := c.newAuthorityLocked(server) - c.authorityMu.Unlock() if err != nil { + c.authorityMu.Unlock() c.logger.Infof("xds: failed to connect to the control plane to do load reporting for authority %q: %v", server, err) return nil, func() {} } // Hold the ref before starting load reporting. - a.ref() + a.refLocked() + c.authorityMu.Unlock() + store, cancelF := a.reportLoad() return store, func() { cancelF() diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_validator.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_validator.go deleted file mode 100644 index 50bdbe4e23f4..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_validator.go +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Copyright 2022 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package xdsclient - -import ( - "fmt" - - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" -) - -func (c *clientImpl) filterChainUpdateValidator(fc *xdsresource.FilterChain) error { - if fc == nil { - return nil - } - return c.securityConfigUpdateValidator(fc.SecurityCfg) -} - -func (c *clientImpl) securityConfigUpdateValidator(sc *xdsresource.SecurityConfig) error { - if sc == nil { - return nil - } - if sc.IdentityInstanceName != "" { - if _, ok := c.config.CertProviderConfigs[sc.IdentityInstanceName]; !ok { - return fmt.Errorf("identitiy certificate provider instance name %q missing in bootstrap configuration", sc.IdentityInstanceName) - } - } - if sc.RootInstanceName != "" { - if _, ok := c.config.CertProviderConfigs[sc.RootInstanceName]; !ok { - return fmt.Errorf("root certificate provider instance name %q missing in bootstrap configuration", sc.RootInstanceName) - } - } - return nil -} - -func (c *clientImpl) updateValidator(u interface{}) error { - switch update := u.(type) { - case xdsresource.ListenerUpdate: - if update.InboundListenerCfg == nil || update.InboundListenerCfg.FilterChains == nil { - return nil - } - return update.InboundListenerCfg.FilterChains.Validate(c.filterChainUpdateValidator) - case xdsresource.ClusterUpdate: - return c.securityConfigUpdateValidator(update.SecurityCfg) - default: - // We currently invoke this update validation function only for LDS and - // CDS updates. In the future, if we wish to invoke it for other xDS - // updates, corresponding plumbing needs to be added to those unmarshal - // functions. - } - return nil -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_watchers.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_watchers.go index 7095a8394487..77c4a614a228 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_watchers.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/clientimpl_watchers.go @@ -25,46 +25,93 @@ import ( "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" ) -// WatchListener uses LDS to discover information about the provided listener. +// This is only required temporarily, while we modify the +// clientImpl.WatchListener API to be implemented via the wrapper +// WatchListener() API which calls the WatchResource() API. +type listenerWatcher struct { + resourceName string + cb func(xdsresource.ListenerUpdate, error) +} + +func (l *listenerWatcher) OnUpdate(update *xdsresource.ListenerResourceData) { + l.cb(update.Resource, nil) +} + +func (l *listenerWatcher) OnError(err error) { + l.cb(xdsresource.ListenerUpdate{}, err) +} + +func (l *listenerWatcher) OnResourceDoesNotExist() { + err := xdsresource.NewErrorf(xdsresource.ErrorTypeResourceNotFound, "resource name %q of type Listener not found in received response", l.resourceName) + l.cb(xdsresource.ListenerUpdate{}, err) +} + +// WatchListener uses LDS to discover information about the Listener resource +// identified by resourceName. // // Note that during race (e.g. an xDS response is received while the user is // calling cancel()), there's a small window where the callback can be called // after the watcher is canceled. The caller needs to handle this case. -func (c *clientImpl) WatchListener(serviceName string, cb func(xdsresource.ListenerUpdate, error)) (cancel func()) { - n := xdsresource.ParseName(serviceName) - a, unref, err := c.findAuthority(n) - if err != nil { - cb(xdsresource.ListenerUpdate{}, err) - return func() {} - } - cancelF := a.watchListener(n.String(), cb) - return func() { - cancelF() - unref() - } +func (c *clientImpl) WatchListener(resourceName string, cb func(xdsresource.ListenerUpdate, error)) (cancel func()) { + watcher := &listenerWatcher{resourceName: resourceName, cb: cb} + return xdsresource.WatchListener(c, resourceName, watcher) +} + +// This is only required temporarily, while we modify the +// clientImpl.WatchRouteConfig API to be implemented via the wrapper +// WatchRouteConfig() API which calls the WatchResource() API. +type routeConfigWatcher struct { + resourceName string + cb func(xdsresource.RouteConfigUpdate, error) +} + +func (r *routeConfigWatcher) OnUpdate(update *xdsresource.RouteConfigResourceData) { + r.cb(update.Resource, nil) } -// WatchRouteConfig starts a listener watcher for the service. +func (r *routeConfigWatcher) OnError(err error) { + r.cb(xdsresource.RouteConfigUpdate{}, err) +} + +func (r *routeConfigWatcher) OnResourceDoesNotExist() { + err := xdsresource.NewErrorf(xdsresource.ErrorTypeResourceNotFound, "resource name %q of type RouteConfiguration not found in received response", r.resourceName) + r.cb(xdsresource.RouteConfigUpdate{}, err) +} + +// WatchRouteConfig uses RDS to discover information about the +// RouteConfiguration resource identified by resourceName. // // Note that during race (e.g. an xDS response is received while the user is // calling cancel()), there's a small window where the callback can be called // after the watcher is canceled. The caller needs to handle this case. -func (c *clientImpl) WatchRouteConfig(routeName string, cb func(xdsresource.RouteConfigUpdate, error)) (cancel func()) { - n := xdsresource.ParseName(routeName) - a, unref, err := c.findAuthority(n) - if err != nil { - cb(xdsresource.RouteConfigUpdate{}, err) - return func() {} - } - cancelF := a.watchRouteConfig(n.String(), cb) - return func() { - cancelF() - unref() - } +func (c *clientImpl) WatchRouteConfig(resourceName string, cb func(xdsresource.RouteConfigUpdate, error)) (cancel func()) { + watcher := &routeConfigWatcher{resourceName: resourceName, cb: cb} + return xdsresource.WatchRouteConfig(c, resourceName, watcher) +} + +// This is only required temporarily, while we modify the +// clientImpl.WatchCluster API to be implemented via the wrapper WatchCluster() +// API which calls the WatchResource() API. +type clusterWatcher struct { + resourceName string + cb func(xdsresource.ClusterUpdate, error) +} + +func (c *clusterWatcher) OnUpdate(update *xdsresource.ClusterResourceData) { + c.cb(update.Resource, nil) +} + +func (c *clusterWatcher) OnError(err error) { + c.cb(xdsresource.ClusterUpdate{}, err) +} + +func (c *clusterWatcher) OnResourceDoesNotExist() { + err := xdsresource.NewErrorf(xdsresource.ErrorTypeResourceNotFound, "resource name %q of type Cluster not found in received response", c.resourceName) + c.cb(xdsresource.ClusterUpdate{}, err) } -// WatchCluster uses CDS to discover information about the provided -// clusterName. +// WatchCluster uses CDS to discover information about the Cluster resource +// identified by resourceName. // // WatchCluster can be called multiple times, with same or different // clusterNames. Each call will start an independent watcher for the resource. @@ -72,21 +119,34 @@ func (c *clientImpl) WatchRouteConfig(routeName string, cb func(xdsresource.Rout // Note that during race (e.g. an xDS response is received while the user is // calling cancel()), there's a small window where the callback can be called // after the watcher is canceled. The caller needs to handle this case. -func (c *clientImpl) WatchCluster(clusterName string, cb func(xdsresource.ClusterUpdate, error)) (cancel func()) { - n := xdsresource.ParseName(clusterName) - a, unref, err := c.findAuthority(n) - if err != nil { - cb(xdsresource.ClusterUpdate{}, err) - return func() {} - } - cancelF := a.watchCluster(n.String(), cb) - return func() { - cancelF() - unref() - } +func (c *clientImpl) WatchCluster(resourceName string, cb func(xdsresource.ClusterUpdate, error)) (cancel func()) { + watcher := &clusterWatcher{resourceName: resourceName, cb: cb} + return xdsresource.WatchCluster(c, resourceName, watcher) +} + +// This is only required temporarily, while we modify the +// clientImpl.WatchEndpoints API to be implemented via the wrapper +// WatchEndpoints() API which calls the WatchResource() API. +type endpointsWatcher struct { + resourceName string + cb func(xdsresource.EndpointsUpdate, error) +} + +func (c *endpointsWatcher) OnUpdate(update *xdsresource.EndpointsResourceData) { + c.cb(update.Resource, nil) +} + +func (c *endpointsWatcher) OnError(err error) { + c.cb(xdsresource.EndpointsUpdate{}, err) } -// WatchEndpoints uses EDS to discover endpoints in the provided clusterName. +func (c *endpointsWatcher) OnResourceDoesNotExist() { + err := xdsresource.NewErrorf(xdsresource.ErrorTypeResourceNotFound, "resource name %q of type Endpoints not found in received response", c.resourceName) + c.cb(xdsresource.EndpointsUpdate{}, err) +} + +// WatchEndpoints uses EDS to discover information about the +// ClusterLoadAssignment resource identified by resourceName. // // WatchEndpoints can be called multiple times, with same or different // clusterNames. Each call will start an independent watcher for the resource. @@ -94,18 +154,9 @@ func (c *clientImpl) WatchCluster(clusterName string, cb func(xdsresource.Cluste // Note that during race (e.g. an xDS response is received while the user is // calling cancel()), there's a small window where the callback can be called // after the watcher is canceled. The caller needs to handle this case. -func (c *clientImpl) WatchEndpoints(clusterName string, cb func(xdsresource.EndpointsUpdate, error)) (cancel func()) { - n := xdsresource.ParseName(clusterName) - a, unref, err := c.findAuthority(n) - if err != nil { - cb(xdsresource.EndpointsUpdate{}, err) - return func() {} - } - cancelF := a.watchEndpoints(n.String(), cb) - return func() { - cancelF() - unref() - } +func (c *clientImpl) WatchEndpoints(resourceName string, cb func(xdsresource.EndpointsUpdate, error)) (cancel func()) { + watcher := &endpointsWatcher{resourceName: resourceName, cb: cb} + return xdsresource.WatchEndpoints(c, resourceName, watcher) } // WatchResource uses xDS to discover the resource associated with the provided @@ -126,6 +177,7 @@ func (c *clientImpl) WatchResource(rType xdsresource.Type, resourceName string, } if err := c.resourceTypes.maybeRegister(rType); err != nil { + logger.Warningf("Watch registered for name %q of type %q which is already registered", rType.TypeEnum().String(), resourceName) c.serializer.Schedule(func(context.Context) { watcher.OnError(err) }) return func() {} } @@ -138,7 +190,21 @@ func (c *clientImpl) WatchResource(rType xdsresource.Type, resourceName string, // - Call the watchResource() method on the authority. // - Return a cancel function to cancel the watch on the authority and to // release the reference. - return func() {} + + // TODO: Make ParseName return an error if parsing fails, and + // schedule the OnError callback in that case. + n := xdsresource.ParseName(resourceName) + a, unref, err := c.findAuthority(n) + if err != nil { + logger.Warningf("Watch registered for name %q of type %q, authority %q is not found", rType.TypeEnum().String(), resourceName, n.Authority) + c.serializer.Schedule(func(context.Context) { watcher.OnError(err) }) + return func() {} + } + cancelF := a.watchResource(rType, n.String(), watcher) + return func() { + cancelF() + unref() + } } // A registry of xdsresource.Type implementations indexed by their corresponding @@ -153,21 +219,21 @@ func newResourceTypeRegistry() *resourceTypeRegistry { return &resourceTypeRegistry{types: make(map[string]xdsresource.Type)} } +func (r *resourceTypeRegistry) get(url string) xdsresource.Type { + r.mu.Lock() + defer r.mu.Unlock() + return r.types[url] +} + func (r *resourceTypeRegistry) maybeRegister(rType xdsresource.Type) error { r.mu.Lock() defer r.mu.Unlock() - urls := []string{rType.V2TypeURL(), rType.V3TypeURL()} - for _, u := range urls { - if u == "" { - // Silently ignore unsupported versions of the resource. - continue - } - typ, ok := r.types[u] - if ok && typ != rType { - return fmt.Errorf("attempt to re-register a resource type implementation for %v", rType.TypeEnum()) - } - r.types[u] = rType + url := rType.TypeURL() + typ, ok := r.types[url] + if ok && typ != rType { + return fmt.Errorf("attempt to re-register a resource type implementation for %v", rType.TypeEnum()) } + r.types[url] = rType return nil } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/controller.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/controller.go deleted file mode 100644 index 520da06a103d..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/controller.go +++ /dev/null @@ -1,201 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Package controller contains implementation to connect to the control plane. -// Including starting the ClientConn, starting the xDS stream, and -// sending/receiving messages. -// -// All the messages are parsed by the resource package (e.g. -// UnmarshalListener()) and sent to the Pubsub watchers. -package controller - -import ( - "context" - "errors" - "fmt" - "sync" - "time" - - "google.golang.org/grpc" - "google.golang.org/grpc/internal/backoff" - "google.golang.org/grpc/internal/buffer" - "google.golang.org/grpc/internal/grpclog" - "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/xds/internal/xdsclient/bootstrap" - "google.golang.org/grpc/xds/internal/xdsclient/controller/version" - "google.golang.org/grpc/xds/internal/xdsclient/pubsub" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" -) - -// Controller manages the connection and stream to the control plane. -// -// It keeps track of what resources are being watched, and send new requests -// when new watches are added. -// -// It takes a pubsub (as an interface) as input. When a response is received, -// it's parsed, and the updates are sent to the pubsub. -type Controller struct { - config *bootstrap.ServerConfig - updateHandler pubsub.UpdateHandler - updateValidator xdsresource.UpdateValidatorFunc - logger *grpclog.PrefixLogger - - cc *grpc.ClientConn // Connection to the management server. - vClient version.VersionedClient - stopRunGoroutine context.CancelFunc - // The run goroutine closes this channel when it exits, and we block on this - // channel in Close(). This ensures that when Close() returns, the - // underlying transport is closed, and we can guarantee that we will not - // process any subsequent responses from the management server. - runDoneCh chan struct{} - - backoff func(int) time.Duration - streamCh chan grpc.ClientStream - sendCh *buffer.Unbounded - - mu sync.Mutex - // Message specific watch infos, protected by the above mutex. These are - // written to, after successfully reading from the update channel, and are - // read from when recovering from a broken stream to resend the xDS - // messages. When the user of this client object cancels a watch call, - // these are set to nil. All accesses to the map protected and any value - // inside the map should be protected with the above mutex. - watchMap map[xdsresource.ResourceType]map[string]bool - // versionMap contains the version that was acked (the version in the ack - // request that was sent on wire). The key is rType, the value is the - // version string, because the versions for different resource types should - // be independent. - versionMap map[xdsresource.ResourceType]string - // nonceMap contains the nonce from the most recent received response. - nonceMap map[xdsresource.ResourceType]string - closed bool - - // Changes to map lrsClients and the lrsClient inside the map need to be - // protected by lrsMu. - // - // TODO: after LRS refactoring, each controller should only manage the LRS - // stream to its server. LRS streams to other servers should be managed by - // other controllers. - lrsMu sync.Mutex - lrsClients map[string]*lrsClient -} - -var grpcDial = grpc.Dial - -// SetGRPCDial sets the dialer for the controller. The dial can be used to -// manipulate the dial options or change the target if needed. -// The SetGRPCDial must be called before gRPC initialization to make sure it -// affects all the controllers created. -// To reset any dialer set, pass in grpc.Dial as the parameter. -func SetGRPCDial(dialer func(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)) { - grpcDial = dialer -} - -// New creates a new controller. -func New(config *bootstrap.ServerConfig, updateHandler pubsub.UpdateHandler, validator xdsresource.UpdateValidatorFunc, logger *grpclog.PrefixLogger, boff func(int) time.Duration) (_ *Controller, retErr error) { - switch { - case config == nil: - return nil, errors.New("xds: no xds_server provided") - case config.ServerURI == "": - return nil, errors.New("xds: no xds_server name provided in options") - case config.Creds == nil: - return nil, errors.New("xds: no credentials provided in options") - case config.NodeProto == nil: - return nil, errors.New("xds: no node_proto provided in options") - } - - dopts := []grpc.DialOption{ - config.Creds, - grpc.WithKeepaliveParams(keepalive.ClientParameters{ - Time: 5 * time.Minute, - Timeout: 20 * time.Second, - }), - } - - if boff == nil { - boff = backoff.DefaultExponential.Backoff - } - ret := &Controller{ - config: config, - updateValidator: validator, - updateHandler: updateHandler, - runDoneCh: make(chan struct{}), - - backoff: boff, - streamCh: make(chan grpc.ClientStream, 1), - sendCh: buffer.NewUnbounded(), - watchMap: make(map[xdsresource.ResourceType]map[string]bool), - versionMap: make(map[xdsresource.ResourceType]string), - nonceMap: make(map[xdsresource.ResourceType]string), - - lrsClients: make(map[string]*lrsClient), - } - - defer func() { - if retErr != nil { - ret.Close() - } - }() - - cc, err := grpcDial(config.ServerURI, dopts...) - if err != nil { - // An error from a non-blocking dial indicates something serious. - return nil, fmt.Errorf("xds: failed to dial control plane {%s}: %v", config.ServerURI, err) - } - ret.cc = cc - - builder := version.GetAPIClientBuilder(config.TransportAPI) - if builder == nil { - return nil, fmt.Errorf("no client builder for xDS API version: %v", config.TransportAPI) - } - apiClient, err := builder(version.BuildOptions{NodeProto: config.NodeProto, Logger: logger}) - if err != nil { - return nil, err - } - ret.vClient = apiClient - - ctx, cancel := context.WithCancel(context.Background()) - ret.stopRunGoroutine = cancel - go ret.run(ctx) - - return ret, nil -} - -// Close closes the controller. -func (t *Controller) Close() { - t.mu.Lock() - if t.closed { - t.mu.Unlock() - return - } - t.closed = true - t.mu.Unlock() - - // Note that Close needs to check for nils even if some of them are always - // set in the constructor. This is because the constructor defers Close() in - // error cases, and the fields might not be set when the error happens. - if t.stopRunGoroutine != nil { - t.stopRunGoroutine() - } - if t.cc != nil { - t.cc.Close() - } - // Wait on the run goroutine to be done only if it was started. - if t.stopRunGoroutine != nil { - <-t.runDoneCh - } -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/loadreport.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/loadreport.go deleted file mode 100644 index a28cc95dc6f6..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/loadreport.go +++ /dev/null @@ -1,145 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package controller - -import ( - "context" - - "google.golang.org/grpc" - "google.golang.org/grpc/xds/internal/xdsclient/controller/version" - "google.golang.org/grpc/xds/internal/xdsclient/load" -) - -// ReportLoad starts an load reporting stream to the given server. If the server -// is not an empty string, and is different from the management server, a new -// ClientConn will be created. -// -// The same options used for creating the Client will be used (including -// NodeProto, and dial options if necessary). -// -// It returns a Store for the user to report loads, a function to cancel the -// load reporting stream. -// -// TODO(xdsfed): LRS refactor, delete the parameter of this function, and -// cleanup the multiple LRS ClientConn code. Each controller should have one -// ClientConn to the authority it's created for, all LRS streams (and ADS -// streams) in this controller should all share that ClientConn. -func (c *Controller) ReportLoad(server string) (*load.Store, func()) { - c.lrsMu.Lock() - defer c.lrsMu.Unlock() - - // If there's already a client to this server, use it. Otherwise, create - // one. - lrsC, ok := c.lrsClients[server] - if !ok { - lrsC = newLRSClient(c, server) - c.lrsClients[server] = lrsC - } - - store := lrsC.ref() - return store, func() { - // This is a callback, need to hold lrsMu. - c.lrsMu.Lock() - defer c.lrsMu.Unlock() - if lrsC.unRef() { - // Delete the lrsClient from map if this is the last reference. - delete(c.lrsClients, server) - } - } -} - -// lrsClient maps to one lrsServer. It contains: -// - a ClientConn to this server (only if it's different from the management -// server) -// - a load.Store that contains loads only for this server -type lrsClient struct { - parent *Controller - server string - - cc *grpc.ClientConn // nil if the server is same as the management server - refCount int - cancelStream func() - loadStore *load.Store -} - -// newLRSClient creates a new LRS stream to the server. -func newLRSClient(parent *Controller, server string) *lrsClient { - return &lrsClient{ - parent: parent, - server: server, - refCount: 0, - } -} - -// ref increments the refCount. If this is the first ref, it starts the LRS stream. -// -// Not thread-safe, caller needs to synchronize. -func (lrsC *lrsClient) ref() *load.Store { - lrsC.refCount++ - if lrsC.refCount == 1 { - lrsC.startStream() - } - return lrsC.loadStore -} - -// unRef decrements the refCount, and closes the stream if refCount reaches 0 -// (and close the cc if cc is not xDS cc). It returns whether refCount reached 0 -// after this call. -// -// Not thread-safe, caller needs to synchronize. -func (lrsC *lrsClient) unRef() (closed bool) { - lrsC.refCount-- - if lrsC.refCount != 0 { - return false - } - lrsC.parent.logger.Infof("Stopping load report to server: %s", lrsC.server) - lrsC.cancelStream() - if lrsC.cc != nil { - lrsC.cc.Close() - } - return true -} - -// startStream starts the LRS stream to the server. If server is not the same -// management server from the parent, it also creates a ClientConn. -func (lrsC *lrsClient) startStream() { - var cc *grpc.ClientConn - - lrsC.parent.logger.Infof("Starting load report to server: %s", lrsC.server) - if lrsC.server == "" || lrsC.server == lrsC.parent.config.ServerURI { - // Reuse the xDS client if server is the same. - cc = lrsC.parent.cc - } else { - lrsC.parent.logger.Infof("LRS server is different from management server, starting a new ClientConn") - ccNew, err := grpc.Dial(lrsC.server, lrsC.parent.config.Creds) - if err != nil { - // An error from a non-blocking dial indicates something serious. - lrsC.parent.logger.Infof("xds: failed to dial load report server {%s}: %v", lrsC.server, err) - return - } - cc = ccNew - lrsC.cc = ccNew - } - - var ctx context.Context - ctx, lrsC.cancelStream = context.WithCancel(context.Background()) - - // Create the store and stream. - lrsC.loadStore = load.NewStore() - go lrsC.parent.reportLoad(ctx, cc, version.LoadReportingOptions{LoadStore: lrsC.loadStore}) -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/transport.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/transport.go deleted file mode 100644 index 526aefae29b0..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/transport.go +++ /dev/null @@ -1,443 +0,0 @@ -/* - * - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package controller - -import ( - "context" - "fmt" - "time" - - "github.com/golang/protobuf/proto" - "google.golang.org/grpc" - controllerversion "google.golang.org/grpc/xds/internal/xdsclient/controller/version" - xdsresourceversion "google.golang.org/grpc/xds/internal/xdsclient/controller/version" - "google.golang.org/grpc/xds/internal/xdsclient/load" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" -) - -// AddWatch adds a watch for an xDS resource given its type and name. -func (t *Controller) AddWatch(rType xdsresource.ResourceType, resourceName string) { - t.sendCh.Put(&watchAction{ - rType: rType, - remove: false, - resource: resourceName, - }) -} - -// RemoveWatch cancels an already registered watch for an xDS resource -// given its type and name. -func (t *Controller) RemoveWatch(rType xdsresource.ResourceType, resourceName string) { - t.sendCh.Put(&watchAction{ - rType: rType, - remove: true, - resource: resourceName, - }) -} - -// run starts an ADS stream (and backs off exponentially, if the previous -// stream failed without receiving a single reply) and runs the sender and -// receiver routines to send and receive data from the stream respectively. -func (t *Controller) run(ctx context.Context) { - sendDoneCh := make(chan struct{}) - defer func() { - <-sendDoneCh - close(t.runDoneCh) - }() - go t.send(ctx, sendDoneCh) - - // TODO: start a goroutine monitoring ClientConn's connectivity state, and - // report error (and log) when stats is transient failure. - - retries := 0 - lastStreamStartTime := time.Time{} - for ctx.Err() == nil { - dur := time.Until(lastStreamStartTime.Add(t.backoff(retries))) - if dur > 0 { - timer := time.NewTimer(dur) - select { - case <-timer.C: - case <-ctx.Done(): - timer.Stop() - return - } - } - - retries++ - lastStreamStartTime = time.Now() - stream, err := t.vClient.NewStream(ctx, t.cc) - if err != nil { - t.updateHandler.NewConnectionError(err) - t.logger.Warningf("xds: ADS stream creation failed: %v", err) - continue - } - t.logger.Infof("ADS stream created") - - select { - case <-t.streamCh: - default: - } - t.streamCh <- stream - if t.recv(stream) { - retries = 0 - } - } -} - -// send is a separate goroutine for sending watch requests on the xds stream. -// -// It watches the stream channel for new streams, and the request channel for -// new requests to send on the stream. -// -// For each new request (watchAction), it's -// - processed and added to the watch map -// so, resend will pick them up when there are new streams -// - sent on the current stream if there's one -// the current stream is cleared when any send on it fails -// -// For each new stream, all the existing requests will be resent. -// -// Note that this goroutine doesn't do anything to the old stream when there's a -// new one. In fact, there should be only one stream in progress, and new one -// should only be created when the old one fails (recv returns an error). -func (t *Controller) send(ctx context.Context, doneCh chan struct{}) { - defer func() { close(doneCh) }() - - var stream grpc.ClientStream - for { - select { - case <-ctx.Done(): - return - case stream = <-t.streamCh: - if !t.sendExisting(stream) { - // send failed, clear the current stream. - stream = nil - } - case u := <-t.sendCh.Get(): - t.sendCh.Load() - - var ( - target []string - rType xdsresource.ResourceType - version, nonce, errMsg string - send bool - ) - switch update := u.(type) { - case *watchAction: - target, rType, version, nonce = t.processWatchInfo(update) - case *ackAction: - target, rType, version, nonce, send = t.processAckInfo(update, stream) - if !send { - continue - } - errMsg = update.errMsg - } - if stream == nil { - // There's no stream yet. Skip the request. This request - // will be resent to the new streams. If no stream is - // created, the watcher will timeout (same as server not - // sending response back). - continue - } - if err := t.vClient.SendRequest(stream, target, rType, version, nonce, errMsg); err != nil { - t.logger.Warningf("ADS request for {target: %q, type: %v, version: %q, nonce: %q} failed: %v", target, rType, version, nonce, err) - // send failed, clear the current stream. - stream = nil - } - } - } -} - -// sendExisting sends out xDS requests for registered watchers when recovering -// from a broken stream. -// -// We call stream.Send() here with the lock being held. It should be OK to do -// that here because the stream has just started and Send() usually returns -// quickly (once it pushes the message onto the transport layer) and is only -// ever blocked if we don't have enough flow control quota. -func (t *Controller) sendExisting(stream grpc.ClientStream) bool { - t.mu.Lock() - defer t.mu.Unlock() - - // Reset only the nonce when the stream restarts. - // - // xDS spec says the following. See section: - // https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol#ack-nack-and-resource-type-instance-version - // - // Note that the version for a resource type is not a property of an - // individual xDS stream but rather a property of the resources themselves. If - // the stream becomes broken and the client creates a new stream, the client’s - // initial request on the new stream should indicate the most recent version - // seen by the client on the previous stream - t.nonceMap = make(map[xdsresource.ResourceType]string) - - for rType, s := range t.watchMap { - if err := t.vClient.SendRequest(stream, mapToSlice(s), rType, t.versionMap[rType], "", ""); err != nil { - t.logger.Warningf("ADS request failed: %v", err) - return false - } - } - - return true -} - -// recv receives xDS responses on the provided ADS stream and branches out to -// message specific handlers. -func (t *Controller) recv(stream grpc.ClientStream) bool { - msgReceived := false - for { - resp, err := t.vClient.RecvResponse(stream) - if err != nil { - t.updateHandler.NewConnectionError(err) - t.logger.Warningf("ADS stream is closed with error: %v", err) - return msgReceived - } - msgReceived = true - - rType, version, nonce, err := t.handleResponse(resp) - if e, ok := err.(xdsresourceversion.ErrResourceTypeUnsupported); ok { - t.logger.Warningf("%s", e.ErrStr) - continue - } - if err != nil { - t.sendCh.Put(&ackAction{ - rType: rType, - version: "", - nonce: nonce, - errMsg: err.Error(), - stream: stream, - }) - t.logger.Warningf("Sending NACK for response type: %v, version: %v, nonce: %v, reason: %v", rType, version, nonce, err) - continue - } - t.sendCh.Put(&ackAction{ - rType: rType, - version: version, - nonce: nonce, - stream: stream, - }) - t.logger.Infof("Sending ACK for response type: %v, version: %v, nonce: %v", rType, version, nonce) - } -} - -func (t *Controller) handleResponse(resp proto.Message) (xdsresource.ResourceType, string, string, error) { - rType, resource, version, nonce, err := t.vClient.ParseResponse(resp) - if err != nil { - return rType, version, nonce, err - } - opts := &xdsresource.UnmarshalOptions{ - Version: version, - Resources: resource, - Logger: t.logger, - UpdateValidator: t.updateValidator, - } - var md xdsresource.UpdateMetadata - switch rType { - case xdsresource.ListenerResource: - var update map[string]xdsresource.ListenerUpdateErrTuple - update, md, err = xdsresource.UnmarshalListener(opts) - t.updateHandler.NewListeners(update, md) - case xdsresource.RouteConfigResource: - var update map[string]xdsresource.RouteConfigUpdateErrTuple - update, md, err = xdsresource.UnmarshalRouteConfig(opts) - t.updateHandler.NewRouteConfigs(update, md) - case xdsresource.ClusterResource: - var update map[string]xdsresource.ClusterUpdateErrTuple - update, md, err = xdsresource.UnmarshalCluster(opts) - t.updateHandler.NewClusters(update, md) - case xdsresource.EndpointsResource: - var update map[string]xdsresource.EndpointsUpdateErrTuple - update, md, err = xdsresource.UnmarshalEndpoints(opts) - t.updateHandler.NewEndpoints(update, md) - default: - return rType, "", "", xdsresourceversion.ErrResourceTypeUnsupported{ - ErrStr: fmt.Sprintf("Resource type %v unknown in response from server", rType), - } - } - return rType, version, nonce, err -} - -func mapToSlice(m map[string]bool) []string { - ret := make([]string, 0, len(m)) - for i := range m { - ret = append(ret, i) - } - return ret -} - -type watchAction struct { - rType xdsresource.ResourceType - remove bool // Whether this is to remove watch for the resource. - resource string -} - -// processWatchInfo pulls the fields needed by the request from a watchAction. -// -// It also updates the watch map. -func (t *Controller) processWatchInfo(w *watchAction) (target []string, rType xdsresource.ResourceType, ver, nonce string) { - t.mu.Lock() - defer t.mu.Unlock() - - var current map[string]bool - current, ok := t.watchMap[w.rType] - if !ok { - current = make(map[string]bool) - t.watchMap[w.rType] = current - } - - if w.remove { - delete(current, w.resource) - if len(current) == 0 { - delete(t.watchMap, w.rType) - } - } else { - current[w.resource] = true - } - - rType = w.rType - target = mapToSlice(current) - // We don't reset version or nonce when a new watch is started. The version - // and nonce from previous response are carried by the request. Only the nonce - // is reset when the stream is recreated. - ver = t.versionMap[rType] - nonce = t.nonceMap[rType] - return target, rType, ver, nonce -} - -type ackAction struct { - rType xdsresource.ResourceType - version string // NACK if version is an empty string. - nonce string - errMsg string // Empty unless it's a NACK. - // ACK/NACK are tagged with the stream it's for. When the stream is down, - // all the ACK/NACK for this stream will be dropped, and the version/nonce - // won't be updated. - stream grpc.ClientStream -} - -// processAckInfo pulls the fields needed by the ack request from a ackAction. -// -// If no active watch is found for this ack, it returns false for send. -func (t *Controller) processAckInfo(ack *ackAction, stream grpc.ClientStream) (target []string, rType xdsresource.ResourceType, version, nonce string, send bool) { - if ack.stream != stream { - // If ACK's stream isn't the current sending stream, this means the ACK - // was pushed to queue before the old stream broke, and a new stream has - // been started since. Return immediately here so we don't update the - // nonce for the new stream. - return nil, xdsresource.UnknownResource, "", "", false - } - rType = ack.rType - - t.mu.Lock() - defer t.mu.Unlock() - - // Update the nonce no matter if we are going to send the ACK request on - // wire. We may not send the request if the watch is canceled. But the nonce - // needs to be updated so the next request will have the right nonce. - nonce = ack.nonce - t.nonceMap[rType] = nonce - - s, ok := t.watchMap[rType] - if !ok || len(s) == 0 { - // We don't send the request ack if there's no active watch (this can be - // either the server sends responses before any request, or the watch is - // canceled while the ackAction is in queue), because there's no resource - // name. And if we send a request with empty resource name list, the - // server may treat it as a wild card and send us everything. - return nil, xdsresource.UnknownResource, "", "", false - } - send = true - target = mapToSlice(s) - - version = ack.version - if version == "" { - // This is a nack, get the previous acked version. - version = t.versionMap[rType] - // version will still be an empty string if rType isn't - // found in versionMap, this can happen if there wasn't any ack - // before. - } else { - t.versionMap[rType] = version - } - return target, rType, version, nonce, send -} - -// reportLoad starts an LRS stream to report load data to the management server. -// It blocks until the context is cancelled. -func (t *Controller) reportLoad(ctx context.Context, cc *grpc.ClientConn, opts controllerversion.LoadReportingOptions) { - retries := 0 - lastStreamStartTime := time.Time{} - for ctx.Err() == nil { - dur := time.Until(lastStreamStartTime.Add(t.backoff(retries))) - if dur > 0 { - timer := time.NewTimer(dur) - select { - case <-timer.C: - case <-ctx.Done(): - timer.Stop() - return - } - } - - retries++ - lastStreamStartTime = time.Now() - func() { - // streamCtx is created and canceled in case we terminate the stream - // early for any reason, to avoid gRPC-Go leaking the RPC's monitoring - // goroutine. - streamCtx, cancel := context.WithCancel(ctx) - defer cancel() - stream, err := t.vClient.NewLoadStatsStream(streamCtx, cc) - if err != nil { - t.logger.Warningf("lrs: failed to create stream: %v", err) - return - } - t.logger.Infof("lrs: created LRS stream") - - if err := t.vClient.SendFirstLoadStatsRequest(stream); err != nil { - t.logger.Warningf("lrs: failed to send first request: %v", err) - return - } - - clusters, interval, err := t.vClient.HandleLoadStatsResponse(stream) - if err != nil { - t.logger.Warningf("lrs: error from stream: %v", err) - return - } - - retries = 0 - t.sendLoads(streamCtx, stream, opts.LoadStore, clusters, interval) - }() - } -} - -func (t *Controller) sendLoads(ctx context.Context, stream grpc.ClientStream, store *load.Store, clusterNames []string, interval time.Duration) { - tick := time.NewTicker(interval) - defer tick.Stop() - for { - select { - case <-tick.C: - case <-ctx.Done(): - return - } - if err := t.vClient.SendLoadStatsRequest(stream, store.Stats(clusterNames)); err != nil { - t.logger.Warningf("lrs: error from stream: %v", err) - return - } - } -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/client.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/client.go deleted file mode 100644 index 968947b0669e..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/client.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// Package v2 provides xDS v2 transport protocol specific functionality. -package v2 - -import ( - "context" - "fmt" - - "github.com/golang/protobuf/proto" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/internal/grpclog" - "google.golang.org/grpc/internal/pretty" - controllerversion "google.golang.org/grpc/xds/internal/xdsclient/controller/version" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" - xdsresourceversion "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version" - "google.golang.org/protobuf/types/known/anypb" - - v2xdspb "github.com/envoyproxy/go-control-plane/envoy/api/v2" - v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - v2adsgrpc "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2" - statuspb "google.golang.org/genproto/googleapis/rpc/status" -) - -func init() { - controllerversion.RegisterAPIClientBuilder(xdsresourceversion.TransportV2, newClient) -} - -var ( - resourceTypeToURL = map[xdsresource.ResourceType]string{ - xdsresource.ListenerResource: xdsresourceversion.V2ListenerURL, - xdsresource.RouteConfigResource: xdsresourceversion.V2RouteConfigURL, - xdsresource.ClusterResource: xdsresourceversion.V2ClusterURL, - xdsresource.EndpointsResource: xdsresourceversion.V2EndpointsURL, - } -) - -func newClient(opts controllerversion.BuildOptions) (controllerversion.VersionedClient, error) { - nodeProto, ok := opts.NodeProto.(*v2corepb.Node) - if !ok { - return nil, fmt.Errorf("xds: unsupported Node proto type: %T, want %T", opts.NodeProto, (*v2corepb.Node)(nil)) - } - v2c := &client{nodeProto: nodeProto, logger: opts.Logger} - return v2c, nil -} - -type adsStream v2adsgrpc.AggregatedDiscoveryService_StreamAggregatedResourcesClient - -// client performs the actual xDS RPCs using the xDS v2 API. It creates a -// single ADS stream on which the different types of xDS requests and responses -// are multiplexed. -type client struct { - nodeProto *v2corepb.Node - logger *grpclog.PrefixLogger -} - -func (v2c *client) NewStream(ctx context.Context, cc *grpc.ClientConn) (grpc.ClientStream, error) { - return v2adsgrpc.NewAggregatedDiscoveryServiceClient(cc).StreamAggregatedResources(ctx, grpc.WaitForReady(true)) -} - -// SendRequest sends out a DiscoveryRequest for the given resourceNames, of type -// rType, on the provided stream. -// -// version is the ack version to be sent with the request -// - If this is the new request (not an ack/nack), version will be empty. -// - If this is an ack, version will be the version from the response. -// - If this is a nack, version will be the previous acked version (from -// versionMap). If there was no ack before, it will be empty. -func (v2c *client) SendRequest(s grpc.ClientStream, resourceNames []string, rType xdsresource.ResourceType, version, nonce, errMsg string) error { - stream, ok := s.(adsStream) - if !ok { - return fmt.Errorf("xds: Attempt to send request on unsupported stream type: %T", s) - } - req := &v2xdspb.DiscoveryRequest{ - Node: v2c.nodeProto, - TypeUrl: resourceTypeToURL[rType], - ResourceNames: resourceNames, - VersionInfo: version, - ResponseNonce: nonce, - } - if errMsg != "" { - req.ErrorDetail = &statuspb.Status{ - Code: int32(codes.InvalidArgument), Message: errMsg, - } - } - if err := stream.Send(req); err != nil { - return fmt.Errorf("xds: stream.Send(%+v) failed: %v", req, err) - } - v2c.logger.Debugf("ADS request sent: %v", pretty.ToJSON(req)) - return nil -} - -// RecvResponse blocks on the receipt of one response message on the provided -// stream. -func (v2c *client) RecvResponse(s grpc.ClientStream) (proto.Message, error) { - stream, ok := s.(adsStream) - if !ok { - return nil, fmt.Errorf("xds: Attempt to receive response on unsupported stream type: %T", s) - } - - resp, err := stream.Recv() - if err != nil { - return nil, fmt.Errorf("xds: stream.Recv() failed: %v", err) - } - v2c.logger.Infof("ADS response received, type: %v", resp.GetTypeUrl()) - v2c.logger.Debugf("ADS response received: %v", pretty.ToJSON(resp)) - return resp, nil -} - -func (v2c *client) ParseResponse(r proto.Message) (xdsresource.ResourceType, []*anypb.Any, string, string, error) { - rType := xdsresource.UnknownResource - resp, ok := r.(*v2xdspb.DiscoveryResponse) - if !ok { - return rType, nil, "", "", fmt.Errorf("xds: unsupported message type: %T", resp) - } - - // Note that the xDS transport protocol is versioned independently of - // the resource types, and it is supported to transfer older versions - // of resource types using new versions of the transport protocol, or - // vice-versa. Hence we need to handle v3 type_urls as well here. - var err error - url := resp.GetTypeUrl() - switch { - case xdsresource.IsListenerResource(url): - rType = xdsresource.ListenerResource - case xdsresource.IsRouteConfigResource(url): - rType = xdsresource.RouteConfigResource - case xdsresource.IsClusterResource(url): - rType = xdsresource.ClusterResource - case xdsresource.IsEndpointsResource(url): - rType = xdsresource.EndpointsResource - default: - return rType, nil, "", "", controllerversion.ErrResourceTypeUnsupported{ - ErrStr: fmt.Sprintf("Resource type %v unknown in response from server", resp.GetTypeUrl()), - } - } - return rType, resp.GetResources(), resp.GetVersionInfo(), resp.GetNonce(), err -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/loadreport.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/loadreport.go deleted file mode 100644 index da5128ac456e..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2/loadreport.go +++ /dev/null @@ -1,170 +0,0 @@ -/* - * - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package v2 - -import ( - "context" - "errors" - "fmt" - "io" - "time" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - "google.golang.org/grpc/internal/pretty" - "google.golang.org/grpc/xds/internal/xdsclient/load" - - v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - v2endpointpb "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" - lrsgrpc "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2" - lrspb "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2" - "google.golang.org/grpc" - "google.golang.org/grpc/xds/internal" -) - -const clientFeatureLRSSendAllClusters = "envoy.lrs.supports_send_all_clusters" - -type lrsStream lrsgrpc.LoadReportingService_StreamLoadStatsClient - -func (v2c *client) NewLoadStatsStream(ctx context.Context, cc *grpc.ClientConn) (grpc.ClientStream, error) { - c := lrsgrpc.NewLoadReportingServiceClient(cc) - return c.StreamLoadStats(ctx) -} - -func (v2c *client) SendFirstLoadStatsRequest(s grpc.ClientStream) error { - stream, ok := s.(lrsStream) - if !ok { - return fmt.Errorf("lrs: Attempt to send request on unsupported stream type: %T", s) - } - node := proto.Clone(v2c.nodeProto).(*v2corepb.Node) - if node == nil { - node = &v2corepb.Node{} - } - node.ClientFeatures = append(node.ClientFeatures, clientFeatureLRSSendAllClusters) - - req := &lrspb.LoadStatsRequest{Node: node} - v2c.logger.Infof("lrs: sending init LoadStatsRequest: %v", pretty.ToJSON(req)) - err := stream.Send(req) - if err == io.EOF { - return getStreamError(stream) - } - return err -} - -func (v2c *client) HandleLoadStatsResponse(s grpc.ClientStream) ([]string, time.Duration, error) { - stream, ok := s.(lrsStream) - if !ok { - return nil, 0, fmt.Errorf("lrs: Attempt to receive response on unsupported stream type: %T", s) - } - - resp, err := stream.Recv() - if err != nil { - return nil, 0, fmt.Errorf("lrs: failed to receive first response: %v", err) - } - v2c.logger.Infof("lrs: received first LoadStatsResponse: %+v", pretty.ToJSON(resp)) - - interval, err := ptypes.Duration(resp.GetLoadReportingInterval()) - if err != nil { - return nil, 0, fmt.Errorf("lrs: failed to convert report interval: %v", err) - } - - if resp.ReportEndpointGranularity { - // TODO: fixme to support per endpoint loads. - return nil, 0, errors.New("lrs: endpoint loads requested, but not supported by current implementation") - } - - clusters := resp.Clusters - if resp.SendAllClusters { - // Return nil to send stats for all clusters. - clusters = nil - } - - return clusters, interval, nil -} - -func (v2c *client) SendLoadStatsRequest(s grpc.ClientStream, loads []*load.Data) error { - stream, ok := s.(lrsStream) - if !ok { - return fmt.Errorf("lrs: Attempt to send request on unsupported stream type: %T", s) - } - - clusterStats := make([]*v2endpointpb.ClusterStats, 0, len(loads)) - for _, sd := range loads { - droppedReqs := make([]*v2endpointpb.ClusterStats_DroppedRequests, 0, len(sd.Drops)) - for category, count := range sd.Drops { - droppedReqs = append(droppedReqs, &v2endpointpb.ClusterStats_DroppedRequests{ - Category: category, - DroppedCount: count, - }) - } - localityStats := make([]*v2endpointpb.UpstreamLocalityStats, 0, len(sd.LocalityStats)) - for l, localityData := range sd.LocalityStats { - lid, err := internal.LocalityIDFromString(l) - if err != nil { - return err - } - loadMetricStats := make([]*v2endpointpb.EndpointLoadMetricStats, 0, len(localityData.LoadStats)) - for name, loadData := range localityData.LoadStats { - loadMetricStats = append(loadMetricStats, &v2endpointpb.EndpointLoadMetricStats{ - MetricName: name, - NumRequestsFinishedWithMetric: loadData.Count, - TotalMetricValue: loadData.Sum, - }) - } - localityStats = append(localityStats, &v2endpointpb.UpstreamLocalityStats{ - Locality: &v2corepb.Locality{ - Region: lid.Region, - Zone: lid.Zone, - SubZone: lid.SubZone, - }, - TotalSuccessfulRequests: localityData.RequestStats.Succeeded, - TotalRequestsInProgress: localityData.RequestStats.InProgress, - TotalErrorRequests: localityData.RequestStats.Errored, - LoadMetricStats: loadMetricStats, - UpstreamEndpointStats: nil, // TODO: populate for per endpoint loads. - }) - } - - clusterStats = append(clusterStats, &v2endpointpb.ClusterStats{ - ClusterName: sd.Cluster, - ClusterServiceName: sd.Service, - UpstreamLocalityStats: localityStats, - TotalDroppedRequests: sd.TotalDrops, - DroppedRequests: droppedReqs, - LoadReportInterval: ptypes.DurationProto(sd.ReportInterval), - }) - - } - - req := &lrspb.LoadStatsRequest{ClusterStats: clusterStats} - v2c.logger.Infof("lrs: sending LRS loads: %+v", pretty.ToJSON(req)) - err := stream.Send(req) - if err == io.EOF { - return getStreamError(stream) - } - return err -} - -func getStreamError(stream lrsStream) error { - for { - if _, err := stream.Recv(); err != nil { - return err - } - } -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/client.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/client.go deleted file mode 100644 index 4cacd94dd19b..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/client.go +++ /dev/null @@ -1,157 +0,0 @@ -/* - * - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// Package v3 provides xDS v3 transport protocol specific functionality. -package v3 - -import ( - "context" - "fmt" - - "github.com/golang/protobuf/proto" - statuspb "google.golang.org/genproto/googleapis/rpc/status" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/internal/grpclog" - "google.golang.org/grpc/internal/pretty" - controllerversion "google.golang.org/grpc/xds/internal/xdsclient/controller/version" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" - xdsresourceversion "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version" - "google.golang.org/protobuf/types/known/anypb" - - v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - v3adsgrpc "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" - v3discoverypb "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" -) - -func init() { - controllerversion.RegisterAPIClientBuilder(xdsresourceversion.TransportV3, newClient) -} - -var ( - resourceTypeToURL = map[xdsresource.ResourceType]string{ - xdsresource.ListenerResource: xdsresourceversion.V3ListenerURL, - xdsresource.RouteConfigResource: xdsresourceversion.V3RouteConfigURL, - xdsresource.ClusterResource: xdsresourceversion.V3ClusterURL, - xdsresource.EndpointsResource: xdsresourceversion.V3EndpointsURL, - } -) - -func newClient(opts controllerversion.BuildOptions) (controllerversion.VersionedClient, error) { - nodeProto, ok := opts.NodeProto.(*v3corepb.Node) - if !ok { - return nil, fmt.Errorf("xds: unsupported Node proto type: %T, want %T", opts.NodeProto, v3corepb.Node{}) - } - v3c := &client{ - nodeProto: nodeProto, logger: opts.Logger, - } - return v3c, nil -} - -type adsStream v3adsgrpc.AggregatedDiscoveryService_StreamAggregatedResourcesClient - -// client performs the actual xDS RPCs using the xDS v3 API. It creates a -// single ADS stream on which the different types of xDS requests and responses -// are multiplexed. -type client struct { - nodeProto *v3corepb.Node - logger *grpclog.PrefixLogger -} - -func (v3c *client) NewStream(ctx context.Context, cc *grpc.ClientConn) (grpc.ClientStream, error) { - return v3adsgrpc.NewAggregatedDiscoveryServiceClient(cc).StreamAggregatedResources(ctx, grpc.WaitForReady(true)) -} - -// SendRequest sends out a DiscoveryRequest for the given resourceNames, of type -// rType, on the provided stream. -// -// version is the ack version to be sent with the request -// - If this is the new request (not an ack/nack), version will be empty. -// - If this is an ack, version will be the version from the response. -// - If this is a nack, version will be the previous acked version (from -// versionMap). If there was no ack before, it will be empty. -func (v3c *client) SendRequest(s grpc.ClientStream, resourceNames []string, rType xdsresource.ResourceType, version, nonce, errMsg string) error { - stream, ok := s.(adsStream) - if !ok { - return fmt.Errorf("xds: Attempt to send request on unsupported stream type: %T", s) - } - req := &v3discoverypb.DiscoveryRequest{ - Node: v3c.nodeProto, - TypeUrl: resourceTypeToURL[rType], - ResourceNames: resourceNames, - VersionInfo: version, - ResponseNonce: nonce, - } - if errMsg != "" { - req.ErrorDetail = &statuspb.Status{ - Code: int32(codes.InvalidArgument), Message: errMsg, - } - } - if err := stream.Send(req); err != nil { - return fmt.Errorf("xds: stream.Send(%+v) failed: %v", req, err) - } - v3c.logger.Debugf("ADS request sent: %v", pretty.ToJSON(req)) - return nil -} - -// RecvResponse blocks on the receipt of one response message on the provided -// stream. -func (v3c *client) RecvResponse(s grpc.ClientStream) (proto.Message, error) { - stream, ok := s.(adsStream) - if !ok { - return nil, fmt.Errorf("xds: Attempt to receive response on unsupported stream type: %T", s) - } - - resp, err := stream.Recv() - if err != nil { - return nil, fmt.Errorf("xds: stream.Recv() failed: %v", err) - } - v3c.logger.Infof("ADS response received, type: %v", resp.GetTypeUrl()) - v3c.logger.Debugf("ADS response received: %+v", pretty.ToJSON(resp)) - return resp, nil -} - -func (v3c *client) ParseResponse(r proto.Message) (xdsresource.ResourceType, []*anypb.Any, string, string, error) { - rType := xdsresource.UnknownResource - resp, ok := r.(*v3discoverypb.DiscoveryResponse) - if !ok { - return rType, nil, "", "", fmt.Errorf("xds: unsupported message type: %T", resp) - } - - // Note that the xDS transport protocol is versioned independently of - // the resource types, and it is supported to transfer older versions - // of resource types using new versions of the transport protocol, or - // vice-versa. Hence we need to handle v3 type_urls as well here. - var err error - url := resp.GetTypeUrl() - switch { - case xdsresource.IsListenerResource(url): - rType = xdsresource.ListenerResource - case xdsresource.IsRouteConfigResource(url): - rType = xdsresource.RouteConfigResource - case xdsresource.IsClusterResource(url): - rType = xdsresource.ClusterResource - case xdsresource.IsEndpointsResource(url): - rType = xdsresource.EndpointsResource - default: - return rType, nil, "", "", controllerversion.ErrResourceTypeUnsupported{ - ErrStr: fmt.Sprintf("Resource type %v unknown in response from server", resp.GetTypeUrl()), - } - } - return rType, resp.GetResources(), resp.GetVersionInfo(), resp.GetNonce(), err -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/loadreport.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/loadreport.go deleted file mode 100644 index f8d866bb1a59..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3/loadreport.go +++ /dev/null @@ -1,169 +0,0 @@ -/* - * - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package v3 - -import ( - "context" - "errors" - "fmt" - "io" - "time" - - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes" - "google.golang.org/grpc/internal/pretty" - "google.golang.org/grpc/xds/internal/xdsclient/load" - - v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" - v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" - lrsgrpc "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3" - lrspb "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3" - "google.golang.org/grpc" - "google.golang.org/grpc/xds/internal" -) - -const clientFeatureLRSSendAllClusters = "envoy.lrs.supports_send_all_clusters" - -type lrsStream lrsgrpc.LoadReportingService_StreamLoadStatsClient - -func (v3c *client) NewLoadStatsStream(ctx context.Context, cc *grpc.ClientConn) (grpc.ClientStream, error) { - c := lrsgrpc.NewLoadReportingServiceClient(cc) - return c.StreamLoadStats(ctx) -} - -func (v3c *client) SendFirstLoadStatsRequest(s grpc.ClientStream) error { - stream, ok := s.(lrsStream) - if !ok { - return fmt.Errorf("lrs: Attempt to send request on unsupported stream type: %T", s) - } - node := proto.Clone(v3c.nodeProto).(*v3corepb.Node) - if node == nil { - node = &v3corepb.Node{} - } - node.ClientFeatures = append(node.ClientFeatures, clientFeatureLRSSendAllClusters) - - req := &lrspb.LoadStatsRequest{Node: node} - v3c.logger.Infof("lrs: sending init LoadStatsRequest: %v", pretty.ToJSON(req)) - err := stream.Send(req) - if err == io.EOF { - return getStreamError(stream) - } - return err -} - -func (v3c *client) HandleLoadStatsResponse(s grpc.ClientStream) ([]string, time.Duration, error) { - stream, ok := s.(lrsStream) - if !ok { - return nil, 0, fmt.Errorf("lrs: Attempt to receive response on unsupported stream type: %T", s) - } - - resp, err := stream.Recv() - if err != nil { - return nil, 0, fmt.Errorf("lrs: failed to receive first response: %v", err) - } - v3c.logger.Infof("lrs: received first LoadStatsResponse: %+v", pretty.ToJSON(resp)) - - interval, err := ptypes.Duration(resp.GetLoadReportingInterval()) - if err != nil { - return nil, 0, fmt.Errorf("lrs: failed to convert report interval: %v", err) - } - - if resp.ReportEndpointGranularity { - // TODO: fixme to support per endpoint loads. - return nil, 0, errors.New("lrs: endpoint loads requested, but not supported by current implementation") - } - - clusters := resp.Clusters - if resp.SendAllClusters { - // Return nil to send stats for all clusters. - clusters = nil - } - - return clusters, interval, nil -} - -func (v3c *client) SendLoadStatsRequest(s grpc.ClientStream, loads []*load.Data) error { - stream, ok := s.(lrsStream) - if !ok { - return fmt.Errorf("lrs: Attempt to send request on unsupported stream type: %T", s) - } - - clusterStats := make([]*v3endpointpb.ClusterStats, 0, len(loads)) - for _, sd := range loads { - droppedReqs := make([]*v3endpointpb.ClusterStats_DroppedRequests, 0, len(sd.Drops)) - for category, count := range sd.Drops { - droppedReqs = append(droppedReqs, &v3endpointpb.ClusterStats_DroppedRequests{ - Category: category, - DroppedCount: count, - }) - } - localityStats := make([]*v3endpointpb.UpstreamLocalityStats, 0, len(sd.LocalityStats)) - for l, localityData := range sd.LocalityStats { - lid, err := internal.LocalityIDFromString(l) - if err != nil { - return err - } - loadMetricStats := make([]*v3endpointpb.EndpointLoadMetricStats, 0, len(localityData.LoadStats)) - for name, loadData := range localityData.LoadStats { - loadMetricStats = append(loadMetricStats, &v3endpointpb.EndpointLoadMetricStats{ - MetricName: name, - NumRequestsFinishedWithMetric: loadData.Count, - TotalMetricValue: loadData.Sum, - }) - } - localityStats = append(localityStats, &v3endpointpb.UpstreamLocalityStats{ - Locality: &v3corepb.Locality{ - Region: lid.Region, - Zone: lid.Zone, - SubZone: lid.SubZone, - }, - TotalSuccessfulRequests: localityData.RequestStats.Succeeded, - TotalRequestsInProgress: localityData.RequestStats.InProgress, - TotalErrorRequests: localityData.RequestStats.Errored, - LoadMetricStats: loadMetricStats, - UpstreamEndpointStats: nil, // TODO: populate for per endpoint loads. - }) - } - - clusterStats = append(clusterStats, &v3endpointpb.ClusterStats{ - ClusterName: sd.Cluster, - ClusterServiceName: sd.Service, - UpstreamLocalityStats: localityStats, - TotalDroppedRequests: sd.TotalDrops, - DroppedRequests: droppedReqs, - LoadReportInterval: ptypes.DurationProto(sd.ReportInterval), - }) - } - - req := &lrspb.LoadStatsRequest{ClusterStats: clusterStats} - v3c.logger.Infof("lrs: sending LRS loads: %+v", pretty.ToJSON(req)) - err := stream.Send(req) - if err == io.EOF { - return getStreamError(stream) - } - return err -} - -func getStreamError(stream lrsStream) error { - for { - if _, err := stream.Recv(); err != nil { - return err - } - } -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/version.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/version.go deleted file mode 100644 index f79a21e294fa..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/controller/version/version.go +++ /dev/null @@ -1,123 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Package version defines APIs to deal with different versions of xDS. -package version - -import ( - "context" - "time" - - "github.com/golang/protobuf/proto" - "google.golang.org/grpc" - "google.golang.org/grpc/internal/grpclog" - "google.golang.org/grpc/xds/internal/xdsclient/load" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version" - "google.golang.org/protobuf/types/known/anypb" -) - -var ( - m = make(map[version.TransportAPI]func(opts BuildOptions) (VersionedClient, error)) -) - -// RegisterAPIClientBuilder registers a client builder for xDS transport protocol -// version specified by b.Version(). -// -// NOTE: this function must only be called during initialization time (i.e. in -// an init() function), and is not thread-safe. If multiple builders are -// registered for the same version, the one registered last will take effect. -func RegisterAPIClientBuilder(v version.TransportAPI, f func(opts BuildOptions) (VersionedClient, error)) { - m[v] = f -} - -// GetAPIClientBuilder returns the client builder registered for the provided -// xDS transport API version. -func GetAPIClientBuilder(version version.TransportAPI) func(opts BuildOptions) (VersionedClient, error) { - if f, ok := m[version]; ok { - return f - } - return nil -} - -// BuildOptions contains options to be passed to client builders. -type BuildOptions struct { - // NodeProto contains the Node proto to be used in xDS requests. The actual - // type depends on the transport protocol version used. - NodeProto proto.Message - // // Backoff returns the amount of time to backoff before retrying broken - // // streams. - // Backoff func(int) time.Duration - // Logger provides enhanced logging capabilities. - Logger *grpclog.PrefixLogger -} - -// LoadReportingOptions contains configuration knobs for reporting load data. -type LoadReportingOptions struct { - LoadStore *load.Store -} - -// ErrResourceTypeUnsupported is an error used to indicate an unsupported xDS -// resource type. The wrapped ErrStr contains the details. -type ErrResourceTypeUnsupported struct { - ErrStr string -} - -// Error helps implements the error interface. -func (e ErrResourceTypeUnsupported) Error() string { - return e.ErrStr -} - -// VersionedClient is the interface to version specific operations of the -// client. -// -// It mainly deals with the type assertion from proto.Message to the real v2/v3 -// types, and grpc.Stream to the versioned stream types. -type VersionedClient interface { - // NewStream returns a new xDS client stream specific to the underlying - // transport protocol version. - NewStream(ctx context.Context, cc *grpc.ClientConn) (grpc.ClientStream, error) - // SendRequest constructs and sends out a DiscoveryRequest message specific - // to the underlying transport protocol version. - SendRequest(s grpc.ClientStream, resourceNames []string, rType xdsresource.ResourceType, version, nonce, errMsg string) error - // RecvResponse uses the provided stream to receive a response specific to - // the underlying transport protocol version. - RecvResponse(s grpc.ClientStream) (proto.Message, error) - // ParseResponse type asserts message to the versioned response, and - // retrieves the fields. - ParseResponse(r proto.Message) (xdsresource.ResourceType, []*anypb.Any, string, string, error) - - // The following are LRS methods. - - // NewLoadStatsStream returns a new LRS client stream specific to the - // underlying transport protocol version. - NewLoadStatsStream(ctx context.Context, cc *grpc.ClientConn) (grpc.ClientStream, error) - // SendFirstLoadStatsRequest constructs and sends the first request on the - // LRS stream. - SendFirstLoadStatsRequest(s grpc.ClientStream) error - // HandleLoadStatsResponse receives the first response from the server which - // contains the load reporting interval and the clusters for which the - // server asks the client to report load for. - // - // If the response sets SendAllClusters to true, the returned clusters is - // nil. - HandleLoadStatsResponse(s grpc.ClientStream) (clusters []string, _ time.Duration, _ error) - // SendLoadStatsRequest will be invoked at regular intervals to send load - // report with load data reported since the last time this method was - // invoked. - SendLoadStatsRequest(s grpc.ClientStream, loads []*load.Data) error -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/dump.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/dump.go deleted file mode 100644 index 2ff19a901616..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/dump.go +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pubsub - -import ( - anypb "github.com/golang/protobuf/ptypes/any" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" -) - -func rawFromCache(s string, cache interface{}) *anypb.Any { - switch c := cache.(type) { - case map[string]xdsresource.ListenerUpdate: - if v, ok := c[s]; ok { - return v.Raw - } - return nil - case map[string]xdsresource.RouteConfigUpdate: - if v, ok := c[s]; ok { - return v.Raw - } - return nil - case map[string]xdsresource.ClusterUpdate: - if v, ok := c[s]; ok { - return v.Raw - } - return nil - case map[string]xdsresource.EndpointsUpdate: - if v, ok := c[s]; ok { - return v.Raw - } - return nil - default: - return nil - } -} - -// Dump dumps the resource for the given type. -func (pb *Pubsub) Dump(t xdsresource.ResourceType) map[string]xdsresource.UpdateWithMD { - pb.mu.Lock() - defer pb.mu.Unlock() - - var ( - md map[string]xdsresource.UpdateMetadata - cache interface{} - ) - switch t { - case xdsresource.ListenerResource: - md = pb.ldsMD - cache = pb.ldsCache - case xdsresource.RouteConfigResource: - md = pb.rdsMD - cache = pb.rdsCache - case xdsresource.ClusterResource: - md = pb.cdsMD - cache = pb.cdsCache - case xdsresource.EndpointsResource: - md = pb.edsMD - cache = pb.edsCache - default: - pb.logger.Errorf("dumping resource of unknown type: %v", t) - return nil - } - - ret := make(map[string]xdsresource.UpdateWithMD, len(md)) - for s, md := range md { - ret[s] = xdsresource.UpdateWithMD{ - MD: md, - Raw: rawFromCache(s, cache), - } - } - return ret -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/interface.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/interface.go deleted file mode 100644 index 334ec101e29d..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/interface.go +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pubsub - -import "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" - -// UpdateHandler receives and processes (by taking appropriate actions) xDS -// resource updates from an APIClient for a specific version. -// -// It's a subset of the APIs of a *Pubsub. -type UpdateHandler interface { - // NewListeners handles updates to xDS listener resources. - NewListeners(map[string]xdsresource.ListenerUpdateErrTuple, xdsresource.UpdateMetadata) - // NewRouteConfigs handles updates to xDS RouteConfiguration resources. - NewRouteConfigs(map[string]xdsresource.RouteConfigUpdateErrTuple, xdsresource.UpdateMetadata) - // NewClusters handles updates to xDS Cluster resources. - NewClusters(map[string]xdsresource.ClusterUpdateErrTuple, xdsresource.UpdateMetadata) - // NewEndpoints handles updates to xDS ClusterLoadAssignment (or tersely - // referred to as Endpoints) resources. - NewEndpoints(map[string]xdsresource.EndpointsUpdateErrTuple, xdsresource.UpdateMetadata) - // NewConnectionError handles connection errors from the xDS stream. The - // error will be reported to all the resource watchers. - NewConnectionError(err error) -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/pubsub.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/pubsub.go deleted file mode 100644 index 95e8ac77300e..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/pubsub.go +++ /dev/null @@ -1,186 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Package pubsub implements a utility type to maintain resource watchers and -// the updates. -// -// This package is designed to work with the xds resources. It could be made a -// general system that works with all types. -package pubsub - -import ( - "sync" - "time" - - "google.golang.org/grpc/internal/buffer" - "google.golang.org/grpc/internal/grpclog" - "google.golang.org/grpc/internal/grpcsync" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" -) - -// Pubsub maintains resource watchers and resource updates. -// -// There can be multiple watchers for the same resource. An update to a resource -// triggers updates to all the existing watchers. Watchers can be canceled at -// any time. -type Pubsub struct { - done *grpcsync.Event - logger *grpclog.PrefixLogger - watchExpiryTimeout time.Duration - nodeID string - - updateCh *buffer.Unbounded // chan *watcherInfoWithUpdate - // All the following maps are to keep the updates/metadata in a cache. - mu sync.Mutex - ldsWatchers map[string]map[*watchInfo]bool - ldsCache map[string]xdsresource.ListenerUpdate - ldsMD map[string]xdsresource.UpdateMetadata - rdsWatchers map[string]map[*watchInfo]bool - rdsCache map[string]xdsresource.RouteConfigUpdate - rdsMD map[string]xdsresource.UpdateMetadata - cdsWatchers map[string]map[*watchInfo]bool - cdsCache map[string]xdsresource.ClusterUpdate - cdsMD map[string]xdsresource.UpdateMetadata - edsWatchers map[string]map[*watchInfo]bool - edsCache map[string]xdsresource.EndpointsUpdate - edsMD map[string]xdsresource.UpdateMetadata -} - -// New creates a new Pubsub. -// -// The passed in nodeID will be attached to all errors sent to the watchers. -func New(watchExpiryTimeout time.Duration, nodeID string, logger *grpclog.PrefixLogger) *Pubsub { - pb := &Pubsub{ - done: grpcsync.NewEvent(), - logger: logger, - watchExpiryTimeout: watchExpiryTimeout, - nodeID: nodeID, - - updateCh: buffer.NewUnbounded(), - ldsWatchers: make(map[string]map[*watchInfo]bool), - ldsCache: make(map[string]xdsresource.ListenerUpdate), - ldsMD: make(map[string]xdsresource.UpdateMetadata), - rdsWatchers: make(map[string]map[*watchInfo]bool), - rdsCache: make(map[string]xdsresource.RouteConfigUpdate), - rdsMD: make(map[string]xdsresource.UpdateMetadata), - cdsWatchers: make(map[string]map[*watchInfo]bool), - cdsCache: make(map[string]xdsresource.ClusterUpdate), - cdsMD: make(map[string]xdsresource.UpdateMetadata), - edsWatchers: make(map[string]map[*watchInfo]bool), - edsCache: make(map[string]xdsresource.EndpointsUpdate), - edsMD: make(map[string]xdsresource.UpdateMetadata), - } - go pb.run() - return pb -} - -// WatchListener registers a watcher for the LDS resource. -// -// It also returns whether this is the first watch for this resource. -func (pb *Pubsub) WatchListener(serviceName string, cb func(xdsresource.ListenerUpdate, error)) (first bool, cancel func() bool) { - wi := &watchInfo{ - c: pb, - rType: xdsresource.ListenerResource, - target: serviceName, - ldsCallback: cb, - } - - wi.expiryTimer = time.AfterFunc(pb.watchExpiryTimeout, func() { - wi.timeout() - }) - return pb.watch(wi) -} - -// WatchRouteConfig register a watcher for the RDS resource. -// -// It also returns whether this is the first watch for this resource. -func (pb *Pubsub) WatchRouteConfig(routeName string, cb func(xdsresource.RouteConfigUpdate, error)) (first bool, cancel func() bool) { - wi := &watchInfo{ - c: pb, - rType: xdsresource.RouteConfigResource, - target: routeName, - rdsCallback: cb, - } - - wi.expiryTimer = time.AfterFunc(pb.watchExpiryTimeout, func() { - wi.timeout() - }) - return pb.watch(wi) -} - -// WatchCluster register a watcher for the CDS resource. -// -// It also returns whether this is the first watch for this resource. -func (pb *Pubsub) WatchCluster(clusterName string, cb func(xdsresource.ClusterUpdate, error)) (first bool, cancel func() bool) { - wi := &watchInfo{ - c: pb, - rType: xdsresource.ClusterResource, - target: clusterName, - cdsCallback: cb, - } - - wi.expiryTimer = time.AfterFunc(pb.watchExpiryTimeout, func() { - wi.timeout() - }) - return pb.watch(wi) -} - -// WatchEndpoints registers a watcher for the EDS resource. -// -// It also returns whether this is the first watch for this resource. -func (pb *Pubsub) WatchEndpoints(clusterName string, cb func(xdsresource.EndpointsUpdate, error)) (first bool, cancel func() bool) { - wi := &watchInfo{ - c: pb, - rType: xdsresource.EndpointsResource, - target: clusterName, - edsCallback: cb, - } - - wi.expiryTimer = time.AfterFunc(pb.watchExpiryTimeout, func() { - wi.timeout() - }) - return pb.watch(wi) -} - -// Close closes the pubsub. -func (pb *Pubsub) Close() { - if pb.done.HasFired() { - return - } - pb.done.Fire() -} - -// run is a goroutine for all the callbacks. -// -// Callback can be called in watch(), if an item is found in cache. Without this -// goroutine, the callback will be called inline, which might cause a deadlock -// in user's code. Callbacks also cannot be simple `go callback()` because the -// order matters. -func (pb *Pubsub) run() { - for { - select { - case t := <-pb.updateCh.Get(): - pb.updateCh.Load() - if pb.done.HasFired() { - return - } - pb.callCallback(t.(*watcherInfoWithUpdate)) - case <-pb.done.Done(): - return - } - } -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/update.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/update.go deleted file mode 100644 index 9ae6ae976712..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/update.go +++ /dev/null @@ -1,318 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pubsub - -import ( - "google.golang.org/grpc/internal/pretty" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" - "google.golang.org/protobuf/proto" -) - -type watcherInfoWithUpdate struct { - wi *watchInfo - update interface{} - err error -} - -// scheduleCallback should only be called by methods of watchInfo, which checks -// for watcher states and maintain consistency. -func (pb *Pubsub) scheduleCallback(wi *watchInfo, update interface{}, err error) { - pb.updateCh.Put(&watcherInfoWithUpdate{ - wi: wi, - update: update, - err: err, - }) -} - -func (pb *Pubsub) callCallback(wiu *watcherInfoWithUpdate) { - pb.mu.Lock() - // Use a closure to capture the callback and type assertion, to save one - // more switch case. - // - // The callback must be called without pb.mu. Otherwise if the callback calls - // another watch() inline, it will cause a deadlock. This leaves a small - // window that a watcher's callback could be called after the watcher is - // canceled, and the user needs to take care of it. - var ccb func() - switch wiu.wi.rType { - case xdsresource.ListenerResource: - if s, ok := pb.ldsWatchers[wiu.wi.target]; ok && s[wiu.wi] { - ccb = func() { wiu.wi.ldsCallback(wiu.update.(xdsresource.ListenerUpdate), wiu.err) } - } - case xdsresource.RouteConfigResource: - if s, ok := pb.rdsWatchers[wiu.wi.target]; ok && s[wiu.wi] { - ccb = func() { wiu.wi.rdsCallback(wiu.update.(xdsresource.RouteConfigUpdate), wiu.err) } - } - case xdsresource.ClusterResource: - if s, ok := pb.cdsWatchers[wiu.wi.target]; ok && s[wiu.wi] { - ccb = func() { wiu.wi.cdsCallback(wiu.update.(xdsresource.ClusterUpdate), wiu.err) } - } - case xdsresource.EndpointsResource: - if s, ok := pb.edsWatchers[wiu.wi.target]; ok && s[wiu.wi] { - ccb = func() { wiu.wi.edsCallback(wiu.update.(xdsresource.EndpointsUpdate), wiu.err) } - } - } - pb.mu.Unlock() - - if ccb != nil { - ccb() - } -} - -// NewListeners is called when there's a new LDS update. -func (pb *Pubsub) NewListeners(updates map[string]xdsresource.ListenerUpdateErrTuple, metadata xdsresource.UpdateMetadata) { - pb.mu.Lock() - defer pb.mu.Unlock() - - for name, uErr := range updates { - if s, ok := pb.ldsWatchers[name]; ok { - if uErr.Err != nil { - // On error, keep previous version for each resource. But update - // status and error. - mdCopy := pb.ldsMD[name] - mdCopy.ErrState = metadata.ErrState - mdCopy.Status = metadata.Status - pb.ldsMD[name] = mdCopy - for wi := range s { - wi.newError(uErr.Err) - } - continue - } - // If we get here, it means that the update is a valid one. Notify - // watchers only if this is a first time update or it is different - // from the one currently cached. - if cur, ok := pb.ldsCache[name]; !ok || !proto.Equal(cur.Raw, uErr.Update.Raw) { - for wi := range s { - wi.newUpdate(uErr.Update) - } - } - // Sync cache. - pb.logger.Debugf("LDS resource with name %v, value %+v added to cache", name, pretty.ToJSON(uErr)) - pb.ldsCache[name] = uErr.Update - // Set status to ACK, and clear error state. The metadata might be a - // NACK metadata because some other resources in the same response - // are invalid. - mdCopy := metadata - mdCopy.Status = xdsresource.ServiceStatusACKed - mdCopy.ErrState = nil - if metadata.ErrState != nil { - mdCopy.Version = metadata.ErrState.Version - } - pb.ldsMD[name] = mdCopy - } - } - // Resources not in the new update were removed by the server, so delete - // them. - for name := range pb.ldsCache { - if _, ok := updates[name]; !ok { - // If resource exists in cache, but not in the new update, delete - // the resource from cache, and also send an resource not found - // error to indicate resource removed. - delete(pb.ldsCache, name) - pb.ldsMD[name] = xdsresource.UpdateMetadata{Status: xdsresource.ServiceStatusNotExist} - for wi := range pb.ldsWatchers[name] { - wi.resourceNotFound() - } - } - } - // When LDS resource is removed, we don't delete corresponding RDS cached - // data. The RDS watch will be canceled, and cache entry is removed when the - // last watch is canceled. -} - -// NewRouteConfigs is called when there's a new RDS update. -func (pb *Pubsub) NewRouteConfigs(updates map[string]xdsresource.RouteConfigUpdateErrTuple, metadata xdsresource.UpdateMetadata) { - pb.mu.Lock() - defer pb.mu.Unlock() - - // If no error received, the status is ACK. - for name, uErr := range updates { - if s, ok := pb.rdsWatchers[name]; ok { - if uErr.Err != nil { - // On error, keep previous version for each resource. But update - // status and error. - mdCopy := pb.rdsMD[name] - mdCopy.ErrState = metadata.ErrState - mdCopy.Status = metadata.Status - pb.rdsMD[name] = mdCopy - for wi := range s { - wi.newError(uErr.Err) - } - continue - } - // If we get here, it means that the update is a valid one. Notify - // watchers only if this is a first time update or it is different - // from the one currently cached. - if cur, ok := pb.rdsCache[name]; !ok || !proto.Equal(cur.Raw, uErr.Update.Raw) { - for wi := range s { - wi.newUpdate(uErr.Update) - } - } - // Sync cache. - pb.logger.Debugf("RDS resource with name %v, value %+v added to cache", name, pretty.ToJSON(uErr)) - pb.rdsCache[name] = uErr.Update - // Set status to ACK, and clear error state. The metadata might be a - // NACK metadata because some other resources in the same response - // are invalid. - mdCopy := metadata - mdCopy.Status = xdsresource.ServiceStatusACKed - mdCopy.ErrState = nil - if metadata.ErrState != nil { - mdCopy.Version = metadata.ErrState.Version - } - pb.rdsMD[name] = mdCopy - } - } -} - -// NewClusters is called when there's a new CDS update. -func (pb *Pubsub) NewClusters(updates map[string]xdsresource.ClusterUpdateErrTuple, metadata xdsresource.UpdateMetadata) { - pb.mu.Lock() - defer pb.mu.Unlock() - - for name, uErr := range updates { - if s, ok := pb.cdsWatchers[name]; ok { - if uErr.Err != nil { - // On error, keep previous version for each resource. But update - // status and error. - mdCopy := pb.cdsMD[name] - mdCopy.ErrState = metadata.ErrState - mdCopy.Status = metadata.Status - pb.cdsMD[name] = mdCopy - for wi := range s { - // Send the watcher the individual error, instead of the - // overall combined error from the metadata.ErrState. - wi.newError(uErr.Err) - } - continue - } - // If we get here, it means that the update is a valid one. Notify - // watchers only if this is a first time update or it is different - // from the one currently cached. - if cur, ok := pb.cdsCache[name]; !ok || !proto.Equal(cur.Raw, uErr.Update.Raw) { - for wi := range s { - wi.newUpdate(uErr.Update) - } - } - // Sync cache. - pb.logger.Debugf("CDS resource with name %v, value %+v added to cache", name, pretty.ToJSON(uErr)) - pb.cdsCache[name] = uErr.Update - // Set status to ACK, and clear error state. The metadata might be a - // NACK metadata because some other resources in the same response - // are invalid. - mdCopy := metadata - mdCopy.Status = xdsresource.ServiceStatusACKed - mdCopy.ErrState = nil - if metadata.ErrState != nil { - mdCopy.Version = metadata.ErrState.Version - } - pb.cdsMD[name] = mdCopy - } - } - // Resources not in the new update were removed by the server, so delete - // them. - for name := range pb.cdsCache { - if _, ok := updates[name]; !ok { - // If resource exists in cache, but not in the new update, delete it - // from cache, and also send an resource not found error to indicate - // resource removed. - delete(pb.cdsCache, name) - pb.cdsMD[name] = xdsresource.UpdateMetadata{Status: xdsresource.ServiceStatusNotExist} - for wi := range pb.cdsWatchers[name] { - wi.resourceNotFound() - } - } - } - // When CDS resource is removed, we don't delete corresponding EDS cached - // data. The EDS watch will be canceled, and cache entry is removed when the - // last watch is canceled. -} - -// NewEndpoints is called when there's anew EDS update. -func (pb *Pubsub) NewEndpoints(updates map[string]xdsresource.EndpointsUpdateErrTuple, metadata xdsresource.UpdateMetadata) { - pb.mu.Lock() - defer pb.mu.Unlock() - - for name, uErr := range updates { - if s, ok := pb.edsWatchers[name]; ok { - if uErr.Err != nil { - // On error, keep previous version for each resource. But update - // status and error. - mdCopy := pb.edsMD[name] - mdCopy.ErrState = metadata.ErrState - mdCopy.Status = metadata.Status - pb.edsMD[name] = mdCopy - for wi := range s { - // Send the watcher the individual error, instead of the - // overall combined error from the metadata.ErrState. - wi.newError(uErr.Err) - } - continue - } - // If we get here, it means that the update is a valid one. Notify - // watchers only if this is a first time update or it is different - // from the one currently cached. - if cur, ok := pb.edsCache[name]; !ok || !proto.Equal(cur.Raw, uErr.Update.Raw) { - for wi := range s { - wi.newUpdate(uErr.Update) - } - } - // Sync cache. - pb.logger.Debugf("EDS resource with name %v, value %+v added to cache", name, pretty.ToJSON(uErr)) - pb.edsCache[name] = uErr.Update - // Set status to ACK, and clear error state. The metadata might be a - // NACK metadata because some other resources in the same response - // are invalid. - mdCopy := metadata - mdCopy.Status = xdsresource.ServiceStatusACKed - mdCopy.ErrState = nil - if metadata.ErrState != nil { - mdCopy.Version = metadata.ErrState.Version - } - pb.edsMD[name] = mdCopy - } - } -} - -// NewConnectionError is called by the underlying xdsAPIClient when it receives -// a connection error. The error will be forwarded to all the resource watchers. -func (pb *Pubsub) NewConnectionError(err error) { - pb.mu.Lock() - defer pb.mu.Unlock() - - for _, s := range pb.ldsWatchers { - for wi := range s { - wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err)) - } - } - for _, s := range pb.rdsWatchers { - for wi := range s { - wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err)) - } - } - for _, s := range pb.cdsWatchers { - for wi := range s { - wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err)) - } - } - for _, s := range pb.edsWatchers { - for wi := range s { - wi.newError(xdsresource.NewErrorf(xdsresource.ErrorTypeConnection, "xds: error received from xDS stream: %v", err)) - } - } -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/watch.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/watch.go deleted file mode 100644 index bef179936a89..000000000000 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/pubsub/watch.go +++ /dev/null @@ -1,239 +0,0 @@ -/* - * - * Copyright 2021 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package pubsub - -import ( - "fmt" - "sync" - "time" - - "google.golang.org/grpc/internal/pretty" - "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" -) - -type watchInfoState int - -const ( - watchInfoStateStarted watchInfoState = iota - watchInfoStateRespReceived - watchInfoStateTimeout - watchInfoStateCanceled -) - -// watchInfo holds all the information from a watch() call. -type watchInfo struct { - c *Pubsub - rType xdsresource.ResourceType - target string - - ldsCallback func(xdsresource.ListenerUpdate, error) - rdsCallback func(xdsresource.RouteConfigUpdate, error) - cdsCallback func(xdsresource.ClusterUpdate, error) - edsCallback func(xdsresource.EndpointsUpdate, error) - - expiryTimer *time.Timer - - // mu protects state, and c.scheduleCallback(). - // - No callback should be scheduled after watchInfo is canceled. - // - No timeout error should be scheduled after watchInfo is resp received. - mu sync.Mutex - state watchInfoState -} - -func (wi *watchInfo) newUpdate(update interface{}) { - wi.mu.Lock() - defer wi.mu.Unlock() - if wi.state == watchInfoStateCanceled { - return - } - wi.state = watchInfoStateRespReceived - wi.expiryTimer.Stop() - wi.c.scheduleCallback(wi, update, nil) -} - -func (wi *watchInfo) newError(err error) { - wi.mu.Lock() - defer wi.mu.Unlock() - if wi.state == watchInfoStateCanceled { - return - } - wi.state = watchInfoStateRespReceived - wi.expiryTimer.Stop() - wi.sendErrorLocked(err) -} - -func (wi *watchInfo) resourceNotFound() { - wi.mu.Lock() - defer wi.mu.Unlock() - if wi.state == watchInfoStateCanceled { - return - } - wi.state = watchInfoStateRespReceived - wi.expiryTimer.Stop() - wi.sendErrorLocked(xdsresource.NewErrorf(xdsresource.ErrorTypeResourceNotFound, "xds: %v target %s not found in received response", wi.rType, wi.target)) -} - -func (wi *watchInfo) timeout() { - wi.mu.Lock() - defer wi.mu.Unlock() - if wi.state == watchInfoStateCanceled || wi.state == watchInfoStateRespReceived { - return - } - wi.state = watchInfoStateTimeout - wi.sendErrorLocked(fmt.Errorf("xds: %v target %s not found, watcher timeout", wi.rType, wi.target)) -} - -// Caller must hold wi.mu. -func (wi *watchInfo) sendErrorLocked(err error) { - var u interface{} - switch wi.rType { - case xdsresource.ListenerResource: - u = xdsresource.ListenerUpdate{} - case xdsresource.RouteConfigResource: - u = xdsresource.RouteConfigUpdate{} - case xdsresource.ClusterResource: - u = xdsresource.ClusterUpdate{} - case xdsresource.EndpointsResource: - u = xdsresource.EndpointsUpdate{} - } - - errMsg := err.Error() - errTyp := xdsresource.ErrType(err) - if errTyp == xdsresource.ErrorTypeUnknown { - err = fmt.Errorf("%v, xDS client nodeID: %s", errMsg, wi.c.nodeID) - } else { - err = xdsresource.NewErrorf(errTyp, "%v, xDS client nodeID: %s", errMsg, wi.c.nodeID) - } - - wi.c.scheduleCallback(wi, u, err) -} - -func (wi *watchInfo) cancel() { - wi.mu.Lock() - defer wi.mu.Unlock() - if wi.state == watchInfoStateCanceled { - return - } - wi.expiryTimer.Stop() - wi.state = watchInfoStateCanceled -} - -func (pb *Pubsub) watch(wi *watchInfo) (first bool, cancel func() bool) { - pb.mu.Lock() - defer pb.mu.Unlock() - pb.logger.Debugf("new watch for type %v, resource name %v", wi.rType, wi.target) - var ( - watchers map[string]map[*watchInfo]bool - mds map[string]xdsresource.UpdateMetadata - ) - switch wi.rType { - case xdsresource.ListenerResource: - watchers = pb.ldsWatchers - mds = pb.ldsMD - case xdsresource.RouteConfigResource: - watchers = pb.rdsWatchers - mds = pb.rdsMD - case xdsresource.ClusterResource: - watchers = pb.cdsWatchers - mds = pb.cdsMD - case xdsresource.EndpointsResource: - watchers = pb.edsWatchers - mds = pb.edsMD - default: - pb.logger.Errorf("unknown watch type: %v", wi.rType) - return false, nil - } - - var firstWatcher bool - resourceName := wi.target - s, ok := watchers[wi.target] - if !ok { - // If this is a new watcher, will ask lower level to send a new request - // with the resource name. - // - // If this (type+name) is already being watched, will not notify the - // underlying versioned apiClient. - pb.logger.Debugf("first watch for type %v, resource name %v, will send a new xDS request", wi.rType, wi.target) - s = make(map[*watchInfo]bool) - watchers[resourceName] = s - mds[resourceName] = xdsresource.UpdateMetadata{Status: xdsresource.ServiceStatusRequested} - firstWatcher = true - } - // No matter what, add the new watcher to the set, so it's callback will be - // call for new responses. - s[wi] = true - - // If the resource is in cache, call the callback with the value. - switch wi.rType { - case xdsresource.ListenerResource: - if v, ok := pb.ldsCache[resourceName]; ok { - pb.logger.Debugf("LDS resource with name %v found in cache: %+v", wi.target, pretty.ToJSON(v)) - wi.newUpdate(v) - } - case xdsresource.RouteConfigResource: - if v, ok := pb.rdsCache[resourceName]; ok { - pb.logger.Debugf("RDS resource with name %v found in cache: %+v", wi.target, pretty.ToJSON(v)) - wi.newUpdate(v) - } - case xdsresource.ClusterResource: - if v, ok := pb.cdsCache[resourceName]; ok { - pb.logger.Debugf("CDS resource with name %v found in cache: %+v", wi.target, pretty.ToJSON(v)) - wi.newUpdate(v) - } - case xdsresource.EndpointsResource: - if v, ok := pb.edsCache[resourceName]; ok { - pb.logger.Debugf("EDS resource with name %v found in cache: %+v", wi.target, pretty.ToJSON(v)) - wi.newUpdate(v) - } - } - - return firstWatcher, func() bool { - pb.logger.Debugf("watch for type %v, resource name %v canceled", wi.rType, wi.target) - wi.cancel() - pb.mu.Lock() - defer pb.mu.Unlock() - var lastWatcher bool - if s := watchers[resourceName]; s != nil { - // Remove this watcher, so it's callback will not be called in the - // future. - delete(s, wi) - if len(s) == 0 { - pb.logger.Debugf("last watch for type %v, resource name %v canceled, will send a new xDS request", wi.rType, wi.target) - // If this was the last watcher, also tell xdsv2Client to stop - // watching this resource. - delete(watchers, resourceName) - delete(mds, resourceName) - lastWatcher = true - // Remove the resource from cache. When a watch for this - // resource is added later, it will trigger a xDS request with - // resource names, and client will receive new xDS responses. - switch wi.rType { - case xdsresource.ListenerResource: - delete(pb.ldsCache, resourceName) - case xdsresource.RouteConfigResource: - delete(pb.rdsCache, resourceName) - case xdsresource.ClusterResource: - delete(pb.cdsCache, resourceName) - case xdsresource.EndpointsResource: - delete(pb.edsCache, resourceName) - } - } - } - return lastWatcher - } -} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/singleton.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/singleton.go index 408a27cf6279..4c42ae424971 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/singleton.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/singleton.go @@ -21,8 +21,11 @@ package xdsclient import ( "fmt" "sync" + "sync/atomic" "time" + "google.golang.org/grpc/internal/envconfig" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/xds/internal/xdsclient/bootstrap" ) @@ -34,7 +37,8 @@ const ( var ( // This is the client returned by New(). It contains one client implementation, // and maintains the refcount. - singletonClient = &clientRefCounted{} + singletonMu sync.Mutex + singletonClient *clientRefCounted // The following functions are no-ops in the actual code, but can be // overridden in tests to give them visibility into certain events. @@ -45,57 +49,57 @@ var ( // To override in tests. var bootstrapNewConfig = bootstrap.NewConfig -// onceClosingClient is a thin wrapper around clientRefCounted. The Close() -// method is overridden such that the underlying reference counted client's -// Close() is called at most once, thereby making Close() idempotent. -// -// This is the type which is returned by New() and NewWithConfig(), making it -// safe for these callers to call Close() any number of times. -type onceClosingClient struct { - XDSClient +func clientRefCountedClose() { + singletonMu.Lock() + defer singletonMu.Unlock() - once sync.Once + if singletonClient.decrRef() != 0 { + return + } + singletonClient.clientImpl.close() + singletonClientImplCloseHook() + singletonClient = nil } -func (o *onceClosingClient) Close() { - o.once.Do(o.XDSClient.Close) -} +func newRefCountedWithConfig(fallbackConfig *bootstrap.Config) (XDSClient, func(), error) { + singletonMu.Lock() + defer singletonMu.Unlock() -func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) { - singletonClient.mu.Lock() - defer singletonClient.mu.Unlock() + if singletonClient != nil { + singletonClient.incrRef() + return singletonClient, grpcsync.OnceFunc(clientRefCountedClose), nil - // If the client implementation was created, increment ref count and return - // the client. - if singletonClient.clientImpl != nil { - singletonClient.refCount++ - return &onceClosingClient{XDSClient: singletonClient}, nil } - // If the passed in config is nil, perform bootstrap to read config. - if config == nil { + // Use fallbackConfig only if bootstrap env vars are unspecified. + var config *bootstrap.Config + if envconfig.XDSBootstrapFileName == "" && envconfig.XDSBootstrapFileContent == "" { + if fallbackConfig == nil { + return nil, nil, fmt.Errorf("xds: bootstrap env vars are unspecified and provided fallback config is nil") + } + config = fallbackConfig + } else { var err error config, err = bootstrapNewConfig() if err != nil { - return nil, fmt.Errorf("xds: failed to read bootstrap file: %v", err) + return nil, nil, fmt.Errorf("xds: failed to read bootstrap file: %v", err) } } // Create the new client implementation. c, err := newWithConfig(config, defaultWatchExpiryTimeout, defaultIdleAuthorityDeleteTimeout) if err != nil { - return nil, err + return nil, nil, err } - - singletonClient.clientImpl = c - singletonClient.refCount++ + singletonClient = &clientRefCounted{clientImpl: c, refCount: 1} singletonClientImplCreateHook() + nodeID := "" if node, ok := config.XDSServer.NodeProto.(interface{ GetId() string }); ok { nodeID = node.GetId() } logger.Infof("xDS node ID: %s", nodeID) - return &onceClosingClient{XDSClient: singletonClient}, nil + return singletonClient, grpcsync.OnceFunc(clientRefCountedClose), nil } // clientRefCounted is ref-counted, and to be shared by the xds resolver and @@ -103,23 +107,13 @@ func newRefCountedWithConfig(config *bootstrap.Config) (XDSClient, error) { type clientRefCounted struct { *clientImpl - // This mu protects all the fields, including the embedded clientImpl above. - mu sync.Mutex - refCount int + refCount int32 // accessed atomically } -// Close closes the client. It does ref count of the xds client implementation, -// and closes the gRPC connection to the management server when ref count -// reaches 0. -func (c *clientRefCounted) Close() { - c.mu.Lock() - defer c.mu.Unlock() - c.refCount-- - if c.refCount == 0 { - c.clientImpl.Close() - // Set clientImpl back to nil. So if New() is called after this, a new - // implementation will be created. - c.clientImpl = nil - singletonClientImplCloseHook() - } +func (c *clientRefCounted) incrRef() int32 { + return atomic.AddInt32(&c.refCount, 1) +} + +func (c *clientRefCounted) decrRef() int32 { + return atomic.AddInt32(&c.refCount, -1) } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/loadreport.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/loadreport.go new file mode 100644 index 000000000000..58a2e5dedb6a --- /dev/null +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/loadreport.go @@ -0,0 +1,268 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package transport + +import ( + "context" + "errors" + "fmt" + "io" + "time" + + "github.com/golang/protobuf/ptypes" + "google.golang.org/grpc/internal/grpcsync" + "google.golang.org/grpc/internal/pretty" + "google.golang.org/grpc/xds/internal" + "google.golang.org/grpc/xds/internal/xdsclient/load" + "google.golang.org/protobuf/proto" + + v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" + v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" + v3lrsgrpc "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3" + v3lrspb "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3" +) + +type lrsStream = v3lrsgrpc.LoadReportingService_StreamLoadStatsClient + +// ReportLoad starts reporting loads to the management server the transport is +// configured to use. +// +// It returns a Store for the user to report loads and a function to cancel the +// load reporting. +func (t *Transport) ReportLoad() (*load.Store, func()) { + t.lrsStartStream() + return t.lrsStore, grpcsync.OnceFunc(func() { t.lrsStopStream() }) +} + +// lrsStartStream starts an LRS stream to the server, if none exists. +func (t *Transport) lrsStartStream() { + t.lrsMu.Lock() + defer t.lrsMu.Unlock() + + t.lrsRefCount++ + if t.lrsRefCount != 1 { + // Return early if the stream has already been started. + return + } + + ctx, cancel := context.WithCancel(context.Background()) + t.lrsCancelStream = cancel + + // Create a new done channel everytime a new stream is created. This ensures + // that we don't close the same channel multiple times (from lrsRunner() + // goroutine) when multiple streams are created and closed. + t.lrsRunnerDoneCh = make(chan struct{}) + go t.lrsRunner(ctx) +} + +// lrsStopStream closes the LRS stream, if this is the last user of the stream. +func (t *Transport) lrsStopStream() { + t.lrsMu.Lock() + defer t.lrsMu.Unlock() + + t.lrsRefCount-- + if t.lrsRefCount != 0 { + // Return early if the stream has other references. + return + } + + t.lrsCancelStream() + t.logger.Infof("Stopping LRS stream") + + // Wait for the runner goroutine to exit. The done channel will be + // recreated when a new stream is created. + <-t.lrsRunnerDoneCh +} + +// lrsRunner starts an LRS stream to report load data to the management server. +// It reports load at constant intervals (as configured by the management +// server) until the context is cancelled. +func (t *Transport) lrsRunner(ctx context.Context) { + defer close(t.lrsRunnerDoneCh) + + // This feature indicates that the client supports the + // LoadStatsResponse.send_all_clusters field in the LRS response. + node := proto.Clone(t.nodeProto).(*v3corepb.Node) + node.ClientFeatures = append(node.ClientFeatures, "envoy.lrs.supports_send_all_clusters") + + backoffAttempt := 0 + backoffTimer := time.NewTimer(0) + for ctx.Err() == nil { + select { + case <-backoffTimer.C: + case <-ctx.Done(): + backoffTimer.Stop() + return + } + + // We reset backoff state when we successfully receive at least one + // message from the server. + resetBackoff := func() bool { + // streamCtx is created and canceled in case we terminate the stream + // early for any reason, to avoid gRPC-Go leaking the RPC's monitoring + // goroutine. + streamCtx, cancel := context.WithCancel(ctx) + defer cancel() + stream, err := v3lrsgrpc.NewLoadReportingServiceClient(t.cc).StreamLoadStats(streamCtx) + if err != nil { + t.logger.Warningf("Failed to create LRS stream: %v", err) + return false + } + t.logger.Infof("Created LRS stream to server: %s", t.serverURI) + + if err := t.sendFirstLoadStatsRequest(stream, node); err != nil { + t.logger.Warningf("Failed to send first LRS request: %v", err) + return false + } + + clusters, interval, err := t.recvFirstLoadStatsResponse(stream) + if err != nil { + t.logger.Warningf("Failed to read from LRS stream: %v", err) + return false + } + + t.sendLoads(streamCtx, stream, clusters, interval) + return true + }() + + if resetBackoff { + backoffTimer.Reset(0) + backoffAttempt = 0 + } else { + backoffTimer.Reset(t.backoff(backoffAttempt)) + backoffAttempt++ + } + } +} + +func (t *Transport) sendLoads(ctx context.Context, stream lrsStream, clusterNames []string, interval time.Duration) { + tick := time.NewTicker(interval) + defer tick.Stop() + for { + select { + case <-tick.C: + case <-ctx.Done(): + return + } + if err := t.sendLoadStatsRequest(stream, t.lrsStore.Stats(clusterNames)); err != nil { + t.logger.Warningf("Failed to write to LRS stream: %v", err) + return + } + } +} + +func (t *Transport) sendFirstLoadStatsRequest(stream lrsStream, node *v3corepb.Node) error { + req := &v3lrspb.LoadStatsRequest{Node: node} + t.logger.Debugf("Sending initial LoadStatsRequest: %s", pretty.ToJSON(req)) + err := stream.Send(req) + if err == io.EOF { + return getStreamError(stream) + } + return err +} + +func (t *Transport) recvFirstLoadStatsResponse(stream lrsStream) ([]string, time.Duration, error) { + resp, err := stream.Recv() + if err != nil { + return nil, 0, fmt.Errorf("failed to receive first LoadStatsResponse: %v", err) + } + t.logger.Debugf("Received first LoadStatsResponse: %s", pretty.ToJSON(resp)) + + interval, err := ptypes.Duration(resp.GetLoadReportingInterval()) + if err != nil { + return nil, 0, fmt.Errorf("invalid load_reporting_interval: %v", err) + } + + if resp.ReportEndpointGranularity { + // TODO(easwars): Support per endpoint loads. + return nil, 0, errors.New("lrs: endpoint loads requested, but not supported by current implementation") + } + + clusters := resp.Clusters + if resp.SendAllClusters { + // Return nil to send stats for all clusters. + clusters = nil + } + + return clusters, interval, nil +} + +func (t *Transport) sendLoadStatsRequest(stream lrsStream, loads []*load.Data) error { + clusterStats := make([]*v3endpointpb.ClusterStats, 0, len(loads)) + for _, sd := range loads { + droppedReqs := make([]*v3endpointpb.ClusterStats_DroppedRequests, 0, len(sd.Drops)) + for category, count := range sd.Drops { + droppedReqs = append(droppedReqs, &v3endpointpb.ClusterStats_DroppedRequests{ + Category: category, + DroppedCount: count, + }) + } + localityStats := make([]*v3endpointpb.UpstreamLocalityStats, 0, len(sd.LocalityStats)) + for l, localityData := range sd.LocalityStats { + lid, err := internal.LocalityIDFromString(l) + if err != nil { + return err + } + loadMetricStats := make([]*v3endpointpb.EndpointLoadMetricStats, 0, len(localityData.LoadStats)) + for name, loadData := range localityData.LoadStats { + loadMetricStats = append(loadMetricStats, &v3endpointpb.EndpointLoadMetricStats{ + MetricName: name, + NumRequestsFinishedWithMetric: loadData.Count, + TotalMetricValue: loadData.Sum, + }) + } + localityStats = append(localityStats, &v3endpointpb.UpstreamLocalityStats{ + Locality: &v3corepb.Locality{ + Region: lid.Region, + Zone: lid.Zone, + SubZone: lid.SubZone, + }, + TotalSuccessfulRequests: localityData.RequestStats.Succeeded, + TotalRequestsInProgress: localityData.RequestStats.InProgress, + TotalErrorRequests: localityData.RequestStats.Errored, + LoadMetricStats: loadMetricStats, + UpstreamEndpointStats: nil, // TODO: populate for per endpoint loads. + }) + } + + clusterStats = append(clusterStats, &v3endpointpb.ClusterStats{ + ClusterName: sd.Cluster, + ClusterServiceName: sd.Service, + UpstreamLocalityStats: localityStats, + TotalDroppedRequests: sd.TotalDrops, + DroppedRequests: droppedReqs, + LoadReportInterval: ptypes.DurationProto(sd.ReportInterval), + }) + } + + req := &v3lrspb.LoadStatsRequest{ClusterStats: clusterStats} + t.logger.Debugf("Sending LRS loads: %s", pretty.ToJSON(req)) + err := stream.Send(req) + if err == io.EOF { + return getStreamError(stream) + } + return err +} + +func getStreamError(stream lrsStream) error { + for { + if _, err := stream.Recv(); err != nil { + return err + } + } +} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/transport.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/transport.go new file mode 100644 index 000000000000..814ca5f87263 --- /dev/null +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/transport/transport.go @@ -0,0 +1,572 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Package transport implements the xDS transport protocol functionality +// required by the xdsclient. +package transport + +import ( + "context" + "errors" + "fmt" + "sync" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/internal/backoff" + "google.golang.org/grpc/internal/buffer" + "google.golang.org/grpc/internal/grpclog" + "google.golang.org/grpc/internal/pretty" + "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/xds/internal/xdsclient/bootstrap" + "google.golang.org/grpc/xds/internal/xdsclient/load" + "google.golang.org/grpc/xds/internal/xdsclient/xdsresource" + "google.golang.org/protobuf/types/known/anypb" + + v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" + v3adsgrpc "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" + v3discoverypb "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3" + statuspb "google.golang.org/genproto/googleapis/rpc/status" +) + +type adsStream = v3adsgrpc.AggregatedDiscoveryService_StreamAggregatedResourcesClient + +// Transport provides a resource-type agnostic implementation of the xDS +// transport protocol. At this layer, resource contents are supposed to be +// opaque blobs which should be be meaningful only to the xDS data model layer +// which is implemented by the `xdsresource` package. +// +// Under the hood, it owns the gRPC connection to a single management server and +// manages the lifecycle of ADS/LRS streams. It uses the xDS v3 transport +// protocol version. +type Transport struct { + // These fields are initialized at creation time and are read-only afterwards. + cc *grpc.ClientConn // ClientConn to the mangement server. + serverURI string // URI of the management server. + updateHandler UpdateHandlerFunc // Resource update handler. xDS data model layer. + adsStreamErrHandler func(error) // To report underlying stream errors. + lrsStore *load.Store // Store returned to user for pushing loads. + backoff func(int) time.Duration // Backoff after stream failures. + nodeProto *v3corepb.Node // Identifies the gRPC application. + logger *grpclog.PrefixLogger // Prefix logger for transport logs. + adsRunnerCancel context.CancelFunc // CancelFunc for the ADS goroutine. + adsRunnerDoneCh chan struct{} // To notify exit of ADS goroutine. + lrsRunnerDoneCh chan struct{} // To notify exit of LRS goroutine. + + // These channels enable synchronization amongst the different goroutines + // spawned by the transport, and between asynchorous events resulting from + // receipt of responses from the management server. + adsStreamCh chan adsStream // New ADS streams are pushed here. + adsRequestCh *buffer.Unbounded // Resource and ack requests are pushed here. + + // mu guards the following runtime state maintained by the transport. + mu sync.Mutex + // resources is map from resource type URL to the set of resource names + // being requested for that type. When the ADS stream is restarted, the + // transport requests all these resources again from the management server. + resources map[string]map[string]bool + // versions is a map from resource type URL to the most recently ACKed + // version for that resource. Resource versions are a property of the + // resource type and not the stream, and will not be reset upon stream + // restarts. + versions map[string]string + // nonces is a map from resource type URL to the most recently received + // nonce for that resource type. Nonces are a property of the ADS stream and + // will be reset upon stream restarts. + nonces map[string]string + + lrsMu sync.Mutex // Protects all LRS state. + lrsCancelStream context.CancelFunc // CancelFunc for the LRS stream. + lrsRefCount int // Reference count on the load store. +} + +// UpdateHandlerFunc is the implementation at the xDS data model layer, which +// determines if the configuration received from the management server can be +// applied locally or not. +// +// A nil error is returned from this function when the data model layer believes +// that the received configuration is good and can be applied locally. This will +// cause the transport layer to send an ACK to the management server. A non-nil +// error is returned from this function when the data model layer believes +// otherwise, and this will cause the transport layer to send a NACK. +type UpdateHandlerFunc func(update ResourceUpdate) error + +// ResourceUpdate is a representation of the configuration update received from +// the management server. It only contains fields which are useful to the data +// model layer, and layers above it. +type ResourceUpdate struct { + // Resources is the list of resources received from the management server. + Resources []*anypb.Any + // URL is the resource type URL for the above resources. + URL string + // Version is the resource version, for the above resources, as specified by + // the management server. + Version string +} + +// Options specifies configuration knobs used when creating a new Transport. +type Options struct { + // ServerCfg contains all the configuration required to connect to the xDS + // management server. + ServerCfg bootstrap.ServerConfig + // UpdateHandler is the component which makes ACK/NACK decisions based on + // the received resources. + // + // Invoked inline and implementations must not block. + UpdateHandler UpdateHandlerFunc + // StreamErrorHandler provides a way for the transport layer to report + // underlying stream errors. These can be bubbled all the way up to the user + // of the xdsClient. + // + // Invoked inline and implementations must not block. + StreamErrorHandler func(error) + // Backoff controls the amount of time to backoff before recreating failed + // ADS streams. If unspecified, a default exponential backoff implementation + // is used. For more details, see: + // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. + Backoff func(retries int) time.Duration + // Logger does logging with a prefix. + Logger *grpclog.PrefixLogger +} + +// For overriding in unit tests. +var grpcDial = grpc.Dial + +// New creates a new Transport. +func New(opts Options) (*Transport, error) { + switch { + case opts.ServerCfg.ServerURI == "": + return nil, errors.New("missing server URI when creating a new transport") + case opts.ServerCfg.Creds == nil: + return nil, errors.New("missing credentials when creating a new transport") + case opts.UpdateHandler == nil: + return nil, errors.New("missing update handler when creating a new transport") + case opts.StreamErrorHandler == nil: + return nil, errors.New("missing stream error handler when creating a new transport") + } + + node, ok := opts.ServerCfg.NodeProto.(*v3corepb.Node) + if !ok { + return nil, fmt.Errorf("unexpected type %T for NodeProto, want %T", opts.ServerCfg.NodeProto, &v3corepb.Node{}) + } + + // Dial the xDS management with the passed in credentials. + dopts := []grpc.DialOption{ + opts.ServerCfg.Creds, + grpc.WithKeepaliveParams(keepalive.ClientParameters{ + // We decided to use these sane defaults in all languages, and + // kicked the can down the road as far making these configurable. + Time: 5 * time.Minute, + Timeout: 20 * time.Second, + }), + } + cc, err := grpcDial(opts.ServerCfg.ServerURI, dopts...) + if err != nil { + // An error from a non-blocking dial indicates something serious. + return nil, fmt.Errorf("failed to create a transport to the management server %q: %v", opts.ServerCfg.ServerURI, err) + } + + boff := opts.Backoff + if boff == nil { + boff = backoff.DefaultExponential.Backoff + } + ret := &Transport{ + cc: cc, + serverURI: opts.ServerCfg.ServerURI, + updateHandler: opts.UpdateHandler, + adsStreamErrHandler: opts.StreamErrorHandler, + lrsStore: load.NewStore(), + backoff: boff, + nodeProto: node, + logger: opts.Logger, + + adsStreamCh: make(chan adsStream, 1), + adsRequestCh: buffer.NewUnbounded(), + resources: make(map[string]map[string]bool), + versions: make(map[string]string), + nonces: make(map[string]string), + adsRunnerDoneCh: make(chan struct{}), + } + + // This context is used for sending and receiving RPC requests and + // responses. It is also used by all the goroutines spawned by this + // Transport. Therefore, cancelling this context when the transport is + // closed will essentially cancel any pending RPCs, and cause the goroutines + // to terminate. + ctx, cancel := context.WithCancel(context.Background()) + ret.adsRunnerCancel = cancel + go ret.adsRunner(ctx) + + ret.logger.Infof("Created transport to server %q", ret.serverURI) + return ret, nil +} + +// resourceRequest wraps the resource type url and the resource names requested +// by the user of this transport. +type resourceRequest struct { + resources []string + url string +} + +// SendRequest sends out an ADS request for the provided resources of the +// specified resource type. +// +// The request is sent out asynchronously. If no valid stream exists at the time +// of processing this request, it is queued and will be sent out once a valid +// stream exists. +// +// If a successful response is received, the update handler callback provided at +// creation time is invoked. If an error is encountered, the stream error +// handler callback provided at creation time is invoked. +func (t *Transport) SendRequest(url string, resources []string) { + t.adsRequestCh.Put(&resourceRequest{ + url: url, + resources: resources, + }) +} + +func (t *Transport) newAggregatedDiscoveryServiceStream(ctx context.Context, cc *grpc.ClientConn) (adsStream, error) { + // The transport retries the stream with an exponential backoff whenever the + // stream breaks. But if the channel is broken, we don't want the backoff + // logic to continuously retry the stream. Setting WaitForReady() blocks the + // stream creation until the channel is READY. + // + // TODO(easwars): Make changes required to comply with A57: + // https://github.com/grpc/proposal/blob/master/A57-xds-client-failure-mode-behavior.md + return v3adsgrpc.NewAggregatedDiscoveryServiceClient(cc).StreamAggregatedResources(ctx, grpc.WaitForReady(true)) +} + +func (t *Transport) sendAggregatedDiscoveryServiceRequest(stream adsStream, resourceNames []string, resourceURL, version, nonce string, nackErr error) error { + req := &v3discoverypb.DiscoveryRequest{ + Node: t.nodeProto, + TypeUrl: resourceURL, + ResourceNames: resourceNames, + VersionInfo: version, + ResponseNonce: nonce, + } + if nackErr != nil { + req.ErrorDetail = &statuspb.Status{ + Code: int32(codes.InvalidArgument), Message: nackErr.Error(), + } + } + if err := stream.Send(req); err != nil { + return fmt.Errorf("sending ADS request %s failed: %v", pretty.ToJSON(req), err) + } + t.logger.Debugf("ADS request sent: %v", pretty.ToJSON(req)) + return nil +} + +func (t *Transport) recvAggregatedDiscoveryServiceResponse(stream adsStream) (resources []*anypb.Any, resourceURL, version, nonce string, err error) { + resp, err := stream.Recv() + if err != nil { + return nil, "", "", "", fmt.Errorf("failed to read ADS response: %v", err) + } + t.logger.Infof("ADS response received, type: %v", resp.GetTypeUrl()) + t.logger.Debugf("ADS response received: %v", pretty.ToJSON(resp)) + return resp.GetResources(), resp.GetTypeUrl(), resp.GetVersionInfo(), resp.GetNonce(), nil +} + +// adsRunner starts an ADS stream (and backs off exponentially, if the previous +// stream failed without receiving a single reply) and runs the sender and +// receiver routines to send and receive data from the stream respectively. +func (t *Transport) adsRunner(ctx context.Context) { + defer close(t.adsRunnerDoneCh) + + go t.send(ctx) + + // TODO: start a goroutine monitoring ClientConn's connectivity state, and + // report error (and log) when stats is transient failure. + + backoffAttempt := 0 + backoffTimer := time.NewTimer(0) + for ctx.Err() == nil { + select { + case <-backoffTimer.C: + case <-ctx.Done(): + backoffTimer.Stop() + return + } + + // We reset backoff state when we successfully receive at least one + // message from the server. + resetBackoff := func() bool { + stream, err := t.newAggregatedDiscoveryServiceStream(ctx, t.cc) + if err != nil { + t.adsStreamErrHandler(err) + t.logger.Warningf("ADS stream creation failed: %v", err) + return false + } + t.logger.Infof("ADS stream created") + + select { + case <-t.adsStreamCh: + default: + } + t.adsStreamCh <- stream + return t.recv(stream) + }() + + if resetBackoff { + backoffTimer.Reset(0) + backoffAttempt = 0 + } else { + backoffTimer.Reset(t.backoff(backoffAttempt)) + backoffAttempt++ + } + } +} + +// send is a separate goroutine for sending resource requests on the ADS stream. +// +// For every new stream received on the stream channel, all existing resources +// are re-requested from the management server. +// +// For every new resource request received on the resources channel, the +// resources map is updated (this ensures that resend will pick them up when +// there are new streams) and the appropriate request is sent out. +func (t *Transport) send(ctx context.Context) { + var stream adsStream + for { + select { + case <-ctx.Done(): + return + case stream = <-t.adsStreamCh: + if !t.sendExisting(stream) { + // Send failed, clear the current stream. Attempt to resend will + // only be made after a new stream is created. + stream = nil + } + case u := <-t.adsRequestCh.Get(): + t.adsRequestCh.Load() + + var ( + resources []string + url, version, nonce string + send bool + nackErr error + ) + switch update := u.(type) { + case *resourceRequest: + resources, url, version, nonce = t.processResourceRequest(update) + case *ackRequest: + resources, url, version, nonce, send = t.processAckRequest(update, stream) + if !send { + continue + } + nackErr = update.nackErr + } + if stream == nil { + // There's no stream yet. Skip the request. This request + // will be resent to the new streams. If no stream is + // created, the watcher will timeout (same as server not + // sending response back). + continue + } + if err := t.sendAggregatedDiscoveryServiceRequest(stream, resources, url, version, nonce, nackErr); err != nil { + t.logger.Warningf("ADS request for {resources: %q, url: %v, version: %q, nonce: %q} failed: %v", resources, url, version, nonce, err) + // Send failed, clear the current stream. + stream = nil + } + } + } +} + +// sendExisting sends out xDS requests for existing resources when recovering +// from a broken stream. +// +// We call stream.Send() here with the lock being held. It should be OK to do +// that here because the stream has just started and Send() usually returns +// quickly (once it pushes the message onto the transport layer) and is only +// ever blocked if we don't have enough flow control quota. +func (t *Transport) sendExisting(stream adsStream) bool { + t.mu.Lock() + defer t.mu.Unlock() + + // Reset only the nonces map when the stream restarts. + // + // xDS spec says the following. See section: + // https://www.envoyproxy.io/docs/envoy/latest/api-docs/xds_protocol#ack-nack-and-resource-type-instance-version + // + // Note that the version for a resource type is not a property of an + // individual xDS stream but rather a property of the resources themselves. If + // the stream becomes broken and the client creates a new stream, the client’s + // initial request on the new stream should indicate the most recent version + // seen by the client on the previous stream + t.nonces = make(map[string]string) + + for url, resources := range t.resources { + if err := t.sendAggregatedDiscoveryServiceRequest(stream, mapToSlice(resources), url, t.versions[url], "", nil); err != nil { + t.logger.Warningf("ADS request failed: %v", err) + return false + } + } + + return true +} + +// recv receives xDS responses on the provided ADS stream and branches out to +// message specific handlers. Returns true if at least one message was +// successfully received. +func (t *Transport) recv(stream adsStream) bool { + msgReceived := false + for { + resources, url, rVersion, nonce, err := t.recvAggregatedDiscoveryServiceResponse(stream) + if err != nil { + t.adsStreamErrHandler(err) + t.logger.Warningf("ADS stream is closed with error: %v", err) + return msgReceived + } + msgReceived = true + + err = t.updateHandler(ResourceUpdate{ + Resources: resources, + URL: url, + Version: rVersion, + }) + if xdsresource.ErrType(err) == xdsresource.ErrorTypeResourceTypeUnsupported { + t.logger.Warningf("%v", err) + continue + } + // If the data model layer returned an error, we need to NACK the + // response in which case we need to set the version to the most + // recently accepted version of this resource type. + if err != nil { + t.mu.Lock() + t.adsRequestCh.Put(&ackRequest{ + url: url, + nonce: nonce, + stream: stream, + version: t.versions[url], + nackErr: err, + }) + t.mu.Unlock() + t.logger.Warningf("Sending NACK for resource type: %v, version: %v, nonce: %v, reason: %v", url, rVersion, nonce, err) + continue + } + t.adsRequestCh.Put(&ackRequest{ + url: url, + nonce: nonce, + stream: stream, + version: rVersion, + }) + t.logger.Infof("Sending ACK for resource type: %v, version: %v, nonce: %v", url, rVersion, nonce) + } +} + +func mapToSlice(m map[string]bool) []string { + ret := make([]string, 0, len(m)) + for i := range m { + ret = append(ret, i) + } + return ret +} + +func sliceToMap(ss []string) map[string]bool { + ret := make(map[string]bool, len(ss)) + for _, s := range ss { + ret[s] = true + } + return ret +} + +// processResourceRequest pulls the fields needed to send out an ADS request. +// The resource type and the list of resources to request are provided by the +// user, while the version and nonce are maintained internally. +// +// The resources map, which keeps track of the resources being requested, is +// updated here. Any subsequent stream failure will re-request resources stored +// in this map. +// +// Returns the list of resources, resource type url, version and nonce. +func (t *Transport) processResourceRequest(req *resourceRequest) ([]string, string, string, string) { + t.mu.Lock() + defer t.mu.Unlock() + + resources := sliceToMap(req.resources) + t.resources[req.url] = resources + return req.resources, req.url, t.versions[req.url], t.nonces[req.url] +} + +type ackRequest struct { + url string // Resource type URL. + version string // NACK if version is an empty string. + nonce string + nackErr error // nil for ACK, non-nil for NACK. + // ACK/NACK are tagged with the stream it's for. When the stream is down, + // all the ACK/NACK for this stream will be dropped, and the version/nonce + // won't be updated. + stream grpc.ClientStream +} + +// processAckRequest pulls the fields needed to send out an ADS ACK. The nonces +// and versions map is updated. +// +// Returns the list of resources, resource type url, version, nonce, and an +// indication of whether an ACK should be sent on the wire or not. +func (t *Transport) processAckRequest(ack *ackRequest, stream grpc.ClientStream) ([]string, string, string, string, bool) { + if ack.stream != stream { + // If ACK's stream isn't the current sending stream, this means the ACK + // was pushed to queue before the old stream broke, and a new stream has + // been started since. Return immediately here so we don't update the + // nonce for the new stream. + return nil, "", "", "", false + } + + t.mu.Lock() + defer t.mu.Unlock() + + // Update the nonce irrespective of whether we send the ACK request on wire. + // An up-to-date nonce is required for the next request. + nonce := ack.nonce + t.nonces[ack.url] = nonce + + s, ok := t.resources[ack.url] + if !ok || len(s) == 0 { + // We don't send the ACK request if there are no resources of this type + // in our resources map. This can be either when the server sends + // responses before any request, or the resources are removed while the + // ackRequest was in queue). If we send a request with an empty + // resource name list, the server may treat it as a wild card and send + // us everything. + return nil, "", "", "", false + } + resources := mapToSlice(s) + + // Update the versions map only when we plan to send an ACK. + if ack.nackErr == nil { + t.versions[ack.url] = ack.version + } + + return resources, ack.url, ack.version, nonce, true +} + +// Close closes the Transport and frees any associated resources. +func (t *Transport) Close() { + t.adsRunnerCancel() + <-t.adsRunnerDoneCh + t.cc.Close() +} + +// ChannelConnectivityStateForTesting returns the connectivity state of the gRPC +// channel to the management server. +// +// Only for testing purposes. +func (t *Transport) ChannelConnectivityStateForTesting() connectivity.State { + return t.cc.GetState() +} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/cluster_resource_type.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/cluster_resource_type.go index a2529793392b..87e6dbd1194a 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/cluster_resource_type.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/cluster_resource_type.go @@ -31,8 +31,7 @@ var ( // Singleton instantiation of the resource type implementation. clusterType = clusterResourceType{ resourceTypeState: resourceTypeState{ - v2TypeURL: "type.googleapis.com/envoy.api.v2.Cluster", - v3TypeURL: "type.googleapis.com/envoy.config.cluster.v3.Cluster", + typeURL: "type.googleapis.com/envoy.config.cluster.v3.Cluster", typeEnum: ClusterResource, allResourcesRequiredInSotW: true, }, @@ -50,7 +49,7 @@ type clusterResourceType struct { // Decode deserializes and validates an xDS resource serialized inside the // provided `Any` proto, as received from the xDS management server. func (clusterResourceType) Decode(opts *DecodeOptions, resource *anypb.Any) (*DecodeResult, error) { - name, cluster, err := unmarshalClusterResource(resource, nil, opts.Logger) + name, cluster, err := unmarshalClusterResource(resource, opts.Logger) switch { case name == "": // Name is unset only when protobuf deserialization fails. @@ -90,7 +89,6 @@ func (c *ClusterResourceData) Equal(other ResourceData) bool { return false } return proto.Equal(c.Resource.Raw, other.Raw()) - } // ToJSON returns a JSON string representation of the resource data. diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/endpoints_resource_type.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/endpoints_resource_type.go index 2ba7e494aeca..dc1c09da08f3 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/endpoints_resource_type.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/endpoints_resource_type.go @@ -31,8 +31,7 @@ var ( // Singleton instantiation of the resource type implementation. endpointsType = endpointsResourceType{ resourceTypeState: resourceTypeState{ - v2TypeURL: "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment", - v3TypeURL: "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + typeURL: "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", typeEnum: EndpointsResource, allResourcesRequiredInSotW: false, }, diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/listener_resource_type.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/listener_resource_type.go index 442389f1cc18..6b2fff9f6f0c 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/listener_resource_type.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/listener_resource_type.go @@ -34,8 +34,7 @@ var ( // Singleton instantiation of the resource type implementation. listenerType = listenerResourceType{ resourceTypeState: resourceTypeState{ - v2TypeURL: "type.googleapis.com/envoy.api.v2.Listener", - v3TypeURL: "type.googleapis.com/envoy.config.listener.v3.Listener", + typeURL: "type.googleapis.com/envoy.config.listener.v3.Listener", typeEnum: ListenerResource, allResourcesRequiredInSotW: true, }, @@ -82,7 +81,7 @@ func listenerValidator(bc *bootstrap.Config, lis ListenerUpdate) error { // Decode deserializes and validates an xDS resource serialized inside the // provided `Any` proto, as received from the xDS management server. func (listenerResourceType) Decode(opts *DecodeOptions, resource *anypb.Any) (*DecodeResult, error) { - name, listener, err := unmarshalListenerResource(resource, nil, opts.Logger) + name, listener, err := unmarshalListenerResource(resource, opts.Logger) switch { case name == "": // Name is unset only when protobuf deserialization fails. diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/resource_type.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/resource_type.go index 6946c5647fc0..6fced7784d02 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/resource_type.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/resource_type.go @@ -65,11 +65,8 @@ type ResourceWatcher interface { // Type wraps all resource-type specific functionality. Each supported resource // type will provide an implementation of this interface. type Type interface { - // V2TypeURL is the xDS type URL of this resource type for v2 transport. - V2TypeURL() string - - // V3TypeURL is the xDS type URL of this resource type for v3 transport. - V3TypeURL() string + // TypeURL is the xDS type URL of this resource type for v3 transport. + TypeURL() string // TypeEnum is an enumerated value for this resource type. This can be used // for logging/debugging purposes, as well in cases where the resource type @@ -135,18 +132,13 @@ type DecodeResult struct { // type implementations, which can then embed this struct and get the methods // implemented here for free. type resourceTypeState struct { - v2TypeURL string - v3TypeURL string + typeURL string typeEnum ResourceType allResourcesRequiredInSotW bool } -func (r resourceTypeState) V2TypeURL() string { - return r.v2TypeURL -} - -func (r resourceTypeState) V3TypeURL() string { - return r.v3TypeURL +func (r resourceTypeState) TypeURL() string { + return r.typeURL } func (r resourceTypeState) TypeEnum() ResourceType { diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/route_config_resource_type.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/route_config_resource_type.go index 9c7465fd7de0..31be4d6aebd0 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/route_config_resource_type.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/route_config_resource_type.go @@ -31,8 +31,7 @@ var ( // Singleton instantiation of the resource type implementation. routeConfigType = routeConfigResourceType{ resourceTypeState: resourceTypeState{ - v2TypeURL: "type.googleapis.com/envoy.api.v2.RouteConfiguration", - v3TypeURL: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + typeURL: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", typeEnum: RouteConfigResource, allResourcesRequiredInSotW: false, }, diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type.go index faf34f98e3c7..d9c78997cffb 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/type.go @@ -165,3 +165,57 @@ func (r ResourceType) String() string { return "UnknownResource" } } + +var v2ResourceTypeToURL = map[ResourceType]string{ + ListenerResource: version.V2ListenerURL, + HTTPConnManagerResource: version.V2HTTPConnManagerURL, + RouteConfigResource: version.V2RouteConfigURL, + ClusterResource: version.V2ClusterURL, + EndpointsResource: version.V2EndpointsURL, +} +var v3ResourceTypeToURL = map[ResourceType]string{ + ListenerResource: version.V3ListenerURL, + HTTPConnManagerResource: version.V3HTTPConnManagerURL, + RouteConfigResource: version.V3RouteConfigURL, + ClusterResource: version.V3ClusterURL, + EndpointsResource: version.V3EndpointsURL, +} + +// URL returns the transport protocol specific resource type URL. +func (r ResourceType) URL(v version.TransportAPI) string { + var mapping map[ResourceType]string + switch v { + case version.TransportV2: + mapping = v2ResourceTypeToURL + case version.TransportV3: + mapping = v3ResourceTypeToURL + default: + return "UnknownResource" + } + if url, ok := mapping[r]; ok { + return url + } + return "UnknownResource" +} + +var urlToResourceType = map[string]ResourceType{ + version.V2ListenerURL: ListenerResource, + version.V2RouteConfigURL: RouteConfigResource, + version.V2ClusterURL: ClusterResource, + version.V2EndpointsURL: EndpointsResource, + version.V2HTTPConnManagerURL: HTTPConnManagerResource, + version.V3ListenerURL: ListenerResource, + version.V3RouteConfigURL: RouteConfigResource, + version.V3ClusterURL: ClusterResource, + version.V3EndpointsURL: EndpointsResource, + version.V3HTTPConnManagerURL: HTTPConnManagerResource, +} + +// ResourceTypeFromURL returns the xDS resource type associated with the given +// resource type URL. +func ResourceTypeFromURL(url string) ResourceType { + if typ, ok := urlToResourceType[url]; ok { + return typ + } + return UnknownResource +} diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal.go index eda11088765b..28ae41e43a91 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal.go @@ -23,7 +23,6 @@ import ( "errors" "fmt" "strings" - "time" "google.golang.org/grpc/internal/grpclog" "google.golang.org/protobuf/types/known/anypb" @@ -42,117 +41,8 @@ type UnmarshalOptions struct { UpdateValidator UpdateValidatorFunc } -// processAllResources unmarshals and validates the resources, populates the -// provided ret (a map), and returns metadata and error. -// -// After this function, the ret map will be populated with both valid and -// invalid updates. Invalid resources will have an entry with the key as the -// resource name, value as an empty update. -// -// The type of the resource is determined by the type of ret. E.g. -// map[string]ListenerUpdate means this is for LDS. -func processAllResources(opts *UnmarshalOptions, ret interface{}) (UpdateMetadata, error) { - timestamp := time.Now() - md := UpdateMetadata{ - Version: opts.Version, - Timestamp: timestamp, - } - var topLevelErrors []error - perResourceErrors := make(map[string]error) - - for _, r := range opts.Resources { - switch ret2 := ret.(type) { - case map[string]ListenerUpdateErrTuple: - name, update, err := unmarshalListenerResource(r, opts.UpdateValidator, opts.Logger) - name = ParseName(name).String() - if err == nil { - ret2[name] = ListenerUpdateErrTuple{Update: update} - continue - } - if name == "" { - topLevelErrors = append(topLevelErrors, err) - continue - } - perResourceErrors[name] = err - // Add place holder in the map so we know this resource name was in - // the response. - ret2[name] = ListenerUpdateErrTuple{Err: err} - case map[string]RouteConfigUpdateErrTuple: - name, update, err := unmarshalRouteConfigResource(r, opts.Logger) - name = ParseName(name).String() - if err == nil { - ret2[name] = RouteConfigUpdateErrTuple{Update: update} - continue - } - if name == "" { - topLevelErrors = append(topLevelErrors, err) - continue - } - perResourceErrors[name] = err - // Add place holder in the map so we know this resource name was in - // the response. - ret2[name] = RouteConfigUpdateErrTuple{Err: err} - case map[string]ClusterUpdateErrTuple: - name, update, err := unmarshalClusterResource(r, opts.UpdateValidator, opts.Logger) - name = ParseName(name).String() - if err == nil { - ret2[name] = ClusterUpdateErrTuple{Update: update} - continue - } - if name == "" { - topLevelErrors = append(topLevelErrors, err) - continue - } - perResourceErrors[name] = err - // Add place holder in the map so we know this resource name was in - // the response. - ret2[name] = ClusterUpdateErrTuple{Err: err} - case map[string]EndpointsUpdateErrTuple: - name, update, err := unmarshalEndpointsResource(r, opts.Logger) - name = ParseName(name).String() - if err == nil { - ret2[name] = EndpointsUpdateErrTuple{Update: update} - continue - } - if name == "" { - topLevelErrors = append(topLevelErrors, err) - continue - } - perResourceErrors[name] = err - // Add place holder in the map so we know this resource name was in - // the response. - ret2[name] = EndpointsUpdateErrTuple{Err: err} - } - } - - if len(topLevelErrors) == 0 && len(perResourceErrors) == 0 { - md.Status = ServiceStatusACKed - return md, nil - } - - var typeStr string - switch ret.(type) { - case map[string]ListenerUpdate: - typeStr = "LDS" - case map[string]RouteConfigUpdate: - typeStr = "RDS" - case map[string]ClusterUpdate: - typeStr = "CDS" - case map[string]EndpointsUpdate: - typeStr = "EDS" - } - - md.Status = ServiceStatusNACKed - errRet := combineErrors(typeStr, topLevelErrors, perResourceErrors) - md.ErrState = &UpdateErrorMetadata{ - Version: opts.Version, - Err: errRet, - Timestamp: timestamp, - } - return md, errRet -} - -func combineErrors(rType string, topLevelErrors []error, perResourceErrors map[string]error) error { +// CombineErrors TBD. +func CombineErrors(rType string, topLevelErrors []error, perResourceErrors map[string]error) error { var errStrB strings.Builder errStrB.WriteString(fmt.Sprintf("error parsing %q response: ", rType)) if len(topLevelErrors) > 0 { diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_cds.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_cds.go index 3621d61209a0..f04939182b94 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_cds.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_cds.go @@ -41,16 +41,7 @@ import ( // to this value by the management server. const transportSocketName = "envoy.transport_sockets.tls" -// UnmarshalCluster processes resources received in an CDS response, validates -// them, and transforms them into a native struct which contains only fields we -// are interested in. -func UnmarshalCluster(opts *UnmarshalOptions) (map[string]ClusterUpdateErrTuple, UpdateMetadata, error) { - update := make(map[string]ClusterUpdateErrTuple) - md, err := processAllResources(opts, update) - return update, md, err -} - -func unmarshalClusterResource(r *anypb.Any, f UpdateValidatorFunc, logger *grpclog.PrefixLogger) (string, ClusterUpdate, error) { +func unmarshalClusterResource(r *anypb.Any, logger *grpclog.PrefixLogger) (string, ClusterUpdate, error) { r, err := unwrapResource(r) if err != nil { return "", ClusterUpdate{}, fmt.Errorf("failed to unwrap resource: %v", err) @@ -70,11 +61,6 @@ func unmarshalClusterResource(r *anypb.Any, f UpdateValidatorFunc, logger *grpcl return cluster.GetName(), ClusterUpdate{}, err } cu.Raw = r - if f != nil { - if err := f(cu); err != nil { - return "", ClusterUpdate{}, err - } - } return cluster.GetName(), cu, nil } @@ -517,7 +503,7 @@ func outlierConfigFromCluster(cluster *v3clusterpb.Cluster) (*OutlierDetection, interval := defaultInterval if i := od.GetInterval(); i != nil { if err := i.CheckValid(); err != nil { - return nil, fmt.Errorf("outlier_detection.interval is invalid with error %v", err) + return nil, fmt.Errorf("outlier_detection.interval is invalid with error: %v", err) } if interval = i.AsDuration(); interval < 0 { return nil, fmt.Errorf("outlier_detection.interval = %v; must be a valid duration and >= 0", interval) @@ -527,7 +513,7 @@ func outlierConfigFromCluster(cluster *v3clusterpb.Cluster) (*OutlierDetection, baseEjectionTime := defaultBaseEjectionTime if bet := od.GetBaseEjectionTime(); bet != nil { if err := bet.CheckValid(); err != nil { - return nil, fmt.Errorf("outlier_detection.base_ejection_time is invalid with error %v", err) + return nil, fmt.Errorf("outlier_detection.base_ejection_time is invalid with error: %v", err) } if baseEjectionTime = bet.AsDuration(); baseEjectionTime < 0 { return nil, fmt.Errorf("outlier_detection.base_ejection_time = %v; must be >= 0", baseEjectionTime) @@ -537,7 +523,7 @@ func outlierConfigFromCluster(cluster *v3clusterpb.Cluster) (*OutlierDetection, maxEjectionTime := defaultMaxEjectionTime if met := od.GetMaxEjectionTime(); met != nil { if err := met.CheckValid(); err != nil { - return nil, fmt.Errorf("outlier_detection.max_ejection_time is invalid with error %v", err) + return nil, fmt.Errorf("outlier_detection.max_ejection_time is invalid: %v", err) } if maxEjectionTime = met.AsDuration(); maxEjectionTime < 0 { return nil, fmt.Errorf("outlier_detection.max_ejection_time = %v; must be >= 0", maxEjectionTime) diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_eds.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_eds.go index e091d0ddea0f..a1809a62fc9a 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_eds.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_eds.go @@ -33,15 +33,6 @@ import ( "google.golang.org/protobuf/types/known/anypb" ) -// UnmarshalEndpoints processes resources received in an EDS response, -// validates them, and transforms them into a native struct which contains only -// fields we are interested in. -func UnmarshalEndpoints(opts *UnmarshalOptions) (map[string]EndpointsUpdateErrTuple, UpdateMetadata, error) { - update := make(map[string]EndpointsUpdateErrTuple) - md, err := processAllResources(opts, update) - return update, md, err -} - func unmarshalEndpointsResource(r *anypb.Any, logger *grpclog.PrefixLogger) (string, EndpointsUpdate, error) { r, err := unwrapResource(r) if err != nil { diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_lds.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_lds.go index 2e59c0605c9b..6b273e82f956 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_lds.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_lds.go @@ -36,16 +36,7 @@ import ( "google.golang.org/protobuf/types/known/anypb" ) -// UnmarshalListener processes resources received in an LDS response, validates -// them, and transforms them into a native struct which contains only fields we -// are interested in. -func UnmarshalListener(opts *UnmarshalOptions) (map[string]ListenerUpdateErrTuple, UpdateMetadata, error) { - update := make(map[string]ListenerUpdateErrTuple) - md, err := processAllResources(opts, update) - return update, md, err -} - -func unmarshalListenerResource(r *anypb.Any, f UpdateValidatorFunc, logger *grpclog.PrefixLogger) (string, ListenerUpdate, error) { +func unmarshalListenerResource(r *anypb.Any, logger *grpclog.PrefixLogger) (string, ListenerUpdate, error) { r, err := unwrapResource(r) if err != nil { return "", ListenerUpdate{}, fmt.Errorf("failed to unwrap resource: %v", err) @@ -66,11 +57,6 @@ func unmarshalListenerResource(r *anypb.Any, f UpdateValidatorFunc, logger *grpc if err != nil { return lis.GetName(), ListenerUpdate{}, err } - if f != nil { - if err := f(*lu); err != nil { - return lis.GetName(), ListenerUpdate{}, err - } - } lu.Raw = r return lis.GetName(), *lu, nil } diff --git a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_rds.go b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_rds.go index 32c48d46b691..819e47d32fce 100644 --- a/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_rds.go +++ b/vendor/google.golang.org/grpc/xds/internal/xdsclient/xdsresource/unmarshal_rds.go @@ -35,16 +35,6 @@ import ( "google.golang.org/protobuf/types/known/anypb" ) -// UnmarshalRouteConfig processes resources received in an RDS response, -// validates them, and transforms them into a native struct which contains only -// fields we are interested in. The provided hostname determines the route -// configuration resources of interest. -func UnmarshalRouteConfig(opts *UnmarshalOptions) (map[string]RouteConfigUpdateErrTuple, UpdateMetadata, error) { - update := make(map[string]RouteConfigUpdateErrTuple) - md, err := processAllResources(opts, update) - return update, md, err -} - func unmarshalRouteConfigResource(r *anypb.Any, logger *grpclog.PrefixLogger) (string, RouteConfigUpdate, error) { r, err := unwrapResource(r) if err != nil { @@ -93,7 +83,7 @@ func generateRDSUpdateFromRouteConfiguration(rc *v3routepb.RouteConfiguration, l var err error csps, err = processClusterSpecifierPlugins(rc.ClusterSpecifierPlugins) if err != nil { - return RouteConfigUpdate{}, fmt.Errorf("received route is invalid %v", err) + return RouteConfigUpdate{}, fmt.Errorf("received route is invalid: %v", err) } } // cspNames represents all the cluster specifiers referenced by Route diff --git a/vendor/google.golang.org/grpc/xds/server.go b/vendor/google.golang.org/grpc/xds/server.go index 5ab8a5a98008..f7003f6cd5c6 100644 --- a/vendor/google.golang.org/grpc/xds/server.go +++ b/vendor/google.golang.org/grpc/xds/server.go @@ -49,7 +49,7 @@ const serverPrefix = "[xds-server %p] " var ( // These new functions will be overridden in unit tests. - newXDSClient = func() (xdsclient.XDSClient, error) { + newXDSClient = func() (xdsclient.XDSClient, func(), error) { return xdsclient.New() } newGRPCServer = func(opts ...grpc.ServerOption) grpcServer { @@ -89,8 +89,9 @@ type GRPCServer struct { // clientMu is used only in initXDSClient(), which is called at the // beginning of Serve(), where we have to decide if we have to create a // client or use an existing one. - clientMu sync.Mutex - xdsC xdsclient.XDSClient + clientMu sync.Mutex + xdsC xdsclient.XDSClient + xdsClientClose func() } // NewGRPCServer creates an xDS-enabled gRPC server using the passed in opts. @@ -184,16 +185,17 @@ func (s *GRPCServer) initXDSClient() error { newXDSClient := newXDSClient if s.opts.bootstrapContentsForTesting != nil { // Bootstrap file contents may be specified as a server option for tests. - newXDSClient = func() (xdsclient.XDSClient, error) { + newXDSClient = func() (xdsclient.XDSClient, func(), error) { return xdsclient.NewWithBootstrapContentsForTesting(s.opts.bootstrapContentsForTesting) } } - client, err := newXDSClient() + client, close, err := newXDSClient() if err != nil { return fmt.Errorf("xds: failed to create xds-client: %v", err) } s.xdsC = client + s.xdsClientClose = close s.logger.Infof("Created an xdsClient") return nil } @@ -334,7 +336,7 @@ func (s *GRPCServer) Stop() { s.quit.Fire() s.gs.Stop() if s.xdsC != nil { - s.xdsC.Close() + s.xdsClientClose() } } @@ -345,7 +347,7 @@ func (s *GRPCServer) GracefulStop() { s.quit.Fire() s.gs.GracefulStop() if s.xdsC != nil { - s.xdsC.Close() + s.xdsClientClose() } } diff --git a/vendor/google.golang.org/grpc/xds/xds.go b/vendor/google.golang.org/grpc/xds/xds.go index 7c479f5f8a86..706e11c49487 100644 --- a/vendor/google.golang.org/grpc/xds/xds.go +++ b/vendor/google.golang.org/grpc/xds/xds.go @@ -30,21 +30,21 @@ package xds import ( "fmt" - v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3" "google.golang.org/grpc" - _ "google.golang.org/grpc/credentials/tls/certprovider/pemfile" // Register the file watcher certificate provider plugin. "google.golang.org/grpc/internal" internaladmin "google.golang.org/grpc/internal/admin" "google.golang.org/grpc/resolver" "google.golang.org/grpc/xds/csds" - _ "google.golang.org/grpc/xds/internal/balancer" // Register the balancers. - _ "google.golang.org/grpc/xds/internal/clusterspecifier/rls" // Register the RLS cluster specifier plugin. Note that this does not register the RLS LB policy. - _ "google.golang.org/grpc/xds/internal/httpfilter/fault" // Register the fault injection filter. - _ "google.golang.org/grpc/xds/internal/httpfilter/rbac" // Register the RBAC filter. - _ "google.golang.org/grpc/xds/internal/httpfilter/router" // Register the router filter. - _ "google.golang.org/grpc/xds/internal/resolver" // Register the xds_resolver - _ "google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2" // Register the v2 xDS API client. - _ "google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3" // Register the v3 xDS API client. + + _ "google.golang.org/grpc/credentials/tls/certprovider/pemfile" // Register the file watcher certificate provider plugin. + _ "google.golang.org/grpc/xds/internal/balancer" // Register the balancers. + _ "google.golang.org/grpc/xds/internal/clusterspecifier/rls" // Register the RLS cluster specifier plugin. Note that this does not register the RLS LB policy. + _ "google.golang.org/grpc/xds/internal/httpfilter/fault" // Register the fault injection filter. + _ "google.golang.org/grpc/xds/internal/httpfilter/rbac" // Register the RBAC filter. + _ "google.golang.org/grpc/xds/internal/httpfilter/router" // Register the router filter. + _ "google.golang.org/grpc/xds/internal/resolver" // Register the xds_resolver + + v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3" ) func init() { diff --git a/vendor/modules.txt b/vendor/modules.txt index b66ca16a22bd..c11b26a8ed89 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -553,21 +553,13 @@ github.com/emicklei/go-restful/v3/log ## explicit; go 1.17 github.com/envoyproxy/go-control-plane/envoy/admin/v3 github.com/envoyproxy/go-control-plane/envoy/annotations -github.com/envoyproxy/go-control-plane/envoy/api/v2 -github.com/envoyproxy/go-control-plane/envoy/api/v2/auth -github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster github.com/envoyproxy/go-control-plane/envoy/api/v2/core -github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint -github.com/envoyproxy/go-control-plane/envoy/api/v2/listener -github.com/envoyproxy/go-control-plane/envoy/api/v2/route github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v3 github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v3 github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3 github.com/envoyproxy/go-control-plane/envoy/config/common/matcher/v3 github.com/envoyproxy/go-control-plane/envoy/config/core/v3 github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3 -github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2 -github.com/envoyproxy/go-control-plane/envoy/config/listener/v2 github.com/envoyproxy/go-control-plane/envoy/config/listener/v3 github.com/envoyproxy/go-control-plane/envoy/config/metrics/v3 github.com/envoyproxy/go-control-plane/envoy/config/overload/v3 @@ -582,18 +574,14 @@ github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/rbac/v3 github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/router/v3 github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3 github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3 -github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2 github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3 -github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2 github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3 github.com/envoyproxy/go-control-plane/envoy/service/status/v3 github.com/envoyproxy/go-control-plane/envoy/type github.com/envoyproxy/go-control-plane/envoy/type/http/v3 github.com/envoyproxy/go-control-plane/envoy/type/matcher github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3 -github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2 github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3 -github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2 github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3 github.com/envoyproxy/go-control-plane/envoy/type/v3 # github.com/envoyproxy/protoc-gen-validate v0.9.1 @@ -805,7 +793,7 @@ github.com/gorilla/websocket # github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 ## explicit; go 1.17 github.com/grafana/cloudflare-go -# github.com/grafana/dskit v0.0.0-20230417151531-1725bcc1e9a1 +# github.com/grafana/dskit v0.0.0-20230518162305-3c92c534827e ## explicit; go 1.18 github.com/grafana/dskit/backoff github.com/grafana/dskit/concurrency @@ -1164,7 +1152,7 @@ github.com/prometheus/client_golang/prometheus/testutil/promlint # github.com/prometheus/client_model v0.4.0 ## explicit; go 1.18 github.com/prometheus/client_model/go -# github.com/prometheus/common v0.42.0 +# github.com/prometheus/common v0.43.0 ## explicit; go 1.18 github.com/prometheus/common/config github.com/prometheus/common/expfmt @@ -1263,9 +1251,9 @@ github.com/sean-/seed # github.com/segmentio/fasthash v1.0.3 ## explicit; go 1.11 github.com/segmentio/fasthash/fnv1a -# github.com/sercand/kuberesolver v2.4.0+incompatible -## explicit -github.com/sercand/kuberesolver +# github.com/sercand/kuberesolver/v4 v4.0.0 +## explicit; go 1.14 +github.com/sercand/kuberesolver/v4 # github.com/shopspring/decimal v1.2.0 ## explicit; go 1.13 github.com/shopspring/decimal @@ -1280,6 +1268,9 @@ github.com/shurcooL/vfsgen # github.com/sirupsen/logrus v1.9.0 ## explicit; go 1.13 github.com/sirupsen/logrus +# github.com/soheilhy/cmux v0.1.5 +## explicit; go 1.11 +github.com/soheilhy/cmux # github.com/sony/gobreaker v0.5.0 ## explicit; go 1.12 github.com/sony/gobreaker @@ -1346,7 +1337,7 @@ github.com/uber/jaeger-lib/metrics/prometheus # github.com/ugorji/go/codec v1.1.7 ## explicit github.com/ugorji/go/codec -# github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 +# github.com/weaveworks/common v0.0.0-20230511094633-334485600903 ## explicit; go 1.14 github.com/weaveworks/common/aws github.com/weaveworks/common/errors @@ -1526,7 +1517,7 @@ golang.org/x/net/netutil golang.org/x/net/proxy golang.org/x/net/publicsuffix golang.org/x/net/trace -# golang.org/x/oauth2 v0.6.0 +# golang.org/x/oauth2 v0.7.0 ## explicit; go 1.17 golang.org/x/oauth2 golang.org/x/oauth2/authhandler @@ -1652,7 +1643,7 @@ google.golang.org/genproto/googleapis/rpc/status google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/protobuf/field_mask -# google.golang.org/grpc v1.53.0 => google.golang.org/grpc v1.52.3 +# google.golang.org/grpc v1.55.0 => google.golang.org/grpc v1.53.0 ## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes @@ -1717,6 +1708,7 @@ google.golang.org/grpc/internal/resolver/unix google.golang.org/grpc/internal/serviceconfig google.golang.org/grpc/internal/status google.golang.org/grpc/internal/syscall +google.golang.org/grpc/internal/testutils google.golang.org/grpc/internal/transport google.golang.org/grpc/internal/transport/networktype google.golang.org/grpc/internal/wrr @@ -1756,12 +1748,8 @@ google.golang.org/grpc/xds/internal/resolver google.golang.org/grpc/xds/internal/server google.golang.org/grpc/xds/internal/xdsclient google.golang.org/grpc/xds/internal/xdsclient/bootstrap -google.golang.org/grpc/xds/internal/xdsclient/controller -google.golang.org/grpc/xds/internal/xdsclient/controller/version -google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2 -google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3 google.golang.org/grpc/xds/internal/xdsclient/load -google.golang.org/grpc/xds/internal/xdsclient/pubsub +google.golang.org/grpc/xds/internal/xdsclient/transport google.golang.org/grpc/xds/internal/xdsclient/xdsresource google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version # google.golang.org/protobuf v1.30.0 @@ -2105,4 +2093,4 @@ sigs.k8s.io/yaml # github.com/hashicorp/memberlist => github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe # github.com/grafana/regexp => github.com/grafana/regexp v0.0.0-20221005093135-b4c2bcb0a4b6 # github.com/grafana/loki/pkg/push => ./pkg/push -# google.golang.org/grpc => google.golang.org/grpc v1.52.3 +# google.golang.org/grpc => google.golang.org/grpc v1.53.0 From 7ff8463def8cb398e4a1e0a821205a211b1b50bd Mon Sep 17 00:00:00 2001 From: Travis Patterson Date: Tue, 23 May 2023 11:19:53 -0600 Subject: [PATCH 03/23] Fix query behavior in Single Binary and SSD deployments (#9476) To keep ingesters from calling themselves, the AsyncStore was only being used when the module was `Querier`, `Ruler`, or `Read`. This means that, for some operations, ingesters were never queries when the deployment mode was single-binary or `Backend` (where the ruler now lives). This change scopes the async store to just the querier rather than all storage access and always includes in it queriers. Because the `AsyncStore` isn't automatically instantiated, now, I've also moved `IngesterQuerier` to be a dependency to the store. That way anything that wants to make an `AsyncStore` is guaranteed to have what it needs. --- pkg/loki/loki.go | 11 +++-------- pkg/loki/modules.go | 34 ++++++++++++++++++---------------- pkg/storage/async_store.go | 5 ++--- pkg/storage/factory.go | 1 - pkg/storage/store.go | 3 --- 5 files changed, 23 insertions(+), 31 deletions(-) diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index 4a48b670b7e8..06bc076f620d 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -650,14 +650,14 @@ func (t *Loki) setupModuleManager() error { OverridesExporter: {Overrides, Server}, TenantConfigs: {RuntimeConfig}, Distributor: {Ring, Server, Overrides, TenantConfigs, Analytics}, - Store: {Overrides, IndexGatewayRing}, + Store: {Overrides, IndexGatewayRing, IngesterQuerier}, Ingester: {Store, Server, MemberlistKV, TenantConfigs, Analytics}, - Querier: {Store, Ring, Server, IngesterQuerier, Overrides, Analytics, CacheGenerationLoader}, + Querier: {Store, Ring, Server, Overrides, Analytics, CacheGenerationLoader}, QueryFrontendTripperware: {Server, Overrides, TenantConfigs}, QueryFrontend: {QueryFrontendTripperware, Analytics, CacheGenerationLoader}, QueryScheduler: {Server, Overrides, MemberlistKV, Analytics}, Ruler: {Ring, Server, RulerStorage, RuleEvaluator, Overrides, TenantConfigs, Analytics}, - RuleEvaluator: {Ring, Server, Store, IngesterQuerier, Overrides, TenantConfigs, Analytics}, + RuleEvaluator: {Ring, Server, Store, Overrides, TenantConfigs, Analytics}, TableManager: {Server, Analytics}, Compactor: {Server, Overrides, MemberlistKV, Analytics}, IndexGateway: {Server, Store, Overrides, Analytics, MemberlistKV, IndexGatewayRing}, @@ -703,11 +703,6 @@ func (t *Loki) setupModuleManager() error { } } - // Add IngesterQuerier as a dependency for store when target is either querier, ruler, read, or backend. - if t.Cfg.isModuleEnabled(Querier) || t.Cfg.isModuleEnabled(Ruler) || t.Cfg.isModuleEnabled(Read) || t.Cfg.isModuleEnabled(Backend) { - deps[Store] = append(deps[Store], IngesterQuerier) - } - // If the query scheduler and querier are running together, make sure the scheduler goes // first to initialize the ring that will also be used by the querier if (t.Cfg.isModuleEnabled(Querier) && t.Cfg.isModuleEnabled(QueryScheduler)) || t.Cfg.isModuleEnabled(All) { diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index d02e31b6d3d9..3c62b7b9acdc 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -335,7 +335,12 @@ func (t *Loki) initQuerier() (services.Service, error) { return nil, err } - q, err := querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.Overrides, deleteStore, prometheus.DefaultRegisterer) + store := t.Store + if !t.Cfg.Querier.QueryStoreOnly { + store = storage.NewAsyncStore(t.Cfg.StorageConfig.AsyncStoreConfig, t.Store, t.Cfg.SchemaConfig) + } + + q, err := querier.New(t.Cfg.Querier, store, t.ingesterQuerier, t.Overrides, deleteStore, prometheus.DefaultRegisterer) if err != nil { return nil, err } @@ -592,8 +597,6 @@ func (t *Loki) initStore() (_ services.Service, err error) { } if config.UsingObjectStorageIndex(t.Cfg.SchemaConfig.Configs) { - var asyncStore bool - shipperConfigIdx := config.ActivePeriodConfig(t.Cfg.SchemaConfig.Configs) iTy := t.Cfg.SchemaConfig.Configs[shipperConfigIdx].IndexType if iTy != config.BoltDBShipperType && iTy != config.TSDBType { @@ -623,9 +626,6 @@ func (t *Loki) initStore() (_ services.Service, err error) { if t.Cfg.Querier.QueryStoreOnly { break } - // Use AsyncStore to query both ingesters local store and chunk store for store queries. - // Only queriers should use the AsyncStore, it should never be used in ingesters. - asyncStore = true // The legacy Read target includes the index gateway, so disable the index-gateway client in that configuration. if t.Cfg.LegacyReadTarget && t.Cfg.isModuleEnabled(Read) { @@ -654,15 +654,12 @@ func (t *Loki) initStore() (_ services.Service, err error) { t.Cfg.Ingester.QueryStoreMaxLookBackPeriod = mlb } - if asyncStore { - t.Cfg.StorageConfig.EnableAsyncStore = true - t.Cfg.StorageConfig.AsyncStoreConfig = storage.AsyncStoreCfg{ - IngesterQuerier: t.ingesterQuerier, - QueryIngestersWithin: calculateAsyncStoreQueryIngestersWithin( - t.Cfg.Querier.QueryIngestersWithin, - minIngesterQueryStoreDuration, - ), - } + t.Cfg.StorageConfig.AsyncStoreConfig = storage.AsyncStoreCfg{ + IngesterQuerier: t.ingesterQuerier, + QueryIngestersWithin: calculateAsyncStoreQueryIngestersWithin( + t.Cfg.Querier.QueryIngestersWithin, + minIngesterQueryStoreDuration, + ), } } @@ -1333,7 +1330,12 @@ func (t *Loki) createRulerQueryEngine(logger log.Logger) (eng *logql.Engine, err return nil, fmt.Errorf("could not create delete requests store: %w", err) } - q, err := querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.Overrides, deleteStore, nil) + store := t.Store + if !t.Cfg.Querier.QueryStoreOnly { + store = storage.NewAsyncStore(t.Cfg.StorageConfig.AsyncStoreConfig, t.Store, t.Cfg.SchemaConfig) + } + + q, err := querier.New(t.Cfg.Querier, store, t.ingesterQuerier, t.Overrides, deleteStore, nil) if err != nil { return nil, fmt.Errorf("could not create querier: %w", err) } diff --git a/pkg/storage/async_store.go b/pkg/storage/async_store.go index e054f86cedd2..a1995ec073c9 100644 --- a/pkg/storage/async_store.go +++ b/pkg/storage/async_store.go @@ -14,7 +14,6 @@ import ( "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/fetcher" "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores" "github.com/grafana/loki/pkg/storage/stores/index/stats" util_log "github.com/grafana/loki/pkg/util/log" "github.com/grafana/loki/pkg/util/spanlogger" @@ -36,13 +35,13 @@ type AsyncStoreCfg struct { // AsyncStore is meant to be used only in queriers or any other service other than ingesters. // It should never be used in ingesters otherwise it would start spiraling around doing queries over and over again to other ingesters. type AsyncStore struct { - stores.Store + Store scfg config.SchemaConfig ingesterQuerier IngesterQuerier queryIngestersWithin time.Duration } -func NewAsyncStore(cfg AsyncStoreCfg, store stores.Store, scfg config.SchemaConfig) *AsyncStore { +func NewAsyncStore(cfg AsyncStoreCfg, store Store, scfg config.SchemaConfig) *AsyncStore { return &AsyncStore{ Store: store, scfg: scfg, diff --git a/pkg/storage/factory.go b/pkg/storage/factory.go index 7be9019c7d5c..803169cdbc1f 100644 --- a/pkg/storage/factory.go +++ b/pkg/storage/factory.go @@ -198,7 +198,6 @@ type Config struct { // Config for using AsyncStore when using async index stores like `boltdb-shipper`. // It is required for getting chunk ids of recently flushed chunks from the ingesters. - EnableAsyncStore bool `yaml:"-"` AsyncStoreConfig AsyncStoreCfg `yaml:"-"` } diff --git a/pkg/storage/store.go b/pkg/storage/store.go index 95a683fb82a6..69208d16eb2e 100644 --- a/pkg/storage/store.go +++ b/pkg/storage/store.go @@ -170,9 +170,6 @@ func (s *store) init() error { s.composite.AddStore(p.From.Time, f, idx, w, stop) } - if s.cfg.EnableAsyncStore { - s.Store = NewAsyncStore(s.cfg.AsyncStoreConfig, s.Store, s.schemaCfg) - } return nil } From a4ef06890b5cc065e3507f7609ed3a0411a605b3 Mon Sep 17 00:00:00 2001 From: Travis Patterson Date: Tue, 23 May 2023 17:06:52 -0600 Subject: [PATCH 04/23] revert count unflused chunks (#9504) revert this commit: https://github.com/grafana/loki/commit/aeba51ab0fe785ab251eaf8d7005f203ece0986f We seem to be dramatically overcounting bytes now which is causing oversharding This is the same query before and after: Before: ~20 GB ![image (2)](https://github.com/grafana/loki/assets/1413241/6d0e3d4d-56ce-40aa-b57e-d2dd592eefb4) After: ~8 EB ![image (1)](https://github.com/grafana/loki/assets/1413241/f07cca10-0e32-467f-bf96-13a83eea8ce6) --- pkg/ingester/instance.go | 5 ++++- pkg/ingester/instance_test.go | 17 ----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/pkg/ingester/instance.go b/pkg/ingester/instance.go index 702751bdce4a..cae5d02cfabd 100644 --- a/pkg/ingester/instance.go +++ b/pkg/ingester/instance.go @@ -569,6 +569,9 @@ func (i *instance) GetStats(ctx context.Context, req *logproto.IndexStatsRequest from, through := req.From.Time(), req.Through.Time() if err = i.forMatchingStreams(ctx, from, matchers, nil, func(s *stream) error { + // checks for equality against chunk flush fields + var zeroValueTime time.Time + // Consider streams which overlap our time range if shouldConsiderStream(s, from, through) { s.chunkMtx.RLock() @@ -580,7 +583,7 @@ func (i *instance) GetStats(ctx context.Context, req *logproto.IndexStatsRequest // by the TSDB manager+shipper chkFrom, chkThrough := chk.chunk.Bounds() - if chk.flushed.IsZero() && from.Before(chkThrough) && through.After(chkFrom) { + if !chk.flushed.Equal(zeroValueTime) && from.Before(chkThrough) && through.After(chkFrom) { hasChunkOverlap = true res.Chunks++ factor := util.GetFactorOfTime(from.UnixNano(), through.UnixNano(), chkFrom.UnixNano(), chkThrough.UnixNano()) diff --git a/pkg/ingester/instance_test.go b/pkg/ingester/instance_test.go index 327b8eb3d2e8..a82a618c8046 100644 --- a/pkg/ingester/instance_test.go +++ b/pkg/ingester/instance_test.go @@ -837,23 +837,6 @@ func TestStreamShardingUsage(t *testing.T) { }) } -func TestGetStats(t *testing.T) { - instance := defaultInstance(t) - resp, err := instance.GetStats(context.Background(), &logproto.IndexStatsRequest{ - From: 0, - Through: 11000, - Matchers: `{host="agent"}`, - }) - require.NoError(t, err) - - require.Equal(t, &logproto.IndexStatsResponse{ - Streams: 2, - Chunks: 2, - Bytes: 160, - Entries: 10, - }, resp) -} - func defaultInstance(t *testing.T) *instance { ingesterConfig := defaultIngesterTestConfig(t) defaultLimits := defaultLimitsTestConfig() From 2c57d2e2b91a5fe8efe852350b9ca5971b73ebf3 Mon Sep 17 00:00:00 2001 From: Artem Nosulchyk Date: Wed, 24 May 2023 03:25:04 -0400 Subject: [PATCH 05/23] Helm: Support of extraVolumeClaimTemplates for writer statefulset (#9485) **What this PR does / why we need it**: This PR adds `extraVolumeClaimTemplates` value for write loki component, it allows to have more than one volume claims for persistent statefulset configuration. For example, when it's needed to have ingester's and shipper's WAL files on different persistent volumes. **Special notes for your reviewer**: **Checklist** - [X] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [X] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` --------- Co-authored-by: J Stickler --- docs/sources/installation/helm/reference.md | 9 +++++++++ production/helm/loki/CHANGELOG.md | 3 +++ production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../helm/loki/templates/write/statefulset-write.yaml | 3 +++ production/helm/loki/values.yaml | 2 ++ 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/sources/installation/helm/reference.md b/docs/sources/installation/helm/reference.md index bb1211953740..b32ba88afff5 100644 --- a/docs/sources/installation/helm/reference.md +++ b/docs/sources/installation/helm/reference.md @@ -3726,6 +3726,15 @@ Hard node and soft zone anti-affinity
 []
 
+ + + + write.extraVolumeClaimTemplates + list + volumeClaimTemplates to add to StatefulSet +
+[]
+
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index e49f391ae280..c67f7d68d9b4 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,6 +13,9 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.5.4 + +- [CHANGE] Add extraVolumeClaimTemplates for StatefulSet of the write component. - [CHANGE] Add clusterLabelOverride for alert label overrides. ## 5.5.3 diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 60466294adcc..de3df17aa59d 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.8.2 -version: 5.5.3 +version: 5.5.4 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index bdb0c54f4880..2d889e768ed7 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.5.3](https://img.shields.io/badge/Version-5.5.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) +![Version: 5.5.4](https://img.shields.io/badge/Version-5.5.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml index 702f7f9c2c44..3a5524725190 100644 --- a/production/helm/loki/templates/write/statefulset-write.yaml +++ b/production/helm/loki/templates/write/statefulset-write.yaml @@ -173,4 +173,7 @@ spec: selector: {{- toYaml . | nindent 10 }} {{- end }} + {{- with .Values.write.extraVolumeClaimTemplates }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 3072c77362e0..ad799bb7709d 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -678,6 +678,8 @@ write: extraVolumeMounts: [] # -- Volumes to add to the write pods extraVolumes: [] + # -- volumeClaimTemplates to add to StatefulSet + extraVolumeClaimTemplates: [] # -- Resource requests and limits for the write resources: {} # -- Grace period to allow the write to shutdown before it is killed. Especially for the ingester, From 9f19c384e12ee80ae4bbb2ed8ef61eec071cea4c Mon Sep 17 00:00:00 2001 From: Robert Jacob Date: Wed, 24 May 2023 20:50:45 +0200 Subject: [PATCH 06/23] operator: Do not update status after setting degraded condition (#9511) --- operator/CHANGELOG.md | 1 + .../controllers/loki/lokistack_controller.go | 17 +++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/operator/CHANGELOG.md b/operator/CHANGELOG.md index 1bb660a6bb6f..05c8c8da259b 100644 --- a/operator/CHANGELOG.md +++ b/operator/CHANGELOG.md @@ -1,5 +1,6 @@ ## Main +- [9511](https://github.com/grafana/loki/pull/9511) **xperimental**: Do not update status after setting degraded condition - [9405](https://github.com/grafana/loki/pull/9405) **periklis**: Add support for configuring HTTP server timeouts - [9378](https://github.com/grafana/loki/pull/9378) **aminesnow**: Add zone aware API spec validation - [9408](https://github.com/grafana/loki/pull/9408) **JoaoBraveCoding**: Add PodAntiAffinity overwrites per component diff --git a/operator/controllers/loki/lokistack_controller.go b/operator/controllers/loki/lokistack_controller.go index cad6cdba00c1..ca523c09a0fa 100644 --- a/operator/controllers/loki/lokistack_controller.go +++ b/operator/controllers/loki/lokistack_controller.go @@ -5,6 +5,7 @@ import ( "errors" "time" + "github.com/ViaQ/logerr/v2/kverrors" "github.com/go-logr/logr" "github.com/google/go-cmp/cmp" "github.com/grafana/loki/operator/controllers/loki/internal/management/state" @@ -154,14 +155,14 @@ func (r *LokiStackReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( if r.FeatureGates.BuiltInCertManagement.Enabled { err = handlers.CreateOrRotateCertificates(ctx, r.Log, req, r.Client, r.Scheme, r.FeatureGates) - if res, derr := handleDegradedError(ctx, r.Client, req, err); derr != nil { - return res, derr + if err != nil { + return handleDegradedError(ctx, r.Client, req, err) } } err = handlers.CreateOrUpdateLokiStack(ctx, r.Log, req, r.Client, r.Scheme, r.FeatureGates) - if res, derr := handleDegradedError(ctx, r.Client, req, err); derr != nil { - return res, derr + if err != nil { + return handleDegradedError(ctx, r.Client, req, err) } err = status.Refresh(ctx, r.Client, req, time.Now()) @@ -177,7 +178,7 @@ func handleDegradedError(ctx context.Context, c client.Client, req ctrl.Request, if errors.As(err, °raded) { err = status.SetDegradedCondition(ctx, c, req, degraded.Message, degraded.Reason) if err != nil { - return ctrl.Result{}, err + return ctrl.Result{}, kverrors.Wrap(err, "error setting degraded condition") } return ctrl.Result{ @@ -185,11 +186,7 @@ func handleDegradedError(ctx context.Context, c client.Client, req ctrl.Request, }, nil } - if err != nil { - return ctrl.Result{}, err - } - - return ctrl.Result{}, nil + return ctrl.Result{}, err } // SetupWithManager sets up the controller with the Manager. From fce2b3cc7e4abfa4d3eec4a9684a7cdece8f2a6c Mon Sep 17 00:00:00 2001 From: Graham Rounds Date: Thu, 25 May 2023 02:09:00 -0600 Subject: [PATCH 07/23] Helm: Quote tenantId value in logsInstance (#9486) **What this PR does / why we need it**: Quotes the value of `tenantId` for the cases where tenantId is made up of only numerical values (i.e. if tenantId is `0`) the motivation for this is that we have long used the tenant id `0` in our loki instance for some stuff. We probably should fix that, but it's going to be easier (at least for us) to patch this than to rename this tenant or migrate to a new tenant. **Which issue(s) this PR fixes**: N/A - If you'd like me to file an issue to track this there as well, let me know and i'll write one up. i figured this fix was simple enough **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` --- production/helm/loki/CHANGELOG.md | 6 +++++- production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../helm/loki/templates/monitoring/_helpers-monitoring.tpl | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index c67f7d68d9b4..b159fd163c30 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,10 +13,13 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.5.5 + +- [BUGFIX] Quote tenantId value in logsInstance + ## 5.5.4 - [CHANGE] Add extraVolumeClaimTemplates for StatefulSet of the write component. -- [CHANGE] Add clusterLabelOverride for alert label overrides. ## 5.5.3 @@ -25,6 +28,7 @@ Entries should include a reference to the pull request that introduced the chang ## 5.5.2 - [BUGFIX] Use $.Release.Namespace consistently +- [CHANGE] Add clusterLabelOverride for alert label overrides. ## 5.5.1 diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index de3df17aa59d..53eb136dea3f 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.8.2 -version: 5.5.4 +version: 5.5.5 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index 2d889e768ed7..b2b0a6160345 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.5.4](https://img.shields.io/badge/Version-5.5.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) +![Version: 5.5.5](https://img.shields.io/badge/Version-5.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl b/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl index bab70ba9ae89..ff3f18693a5d 100644 --- a/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl +++ b/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl @@ -21,7 +21,7 @@ Client definition for LogsInstance name: {{ include "enterprise-logs.selfMonitoringTenantSecret" . }} key: password {{- else if .Values.loki.auth_enabled }} - tenantId: {{ .Values.monitoring.selfMonitoring.tenant.name }} + tenantId: {{ .Values.monitoring.selfMonitoring.tenant.name | quote }} {{- end }} {{- end -}} From 89b786fe51785dc6f0fce035b757cc992ba29f0a Mon Sep 17 00:00:00 2001 From: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Date: Thu, 25 May 2023 09:34:22 +0100 Subject: [PATCH 08/23] Add instructions for Helm chart updates in the pull request template (#9514) **What this PR does / why we need it**: Add additional instructions for Helm charts in the pull request template. **Special notes for your reviewer**: **Checklist** - [ ] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [ ] Documentation added - [ ] Tests updated - [ ] `CHANGELOG.md` updated - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` --------- Signed-off-by: Michel Hollands --- .github/pull_request_template.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 076627df49de..767e312e4d27 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -11,3 +11,4 @@ Fixes # - [ ] Tests updated - [ ] `CHANGELOG.md` updated - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` +- [ ] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213) From 478510a1bbb73ca930622401e910138327aeae3d Mon Sep 17 00:00:00 2001 From: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Date: Thu, 25 May 2023 11:18:03 +0100 Subject: [PATCH 09/23] Fix Grouping String function and usage so it prints "without ()" (#9515) **What this PR does / why we need it**: The changes rangemapper made to LogQL expressions created invalid LogQL. It added a `without` clause instead of `without ()`. This PR changes the String function of the Grouping struct. This is then used in the rangemapper. This caused the following panic: ``` panic: error cloning query: count without (rate({namespace="apps"}[15s])): parse error at line 1, col 16: syntax error: unexpected RATE, expecting IDENTIFIER or ) ``` **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [ ] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` - [ ] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213) --------- Signed-off-by: Michel Hollands --- CHANGELOG.md | 1 + pkg/logql/rangemapper.go | 2 + pkg/logql/rangemapper_test.go | 206 ++++++++++++++++---------------- pkg/logql/syntax/ast.go | 10 +- pkg/logql/syntax/ast_test.go | 38 ++++++ pkg/logql/syntax/parser_test.go | 4 + 6 files changed, 157 insertions(+), 104 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ebca1924ed5..80a79eeabe3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ##### Enhancements +* [9515](https://github.com/grafana/loki/pull/9515) **MichelHollands**: Fix String() on vector aggregation LogQL expressions that contain `without ()`. * [8067](https://github.com/grafana/loki/pull/8067) **DylanGuedes**: Distributor: Add auto-forget unhealthy members support. * [9175](https://github.com/grafana/loki/pull/9175) **MichelHollands**: Ingester: update the `prepare_shutdown` endpoint so it supports GET and DELETE and stores the state on disk. * [8953](https://github.com/grafana/loki/pull/8953) **dannykopping**: Querier: block queries by hash. diff --git a/pkg/logql/rangemapper.go b/pkg/logql/rangemapper.go index cd654da83057..2dc74c728895 100644 --- a/pkg/logql/rangemapper.go +++ b/pkg/logql/rangemapper.go @@ -230,6 +230,7 @@ func (m RangeMapper) sumOverFullRange(expr *syntax.RangeAggregationExpr, overrid Left: m.mapConcatSampleExpr(downstreamExpr, rangeInterval, recorder), Grouping: &syntax.Grouping{ Without: true, + Groups: []string{}, }, Operation: syntax.OpTypeSum, }, @@ -252,6 +253,7 @@ func (m RangeMapper) vectorAggrWithRangeDownstreams(expr *syntax.RangeAggregatio if expr.Grouping == nil { grouping = &syntax.Grouping{ Without: true, + Groups: []string{}, } } var downstream syntax.SampleExpr = expr diff --git a/pkg/logql/rangemapper_test.go b/pkg/logql/rangemapper_test.go index 7983e4726193..6a284d3aaf1e 100644 --- a/pkg/logql/rangemapper_test.go +++ b/pkg/logql/rangemapper_test.go @@ -19,14 +19,14 @@ func Test_SplitRangeInterval(t *testing.T) { }{ { `bytes_over_time({app="foo"}[3s])`, - `sum without( + `sum without () ( downstream> ++ downstream> )`, }, { `count_over_time({app="foo"}[5s])`, - `sum without( + `sum without () ( downstream> ++ downstream> ++ downstream> @@ -34,7 +34,7 @@ func Test_SplitRangeInterval(t *testing.T) { }, { `rate({app="foo"}[4s] offset 1m)`, - `(sum without( + `(sum without () ( downstream> ++ downstream> ) / 4)`, @@ -62,7 +62,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { // Range vector aggregators { `bytes_over_time({app="foo"}[3m])`, - `sum without( + `sum without () ( downstream> ++ downstream> ++ downstream> @@ -70,7 +70,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `count_over_time({app="foo"}[3m])`, - `sum without( + `sum without () ( downstream> ++ downstream> ++ downstream> @@ -78,7 +78,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `sum_over_time({app="foo"} | unwrap bar [3m])`, - `sum without( + `sum without () ( downstream> ++ downstream> ++ downstream> @@ -86,7 +86,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `max_over_time({app="foo"} | unwrap bar [3m])`, - `max without( + `max without () ( downstream> ++ downstream> ++ downstream> @@ -110,7 +110,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `min_over_time({app="foo"} | unwrap bar [3m])`, - `min without( + `min without () ( downstream> ++ downstream> ++ downstream> @@ -126,7 +126,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `rate({app="foo"}[3m])`, - `(sum without( + `(sum without () ( downstream> ++ downstream> ++ downstream> @@ -134,7 +134,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `rate({app="foo"} | unwrap bar[3m])`, - `(sum without( + `(sum without () ( downstream> ++ downstream> ++ downstream> @@ -142,7 +142,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `bytes_rate({app="foo"}[3m])`, - `(sum without( + `(sum without () ( downstream> ++ downstream> ++ downstream> @@ -153,7 +153,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(bytes_over_time({app="foo"}[3m]))`, `sum( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -163,7 +163,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(count_over_time({app="foo"}[3m]))`, `sum( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -173,7 +173,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(sum_over_time({app="foo"} | unwrap bar [3m]))`, `sum( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -183,7 +183,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(max_over_time({app="foo"} | unwrap bar [3m]))`, `sum( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -203,7 +203,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(min_over_time({app="foo"} | unwrap bar [3m]))`, `sum( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -223,7 +223,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(rate({app="foo"}[3m]))`, `sum( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -233,7 +233,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(bytes_rate({app="foo"}[3m]))`, `sum( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -245,7 +245,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (bytes_over_time({app="foo"}[3m]))`, `sum by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -255,7 +255,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (count_over_time({app="foo"}[3m]))`, `sum by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -265,7 +265,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (sum_over_time({app="foo"} | unwrap bar [3m]))`, `sum by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -275,7 +275,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (max_over_time({app="foo"} | unwrap bar [3m]))`, `sum by (baz) ( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -295,7 +295,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (min_over_time({app="foo"} | unwrap bar [3m]))`, `sum by (baz) ( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -315,7 +315,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (rate({app="foo"}[3m]))`, `sum by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -325,7 +325,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (bytes_rate({app="foo"}[3m]))`, `sum by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -337,7 +337,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count(bytes_over_time({app="foo"}[3m]))`, `count( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -347,7 +347,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count(count_over_time({app="foo"}[3m]))`, `count( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -357,7 +357,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count(sum_over_time({app="foo"} | unwrap bar [3m]))`, `count( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -367,7 +367,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count(max_over_time({app="foo"} | unwrap bar [3m]))`, `count( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -387,7 +387,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count(min_over_time({app="foo"} | unwrap bar [3m]))`, `count( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -407,7 +407,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count(rate({app="foo"}[3m]))`, `count( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -417,7 +417,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count(bytes_rate({app="foo"}[3m]))`, `count( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -429,7 +429,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count by (baz) (bytes_over_time({app="foo"}[3m]))`, `count by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -439,7 +439,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count by (baz) (count_over_time({app="foo"}[3m]))`, `count by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -449,7 +449,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count by (baz) (sum_over_time({app="foo"} | unwrap bar [3m]))`, `count by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -459,7 +459,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count by (baz) (max_over_time({app="foo"} | unwrap bar [3m]))`, `count by (baz) ( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -479,7 +479,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count by (baz) (min_over_time({app="foo"} | unwrap bar [3m]))`, `count by (baz) ( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -499,7 +499,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count by (baz) (rate({app="foo"}[3m]))`, `count by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -509,7 +509,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count by (baz) (bytes_rate({app="foo"}[3m]))`, `count by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -521,7 +521,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(bytes_over_time({app="foo"}[3m]))`, `max( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -531,7 +531,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(count_over_time({app="foo"}[3m]))`, `max( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -541,7 +541,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(sum_over_time({app="foo"} | unwrap bar [3m]))`, `max( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -551,7 +551,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(max_over_time({app="foo"} | unwrap bar [3m]))`, `max( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -571,7 +571,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(min_over_time({app="foo"} | unwrap bar [3m]))`, `max( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -591,7 +591,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(rate({app="foo"}[3m]))`, `max( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -601,7 +601,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(bytes_rate({app="foo"}[3m]))`, `max( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -613,7 +613,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (bytes_over_time({app="foo"}[3m]))`, `max by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -623,7 +623,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (count_over_time({app="foo"}[3m]))`, `max by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -633,7 +633,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (sum_over_time({app="foo"} | unwrap bar [3m]))`, `max by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -643,7 +643,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (max_over_time({app="foo"} | unwrap bar [3m]))`, `max by (baz) ( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -663,7 +663,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (min_over_time({app="foo"} | unwrap bar [3m]))`, `max by (baz) ( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -683,7 +683,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (rate({app="foo"}[3m]))`, `max by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -693,7 +693,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (bytes_rate({app="foo"}[3m]))`, `max by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -705,7 +705,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(bytes_over_time({app="foo"}[3m]))`, `min( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -715,7 +715,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(count_over_time({app="foo"}[3m]))`, `min( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -725,7 +725,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(sum_over_time({app="foo"} | unwrap bar [3m]))`, `min( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -735,7 +735,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(max_over_time({app="foo"} | unwrap bar [3m]))`, `min( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -755,7 +755,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(min_over_time({app="foo"} | unwrap bar [3m]))`, `min( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -775,7 +775,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(rate({app="foo"}[3m]))`, `min( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -785,7 +785,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(bytes_rate({app="foo"}[3m]))`, `min( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -797,7 +797,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (bytes_over_time({app="foo"}[3m]))`, `min by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -807,7 +807,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (count_over_time({app="foo"}[3m]))`, `min by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -817,7 +817,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (sum_over_time({app="foo"} | unwrap bar [3m]))`, `min by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -827,7 +827,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (max_over_time({app="foo"} | unwrap bar [3m]))`, `min by (baz) ( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -847,7 +847,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (min_over_time({app="foo"} | unwrap bar [3m]))`, `min by (baz) ( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -867,7 +867,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (rate({app="foo"}[3m]))`, `min by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -877,7 +877,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (bytes_rate({app="foo"}[3m]))`, `min by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -921,7 +921,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(sum_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `sum( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -931,7 +931,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(max_over_time({app="foo"} | json | unwrap bar [3m]))`, `sum( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -951,7 +951,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(min_over_time({app="foo"} | json | unwrap bar [3m]))`, `sum( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -971,7 +971,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(rate({app="foo"} | json [3m]))`, `sum( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -981,7 +981,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(bytes_rate({app="foo"} | logfmt [3m]))`, `sum( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -1007,7 +1007,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (sum_over_time({app="foo"} | json | unwrap bar [3m]))`, `sum by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1017,7 +1017,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (max_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `sum by (baz) ( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -1037,7 +1037,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (min_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `sum by (baz) ( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -1057,7 +1057,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (rate({app="foo"} | logfmt [3m]))`, `sum by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -1067,7 +1067,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum by (baz) (bytes_rate({app="foo"} | json [3m]))`, `sum by (baz) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -1133,7 +1133,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(sum_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `max( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1143,7 +1143,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(max_over_time({app="foo"} | json | unwrap bar [3m]))`, `max( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -1163,7 +1163,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max(min_over_time({app="foo"} | json | unwrap bar [3m]))`, `max( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -1199,7 +1199,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (sum_over_time({app="foo"} | json | unwrap bar [3m]))`, `max by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1209,7 +1209,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (max_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `max by (baz) ( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -1229,7 +1229,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `max by (baz) (min_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `max by (baz) ( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -1265,7 +1265,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(sum_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `min( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1275,7 +1275,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(max_over_time({app="foo"} | json | unwrap bar [3m]))`, `min( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -1295,7 +1295,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min(min_over_time({app="foo"} | json | unwrap bar [3m]))`, `min( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -1331,7 +1331,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (sum_over_time({app="foo"} | json | unwrap bar [3m]))`, `min by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1341,7 +1341,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (max_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `min by (baz) ( - max without ( + max without () ( downstream> ++ downstream> ++ downstream> @@ -1361,7 +1361,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `min by (baz) (min_over_time({app="foo"} | logfmt | unwrap bar [3m]))`, `min by (baz) ( - min without ( + min without () ( downstream> ++ downstream> ++ downstream> @@ -1384,7 +1384,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { `2 * bytes_over_time({app="foo"}[3m])`, `( 2 * - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1394,7 +1394,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `count_over_time({app="foo"}[3m]) * 2`, `( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1404,12 +1404,12 @@ func Test_SplitRangeVectorMapping(t *testing.T) { }, { `bytes_over_time({app="foo"}[3m]) + count_over_time({app="foo"}[4m])`, - `(sum without ( + `(sum without () ( downstream> ++ downstream> ++ downstream> ) + - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1420,13 +1420,13 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `sum(count_over_time({app="foo"}[3m]) * count(sum_over_time({app="foo"} | unwrap bar [4m])))`, `sum( - (sum without( + (sum without () ( downstream> ++ downstream> ++ downstream> ) * count ( - sum without( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1440,7 +1440,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { `sum by (app) (bytes_rate({app="foo"}[3m])) / sum by (app) (rate({app="foo"}[3m]))`, `( sum by (app) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -1448,7 +1448,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { ) / sum by (app) ( - (sum without ( + (sum without () ( downstream> ++ downstream> ++ downstream> @@ -1466,7 +1466,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { ) / sum ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1480,7 +1480,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { `sum(max(bytes_over_time({app="foo"}[3m])))`, `sum( max( - sum without( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1494,7 +1494,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { { `topk(2, count_over_time({app="foo"}[3m]))`, `topk(2, - sum without( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1508,7 +1508,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { `topk(10, sum by (org_id) ( ( - sum without( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1524,7 +1524,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { `label_replace(sum by (baz) (count_over_time({app="foo"}[3m])), "x", "$1", "a", "(.*)")`, `label_replace( sum by (baz) ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> @@ -1537,7 +1537,7 @@ func Test_SplitRangeVectorMapping(t *testing.T) { `label_replace(rate({job="api-server", service="a:c"} |= "err" [3m]), "foo", "$1", "service", "(.*):.*")`, `label_replace( ( - sum without ( + sum without () ( downstream> ++ downstream> ++ downstream> diff --git a/pkg/logql/syntax/ast.go b/pkg/logql/syntax/ast.go index f6332a1d2fac..f777d77cd840 100644 --- a/pkg/logql/syntax/ast.go +++ b/pkg/logql/syntax/ast.go @@ -1101,9 +1101,14 @@ type Grouping struct { // impls Stringer func (g Grouping) String() string { var sb strings.Builder + + if g.Groups == nil { + return "" + } + if g.Without { sb.WriteString(" without ") - } else if len(g.Groups) > 0 { + } else { sb.WriteString(" by ") } @@ -1112,6 +1117,9 @@ func (g Grouping) String() string { sb.WriteString(strings.Join(g.Groups, ",")) sb.WriteString(")") } + if len(g.Groups) == 0 { + sb.WriteString("()") + } return sb.String() } diff --git a/pkg/logql/syntax/ast_test.go b/pkg/logql/syntax/ast_test.go index 4598736535de..e168ac46092b 100644 --- a/pkg/logql/syntax/ast_test.go +++ b/pkg/logql/syntax/ast_test.go @@ -681,3 +681,41 @@ func TestParseLargeQuery(t *testing.T) { _, err := ParseExpr(line) require.NoError(t, err) } + +func TestGroupingString(t *testing.T) { + g := Grouping{ + Groups: []string{"a", "b"}, + Without: false, + } + require.Equal(t, " by (a,b)", g.String()) + + g = Grouping{ + Groups: []string{}, + Without: false, + } + require.Equal(t, " by ()", g.String()) + + g = Grouping{ + Groups: nil, + Without: false, + } + require.Equal(t, "", g.String()) + + g = Grouping{ + Groups: []string{"a", "b"}, + Without: true, + } + require.Equal(t, " without (a,b)", g.String()) + + g = Grouping{ + Groups: []string{}, + Without: true, + } + require.Equal(t, " without ()", g.String()) + + g = Grouping{ + Groups: nil, + Without: true, + } + require.Equal(t, "", g.String()) +} diff --git a/pkg/logql/syntax/parser_test.go b/pkg/logql/syntax/parser_test.go index e936951ef0d6..70736abbcdad 100644 --- a/pkg/logql/syntax/parser_test.go +++ b/pkg/logql/syntax/parser_test.go @@ -3352,6 +3352,10 @@ func TestParseSampleExpr_equalityMatcher(t *testing.T) { { in: `1 + count_over_time({app=~".+"}[5m]) + count_over_time({app=~".+"}[5m]) + 1`, }, + { + in: `count without (rate({namespace="apps"}[15s]))`, + err: logqlmodel.NewParseError("syntax error: unexpected RATE, expecting IDENTIFIER or )", 1, 16), + }, } { t.Run(tc.in, func(t *testing.T) { _, err := ParseSampleExpr(tc.in) From b4d0a2cd68e25f2d07991ebda01c10464c89eccb Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Thu, 25 May 2023 13:40:02 +0200 Subject: [PATCH 10/23] Force using a buffer from the ChunkRefsPool (#9217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **What this PR does / why we need it**: Re-using a buffer from the `ChunkRefsPool` avoids unnecessary allocations in TSDB's `GetChunkRefs` call. **Special notes for your reviewer**: Benchmarks ``` $ gotest -v -count=1 ./pkg/storage/stores/tsdb/ -test.run="^$" -test.bench=Bench -test.benchtime=10000x ``` ```console $ benchstat old.txt new.txt name old time/op new time/op delta TenantHeads/10-8 244µs ±58% 55µs ± 4% -77.49% (p=0.000 n=10+9) TenantHeads/100-8 1.75ms ± 9% 0.58ms ±26% -66.89% (p=0.000 n=9+10) TenantHeads/1000-8 16.5ms ± 6% 6.4ms ± 2% -60.89% (p=0.000 n=9+10) IndexClient_Stats-8 25.0µs ±10% 25.1µs ±13% ~ (p=0.863 n=9+9) TSDBIndex_GetChunkRefs-8 3.34ms ±12% 1.46ms ± 2% -56.41% (p=0.000 n=10+9) name old alloc/op new alloc/op delta IndexClient_Stats-8 2.37kB ±12% 2.37kB ±12% ~ (p=0.923 n=10+10) TSDBIndex_GetChunkRefs-8 6.40MB ± 0% 1.40MB ± 0% -78.08% (p=0.000 n=9+10) name old allocs/op new allocs/op delta IndexClient_Stats-8 59.0 ± 0% 59.0 ± 0% ~ (all equal) TSDBIndex_GetChunkRefs-8 42.0 ± 0% 27.0 ± 0% -35.71% (p=0.000 n=10+10) ``` Signed-off-by: Christian Haudum --- pkg/storage/stores/tsdb/head_manager.go | 2 +- pkg/storage/stores/tsdb/head_manager_test.go | 33 ++++++++++++++----- pkg/storage/stores/tsdb/index_client.go | 6 ++-- pkg/storage/stores/tsdb/multi_file_index.go | 15 +++------ .../stores/tsdb/multi_file_index_test.go | 4 ++- pkg/storage/stores/tsdb/single_file_index.go | 6 ---- .../stores/tsdb/single_file_index_test.go | 15 ++++++--- 7 files changed, 48 insertions(+), 33 deletions(-) diff --git a/pkg/storage/stores/tsdb/head_manager.go b/pkg/storage/stores/tsdb/head_manager.go index adf954ce9039..a68914fd856f 100644 --- a/pkg/storage/stores/tsdb/head_manager.go +++ b/pkg/storage/stores/tsdb/head_manager.go @@ -743,7 +743,7 @@ func (t *tenantHeads) GetChunkRefs(ctx context.Context, userID string, from, thr if !ok { return nil, nil } - return idx.GetChunkRefs(ctx, userID, from, through, nil, shard, matchers...) + return idx.GetChunkRefs(ctx, userID, from, through, res, shard, matchers...) } diff --git a/pkg/storage/stores/tsdb/head_manager_test.go b/pkg/storage/stores/tsdb/head_manager_test.go index ad8f50f710a6..d5caa261336e 100644 --- a/pkg/storage/stores/tsdb/head_manager_test.go +++ b/pkg/storage/stores/tsdb/head_manager_test.go @@ -104,17 +104,19 @@ func Test_TenantHeads_Append(t *testing.T) { } _ = h.Append("fake", ls, ls.Hash(), chks) + buf := ChunkRefsPool.Get() + defer ChunkRefsPool.Put(buf) + found, err := h.GetChunkRefs( context.Background(), "fake", 0, 100, - nil, nil, + buf, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar"), ) require.Nil(t, err) require.Equal(t, chunkMetasToChunkRefs("fake", ls.Hash(), chks), found) - } // Test multitenant reads @@ -157,20 +159,23 @@ func Test_TenantHeads_MultiRead(t *testing.T) { } + buf := ChunkRefsPool.Get() + defer ChunkRefsPool.Put(buf) + // ensure we're only returned the data from the correct tenant for _, tenant := range tenants { + buf = buf[:0] found, err := h.GetChunkRefs( context.Background(), tenant.user, 0, 100, - nil, nil, + buf, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar"), ) require.Nil(t, err) require.Equal(t, chunkMetasToChunkRefs(tenant.user, tenant.ls.Hash(), chks), found) } - } // test head recover from wal @@ -247,18 +252,21 @@ func Test_HeadManager_RecoverHead(t *testing.T) { require.Equal(t, 1, len(grp.wals)) require.Nil(t, recoverHead(mgr.name, mgr.dir, mgr.activeHeads, grp.wals, false)) + buf := ChunkRefsPool.Get() + defer ChunkRefsPool.Put(buf) + for _, c := range cases { + buf = buf[:0] refs, err := mgr.GetChunkRefs( context.Background(), c.User, 0, math.MaxInt64, - nil, nil, + buf, nil, labels.MustNewMatcher(labels.MatchRegexp, "foo", ".+"), ) require.Nil(t, err) require.Equal(t, chunkMetasToChunkRefs(c.User, c.Fingerprint, c.Chunks), refs) } - } // test mgr recover from multiple wals across multiple periods @@ -323,12 +331,16 @@ func Test_HeadManager_Lifecycle(t *testing.T) { // Ensure old WAL data is queryable multiIndex := NewMultiIndex(IndexSlice{mgr, mgr.tsdbManager.(noopTSDBManager).tenantHeads}) + buf := ChunkRefsPool.Get() + defer ChunkRefsPool.Put(buf) + for _, c := range cases { + buf = buf[:0] refs, err := multiIndex.GetChunkRefs( context.Background(), c.User, 0, math.MaxInt64, - nil, nil, + buf, nil, labels.MustNewMatcher(labels.MatchRegexp, "foo", ".+"), ) require.Nil(t, err) @@ -359,11 +371,12 @@ func Test_HeadManager_Lifecycle(t *testing.T) { // Ensure old + new data is queryable for _, c := range append(cases, newCase) { + buf = buf[:0] refs, err := multiIndex.GetChunkRefs( context.Background(), c.User, 0, math.MaxInt64, - nil, nil, + buf, nil, labels.MustNewMatcher(labels.MatchRegexp, "foo", ".+"), ) require.Nil(t, err) @@ -536,7 +549,9 @@ func BenchmarkTenantHeads(b *testing.B) { wg.Add(1) go func(r int) { defer wg.Done() - var res []ChunkRef + res := ChunkRefsPool.Get() + defer ChunkRefsPool.Put(res) + tenant := r % nTenants // nolint:ineffassign,staticcheck diff --git a/pkg/storage/stores/tsdb/index_client.go b/pkg/storage/stores/tsdb/index_client.go index d30515ee22fb..acbf6b9cf3a0 100644 --- a/pkg/storage/stores/tsdb/index_client.go +++ b/pkg/storage/stores/tsdb/index_client.go @@ -115,8 +115,10 @@ func (c *IndexClient) GetChunkRefs(ctx context.Context, userID string, from, thr return nil, err } - // TODO(owen-d): use a pool to reduce allocs here - chks, err := c.idx.GetChunkRefs(ctx, userID, from, through, nil, shard, matchers...) + chks := ChunkRefsPool.Get() + defer ChunkRefsPool.Put(chks) + + chks, err = c.idx.GetChunkRefs(ctx, userID, from, through, chks, shard, matchers...) kvps = append(kvps, "chunks", len(chks), "indexErr", err, diff --git a/pkg/storage/stores/tsdb/multi_file_index.go b/pkg/storage/stores/tsdb/multi_file_index.go index fd29c510cfcd..7bb5cf428084 100644 --- a/pkg/storage/stores/tsdb/multi_file_index.go +++ b/pkg/storage/stores/tsdb/multi_file_index.go @@ -110,11 +110,6 @@ func (i *MultiIndex) forMatchingIndices(ctx context.Context, from, through model func (i *MultiIndex) GetChunkRefs(ctx context.Context, userID string, from, through model.Time, res []ChunkRef, shard *index.ShardAnnotation, matchers ...*labels.Matcher) ([]ChunkRef, error) { acc := newResultAccumulator(func(xs []interface{}) (interface{}, error) { - if res == nil { - res = ChunkRefsPool.Get() - } - res = res[:0] - // keep track of duplicates seen := make(map[ChunkRef]struct{}) @@ -131,9 +126,7 @@ func (i *MultiIndex) GetChunkRefs(ctx context.Context, userID string, from, thro res = append(res, ref) } ChunkRefsPool.Put(g) - } - return res, nil }) @@ -142,11 +135,14 @@ func (i *MultiIndex) GetChunkRefs(ctx context.Context, userID string, from, thro from, through, func(ctx context.Context, idx Index) error { - got, err := idx.GetChunkRefs(ctx, userID, from, through, nil, shard, matchers...) + var err error + buf := ChunkRefsPool.Get() + buf, err = idx.GetChunkRefs(ctx, userID, from, through, buf, shard, matchers...) if err != nil { + ChunkRefsPool.Put(buf) return err } - acc.Add(got) + acc.Add(buf) return nil }, ); err != nil { @@ -161,7 +157,6 @@ func (i *MultiIndex) GetChunkRefs(ctx context.Context, userID string, from, thro return nil, err } return merged.([]ChunkRef), nil - } func (i *MultiIndex) Series(ctx context.Context, userID string, from, through model.Time, res []Series, shard *index.ShardAnnotation, matchers ...*labels.Matcher) ([]Series, error) { diff --git a/pkg/storage/stores/tsdb/multi_file_index_test.go b/pkg/storage/stores/tsdb/multi_file_index_test.go index 0f6d5f306ec1..3b2062061073 100644 --- a/pkg/storage/stores/tsdb/multi_file_index_test.go +++ b/pkg/storage/stores/tsdb/multi_file_index_test.go @@ -67,7 +67,9 @@ func TestMultiIndex(t *testing.T) { idx := NewMultiIndex(IndexSlice(indices)) t.Run("GetChunkRefs", func(t *testing.T) { - refs, err := idx.GetChunkRefs(context.Background(), "fake", 2, 5, nil, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) + var err error + refs := make([]ChunkRef, 0, 8) + refs, err = idx.GetChunkRefs(context.Background(), "fake", 2, 5, refs, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) require.Nil(t, err) expected := []ChunkRef{ diff --git a/pkg/storage/stores/tsdb/single_file_index.go b/pkg/storage/stores/tsdb/single_file_index.go index 9be2de3cf370..abbcb00450f0 100644 --- a/pkg/storage/stores/tsdb/single_file_index.go +++ b/pkg/storage/stores/tsdb/single_file_index.go @@ -202,14 +202,8 @@ func (i *TSDBIndex) forPostings( } func (i *TSDBIndex) GetChunkRefs(ctx context.Context, userID string, from, through model.Time, res []ChunkRef, shard *index.ShardAnnotation, matchers ...*labels.Matcher) ([]ChunkRef, error) { - if res == nil { - res = ChunkRefsPool.Get() - } - res = res[:0] - if err := i.ForSeries(ctx, shard, from, through, func(ls labels.Labels, fp model.Fingerprint, chks []index.ChunkMeta) { for _, chk := range chks { - res = append(res, ChunkRef{ User: userID, // assumed to be the same, will be enforced by caller. Fingerprint: fp, diff --git a/pkg/storage/stores/tsdb/single_file_index_test.go b/pkg/storage/stores/tsdb/single_file_index_test.go index 167a95168b96..8707e66583b6 100644 --- a/pkg/storage/stores/tsdb/single_file_index_test.go +++ b/pkg/storage/stores/tsdb/single_file_index_test.go @@ -85,7 +85,9 @@ func TestSingleIdx(t *testing.T) { t.Run(variant.desc, func(t *testing.T) { idx := variant.fn() t.Run("GetChunkRefs", func(t *testing.T) { - refs, err := idx.GetChunkRefs(context.Background(), "fake", 1, 5, nil, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) + var err error + refs := make([]ChunkRef, 0, 8) + refs, err = idx.GetChunkRefs(context.Background(), "fake", 1, 5, refs, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) require.Nil(t, err) expected := []ChunkRef{ @@ -126,7 +128,9 @@ func TestSingleIdx(t *testing.T) { Shard: 1, Of: 2, } - shardedRefs, err := idx.GetChunkRefs(context.Background(), "fake", 1, 5, nil, &shard, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) + var err error + refs := make([]ChunkRef, 0, 8) + refs, err = idx.GetChunkRefs(context.Background(), "fake", 1, 5, refs, &shard, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) require.Nil(t, err) @@ -136,7 +140,7 @@ func TestSingleIdx(t *testing.T) { Start: 1, End: 10, Checksum: 3, - }}, shardedRefs) + }}, refs) }) @@ -249,10 +253,13 @@ func BenchmarkTSDBIndex_GetChunkRefs(b *testing.B) { b.ResetTimer() b.ReportAllocs() + var err error for i := 0; i < b.N; i++ { - chkRefs, err := tsdbIndex.GetChunkRefs(context.Background(), "fake", queryFrom, queryThrough, nil, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) + chkRefs := ChunkRefsPool.Get() + chkRefs, err = tsdbIndex.GetChunkRefs(context.Background(), "fake", queryFrom, queryThrough, chkRefs, nil, labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")) require.NoError(b, err) require.Len(b, chkRefs, numChunksToMatch*2) + ChunkRefsPool.Put(chkRefs) } } From a55404766c37875ac849f28b792165763b07e751 Mon Sep 17 00:00:00 2001 From: indX Date: Thu, 25 May 2023 16:17:40 +0200 Subject: [PATCH 11/23] Logging: Add HTTP API to change the log level at runtime (#9357) **What this PR does / why we need it**: To be able to change the log level at runtime, particularly from info to debug to enable debugging information during an incident without restarting Loki. **Which issue(s) this PR fixes**: Fixes #6805 **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md`: No such changes --------- Co-authored-by: J Stickler --- CHANGELOG.md | 1 + docs/sources/reference/api.md | 16 +++++++++ pkg/loki/loki.go | 2 ++ pkg/util/log/log.go | 67 ++++++++++++++++++++++++++++++++--- pkg/util/log/log_test.go | 64 +++++++++++++++++++++++++++++++++ 5 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 pkg/util/log/log_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 80a79eeabe3e..403e37d25384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ * [8732](https://github.com/grafana/loki/pull/8732) **abaguas**: azure: respect retry config before cancelling the context * [9206](https://github.com/grafana/loki/pull/9206) **dannykopping**: Ruler: log rule evaluation detail. * [9184](https://github.com/grafana/loki/pull/9184) **periklis**: Bump dskit to introduce IPv6 support for memberlist +* [9357](https://github.com/grafana/loki/pull/9357) **Indransh**: Add HTTP API to change the log level at runtime * [9431](https://github.com/grafana/loki/pull/9431) **dannykopping**: Add more buckets to `loki_memcache_request_duration_seconds` metric; latencies can increase if using memcached with NVMe ##### Fixes diff --git a/docs/sources/reference/api.md b/docs/sources/reference/api.md index 6e8265ad8811..78df5834acec 100644 --- a/docs/sources/reference/api.md +++ b/docs/sources/reference/api.md @@ -22,6 +22,7 @@ component is different. These endpoints are exposed by all components: - [`GET /ready`](#identify-ready-loki-instance) +- [`GET /log_level`](#change-log-level-at-runtime) - [`GET /metrics`](#return-exposed-prometheus-metrics) - [`GET /config`](#list-current-configuration) - [`GET /services`](#list-running-services) @@ -612,6 +613,21 @@ running Loki on Kubernetes, `/ready` can be used as a readiness probe. In microservices mode, the `/ready` endpoint is exposed by all components. +## Change log level at runtime + +``` +GET /log_level +POST /log_level +``` + +`/log_level` a `GET` returns the current log level and a `POST` lets you change the log level of a Loki process at runtime. This can be useful for accessing debugging information during an incident. Caution should be used when running at the `debug` log level, as this produces a large volume of data. + +Params: + +- `log_level`: A valid log level that can be passed as a URL param (`?log_level=`) or as a form value in case of `POST`. Valid levels: [debug, info, warn, error] + +In microservices mode, the `/log_level` endpoint is exposed by all components. + ## Flush in-memory chunks to backing store ``` diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index 06bc076f620d..ccd8417e0ee1 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -484,6 +484,8 @@ func (t *Loki) Run(opts RunOpts) error { } t.Server.HTTP.Path("/ready").Methods("GET").Handler(t.readyHandler(sm, shutdownRequested)) + t.Server.HTTP.Path("/log_level").Methods("GET", "POST").Handler(util_log.LevelHandler(&t.Cfg.Server.LogLevel)) + grpc_health_v1.RegisterHealthServer(t.Server.GRPC, grpcutil.NewHealthCheck(sm)) // Config endpoint adds a way to see the config and the changes compared to the defaults. diff --git a/pkg/util/log/log.go b/pkg/util/log/log.go index fef2e3d83d20..67ea79c0855a 100644 --- a/pkg/util/log/log.go +++ b/pkg/util/log/log.go @@ -1,9 +1,11 @@ package log import ( + "encoding/json" "fmt" "io" "math" + "net/http" "os" "time" @@ -22,6 +24,8 @@ var ( Logger = log.NewNopLogger() bufferedLogger *LineBufferedLogger + + plogger *prometheusLogger ) // InitLogger initialises the global gokit logger (util_log.Logger) and overrides the @@ -53,6 +57,7 @@ func Flush() error { // prometheusLogger exposes Prometheus counters for each of go-kit's log levels. type prometheusLogger struct { + baseLogger log.Logger logger log.Logger logMessages *prometheus.CounterVec internalLogMessages *prometheus.CounterVec @@ -62,6 +67,54 @@ type prometheusLogger struct { useSyncLogger bool } +// LevelHandler returns an http handler function that returns the current log level. +// The optional query parameter 'log_level' can be passed to change the log level at runtime. +func LevelHandler(currentLogLevel *logging.Level) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + type logResponse struct { + Status string `json:"status,omitempty"` + Message string `json:"message"` + } + var resp logResponse + status := http.StatusOK + + w.Header().Set("Content-Type", "application/json; charset=utf-8") + + switch r.Method { + case "GET": + resp = logResponse{ + Message: fmt.Sprintf("Current log level is %s", currentLogLevel.String()), + } + case "POST": + logLevel := r.FormValue("log_level") + + // Update log level in config + err := currentLogLevel.Set(logLevel) + if err != nil { + status = http.StatusBadRequest + resp = logResponse{ + Message: fmt.Sprintf("%v", err), + Status: "failed", + } + } else { + plogger.Set(levelFilter(logLevel)) + + msg := fmt.Sprintf("Log level set to %s", logLevel) + level.Info(Logger).Log("msg", msg) + resp = logResponse{ + Status: "success", + Message: msg, + } + } + } + + w.WriteHeader(status) + if err := json.NewEncoder(w).Encode(resp); err != nil { + level.Error(Logger).Log("msg", err) + } + } +} + // newPrometheusLogger creates a new instance of PrometheusLogger which exposes // Prometheus counters for various log levels. func newPrometheusLogger(l logging.Level, format logging.Format, reg prometheus.Registerer, buffered bool, sync bool) log.Logger { @@ -111,13 +164,14 @@ func newPrometheusLogger(l logging.Level, format logging.Format, reg prometheus. writer = log.NewSyncWriter(writer) } - logger := log.NewLogfmtLogger(writer) + baseLogger := log.NewLogfmtLogger(writer) if format.String() == "json" { - logger = log.NewJSONLogger(writer) + baseLogger = log.NewJSONLogger(writer) } - logger = level.NewFilter(logger, levelFilter(l.String())) + logger := level.NewFilter(baseLogger, levelFilter(l.String())) - plogger := &prometheusLogger{ + plogger = &prometheusLogger{ + baseLogger: baseLogger, logger: logger, logMessages: logMessages, internalLogMessages: internalLogMessages, @@ -139,6 +193,11 @@ func newPrometheusLogger(l logging.Level, format logging.Format, reg prometheus. return log.With(plogger, "ts", log.DefaultTimestampUTC) } +// Set overrides the log level of the logger. +func (pl *prometheusLogger) Set(option level.Option) { + pl.logger = level.NewFilter(pl.baseLogger, option) +} + // Log increments the appropriate Prometheus counter depending on the log level. func (pl *prometheusLogger) Log(kv ...interface{}) error { pl.logger.Log(kv...) diff --git a/pkg/util/log/log_test.go b/pkg/util/log/log_test.go new file mode 100644 index 000000000000..3619524443d9 --- /dev/null +++ b/pkg/util/log/log_test.go @@ -0,0 +1,64 @@ +package log + +import ( + "io" + "net/http" + "net/url" + "strings" + "testing" + + "github.com/go-kit/log" + "github.com/stretchr/testify/assert" + "github.com/weaveworks/common/logging" +) + +func TestLevelHandler(t *testing.T) { + var lvl logging.Level + err := lvl.Set("info") + assert.NoError(t, err) + plogger = &prometheusLogger{ + baseLogger: log.NewLogfmtLogger(io.Discard), + } + + // Start test http server + go func() { + err := http.ListenAndServe(":8080", LevelHandler(&lvl)) + assert.NoError(t, err) + }() + + testCases := []struct { + testName string + targetLogLevel string + expectedResponse string + expectedLogLevel string + expectedStatusCode int + }{ + {"GetLogLevel", "", `{"message":"Current log level is info"}`, "info", 200}, + {"PostLogLevelInvalid", "invalid", `{"message":"unrecognized log level \"invalid\"", "status":"failed"}`, "info", 400}, + {"PostLogLevelEmpty", "", `{"message":"unrecognized log level \"\"", "status":"failed"}`, "info", 400}, + {"PostLogLevelDebug", "debug", `{"status": "success", "message":"Log level set to debug"}`, "debug", 200}, + } + + for _, testCase := range testCases { + t.Run(testCase.testName, func(t *testing.T) { + var ( + resp *http.Response + err error + ) + + if strings.HasPrefix(testCase.testName, "Get") { + resp, err = http.Get("http://localhost:8080/") + } else if strings.HasPrefix(testCase.testName, "Post") { + resp, err = http.PostForm("http://localhost:8080/", url.Values{"log_level": {testCase.targetLogLevel}}) + } + assert.NoError(t, err) + defer resp.Body.Close() + + body, err := io.ReadAll(resp.Body) + assert.NoError(t, err) + assert.JSONEq(t, testCase.expectedResponse, string(body)) + assert.Equal(t, testCase.expectedStatusCode, resp.StatusCode) + assert.Equal(t, testCase.expectedLogLevel, lvl.String()) + }) + } +} From f9aba994555da55f424163a49b53bb6643946aa2 Mon Sep 17 00:00:00 2001 From: oleksii-boiko-ua Date: Thu, 25 May 2023 17:36:04 +0300 Subject: [PATCH 12/23] Helm: add hpa for read, write and backend (#8684) **What this PR does / why we need it**: It adds missing HPA (HorizontalPodAutoscaler) templates to write, read, and backend components **Which issue(s) this PR fixes**: Fixes #7864 **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Documentation added - [ ] Tests updated - [x] `CHANGELOG.md` updated - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` Co-authored-by: Oleksii Boiko --- CHANGELOG.md | 1 + docs/sources/installation/helm/reference.md | 173 +++++++++++++++++- docs/sources/operations/storage/wal.md | 12 ++ production/helm/loki/CHANGELOG.md | 4 + production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../helm/loki/templates/backend/hpa.yaml | 49 +++++ .../backend/statefulset-backend.yaml | 2 + .../helm/loki/templates/gateway/hpa.yaml | 4 + production/helm/loki/templates/read/hpa.yaml | 55 ++++++ .../loki/templates/read/statefulset-read.yaml | 2 + production/helm/loki/templates/write/hpa.yaml | 50 +++++ .../templates/write/statefulset-write.yaml | 15 +- production/helm/loki/values.yaml | 83 +++++++++ 14 files changed, 442 insertions(+), 12 deletions(-) create mode 100644 production/helm/loki/templates/backend/hpa.yaml create mode 100644 production/helm/loki/templates/read/hpa.yaml create mode 100644 production/helm/loki/templates/write/hpa.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 403e37d25384..69b9352f5d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * [9184](https://github.com/grafana/loki/pull/9184) **periklis**: Bump dskit to introduce IPv6 support for memberlist * [9357](https://github.com/grafana/loki/pull/9357) **Indransh**: Add HTTP API to change the log level at runtime * [9431](https://github.com/grafana/loki/pull/9431) **dannykopping**: Add more buckets to `loki_memcache_request_duration_seconds` metric; latencies can increase if using memcached with NVMe +* [8684](https://github.com/grafana/loki/pull/8684) **oleksii-boiko-ua**: Helm: Add hpa templates for read, write and backend components. ##### Fixes diff --git a/docs/sources/installation/helm/reference.md b/docs/sources/installation/helm/reference.md index b32ba88afff5..7de274aa5275 100644 --- a/docs/sources/installation/helm/reference.md +++ b/docs/sources/installation/helm/reference.md @@ -38,6 +38,60 @@ This is the generated reference for the Loki Helm Chart values.
 Hard node and soft zone anti-affinity
 
+ + + + backend.autoscaling.behavior + object + Behavior policies while scaling. +
+{}
+
+ + + + backend.autoscaling.enabled + bool + Enable autoscaling for the backend. +
+false
+
+ + + + backend.autoscaling.maxReplicas + int + Maximum autoscaling replicas for the backend. +
+3
+
+ + + + backend.autoscaling.minReplicas + int + Minimum autoscaling replicas for the backend. +
+1
+
+ + + + backend.autoscaling.targetCPUUtilizationPercentage + int + Target CPU utilization percentage for the backend. +
+60
+
+ + + + backend.autoscaling.targetMemoryUtilizationPercentage + string + Target memory utilization percentage for the backend. +
+null
+
@@ -764,6 +818,15 @@ null
 Hard node and soft zone anti-affinity
 
+ + + + gateway.autoscaling.behavior + object + Behavior policies while scaling. +
+{}
+
@@ -874,13 +937,11 @@ null - gateway.deploymentStrategy - object - ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + gateway.deploymentStrategy.type + string +
-{
-  "type": "RollingUpdate"
-}
+"RollingUpdate"
 
@@ -2780,6 +2841,15 @@ false
 Hard node and soft zone anti-affinity
 
+ + + + read.autoscaling.behavior + object + Behavior policies while scaling. +
+{}
+
@@ -3699,6 +3769,97 @@ null
 Hard node and soft zone anti-affinity
 
+ + + + write.autoscaling.behavior + object + Behavior policies while scaling. +
+{
+  "scaleDown": {
+    "policies": [
+      {
+        "periodSeconds": 1800,
+        "type": "Pods",
+        "value": 1
+      }
+    ]
+  },
+  "scaleUp": {
+    "policies": [
+      {
+        "periodSeconds": 900,
+        "type": "Pods",
+        "value": 1
+      }
+    ]
+  },
+  "stabilizationWindowSeconds": 3600
+}
+
+ + + + write.autoscaling.behavior.scaleUp + object + see https://github.com/grafana/loki/blob/main/docs/sources/operations/storage/wal.md#how-to-scale-updown for scaledown details +
+{
+  "policies": [
+    {
+      "periodSeconds": 900,
+      "type": "Pods",
+      "value": 1
+    }
+  ]
+}
+
+ + + + write.autoscaling.enabled + bool + Enable autoscaling for the write. +
+false
+
+ + + + write.autoscaling.maxReplicas + int + Maximum autoscaling replicas for the write. +
+3
+
+ + + + write.autoscaling.minReplicas + int + Minimum autoscaling replicas for the write. +
+1
+
+ + + + write.autoscaling.targetCPUUtilizationPercentage + int + Target CPU utilisation percentage for the write. +
+60
+
+ + + + write.autoscaling.targetMemoryUtilizationPercentage + string + Target memory utilization percentage for the write. +
+null
+
diff --git a/docs/sources/operations/storage/wal.md b/docs/sources/operations/storage/wal.md index bc31bc4aa3d9..85eaa3d83dab 100644 --- a/docs/sources/operations/storage/wal.md +++ b/docs/sources/operations/storage/wal.md @@ -95,6 +95,18 @@ Statefulsets are significantly more cumbersome to work with/upgrade/etc. Much of In this case, try `kubectl -n delete sts ingester --cascade=false`. This will leave the pods alive but delete the statefulset. Then you may recreate the (updated) statefulset and one-by-one start deleting the `ingester-0` through `ingester-n` pods _in that order_, allowing the statefulset to spin up new pods to replace them. +#### Scaling Down Using `/flush_shutdown` Endpoint and Lifecycle Hook + +1. **StatefulSets for Ordered Scaling Down**: Loki's ingesters should be scaled down one by one, which is efficiently handled by Kubernetes StatefulSets. This ensures an ordered and reliable scaling process, as described in the [Deployment and Scaling Guarantees](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#deployment-and-scaling-guarantees) documentation. + +2. **Using PreStop Lifecycle Hook**: During the pod scaling down process, the PreStop [lifecycle hook](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) triggers the `/flush_shutdown` endpoint on the ingester. This action flushes the chunks and removes the ingester from the ring, allowing it to register as unready and become eligible for deletion. + +3. **Using terminationGracePeriodSeconds**: Provides time for the ingester to flush its data before being deleted, if flushing data takes more than 30 minutes, you may need to increase it. + +4. **Cleaning Persistent Volumes**: Persistent volumes are automatically cleaned up by leveraging the [enableStatefulSetAutoDeletePVC](https://kubernetes.io/blog/2021/12/16/kubernetes-1-23-statefulset-pvc-auto-deletion/) feature in Kubernetes. + +By following the above steps, you can ensure a smooth scaling down process for Loki's ingesters while maintaining data integrity and minimizing potential disruptions. + ### Non-Kubernetes or baremetal deployments * When the ingester restarts for any reason (upgrade, crash, etc), it should be able to attach to the same volume in order to recover back the WAL and tokens. diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index b159fd163c30..5dde3e2687f3 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.5.6 + +- [FEATURE] Add hpa templates for read, write and backend. + ## 5.5.5 - [BUGFIX] Quote tenantId value in logsInstance diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 53eb136dea3f..9976bb270a2f 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.8.2 -version: 5.5.5 +version: 5.5.6 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index b2b0a6160345..85239d198c49 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.5.5](https://img.shields.io/badge/Version-5.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) +![Version: 5.5.6](https://img.shields.io/badge/Version-5.5.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/backend/hpa.yaml b/production/helm/loki/templates/backend/hpa.yaml new file mode 100644 index 000000000000..83487e9aaa41 --- /dev/null +++ b/production/helm/loki/templates/backend/hpa.yaml @@ -0,0 +1,49 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} +{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) ( .Values.backend.autoscaling.enabled ) }} +{{- if $autoscalingv2 }} +apiVersion: autoscaling/v2 +{{- else }} +apiVersion: autoscaling/v2beta1 +{{- end }} +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "loki.backendFullname" . }} + labels: + {{- include "loki.backendLabels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: StatefulSet + name: {{ include "loki.backendFullname" . }} + minReplicas: {{ .Values.backend.autoscaling.minReplicas }} + maxReplicas: {{ .Values.backend.autoscaling.maxReplicas }} + {{- with .Values.backend.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.backend.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + {{- if $autoscalingv2 }} + target: + type: Utilization + averageUtilization: {{ . }} + {{- else }} + targetAverageUtilization: {{ . }} + {{- end }} + {{- end }} + {{- with .Values.backend.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + {{- if $autoscalingv2 }} + target: + type: Utilization + averageUtilization: {{ . }} + {{- else }} + targetAverageUtilization: {{ . }} + {{- end }} + {{- end }} +{{- end }} diff --git a/production/helm/loki/templates/backend/statefulset-backend.yaml b/production/helm/loki/templates/backend/statefulset-backend.yaml index d74bd9c957ba..59816a47490f 100644 --- a/production/helm/loki/templates/backend/statefulset-backend.yaml +++ b/production/helm/loki/templates/backend/statefulset-backend.yaml @@ -10,7 +10,9 @@ metadata: {{- include "loki.backendLabels" . | nindent 4 }} app.kubernetes.io/part-of: memberlist spec: +{{- if not .Values.backend.autoscaling.enabled }} replicas: {{ .Values.backend.replicas }} +{{- end }} podManagementPolicy: Parallel updateStrategy: rollingUpdate: diff --git a/production/helm/loki/templates/gateway/hpa.yaml b/production/helm/loki/templates/gateway/hpa.yaml index c71b4f2284a0..3541ec6965d6 100644 --- a/production/helm/loki/templates/gateway/hpa.yaml +++ b/production/helm/loki/templates/gateway/hpa.yaml @@ -18,6 +18,10 @@ spec: name: {{ include "loki.gatewayFullname" . }} minReplicas: {{ .Values.gateway.autoscaling.minReplicas }} maxReplicas: {{ .Values.gateway.autoscaling.maxReplicas }} + {{- with .Values.gateway.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} metrics: {{- with .Values.gateway.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource diff --git a/production/helm/loki/templates/read/hpa.yaml b/production/helm/loki/templates/read/hpa.yaml new file mode 100644 index 000000000000..5515ecb0b448 --- /dev/null +++ b/production/helm/loki/templates/read/hpa.yaml @@ -0,0 +1,55 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} +{{- if and $isSimpleScalable ( .Values.read.autoscaling.enabled ) }} +{{- if $autoscalingv2 }} +apiVersion: autoscaling/v2 +{{- else }} +apiVersion: autoscaling/v2beta1 +{{- end }} +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "loki.readFullname" . }} + labels: + {{- include "loki.readLabels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 +{{- if and $isSimpleScalable (not .Values.read.legacyReadTarget ) }} + kind: Deployment + name: {{ include "loki.readFullname" . }} +{{- else }} + kind: StatefulSet + name: {{ include "loki.readFullname" . }} +{{- end }} + minReplicas: {{ .Values.read.autoscaling.minReplicas }} + maxReplicas: {{ .Values.read.autoscaling.maxReplicas }} + {{- with .Values.read.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} + metrics: + {{- with .Values.read.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + {{- if $autoscalingv2 }} + target: + type: Utilization + averageUtilization: {{ . }} + {{- else }} + targetAverageUtilization: {{ . }} + {{- end }} + {{- end }} + {{- with .Values.read.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + {{- if $autoscalingv2 }} + target: + type: Utilization + averageUtilization: {{ . }} + {{- else }} + targetAverageUtilization: {{ . }} + {{- end }} + {{- end }} +{{- end }} diff --git a/production/helm/loki/templates/read/statefulset-read.yaml b/production/helm/loki/templates/read/statefulset-read.yaml index 93e9c0e85e55..b4eb9ba369fb 100644 --- a/production/helm/loki/templates/read/statefulset-read.yaml +++ b/production/helm/loki/templates/read/statefulset-read.yaml @@ -10,7 +10,9 @@ metadata: app.kubernetes.io/part-of: memberlist {{- include "loki.readLabels" . | nindent 4 }} spec: +{{- if not .Values.read.autoscaling.enabled }} replicas: {{ .Values.read.replicas }} +{{- end }} podManagementPolicy: Parallel updateStrategy: rollingUpdate: diff --git a/production/helm/loki/templates/write/hpa.yaml b/production/helm/loki/templates/write/hpa.yaml new file mode 100644 index 000000000000..18d59dbd0757 --- /dev/null +++ b/production/helm/loki/templates/write/hpa.yaml @@ -0,0 +1,50 @@ +{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} +{{- $autoscalingv2 := .Capabilities.APIVersions.Has "autoscaling/v2" -}} +{{- if and $isSimpleScalable ( .Values.write.autoscaling.enabled ) }} +{{- if $autoscalingv2 }} +apiVersion: autoscaling/v2 +{{- else }} +apiVersion: autoscaling/v2beta1 +{{- end }} +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "loki.writeFullname" . }} + labels: + {{- include "loki.writeLabels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: StatefulSet + name: {{ include "loki.writeFullname" . }} + minReplicas: {{ .Values.write.autoscaling.minReplicas }} + maxReplicas: {{ .Values.write.autoscaling.maxReplicas }} + {{- with .Values.write.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} + metrics: + {{- with .Values.write.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + {{- if $autoscalingv2 }} + target: + type: Utilization + averageUtilization: {{ . }} + {{- else }} + targetAverageUtilization: {{ . }} + {{- end }} + {{- end }} + {{- with .Values.write.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + {{- if $autoscalingv2 }} + target: + type: Utilization + averageUtilization: {{ . }} + {{- else }} + targetAverageUtilization: {{ . }} + {{- end }} + {{- end }} +{{- end }} diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml index 3a5524725190..b1756e4321a2 100644 --- a/production/helm/loki/templates/write/statefulset-write.yaml +++ b/production/helm/loki/templates/write/statefulset-write.yaml @@ -9,9 +9,10 @@ metadata: {{- include "loki.writeLabels" . | nindent 4 }} app.kubernetes.io/part-of: memberlist spec: +{{- if not .Values.write.autoscaling.enabled }} replicas: {{ .Values.write.replicas }} - - podManagementPolicy: Parallel +{{- end }} + podManagementPolicy: OrderedReady updateStrategy: rollingUpdate: partition: 0 @@ -101,9 +102,15 @@ spec: {{- toYaml .Values.loki.containerSecurityContext | nindent 12 }} readinessProbe: {{- toYaml .Values.loki.readinessProbe | nindent 12 }} - {{- with .Values.write.lifecycle }} + {{- if .Values.write.lifecycle }} lifecycle: - {{- toYaml . | nindent 12 }} + {{- toYaml .Values.write.lifecycle | nindent 12 }} + {{- else if .Values.write.autoscaling.enabled }} + lifecycle: + preStop: + httpGet: + path: "/ingester/flush_shutdown" + port: http-metrics {{- end }} volumeMounts: - name: config diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index ad799bb7709d..3b1aafad51de 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -645,6 +645,31 @@ monitoring: write: # -- Number of replicas for the write replicas: 3 + autoscaling: + # -- Enable autoscaling for the write. + enabled: false + # -- Minimum autoscaling replicas for the write. + minReplicas: 1 + # -- Maximum autoscaling replicas for the write. + maxReplicas: 3 + # -- Target CPU utilisation percentage for the write. + targetCPUUtilizationPercentage: 60 + # -- Target memory utilization percentage for the write. + targetMemoryUtilizationPercentage: + # -- Behavior policies while scaling. + behavior: + # -- see https://github.com/grafana/loki/blob/main/docs/sources/operations/storage/wal.md#how-to-scale-updown for scaledown details + scaleUp: + policies: + - type: Pods + value: 1 + periodSeconds: 900 + scaleDown: + policies: + - type: Pods + value: 1 + periodSeconds: 1800 + stabilizationWindowSeconds: 3600 image: # -- The Docker registry for the write image. Overrides `loki.image.registry` registry: null @@ -672,6 +697,11 @@ write: extraEnvFrom: [] # -- Lifecycle for the write container lifecycle: {} + # -- The default /flush_shutdown preStop hook is recommended as part of the ingester + # scaledown process so it's added to the template by default when autoscaling is enabled, + # but it's disabled to optimize rolling restarts in instances that will never be scaled + # down or when using chunks storage with WAL disabled. + # https://github.com/grafana/loki/blob/main/docs/sources/operations/storage/wal.md#how-to-scale-updown # -- Init containers to add to the write pods initContainers: [] # -- Volume mounts to add to the write pods @@ -784,6 +814,20 @@ read: targetCPUUtilizationPercentage: 60 # -- Target memory utilisation percentage for the read targetMemoryUtilizationPercentage: + # -- Behavior policies while scaling. + behavior: {} + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 60 + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 180 image: # -- The Docker registry for the read image. Overrides `loki.image.registry` registry: null @@ -853,6 +897,31 @@ read: backend: # -- Number of replicas for the backend replicas: 3 + autoscaling: + # -- Enable autoscaling for the backend. + enabled: false + # -- Minimum autoscaling replicas for the backend. + minReplicas: 1 + # -- Maximum autoscaling replicas for the backend. + maxReplicas: 3 + # -- Target CPU utilization percentage for the backend. + targetCPUUtilizationPercentage: 60 + # -- Target memory utilization percentage for the backend. + targetMemoryUtilizationPercentage: + # -- Behavior policies while scaling. + behavior: {} + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 60 + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 180 image: # -- The Docker registry for the backend image. Overrides `loki.image.registry` registry: null @@ -1060,6 +1129,20 @@ gateway: targetMemoryUtilizationPercentage: # -- See `kubectl explain deployment.spec.strategy` for more # -- ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + # -- Behavior policies while scaling. + behavior: {} + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 60 + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Pods + # value: 1 + # periodSeconds: 180 deploymentStrategy: type: RollingUpdate image: From 7c26c8c093ac7fc84d5f767f5e646275b5c88f11 Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Thu, 25 May 2023 17:22:31 +0200 Subject: [PATCH 13/23] Fix panic in `pkg/analytics` (#9502) We discovered a bug in Phlare https://github.com/grafana/phlare/pull/706. There can be a race occuring between two different `New` calls for the same `name`. --- pkg/analytics/stats.go | 203 ++++++++++++++++++++++++------------ pkg/analytics/stats_test.go | 27 ++++- 2 files changed, 162 insertions(+), 68 deletions(-) diff --git a/pkg/analytics/stats.go b/pkg/analytics/stats.go index c1261f40bacd..2479ae28c804 100644 --- a/pkg/analytics/stats.go +++ b/pkg/analytics/stats.go @@ -28,8 +28,36 @@ var ( statsPrefix = "github.com/grafana/loki/" targetKey = "target" editionKey = "edition" + + createLock sync.RWMutex ) +func createOrRetrieveExpvar[K any](check func() (*K, error), create func() *K) *K { + // check if string exists holding read lock + createLock.RLock() + s, err := check() + createLock.RUnlock() + if err != nil { + panic(err.Error()) + } + if s != nil { + return s + } + + // acquire write lock and check again and create if still missing + createLock.Lock() + defer createLock.Unlock() + s, err = check() + if err != nil { + panic(err.Error()) + } + if s != nil { + return s + } + + return create() +} + // Report is the JSON object sent to the stats server type Report struct { ClusterID string `json:"clusterID"` @@ -156,40 +184,61 @@ func memstats() interface{} { // NewFloat returns a new Float stats object. // If a Float stats object with the same name already exists it is returned. func NewFloat(name string) *expvar.Float { - existing := expvar.Get(statsPrefix + name) - if existing != nil { - if f, ok := existing.(*expvar.Float); ok { - return f - } - panic(fmt.Sprintf("%v is set to a non-float value", name)) - } - return expvar.NewFloat(statsPrefix + name) + return createOrRetrieveExpvar( + func() (*expvar.Float, error) { // check + existing := expvar.Get(statsPrefix + name) + if existing != nil { + if f, ok := existing.(*expvar.Float); ok { + return f, nil + } + return nil, fmt.Errorf("%v is set to a non-float value", name) + } + return nil, nil + }, + func() *expvar.Float { // create + return expvar.NewFloat(statsPrefix + name) + }, + ) } // NewInt returns a new Int stats object. // If an Int stats object object with the same name already exists it is returned. func NewInt(name string) *expvar.Int { - existing := expvar.Get(statsPrefix + name) - if existing != nil { - if i, ok := existing.(*expvar.Int); ok { - return i - } - panic(fmt.Sprintf("%v is set to a non-int value", name)) - } - return expvar.NewInt(statsPrefix + name) + return createOrRetrieveExpvar( + func() (*expvar.Int, error) { // check + existing := expvar.Get(statsPrefix + name) + if existing != nil { + if i, ok := existing.(*expvar.Int); ok { + return i, nil + } + return nil, fmt.Errorf("%v is set to a non-int value", name) + } + return nil, nil + }, + func() *expvar.Int { // create + return expvar.NewInt(statsPrefix + name) + }, + ) } // NewString returns a new String stats object. // If a String stats object with the same name already exists it is returned. func NewString(name string) *expvar.String { - existing := expvar.Get(statsPrefix + name) - if existing != nil { - if s, ok := existing.(*expvar.String); ok { - return s - } - panic(fmt.Sprintf("%v is set to a non-string value", name)) - } - return expvar.NewString(statsPrefix + name) + return createOrRetrieveExpvar( + func() (*expvar.String, error) { // check + existing := expvar.Get(statsPrefix + name) + if existing != nil { + if s, ok := existing.(*expvar.String); ok { + return s, nil + } + return nil, fmt.Errorf("%v is set to a non-string value", name) + } + return nil, nil + }, + func() *expvar.String { // create + return expvar.NewString(statsPrefix + name) + }, + ) } // Target sets the target name. This can be set multiple times. @@ -225,23 +274,31 @@ type Statistics struct { // - stdvar // If a Statistics object with the same name already exists it is returned. func NewStatistics(name string) *Statistics { - s := &Statistics{ - min: atomic.NewFloat64(math.Inf(0)), - max: atomic.NewFloat64(math.Inf(-1)), - count: atomic.NewInt64(0), - avg: atomic.NewFloat64(0), - mean: atomic.NewFloat64(0), - value: atomic.NewFloat64(0), - } - existing := expvar.Get(statsPrefix + name) - if existing != nil { - if s, ok := existing.(*Statistics); ok { + return createOrRetrieveExpvar( + func() (*Statistics, error) { // check + + existing := expvar.Get(statsPrefix + name) + if existing != nil { + if s, ok := existing.(*Statistics); ok { + return s, nil + } + return nil, fmt.Errorf("%v is set to a non-Statistics value", name) + } + return nil, nil + }, + func() *Statistics { // create + s := &Statistics{ + min: atomic.NewFloat64(math.Inf(0)), + max: atomic.NewFloat64(math.Inf(-1)), + count: atomic.NewInt64(0), + avg: atomic.NewFloat64(0), + mean: atomic.NewFloat64(0), + value: atomic.NewFloat64(0), + } + expvar.Publish(statsPrefix+name, s) return s - } - panic(fmt.Sprintf("%v is set to a non-Statistics value", name)) - } - expvar.Publish(statsPrefix+name, s) - return s + }, + ) } func (s *Statistics) String() string { @@ -319,20 +376,27 @@ type Counter struct { // NewCounter returns a new Counter stats object. // If a Counter stats object with the same name already exists it is returned. func NewCounter(name string) *Counter { - c := &Counter{ - total: atomic.NewInt64(0), - rate: atomic.NewFloat64(0), - resetTime: time.Now(), - } - existing := expvar.Get(statsPrefix + name) - if existing != nil { - if c, ok := existing.(*Counter); ok { + return createOrRetrieveExpvar( + func() (*Counter, error) { // check + existing := expvar.Get(statsPrefix + name) + if existing != nil { + if c, ok := existing.(*Counter); ok { + return c, nil + } + return nil, fmt.Errorf("%v is set to a non-Counter value", name) + } + return nil, nil + }, + func() *Counter { // create + c := &Counter{ + total: atomic.NewInt64(0), + rate: atomic.NewFloat64(0), + resetTime: time.Now(), + } + expvar.Publish(statsPrefix+name, c) return c - } - panic(fmt.Sprintf("%v is set to a non-Counter value", name)) - } - expvar.Publish(statsPrefix+name, c) - return c + }, + ) } func (c *Counter) updateRate() { @@ -371,19 +435,26 @@ type WordCounter struct { // The WordCounter object is thread-safe and counts the number of words recorded. // If a WordCounter stats object with the same name already exists it is returned. func NewWordCounter(name string) *WordCounter { - c := &WordCounter{ - count: atomic.NewInt64(0), - words: sync.Map{}, - } - existing := expvar.Get(statsPrefix + name) - if existing != nil { - if w, ok := existing.(*WordCounter); ok { - return w - } - panic(fmt.Sprintf("%v is set to a non-WordCounter value", name)) - } - expvar.Publish(statsPrefix+name, c) - return c + return createOrRetrieveExpvar( + func() (*WordCounter, error) { // check + existing := expvar.Get(statsPrefix + name) + if existing != nil { + if w, ok := existing.(*WordCounter); ok { + return w, nil + } + return nil, fmt.Errorf("%v is set to a non-WordCounter value", name) + } + return nil, nil + }, + func() *WordCounter { // create + c := &WordCounter{ + count: atomic.NewInt64(0), + words: sync.Map{}, + } + expvar.Publish(statsPrefix+name, c) + return c + }, + ) } func (w *WordCounter) Add(word string) { diff --git a/pkg/analytics/stats_test.go b/pkg/analytics/stats_test.go index 81458e2c33ed..af0e0108513a 100644 --- a/pkg/analytics/stats_test.go +++ b/pkg/analytics/stats_test.go @@ -1,16 +1,18 @@ package analytics import ( + "context" "runtime" "sync" "testing" "time" - "github.com/grafana/loki/pkg/util/build" - "github.com/google/uuid" jsoniter "github.com/json-iterator/go" "github.com/stretchr/testify/require" + "golang.org/x/sync/errgroup" + + "github.com/grafana/loki/pkg/util/build" ) func Test_BuildReport(t *testing.T) { @@ -65,6 +67,27 @@ func Test_BuildReport(t *testing.T) { t.Log(string(out)) } +func TestCounterRace(t *testing.T) { + counterName := "test_counter_" + t.TempDir() + g, _ := errgroup.WithContext(context.Background()) + + g.Go(func() error { + c := NewCounter(counterName) + c.Inc(100) + return nil + }) + + g.Go(func() error { + c := NewCounter(counterName) + c.Inc(200) + return nil + }) + + require.NoError(g.Wait()) + + require.Equal(t, NewCounter(counterName).total.Load(), int64(300)) +} + func TestCounter(t *testing.T) { c := NewCounter("test_counter") c.Inc(100) From a9cde84c952b11ad3fae593acbb4f0e928f0c329 Mon Sep 17 00:00:00 2001 From: bluesky6529 Date: Thu, 25 May 2023 23:26:25 +0800 Subject: [PATCH 14/23] Fix typo on lambda-promtail docs (#9472) **What this PR does / why we need it**: fix for doc typo **Which issue(s) this PR fixes**:N/A **Special notes for your reviewer**: N/A --- docs/sources/clients/lambda-promtail/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/clients/lambda-promtail/_index.md b/docs/sources/clients/lambda-promtail/_index.md index de1bdcbb722b..19e7a8e90756 100644 --- a/docs/sources/clients/lambda-promtail/_index.md +++ b/docs/sources/clients/lambda-promtail/_index.md @@ -188,7 +188,7 @@ scrape_configs: - source_labels: ['__aws_cloudwatch_log_group'] target_label: 'log_group' # Maps the loadbalancer name into a label called `loadbalancer_name` for use in Loki. - - source_label: ['__aws_s3_log_lb'] + - source_labels: ['__aws_s3_log_lb'] target_label: 'loadbalancer_name' ``` From e38ccb44180fd0c5ea29fa3864b34388739b2933 Mon Sep 17 00:00:00 2001 From: Alexandre de Verteuil Date: Thu, 25 May 2023 09:39:57 -0600 Subject: [PATCH 15/23] Uniformize "Available Labels" headers in Promtail config reference doc (#9436) **What this PR does / why we need it**: There were various formats for the "Available Labels" headings. This PR makes them all the same heading level and spelling. --- docs/sources/clients/promtail/configuration.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/sources/clients/promtail/configuration.md b/docs/sources/clients/promtail/configuration.md index 7f7a4bce44b7..cb64028738a0 100644 --- a/docs/sources/clients/promtail/configuration.md +++ b/docs/sources/clients/promtail/configuration.md @@ -1050,7 +1050,7 @@ labels: [ : ... ] ``` -### Available Labels +#### Available Labels When Promtail receives GCP logs, various internal labels are made available for [relabeling](#relabel_configs). This depends on the subscription type chosen. @@ -1108,12 +1108,10 @@ connection_string: | default = "range" [ : ... ] ``` -### Available Labels +#### Available Labels When Promtail receives Azure Event Hubs messages, various internal labels are made available for [relabeling](#relabel_configs). -**Available Labels:** - - `__azure_event_hubs_category`: The log category of the message when a message is an application log. The following list of labels is discovered using the Kafka endpoint in Event Hubs. @@ -1211,7 +1209,7 @@ labels: [use_incoming_timestamp: | default = false] ``` -**Available Labels:** +#### Available Labels The list of labels below are discovered when consuming kafka: @@ -1255,7 +1253,7 @@ use_incoming_timestamp: ``` -**Available Labels:** +#### Available Labels - `__gelf_message_level`: The GELF level as string. - `__gelf_message_host`: The host sending the GELF message. From 8fbb095aae28fae42d7d678c5b1571a99413d705 Mon Sep 17 00:00:00 2001 From: AleksandrKovshariov Date: Thu, 25 May 2023 17:42:50 +0200 Subject: [PATCH 16/23] Update replication factor ceveat sentence (#9358) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **What this PR does / why we need it**: This sentence "There’s also an edge case where we acknowledge a write if 2 of the three ingesters do which means that in the case where 2 writes succeed, we can only lose one ingester before suffering data loss." is really hard to understand. I suggest "If a write is acknowledged by 2 out of 3 ingesters, we can tolerate the loss of one ingester but not two, as this would result in data loss." **Which issue(s) this PR fixes**: Fixes # **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [ ] Documentation added - [ ] Tests updated - [ ] `CHANGELOG.md` updated - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` --- docs/sources/fundamentals/architecture/components/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/fundamentals/architecture/components/_index.md b/docs/sources/fundamentals/architecture/components/_index.md index 992658131b9e..cce1ba76aaeb 100644 --- a/docs/sources/fundamentals/architecture/components/_index.md +++ b/docs/sources/fundamentals/architecture/components/_index.md @@ -42,7 +42,7 @@ Once the distributor has performed all of its validation duties, it forwards dat In order to mitigate the chance of _losing_ data on any single ingester, the distributor will forward writes to a _replication_factor_ of them. Generally, this is `3`. Replication allows for ingester restarts and rollouts without failing writes and adds additional protection from data loss for some scenarios. Loosely, for each label set (called a _stream_) that is pushed to a distributor, it will hash the labels and use the resulting value to look up `replication_factor` ingesters in the `ring` (which is a subcomponent that exposes a [distributed hash table](https://en.wikipedia.org/wiki/Distributed_hash_table)). It will then try to write the same data to all of them. This will error if less than a _quorum_ of writes succeed. A quorum is defined as `floor(replication_factor / 2) + 1`. So, for our `replication_factor` of `3`, we require that two writes succeed. If less than two writes succeed, the distributor returns an error and the write can be retried. -**Caveat: There's also an edge case where we acknowledge a write if 2 of the three ingesters do which means that in the case where 2 writes succeed, we can only lose one ingester before suffering data loss.** +**Caveat: If a write is acknowledged by 2 out of 3 ingesters, we can tolerate the loss of one ingester but not two, as this would result in data loss.** Replication factor isn't the only thing that prevents data loss, though, and arguably these days its main purpose is to allow writes to continue uninterrupted during rollouts & restarts. The `ingester` component now includes a [write ahead log](https://en.wikipedia.org/wiki/Write-ahead_logging) which persists incoming writes to disk to ensure they're not lost as long as the disk isn't corrupted. The complementary nature of replication factor and WAL ensures data isn't lost unless there are significant failures in both mechanisms (i.e. multiple ingesters die and lose/corrupt their disks). From 5d7e0fd6c0a23cf0f1bf48a46a277515c2b5e0aa Mon Sep 17 00:00:00 2001 From: Karsten Jeschkies Date: Fri, 26 May 2023 09:46:43 +0200 Subject: [PATCH 17/23] Pass emtpy TLS config to Loki Canary client. (#9516) --- cmd/loki-canary/main.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/cmd/loki-canary/main.go b/cmd/loki-canary/main.go index e5b092d7aae5..49f4e1419e4c 100644 --- a/cmd/loki-canary/main.go +++ b/cmd/loki-canary/main.go @@ -111,9 +111,7 @@ func main() { } var tlsConfig *tls.Config - tc := config.TLSConfig{ - InsecureSkipVerify: *insecureSkipVerify, - } + tc := config.TLSConfig{} if *certFile != "" || *keyFile != "" || *caFile != "" { if !*useTLS { _, _ = fmt.Fprintf(os.Stderr, "Must set --tls when specifying client certs\n") @@ -122,8 +120,18 @@ func main() { tc.CAFile = *caFile tc.CertFile = *certFile tc.KeyFile = *keyFile - } - if *useTLS { + tc.InsecureSkipVerify = *insecureSkipVerify + + var err error + tlsConfig, err = config.NewTLSConfig(&tc) + if err != nil { + _, _ = fmt.Fprintf(os.Stderr, "TLS configuration error: %s\n", err.Error()) + os.Exit(1) + } + } else if *useTLS && *insecureSkipVerify { + // Case where cert cannot be trusted but we are also not using mTLS. + tc.InsecureSkipVerify = *insecureSkipVerify + var err error tlsConfig, err = config.NewTLSConfig(&tc) if err != nil { From 9399ed930a594fcc55a3e03666604ec0fc6b26c0 Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Fri, 26 May 2023 09:48:40 +0200 Subject: [PATCH 18/23] Fix wrong error check (#9518) I am afraid I broke main with #9502. It seem to have auto-merged with failing tests :cry: --- pkg/analytics/stats_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/analytics/stats_test.go b/pkg/analytics/stats_test.go index af0e0108513a..8c676af35865 100644 --- a/pkg/analytics/stats_test.go +++ b/pkg/analytics/stats_test.go @@ -83,7 +83,7 @@ func TestCounterRace(t *testing.T) { return nil }) - require.NoError(g.Wait()) + require.NoError(t, g.Wait()) require.Equal(t, NewCounter(counterName).total.Load(), int64(300)) } From 65b5df68ff630bac65ed704601b96c9a2f2f0307 Mon Sep 17 00:00:00 2001 From: oleksii-boiko-ua Date: Fri, 26 May 2023 11:05:23 +0300 Subject: [PATCH 19/23] helm: fix breaking sts change (#9528) **What this PR does / why we need it**: It fixes the breaking change I introduced by changing sts podManagementPolicy from Parallel to OrderedReady **Which issue(s) this PR fixes**: Fixes #9524 **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Documentation added - [ ] Tests updated - [x] `CHANGELOG.md` updated - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` - [x] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213) Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> --- docs/sources/installation/helm/reference.md | 27 +++++++++++++++++++ production/helm/loki/CHANGELOG.md | 4 +++ production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../backend/statefulset-backend.yaml | 2 +- .../loki/templates/read/statefulset-read.yaml | 2 +- .../templates/write/statefulset-write.yaml | 2 +- production/helm/loki/values.yaml | 6 +++++ 8 files changed, 42 insertions(+), 5 deletions(-) diff --git a/docs/sources/installation/helm/reference.md b/docs/sources/installation/helm/reference.md index 7de274aa5275..06965e470aae 100644 --- a/docs/sources/installation/helm/reference.md +++ b/docs/sources/installation/helm/reference.md @@ -236,6 +236,15 @@ null
 {}
 
+ + + + backend.podManagementPolicy + string + The default is to deploy all pods in parallel. +
+"Parallel"
+
@@ -3048,6 +3057,15 @@ null
 {}
 
+ + + + read.podManagementPolicy + string + The default is to deploy all pods in parallel. +
+"Parallel"
+
@@ -4022,6 +4040,15 @@ null
 {}
 
+ + + + write.podManagementPolicy + string + The default is to deploy all pods in parallel. +
+"Parallel"
+
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 5dde3e2687f3..b49b83eedfb7 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.5.7 + +- [BUGFIX] Fix breaking helm upgrade by changing sts podManagementPolicy from Parallel to OrderedReady which fails since that field cannot be modified on sts. + ## 5.5.6 - [FEATURE] Add hpa templates for read, write and backend. diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 9976bb270a2f..5fb1ebcca6f2 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.8.2 -version: 5.5.6 +version: 5.5.7 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index 85239d198c49..b53703ade267 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.5.6](https://img.shields.io/badge/Version-5.5.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) +![Version: 5.5.7](https://img.shields.io/badge/Version-5.5.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/backend/statefulset-backend.yaml b/production/helm/loki/templates/backend/statefulset-backend.yaml index 59816a47490f..4124f7d22998 100644 --- a/production/helm/loki/templates/backend/statefulset-backend.yaml +++ b/production/helm/loki/templates/backend/statefulset-backend.yaml @@ -13,7 +13,7 @@ spec: {{- if not .Values.backend.autoscaling.enabled }} replicas: {{ .Values.backend.replicas }} {{- end }} - podManagementPolicy: Parallel + podManagementPolicy: {{ .Values.backend.podManagementPolicy }} updateStrategy: rollingUpdate: partition: 0 diff --git a/production/helm/loki/templates/read/statefulset-read.yaml b/production/helm/loki/templates/read/statefulset-read.yaml index b4eb9ba369fb..2998633fe6ca 100644 --- a/production/helm/loki/templates/read/statefulset-read.yaml +++ b/production/helm/loki/templates/read/statefulset-read.yaml @@ -13,7 +13,7 @@ spec: {{- if not .Values.read.autoscaling.enabled }} replicas: {{ .Values.read.replicas }} {{- end }} - podManagementPolicy: Parallel + podManagementPolicy: {{ .Values.read.podManagementPolicy }} updateStrategy: rollingUpdate: partition: 0 diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml index b1756e4321a2..c73e5e4f348b 100644 --- a/production/helm/loki/templates/write/statefulset-write.yaml +++ b/production/helm/loki/templates/write/statefulset-write.yaml @@ -12,7 +12,7 @@ spec: {{- if not .Values.write.autoscaling.enabled }} replicas: {{ .Values.write.replicas }} {{- end }} - podManagementPolicy: OrderedReady + podManagementPolicy: {{ .Values.write.podManagementPolicy }} updateStrategy: rollingUpdate: partition: 0 diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 3b1aafad51de..32d249b2b449 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -729,6 +729,8 @@ write: nodeSelector: {} # -- Tolerations for write pods tolerations: [] + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" persistence: # -- Enable StatefulSetAutoDeletePVC feature enableStatefulSetAutoDeletePVC: false @@ -880,6 +882,8 @@ read: nodeSelector: {} # -- Tolerations for read pods tolerations: [] + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" persistence: # -- Enable StatefulSetAutoDeletePVC feature enableStatefulSetAutoDeletePVC: true @@ -972,6 +976,8 @@ backend: nodeSelector: {} # -- Tolerations for backend pods tolerations: [] + # -- The default is to deploy all pods in parallel. + podManagementPolicy: "Parallel" persistence: # -- Enable StatefulSetAutoDeletePVC feature enableStatefulSetAutoDeletePVC: true From b4dd0ca4329a11ec5f07c6db29767ad4e529662f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 10:28:32 +0100 Subject: [PATCH 20/23] Bump github.com/alicebob/miniredis/v2 from 2.30.0 to 2.30.2 (#9461) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [github.com/alicebob/miniredis/v2](https://github.com/alicebob/miniredis) from 2.30.0 to 2.30.2.
Release notes

Sourced from github.com/alicebob/miniredis/v2's releases.

XADD minid, BLMOVE, COMMAND fix, XREAD fix

SET NX GET

  • support SET NX GET special case
Changelog

Sourced from github.com/alicebob/miniredis/v2's changelog.

v2.30.2

v2.30.1

  • support SET NX GET special case
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/alicebob/miniredis/v2&package-manager=go_modules&previous-version=2.30.0&new-version=2.30.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 +- go.sum | 8 +- .../alicebob/miniredis/v2/CHANGELOG.md | 13 + .../github.com/alicebob/miniredis/v2/Makefile | 2 +- .../alicebob/miniredis/v2/README.md | 1 + .../alicebob/miniredis/v2/cmd_command.go | 2037 +---------------- .../alicebob/miniredis/v2/cmd_list.go | 77 + .../alicebob/miniredis/v2/cmd_stream.go | 31 +- .../alicebob/miniredis/v2/cmd_string.go | 36 +- .../alicebob/miniredis/v2/stream.go | 17 + vendor/github.com/yuin/gopher-lua/.travis.yml | 18 - vendor/github.com/yuin/gopher-lua/README.rst | 16 +- vendor/github.com/yuin/gopher-lua/_vm.go | 2 +- vendor/github.com/yuin/gopher-lua/ast/stmt.go | 12 + vendor/github.com/yuin/gopher-lua/compile.go | 287 ++- .../github.com/yuin/gopher-lua/parse/lexer.go | 16 +- .../yuin/gopher-lua/parse/parser.go | 615 ++--- .../yuin/gopher-lua/parse/parser.go.y | 12 +- vendor/github.com/yuin/gopher-lua/vm.go | 2 +- vendor/modules.txt | 4 +- 20 files changed, 771 insertions(+), 2439 deletions(-) delete mode 100644 vendor/github.com/yuin/gopher-lua/.travis.yml diff --git a/go.mod b/go.mod index fadfdefc998b..672adc505ba2 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/NYTimes/gziphandler v1.1.1 github.com/Shopify/sarama v1.38.1 github.com/Workiva/go-datastructures v1.0.53 - github.com/alicebob/miniredis/v2 v2.30.0 + github.com/alicebob/miniredis/v2 v2.30.2 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/aws/aws-sdk-go v1.44.217 github.com/baidubce/bce-sdk-go v0.9.141 @@ -285,7 +285,7 @@ require ( github.com/willf/bitset v1.1.11 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect - github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 // indirect + github.com/yuin/gopher-lua v1.1.0 // indirect go.etcd.io/etcd/api/v3 v3.5.4 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect go.etcd.io/etcd/client/v3 v3.5.4 // indirect diff --git a/go.sum b/go.sum index 836b0f2c2628..7f4547610a89 100644 --- a/go.sum +++ b/go.sum @@ -537,8 +537,8 @@ github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAu github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= -github.com/alicebob/miniredis/v2 v2.30.0 h1:uA3uhDbCxfO9+DI/DuGeAMr9qI+noVWwGPNTFuKID5M= -github.com/alicebob/miniredis/v2 v2.30.0/go.mod h1:84TWKZlxYkfgMucPBf5SOQBYJceZeQRFIaQgNMiCX6Q= +github.com/alicebob/miniredis/v2 v2.30.2 h1:lc1UAUT9ZA7h4srlfBmBt2aorm5Yftk9nBjxz7EyY9I= +github.com/alicebob/miniredis/v2 v2.30.2/go.mod h1:b25qWj4fCEsBeAAR2mlb0ufImGC6uH3VlUfb/HS5zKg= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/amir/raidman v0.0.0-20170415203553-1ccc43bfb9c9/go.mod h1:eliMa/PW+RDr2QLWRmLH1R1ZA4RInpmvOzDDXtaIZkc= @@ -1780,8 +1780,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v0.0.0-20180630135845-46796da1b0b4/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= -github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= -github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= +github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= diff --git a/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md b/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md index d9700af64e9e..8ee3721edf83 100644 --- a/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md +++ b/vendor/github.com/alicebob/miniredis/v2/CHANGELOG.md @@ -1,6 +1,19 @@ ## Changelog +### v2.30.2 + +- support MINID in XADD (thanks @nathan-cormier) +- support BLMOVE (thanks @sevein) +- fix COMMAND (thanks @pje) +- fix 'XREAD ... $' on a non-existing stream + + +### v2.30.1 + +- support SET NX GET special case + + ### v2.30.0 - implement redis 7.0.x (from 6.X). Main changes: diff --git a/vendor/github.com/alicebob/miniredis/v2/Makefile b/vendor/github.com/alicebob/miniredis/v2/Makefile index 2aa4cd2c5734..125f574cffe4 100644 --- a/vendor/github.com/alicebob/miniredis/v2/Makefile +++ b/vendor/github.com/alicebob/miniredis/v2/Makefile @@ -9,4 +9,4 @@ testrace: go test -race ./... int: - ${MAKE} -C integration all + INT=1 go test ./... diff --git a/vendor/github.com/alicebob/miniredis/v2/README.md b/vendor/github.com/alicebob/miniredis/v2/README.md index 24df8603c5ce..3ec7ea28429c 100644 --- a/vendor/github.com/alicebob/miniredis/v2/README.md +++ b/vendor/github.com/alicebob/miniredis/v2/README.md @@ -127,6 +127,7 @@ Implemented commands: - RPUSH - RPUSHX - LMOVE + - BLMOVE - Pub/Sub (complete) - PSUBSCRIBE - PUBLISH diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_command.go b/vendor/github.com/alicebob/miniredis/v2/cmd_command.go index d82174f2f2e7..8f73b2bac427 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_command.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_command.go @@ -7,2039 +7,8 @@ import "github.com/alicebob/miniredis/v2/server" func (m *Miniredis) cmdCommand(c *server.Peer, cmd string, args []string) { // Got from redis 5.0.7 with // echo 'COMMAND' | nc redis_addr redis_port - // - res := ` -*200 -*6 -$12 -hincrbyfloat -:4 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$10 -xreadgroup -:-7 -*3 -+write -+noscript -+movablekeys -:1 -:1 -:1 -*6 -$10 -sdiffstore -:-3 -*2 -+write -+denyoom -:1 -:-1 -:1 -*6 -$8 -lastsave -:1 -*2 -+random -+fast -:0 -:0 -:0 -*6 -$5 -setnx -:3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$8 -bzpopmax -:-3 -*3 -+write -+noscript -+fast -:1 -:-2 -:1 -*6 -$12 -punsubscribe -:-1 -*4 -+pubsub -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$4 -xack -:-4 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$10 -pfselftest -:1 -*1 -+admin -:0 -:0 -:0 -*6 -$6 -substr -:4 -*1 -+readonly -:1 -:1 -:1 -*6 -$8 -smembers -:2 -*2 -+readonly -+sort_for_script -:1 -:1 -:1 -*6 -$11 -unsubscribe -:-1 -*4 -+pubsub -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$11 -zinterstore -:-4 -*3 -+write -+denyoom -+movablekeys -:0 -:0 -:0 -*6 -$6 -strlen -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$7 -pfmerge -:-2 -*2 -+write -+denyoom -:1 -:-1 -:1 -*6 -$9 -randomkey -:1 -*2 -+readonly -+random -:0 -:0 -:0 -*6 -$6 -lolwut -:-1 -*1 -+readonly -:0 -:0 -:0 -*6 -$4 -rpop -:2 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$5 -hkeys -:2 -*2 -+readonly -+sort_for_script -:1 -:1 -:1 -*6 -$6 -client -:-2 -*2 -+admin -+noscript -:0 -:0 -:0 -*6 -$6 -module -:-2 -*2 -+admin -+noscript -:0 -:0 -:0 -*6 -$7 -slowlog -:-2 -*2 -+admin -+random -:0 -:0 -:0 -*6 -$7 -geohash -:-2 -*1 -+readonly -:1 -:1 -:1 -*6 -$6 -lrange -:4 -*1 -+readonly -:1 -:1 -:1 -*6 -$4 -ping -:-1 -*2 -+stale -+fast -:0 -:0 -:0 -*6 -$8 -bitcount -:-2 -*1 -+readonly -:1 -:1 -:1 -*6 -$6 -pubsub -:-2 -*4 -+pubsub -+random -+loading -+stale -:0 -:0 -:0 -*6 -$4 -role -:1 -*3 -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$4 -hget -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -object -:-2 -*2 -+readonly -+random -:2 -:2 -:1 -*6 -$9 -zrevrange -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$7 -hincrby -:4 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$9 -zlexcount -:4 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$5 -scard -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -append -:3 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$7 -hstrlen -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -config -:-2 -*4 -+admin -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$4 -hset -:-4 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$16 -zrevrangebyscore -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$4 -incr -:2 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$6 -setbit -:4 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$9 -rpoplpush -:3 -*2 -+write -+denyoom -:1 -:2 -:1 -*6 -$6 -xclaim -:-6 -*3 -+write -+random -+fast -:1 -:1 -:1 -*6 -$11 -sinterstore -:-3 -*2 -+write -+denyoom -:1 -:-1 -:1 -*6 -$7 -publish -:3 -*4 -+pubsub -+loading -+stale -+fast -:0 -:0 -:0 -*6 -$5 -hscan -:-3 -*2 -+readonly -+random -:1 -:1 -:1 -*6 -$5 -multi -:1 -*2 -+noscript -+fast -:0 -:0 -:0 -*6 -$3 -set -:-3 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$6 -lpushx -:-3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$16 -zremrangebyscore -:4 -*1 -+write -:1 -:1 -:1 -*6 -$9 -pexpireat -:3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$4 -hdel -:-3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$12 -bgrewriteaof -:1 -*2 -+admin -+noscript -:0 -:0 -:0 -*6 -$7 -migrate -:-6 -*3 -+write -+random -+movablekeys -:0 -:0 -:0 -*6 -$9 -replicaof -:3 -*3 -+admin -+noscript -+stale -:0 -:0 -:0 -*6 -$5 -touch -:-2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -xsetid -:3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$5 -bitop -:-4 -*2 -+write -+denyoom -:2 -:-1 -:1 -*6 -$6 -swapdb -:3 -*2 -+write -+fast -:0 -:0 -:0 -*6 -$5 -sdiff -:-2 -*2 -+readonly -+sort_for_script -:1 -:-1 -:1 -*6 -$6 -lindex -:3 -*1 -+readonly -:1 -:1 -:1 -*6 -$4 -wait -:3 -*1 -+noscript -:0 -:0 -:0 -*6 -$4 -lrem -:4 -*1 -+write -:1 -:1 -:1 -*6 -$6 -hsetnx -:4 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$8 -getrange -:4 -*1 -+readonly -:1 -:1 -:1 -*6 -$4 -hlen -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$4 -post -:-1 -*2 -+loading -+stale -:0 -:0 -:0 -*6 -$9 -sismember -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$7 -unwatch -:1 -*2 -+noscript -+fast -:0 -:0 -:0 -*6 -$5 -lpush -:-3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$4 -scan -:-2 -*2 -+readonly -+random -:0 -:0 -:0 -*6 -$5 -smove -:4 -*2 -+write -+fast -:1 -:2 -:1 -*6 -$7 -cluster -:-2 -*1 -+admin -:0 -:0 -:0 -*6 -$6 -bgsave -:-1 -*2 -+admin -+noscript -:0 -:0 -:0 -*6 -$4 -dump -:2 -*2 -+readonly -+random -:1 -:1 -:1 -*6 -$7 -latency -:-2 -*4 -+admin -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$8 -bzpopmin -:-3 -*3 -+write -+noscript -+fast -:1 -:-2 -:1 -*6 -$6 -getbit -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$7 -hgetall -:2 -*2 -+readonly -+random -:1 -:1 -:1 -*6 -$6 -rename -:3 -*1 -+write -:1 -:2 -:1 -*6 -$9 -subscribe -:-2 -*4 -+pubsub -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$4 -xdel -:-3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$15 -zremrangebyrank -:4 -*1 -+write -:1 -:1 -:1 -*6 -$4 -type -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -script -:-2 -*1 -+noscript -:0 -:0 -:0 -*6 -$5 -hmset -:-4 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$6 -sunion -:-2 -*2 -+readonly -+sort_for_script -:1 -:-1 -:1 -*6 -$4 -mget -:-2 -*2 -+readonly -+fast -:1 -:-1 -:1 -*6 -$10 -brpoplpush -:4 -*3 -+write -+denyoom -+noscript -:1 -:2 -:1 -*6 -$6 -geoadd -:-5 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$6 -decrby -:3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$4 -echo -:2 -*1 -+fast -:0 -:0 -:0 -*6 -$6 -dbsize -:1 -*2 -+readonly -+fast -:0 -:0 -:0 -*6 -$5 -zcard -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -select -:2 -*2 -+loading -+fast -:0 -:0 -:0 -*6 -$4 -sadd -:-3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$5 -host: -:-1 -*2 -+loading -+stale -:0 -:0 -:0 -*6 -$5 -sscan -:-3 -*2 -+readonly -+random -:1 -:1 -:1 -*6 -$12 -georadius_ro -:-6 -*2 -+readonly -+movablekeys -:1 -:1 -:1 -*6 -$7 -monitor -:1 -*2 -+admin -+noscript -:0 -:0 -:0 -*6 -$14 -zremrangebylex -:4 -*1 -+write -:1 -:1 -:1 -*6 -$11 -sunionstore -:-3 -*2 -+write -+denyoom -:1 -:-1 -:1 -*6 -$5 -zscan -:-3 -*2 -+readonly -+random -:1 -:1 -:1 -*6 -$9 -readwrite -:1 -*1 -+fast -:0 -:0 -:0 -*6 -$6 -xgroup -:-2 -*2 -+write -+denyoom -:2 -:2 -:1 -*6 -$5 -setex -:4 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$4 -save -:1 -*2 -+admin -+noscript -:0 -:0 -:0 -*6 -$5 -hvals -:2 -*2 -+readonly -+sort_for_script -:1 -:1 -:1 -*6 -$5 -watch -:-2 -*2 -+noscript -+fast -:1 -:-1 -:1 -*6 -$7 -hexists -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$4 -info -:-1 -*3 -+random -+loading -+stale -:0 -:0 -:0 -*6 -$5 -psync -:3 -*3 -+readonly -+admin -+noscript -:0 -:0 -:0 -*6 -$11 -zrangebylex -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$4 -zadd -:-4 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$4 -xlen -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$4 -auth -:2 -*4 -+noscript -+loading -+stale -+fast -:0 -:0 -:0 -*6 -$4 -srem -:-3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$9 -georadius -:-6 -*2 -+write -+movablekeys -:1 -:1 -:1 -*6 -$4 -exec -:1 -*2 -+noscript -+skip_monitor -:0 -:0 -:0 -*6 -$7 -pfcount -:-2 -*1 -+readonly -:1 -:-1 -:1 -*6 -$7 -zpopmin -:-2 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$4 -move -:3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$5 -xtrim -:-2 -*3 -+write -+random -+fast -:1 -:1 -:1 -*6 -$6 -asking -:1 -*1 -+fast -:0 -:0 -:0 -*6 -$4 -pttl -:2 -*3 -+readonly -+random -+fast -:1 -:1 -:1 -*6 -$11 -srandmember -:-2 -*2 -+readonly -+random -:1 -:1 -:1 -*6 -$8 -flushall -:-1 -*1 -+write -:0 -:0 -:0 -*6 -$4 -sort -:-2 -*3 -+write -+denyoom -+movablekeys -:1 -:1 -:1 -*6 -$3 -del -:-2 -*1 -+write -:1 -:-1 -:1 -*6 -$14 -restore-asking -:-4 -*3 -+write -+denyoom -+asking -:1 -:1 -:1 -*6 -$10 -psubscribe -:-2 -*4 -+pubsub -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$4 -decr -:2 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$6 -incrby -:3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$14 -zrevrangebylex -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$8 -bitfield -:-2 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$6 -exists -:-2 -*2 -+readonly -+fast -:1 -:-1 -:1 -*6 -$8 -replconf -:-1 -*4 -+admin -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$7 -zincrby -:4 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$5 -blpop -:-3 -*2 -+write -+noscript -:1 -:-2 -:1 -*6 -$4 -lpop -:2 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$3 -ttl -:2 -*3 -+readonly -+random -+fast -:1 -:1 -:1 -*6 -$5 -xread -:-4 -*3 -+readonly -+noscript -+movablekeys -:1 -:1 -:1 -*6 -$5 -rpush -:-3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$8 -zrevrank -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$11 -incrbyfloat -:3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$5 -brpop -:-3 -*2 -+write -+noscript -:1 -:-2 -:1 -*6 -$4 -xadd -:-5 -*4 -+write -+denyoom -+random -+fast -:1 -:1 -:1 -*6 -$8 -setrange -:4 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$17 -georadiusbymember -:-5 -*2 -+write -+movablekeys -:1 -:1 -:1 -*6 -$6 -unlink -:-2 -*2 -+write -+fast -:1 -:-1 -:1 -*6 -$8 -expireat -:3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$5 -debug -:-2 -*2 -+admin -+noscript -:0 -:0 -:0 -*6 -$20 -georadiusbymember_ro -:-5 -*2 -+readonly -+movablekeys -:1 -:1 -:1 -*6 -$4 -lset -:4 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$6 -zscore -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$4 -llen -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$4 -time -:1 -*2 -+random -+fast -:0 -:0 -:0 -*6 -$8 -shutdown -:-1 -*4 -+admin -+noscript -+loading -+stale -:0 -:0 -:0 -*6 -$7 -evalsha -:-3 -*2 -+noscript -+movablekeys -:0 -:0 -:0 -*6 -$6 -zcount -:4 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -memory -:-2 -*2 -+readonly -+random -:0 -:0 -:0 -*6 -$5 -xinfo -:-2 -*2 -+readonly -+random -:2 -:2 -:1 -*6 -$8 -xpending -:-3 -*2 -+readonly -+random -:1 -:1 -:1 -*6 -$4 -eval -:-3 -*2 -+noscript -+movablekeys -:0 -:0 -:0 -*6 -$6 -xrange -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$7 -restore -:-4 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$7 -zpopmax -:-2 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$4 -mset -:-3 -*2 -+write -+denyoom -:1 -:-1 -:2 -*6 -$4 -spop -:-2 -*3 -+write -+random -+fast -:1 -:1 -:1 -*6 -$5 -ltrim -:4 -*1 -+write -:1 -:1 -:1 -*6 -$5 -zrank -:3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$9 -xrevrange -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$3 -get -:2 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$7 -flushdb -:-1 -*1 -+write -:0 -:0 -:0 -*6 -$5 -hmget -:-3 -*2 -+readonly -+fast -:1 -:1 -:1 -*6 -$6 -msetnx -:-3 -*2 -+write -+denyoom -:1 -:-1 -:2 -*6 -$7 -persist -:2 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$11 -zunionstore -:-4 -*3 -+write -+denyoom -+movablekeys -:0 -:0 -:0 -*6 -$7 -command -:0 -*3 -+random -+loading -+stale -:0 -:0 -:0 -*6 -$8 -renamenx -:3 -*2 -+write -+fast -:1 -:2 -:1 -*6 -$6 -zrange -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$7 -pexpire -:3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$4 -keys -:2 -*2 -+readonly -+sort_for_script -:0 -:0 -:0 -*6 -$4 -zrem -:-3 -*2 -+write -+fast -:1 -:1 -:1 -*6 -$5 -pfadd -:-2 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$6 -psetex -:4 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$13 -zrangebyscore -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$4 -sync -:1 -*3 -+readonly -+admin -+noscript -:0 -:0 -:0 -*6 -$7 -pfdebug -:-3 -*1 -+write -:0 -:0 -:0 -*6 -$7 -discard -:1 -*2 -+noscript -+fast -:0 -:0 -:0 -*6 -$8 -readonly -:1 -*1 -+fast -:0 -:0 -:0 -*6 -$7 -geodist -:-4 -*1 -+readonly -:1 -:1 -:1 -*6 -$6 -geopos -:-2 -*1 -+readonly -:1 -:1 -:1 -*6 -$6 -bitpos -:-3 -*1 -+readonly -:1 -:1 -:1 -*6 -$6 -sinter -:-2 -*2 -+readonly -+sort_for_script -:1 -:-1 -:1 -*6 -$6 -getset -:3 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$7 -slaveof -:3 -*3 -+admin -+noscript -+stale -:0 -:0 -:0 -*6 -$6 -rpushx -:-3 -*3 -+write -+denyoom -+fast -:1 -:1 -:1 -*6 -$7 -linsert -:5 -*2 -+write -+denyoom -:1 -:1 -:1 -*6 -$6 -expire -:3 -*2 -+write -+fast -:1 -:1 -:1 - ` - c.WriteBulk(res) + res := "*200\r\n*6\r\n$12\r\nhincrbyfloat\r\n:4\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$10\r\nxreadgroup\r\n:-7\r\n*3\r\n+write\r\n+noscript\r\n+movablekeys\r\n:1\r\n:1\r\n:1\r\n*6\r\n$10\r\nsdiffstore\r\n:-3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$8\r\nlastsave\r\n:1\r\n*2\r\n+random\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nsetnx\r\n:3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$8\r\nbzpopmax\r\n:-3\r\n*3\r\n+write\r\n+noscript\r\n+fast\r\n:1\r\n:-2\r\n:1\r\n*6\r\n$12\r\npunsubscribe\r\n:-1\r\n*4\r\n+pubsub\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nxack\r\n:-4\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$10\r\npfselftest\r\n:1\r\n*1\r\n+admin\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nsubstr\r\n:4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$8\r\nsmembers\r\n:2\r\n*2\r\n+readonly\r\n+sort_for_script\r\n:1\r\n:1\r\n:1\r\n*6\r\n$11\r\nunsubscribe\r\n:-1\r\n*4\r\n+pubsub\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$11\r\nzinterstore\r\n:-4\r\n*3\r\n+write\r\n+denyoom\r\n+movablekeys\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nstrlen\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\npfmerge\r\n:-2\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$9\r\nrandomkey\r\n:1\r\n*2\r\n+readonly\r\n+random\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nlolwut\r\n:-1\r\n*1\r\n+readonly\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nrpop\r\n:2\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nhkeys\r\n:2\r\n*2\r\n+readonly\r\n+sort_for_script\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nclient\r\n:-2\r\n*2\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nmodule\r\n:-2\r\n*2\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\nslowlog\r\n:-2\r\n*2\r\n+admin\r\n+random\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\ngeohash\r\n:-2\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nlrange\r\n:4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nping\r\n:-1\r\n*2\r\n+stale\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$8\r\nbitcount\r\n:-2\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\npubsub\r\n:-2\r\n*4\r\n+pubsub\r\n+random\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nrole\r\n:1\r\n*3\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nhget\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nobject\r\n:-2\r\n*2\r\n+readonly\r\n+random\r\n:2\r\n:2\r\n:1\r\n*6\r\n$9\r\nzrevrange\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nhincrby\r\n:4\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$9\r\nzlexcount\r\n:4\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nscard\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nappend\r\n:3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nhstrlen\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nconfig\r\n:-2\r\n*4\r\n+admin\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nhset\r\n:-4\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$16\r\nzrevrangebyscore\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nincr\r\n:2\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nsetbit\r\n:4\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$9\r\nrpoplpush\r\n:3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:2\r\n:1\r\n*6\r\n$6\r\nxclaim\r\n:-6\r\n*3\r\n+write\r\n+random\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$11\r\nsinterstore\r\n:-3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$7\r\npublish\r\n:3\r\n*4\r\n+pubsub\r\n+loading\r\n+stale\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nhscan\r\n:-3\r\n*2\r\n+readonly\r\n+random\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nmulti\r\n:1\r\n*2\r\n+noscript\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$3\r\nset\r\n:-3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nlpushx\r\n:-3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$16\r\nzremrangebyscore\r\n:4\r\n*1\r\n+write\r\n:1\r\n:1\r\n:1\r\n*6\r\n$9\r\npexpireat\r\n:3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nhdel\r\n:-3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$12\r\nbgrewriteaof\r\n:1\r\n*2\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\nmigrate\r\n:-6\r\n*3\r\n+write\r\n+random\r\n+movablekeys\r\n:0\r\n:0\r\n:0\r\n*6\r\n$9\r\nreplicaof\r\n:3\r\n*3\r\n+admin\r\n+noscript\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\ntouch\r\n:-2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nxsetid\r\n:3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nbitop\r\n:-4\r\n*2\r\n+write\r\n+denyoom\r\n:2\r\n:-1\r\n:1\r\n*6\r\n$6\r\nswapdb\r\n:3\r\n*2\r\n+write\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nsdiff\r\n:-2\r\n*2\r\n+readonly\r\n+sort_for_script\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$6\r\nlindex\r\n:3\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nwait\r\n:3\r\n*1\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nlrem\r\n:4\r\n*1\r\n+write\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nhsetnx\r\n:4\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$8\r\ngetrange\r\n:4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nhlen\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\npost\r\n:-1\r\n*2\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$9\r\nsismember\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nunwatch\r\n:1\r\n*2\r\n+noscript\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nlpush\r\n:-3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nscan\r\n:-2\r\n*2\r\n+readonly\r\n+random\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nsmove\r\n:4\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:2\r\n:1\r\n*6\r\n$7\r\ncluster\r\n:-2\r\n*1\r\n+admin\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nbgsave\r\n:-1\r\n*2\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\ndump\r\n:2\r\n*2\r\n+readonly\r\n+random\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nlatency\r\n:-2\r\n*4\r\n+admin\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$8\r\nbzpopmin\r\n:-3\r\n*3\r\n+write\r\n+noscript\r\n+fast\r\n:1\r\n:-2\r\n:1\r\n*6\r\n$6\r\ngetbit\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nhgetall\r\n:2\r\n*2\r\n+readonly\r\n+random\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nrename\r\n:3\r\n*1\r\n+write\r\n:1\r\n:2\r\n:1\r\n*6\r\n$9\r\nsubscribe\r\n:-2\r\n*4\r\n+pubsub\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nxdel\r\n:-3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$15\r\nzremrangebyrank\r\n:4\r\n*1\r\n+write\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\ntype\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nscript\r\n:-2\r\n*1\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nhmset\r\n:-4\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nsunion\r\n:-2\r\n*2\r\n+readonly\r\n+sort_for_script\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$4\r\nmget\r\n:-2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$10\r\nbrpoplpush\r\n:4\r\n*3\r\n+write\r\n+denyoom\r\n+noscript\r\n:1\r\n:2\r\n:1\r\n*6\r\n$6\r\ngeoadd\r\n:-5\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\ndecrby\r\n:3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\necho\r\n:2\r\n*1\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\ndbsize\r\n:1\r\n*2\r\n+readonly\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nzcard\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nselect\r\n:2\r\n*2\r\n+loading\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nsadd\r\n:-3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nhost:\r\n:-1\r\n*2\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nsscan\r\n:-3\r\n*2\r\n+readonly\r\n+random\r\n:1\r\n:1\r\n:1\r\n*6\r\n$12\r\ngeoradius_ro\r\n:-6\r\n*2\r\n+readonly\r\n+movablekeys\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nmonitor\r\n:1\r\n*2\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$14\r\nzremrangebylex\r\n:4\r\n*1\r\n+write\r\n:1\r\n:1\r\n:1\r\n*6\r\n$11\r\nsunionstore\r\n:-3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$5\r\nzscan\r\n:-3\r\n*2\r\n+readonly\r\n+random\r\n:1\r\n:1\r\n:1\r\n*6\r\n$9\r\nreadwrite\r\n:1\r\n*1\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nxgroup\r\n:-2\r\n*2\r\n+write\r\n+denyoom\r\n:2\r\n:2\r\n:1\r\n*6\r\n$5\r\nsetex\r\n:4\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nsave\r\n:1\r\n*2\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nhvals\r\n:2\r\n*2\r\n+readonly\r\n+sort_for_script\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nwatch\r\n:-2\r\n*2\r\n+noscript\r\n+fast\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$7\r\nhexists\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\ninfo\r\n:-1\r\n*3\r\n+random\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\npsync\r\n:3\r\n*3\r\n+readonly\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$11\r\nzrangebylex\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nzadd\r\n:-4\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nxlen\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nauth\r\n:2\r\n*4\r\n+noscript\r\n+loading\r\n+stale\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nsrem\r\n:-3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$9\r\ngeoradius\r\n:-6\r\n*2\r\n+write\r\n+movablekeys\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nexec\r\n:1\r\n*2\r\n+noscript\r\n+skip_monitor\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\npfcount\r\n:-2\r\n*1\r\n+readonly\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$7\r\nzpopmin\r\n:-2\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nmove\r\n:3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nxtrim\r\n:-2\r\n*3\r\n+write\r\n+random\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nasking\r\n:1\r\n*1\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\npttl\r\n:2\r\n*3\r\n+readonly\r\n+random\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$11\r\nsrandmember\r\n:-2\r\n*2\r\n+readonly\r\n+random\r\n:1\r\n:1\r\n:1\r\n*6\r\n$8\r\nflushall\r\n:-1\r\n*1\r\n+write\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nsort\r\n:-2\r\n*3\r\n+write\r\n+denyoom\r\n+movablekeys\r\n:1\r\n:1\r\n:1\r\n*6\r\n$3\r\ndel\r\n:-2\r\n*1\r\n+write\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$14\r\nrestore-asking\r\n:-4\r\n*3\r\n+write\r\n+denyoom\r\n+asking\r\n:1\r\n:1\r\n:1\r\n*6\r\n$10\r\npsubscribe\r\n:-2\r\n*4\r\n+pubsub\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\ndecr\r\n:2\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nincrby\r\n:3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$14\r\nzrevrangebylex\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$8\r\nbitfield\r\n:-2\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nexists\r\n:-2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$8\r\nreplconf\r\n:-1\r\n*4\r\n+admin\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\nzincrby\r\n:4\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nblpop\r\n:-3\r\n*2\r\n+write\r\n+noscript\r\n:1\r\n:-2\r\n:1\r\n*6\r\n$4\r\nlpop\r\n:2\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$3\r\nttl\r\n:2\r\n*3\r\n+readonly\r\n+random\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nxread\r\n:-4\r\n*3\r\n+readonly\r\n+noscript\r\n+movablekeys\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nrpush\r\n:-3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$8\r\nzrevrank\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$11\r\nincrbyfloat\r\n:3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nbrpop\r\n:-3\r\n*2\r\n+write\r\n+noscript\r\n:1\r\n:-2\r\n:1\r\n*6\r\n$4\r\nxadd\r\n:-5\r\n*4\r\n+write\r\n+denyoom\r\n+random\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$8\r\nsetrange\r\n:4\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$17\r\ngeoradiusbymember\r\n:-5\r\n*2\r\n+write\r\n+movablekeys\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nunlink\r\n:-2\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$8\r\nexpireat\r\n:3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\ndebug\r\n:-2\r\n*2\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$20\r\ngeoradiusbymember_ro\r\n:-5\r\n*2\r\n+readonly\r\n+movablekeys\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nlset\r\n:4\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nzscore\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nllen\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\ntime\r\n:1\r\n*2\r\n+random\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$8\r\nshutdown\r\n:-1\r\n*4\r\n+admin\r\n+noscript\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\nevalsha\r\n:-3\r\n*2\r\n+noscript\r\n+movablekeys\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nzcount\r\n:4\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nmemory\r\n:-2\r\n*2\r\n+readonly\r\n+random\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nxinfo\r\n:-2\r\n*2\r\n+readonly\r\n+random\r\n:2\r\n:2\r\n:1\r\n*6\r\n$8\r\nxpending\r\n:-3\r\n*2\r\n+readonly\r\n+random\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\neval\r\n:-3\r\n*2\r\n+noscript\r\n+movablekeys\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nxrange\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nrestore\r\n:-4\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nzpopmax\r\n:-2\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nmset\r\n:-3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:-1\r\n:2\r\n*6\r\n$4\r\nspop\r\n:-2\r\n*3\r\n+write\r\n+random\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nltrim\r\n:4\r\n*1\r\n+write\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\nzrank\r\n:3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$9\r\nxrevrange\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$3\r\nget\r\n:2\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nflushdb\r\n:-1\r\n*1\r\n+write\r\n:0\r\n:0\r\n:0\r\n*6\r\n$5\r\nhmget\r\n:-3\r\n*2\r\n+readonly\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nmsetnx\r\n:-3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:-1\r\n:2\r\n*6\r\n$7\r\npersist\r\n:2\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$11\r\nzunionstore\r\n:-4\r\n*3\r\n+write\r\n+denyoom\r\n+movablekeys\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\ncommand\r\n:0\r\n*3\r\n+random\r\n+loading\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$8\r\nrenamenx\r\n:3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:2\r\n:1\r\n*6\r\n$6\r\nzrange\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\npexpire\r\n:3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nkeys\r\n:2\r\n*2\r\n+readonly\r\n+sort_for_script\r\n:0\r\n:0\r\n:0\r\n*6\r\n$4\r\nzrem\r\n:-3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$5\r\npfadd\r\n:-2\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\npsetex\r\n:4\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$13\r\nzrangebyscore\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$4\r\nsync\r\n:1\r\n*3\r\n+readonly\r\n+admin\r\n+noscript\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\npfdebug\r\n:-3\r\n*1\r\n+write\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\ndiscard\r\n:1\r\n*2\r\n+noscript\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$8\r\nreadonly\r\n:1\r\n*1\r\n+fast\r\n:0\r\n:0\r\n:0\r\n*6\r\n$7\r\ngeodist\r\n:-4\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\ngeopos\r\n:-2\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nbitpos\r\n:-3\r\n*1\r\n+readonly\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nsinter\r\n:-2\r\n*2\r\n+readonly\r\n+sort_for_script\r\n:1\r\n:-1\r\n:1\r\n*6\r\n$6\r\ngetset\r\n:3\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nslaveof\r\n:3\r\n*3\r\n+admin\r\n+noscript\r\n+stale\r\n:0\r\n:0\r\n:0\r\n*6\r\n$6\r\nrpushx\r\n:-3\r\n*3\r\n+write\r\n+denyoom\r\n+fast\r\n:1\r\n:1\r\n:1\r\n*6\r\n$7\r\nlinsert\r\n:5\r\n*2\r\n+write\r\n+denyoom\r\n:1\r\n:1\r\n:1\r\n*6\r\n$6\r\nexpire\r\n:3\r\n*2\r\n+write\r\n+fast\r\n:1\r\n:1\r\n:1\r\n" + + c.WriteRaw(res) } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_list.go b/vendor/github.com/alicebob/miniredis/v2/cmd_list.go index 0e74373b0173..3d1cd02eaa3d 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_list.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_list.go @@ -38,6 +38,7 @@ func commandsList(m *Miniredis) { m.srv.Register("RPUSH", m.cmdRpush) m.srv.Register("RPUSHX", m.cmdRpushx) m.srv.Register("LMOVE", m.cmdLmove) + m.srv.Register("BLMOVE", m.cmdBlmove) } // BLPOP @@ -975,3 +976,79 @@ func (m *Miniredis) cmdLmove(c *server.Peer, cmd string, args []string) { c.WriteBulk(elem) }) } + +// BLMOVE +func (m *Miniredis) cmdBlmove(c *server.Peer, cmd string, args []string) { + if len(args) != 5 { + setDirty(c) + c.WriteError(errWrongNumber(cmd)) + return + } + if !m.handleAuth(c) { + return + } + if m.checkPubsub(c, cmd) { + return + } + + opts := struct { + src string + dst string + srcDir string + dstDir string + timeout time.Duration + }{ + src: args[0], + dst: args[1], + srcDir: strings.ToLower(args[2]), + dstDir: strings.ToLower(args[3]), + } + if ok := optDuration(c, args[len(args)-1], &opts.timeout); !ok { + return + } + + blocking( + m, + c, + opts.timeout, + func(c *server.Peer, ctx *connCtx) bool { + db := m.db(ctx.selectedDB) + + if !db.exists(opts.src) { + return false + } + if db.t(opts.src) != "list" || (db.exists(opts.dst) && db.t(opts.dst) != "list") { + c.WriteError(msgWrongType) + return true + } + + var elem string + switch opts.srcDir { + case "left": + elem = db.listLpop(opts.src) + case "right": + elem = db.listPop(opts.src) + default: + c.WriteError(msgSyntaxError) + return true + } + + switch opts.dstDir { + case "left": + db.listLpush(opts.dst, elem) + case "right": + db.listPush(opts.dst, elem) + default: + c.WriteError(msgSyntaxError) + return true + } + + c.WriteBulk(elem) + return true + }, + func(c *server.Peer) { + // timeout + c.WriteLen(-1) + }, + ) +} diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go b/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go index 7735a6bafd2d..04ece5206046 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_stream.go @@ -50,6 +50,7 @@ func (m *Miniredis) cmdXadd(c *server.Peer, cmd string, args []string) { withTx(m, c, func(c *server.Peer, ctx *connCtx) { maxlen := -1 + minID := "" if strings.ToLower(args[0]) == "maxlen" { args = args[1:] // we don't treat "~" special @@ -67,6 +68,14 @@ func (m *Miniredis) cmdXadd(c *server.Peer, cmd string, args []string) { } maxlen = n args = args[1:] + } else if strings.ToLower(args[0]) == "minid" { + args = args[1:] + // we don't treat "~" special + if args[0] == "~" { + args = args[1:] + } + minID = args[0] + args = args[1:] } if len(args) < 1 { c.WriteError(errWrongNumber(cmd)) @@ -110,6 +119,9 @@ func (m *Miniredis) cmdXadd(c *server.Peer, cmd string, args []string) { if maxlen >= 0 { s.trim(maxlen) } + if minID != "" { + s.trimBefore(minID) + } db.keyVersion[key]++ c.WriteBulk(newID) @@ -932,7 +944,12 @@ parsing: return } else if id == "$" { db := m.DB(getCtx(c).selectedDB) - opts.ids[i] = db.streamKeys[opts.streams[i]].lastID() + stream, ok := db.streamKeys[opts.streams[i]] + if ok { + opts.ids[i] = stream.lastID() + } else { + opts.ids[i] = "0-0" + } } } args = nil @@ -1329,16 +1346,8 @@ func (m *Miniredis) cmdXtrim(c *server.Peer, cmd string, args []string) { s.trim(opts.maxLen) c.WriteInt(entriesBefore - len(s.entries)) case "MINID": - var delete []string - for _, entry := range s.entries { - if entry.ID < opts.threshold { - delete = append(delete, entry.ID) - } else { - break - } - } - s.delete(delete) - c.WriteInt(len(delete)) + n := s.trimBefore(opts.threshold) + c.WriteInt(n) } }) } diff --git a/vendor/github.com/alicebob/miniredis/v2/cmd_string.go b/vendor/github.com/alicebob/miniredis/v2/cmd_string.go index cec9d48343c6..b8013f2811ce 100644 --- a/vendor/github.com/alicebob/miniredis/v2/cmd_string.go +++ b/vendor/github.com/alicebob/miniredis/v2/cmd_string.go @@ -131,16 +131,27 @@ func (m *Miniredis) cmdSet(c *server.Peer, cmd string, args []string) { withTx(m, c, func(c *server.Peer, ctx *connCtx) { db := m.db(ctx.selectedDB) + readonly := false if opts.nx { if db.exists(opts.key) { - c.WriteNull() - return + if opts.get { + // special case for SET NX GET + readonly = true + } else { + c.WriteNull() + return + } } } if opts.xx { if !db.exists(opts.key) { - c.WriteNull() - return + if opts.get { + // special case for SET XX GET + readonly = true + } else { + c.WriteNull() + return + } } } if opts.keepttl { @@ -154,14 +165,17 @@ func (m *Miniredis) cmdSet(c *server.Peer, cmd string, args []string) { return } } + old, existed := db.stringKeys[opts.key] - db.del(opts.key, true) // be sure to remove existing values of other type keys. - // a vanilla SET clears the expire - if opts.ttl >= 0 { // EXAT/PXAT can expire right away - db.stringSet(opts.key, opts.value) - } - if opts.ttl != 0 { - db.ttl[opts.key] = opts.ttl + if !readonly { + db.del(opts.key, true) // be sure to remove existing values of other type keys. + // a vanilla SET clears the expire + if opts.ttl >= 0 { // EXAT/PXAT can expire right away + db.stringSet(opts.key, opts.value) + } + if opts.ttl != 0 { + db.ttl[opts.key] = opts.ttl + } } if opts.get { if !existed { diff --git a/vendor/github.com/alicebob/miniredis/v2/stream.go b/vendor/github.com/alicebob/miniredis/v2/stream.go index f59820d55ce2..9e04aa17057a 100644 --- a/vendor/github.com/alicebob/miniredis/v2/stream.go +++ b/vendor/github.com/alicebob/miniredis/v2/stream.go @@ -265,6 +265,23 @@ func (s *streamKey) trim(n int) { } } +// trimBefore deletes entries with an id less than the provided id +// and returns the number of entries deleted +func (s *streamKey) trimBefore(id string) int { + s.mu.Lock() + var delete []string + for _, entry := range s.entries { + if entry.ID < id { + delete = append(delete, entry.ID) + } else { + break + } + } + s.mu.Unlock() + s.delete(delete) + return len(delete) +} + // all entries after "id" func (s *streamKey) after(id string) []StreamEntry { s.mu.Lock() diff --git a/vendor/github.com/yuin/gopher-lua/.travis.yml b/vendor/github.com/yuin/gopher-lua/.travis.yml deleted file mode 100644 index 68df5e7b1a15..000000000000 --- a/vendor/github.com/yuin/gopher-lua/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go - -go: - - "1.9.x" - - "1.10.x" - - "1.11.x" -env: - global: - GO111MODULE=off - -before_install: - - go get github.com/axw/gocov/gocov - - go get github.com/mattn/goveralls - - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi -install: - - go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep '\.' | grep -v gopher-lua) -script: - - $HOME/gopath/bin/goveralls -service=travis-ci diff --git a/vendor/github.com/yuin/gopher-lua/README.rst b/vendor/github.com/yuin/gopher-lua/README.rst index 2b6de3259ac5..cc936311069f 100644 --- a/vendor/github.com/yuin/gopher-lua/README.rst +++ b/vendor/github.com/yuin/gopher-lua/README.rst @@ -3,14 +3,14 @@ GopherLua: VM and compiler for Lua in Go. =============================================================================== -.. image:: https://godoc.org/github.com/yuin/gopher-lua?status.svg - :target: http://godoc.org/github.com/yuin/gopher-lua +.. image:: https://pkg.go.dev/badge/github.com/yuin/gopher-lua.svg + :target: https://pkg.go.dev/github.com/yuin/gopher-lua -.. image:: https://travis-ci.org/yuin/gopher-lua.svg - :target: https://travis-ci.org/yuin/gopher-lua +.. image:: https://github.com/yuin/gopher-lua/workflows/test/badge.svg?branch=master&event=push + :target: https://github.com/yuin/gopher-lua/actions?query=workflow:test -.. image:: https://coveralls.io/repos/yuin/gopher-lua/badge.svg - :target: https://coveralls.io/r/yuin/gopher-lua +.. image:: https://coveralls.io/repos/github/yuin/gopher-lua/badge.svg?branch=master + :target: https://coveralls.io/github/yuin/gopher-lua .. image:: https://badges.gitter.im/Join%20Chat.svg :alt: Join the chat at https://gitter.im/yuin/gopher-lua @@ -19,7 +19,7 @@ GopherLua: VM and compiler for Lua in Go. | -GopherLua is a Lua5.1 VM and compiler written in Go. GopherLua has a same goal +GopherLua is a Lua5.1(+ `goto` statement in Lua5.2) VM and compiler written in Go. GopherLua has a same goal with Lua: **Be a scripting language with extensible semantics** . It provides Go APIs that allow you to easily embed a scripting language to your Go host programs. @@ -830,6 +830,8 @@ Miscellaneous notes - ``file:setvbuf`` does not support a line buffering. - Daylight saving time is not supported. - GopherLua has a function to set an environment variable : ``os.setenv(name, value)`` +- GopherLua support ``goto`` and ``::label::`` statement in Lua5.2. + - `goto` is a keyword and not a valid variable name. ---------------------------------------------------------------- Standalone interpreter diff --git a/vendor/github.com/yuin/gopher-lua/_vm.go b/vendor/github.com/yuin/gopher-lua/_vm.go index 049107e17744..687fe797a632 100644 --- a/vendor/github.com/yuin/gopher-lua/_vm.go +++ b/vendor/github.com/yuin/gopher-lua/_vm.go @@ -840,7 +840,7 @@ func luaModulo(lhs, rhs LNumber) LNumber { flhs := float64(lhs) frhs := float64(rhs) v := math.Mod(flhs, frhs) - if flhs < 0 || frhs < 0 && !(flhs < 0 && frhs < 0) { + if frhs > 0 && v < 0 || frhs < 0 && v > 0 { v += frhs } return LNumber(v) diff --git a/vendor/github.com/yuin/gopher-lua/ast/stmt.go b/vendor/github.com/yuin/gopher-lua/ast/stmt.go index 56ea6d1a23af..e24880b6e0c4 100644 --- a/vendor/github.com/yuin/gopher-lua/ast/stmt.go +++ b/vendor/github.com/yuin/gopher-lua/ast/stmt.go @@ -93,3 +93,15 @@ type ReturnStmt struct { type BreakStmt struct { StmtBase } + +type LabelStmt struct { + StmtBase + + Name string +} + +type GotoStmt struct { + StmtBase + + Label string +} diff --git a/vendor/github.com/yuin/gopher-lua/compile.go b/vendor/github.com/yuin/gopher-lua/compile.go index 75c75550e42a..c3736777a4d0 100644 --- a/vendor/github.com/yuin/gopher-lua/compile.go +++ b/vendor/github.com/yuin/gopher-lua/compile.go @@ -2,9 +2,10 @@ package lua import ( "fmt" - "github.com/yuin/gopher-lua/ast" "math" "reflect" + + "github.com/yuin/gopher-lua/ast" ) /* internal constants & structs {{{ */ @@ -94,7 +95,11 @@ func sline(pos ast.PositionHolder) int { } func eline(pos ast.PositionHolder) int { - return pos.LastLine() + line := pos.LastLine() + if line == 0 { + return pos.Line() + } + return line } func savereg(ec *expcontext, reg int) int { @@ -134,6 +139,28 @@ func lnumberValue(expr ast.Expr) (LNumber, bool) { /* utilities }}} */ +type gotoLabelDesc struct { // {{{ + Id int + Name string + Pc int + Line int + NumActiveLocalVars int +} + +func newLabelDesc(id int, name string, pc, line, n int) *gotoLabelDesc { + return &gotoLabelDesc{ + Id: id, + Name: name, + Pc: pc, + Line: line, + NumActiveLocalVars: n, + } +} + +func (l *gotoLabelDesc) SetNumActiveLocalVars(n int) { + l.NumActiveLocalVars = n +} // }}} + type CompileError struct { // {{{ context *funcContext Line int @@ -328,16 +355,18 @@ func (vp *varNamePool) Register(name string) int { /* FuncContext {{{ */ type codeBlock struct { - LocalVars *varNamePool - BreakLabel int - Parent *codeBlock - RefUpvalue bool - LineStart int - LastLine int + LocalVars *varNamePool + BreakLabel int + Parent *codeBlock + RefUpvalue bool + LineStart int + LastLine int + labels map[string]*gotoLabelDesc + firstGotoIndex int } -func newCodeBlock(localvars *varNamePool, blabel int, parent *codeBlock, pos ast.PositionHolder) *codeBlock { - bl := &codeBlock{localvars, blabel, parent, false, 0, 0} +func newCodeBlock(localvars *varNamePool, blabel int, parent *codeBlock, pos ast.PositionHolder, firstGotoIndex int) *codeBlock { + bl := &codeBlock{localvars, blabel, parent, false, 0, 0, map[string]*gotoLabelDesc{}, firstGotoIndex} if pos != nil { bl.LineStart = pos.Line() bl.LastLine = pos.LastLine() @@ -345,33 +374,136 @@ func newCodeBlock(localvars *varNamePool, blabel int, parent *codeBlock, pos ast return bl } +func (b *codeBlock) AddLabel(label *gotoLabelDesc) *gotoLabelDesc { + if old, ok := b.labels[label.Name]; ok { + return old + } + b.labels[label.Name] = label + return nil +} + +func (b *codeBlock) GetLabel(label string) *gotoLabelDesc { + if v, ok := b.labels[label]; ok { + return v + } + return nil +} + +func (b *codeBlock) LocalVarsCount() int { + count := 0 + for block := b; block != nil; block = block.Parent { + count += len(block.LocalVars.Names()) + } + return count +} + type funcContext struct { - Proto *FunctionProto - Code *codeStore - Parent *funcContext - Upvalues *varNamePool - Block *codeBlock - Blocks []*codeBlock - regTop int - labelId int - labelPc map[int]int + Proto *FunctionProto + Code *codeStore + Parent *funcContext + Upvalues *varNamePool + Block *codeBlock + Blocks []*codeBlock + regTop int + labelId int + labelPc map[int]int + gotosCount int + unresolvedGotos map[int]*gotoLabelDesc } func newFuncContext(sourcename string, parent *funcContext) *funcContext { fc := &funcContext{ - Proto: newFunctionProto(sourcename), - Code: &codeStore{make([]uint32, 0, 1024), make([]int, 0, 1024), 0}, - Parent: parent, - Upvalues: newVarNamePool(0), - Block: newCodeBlock(newVarNamePool(0), labelNoJump, nil, nil), - regTop: 0, - labelId: 1, - labelPc: map[int]int{}, + Proto: newFunctionProto(sourcename), + Code: &codeStore{make([]uint32, 0, 1024), make([]int, 0, 1024), 0}, + Parent: parent, + Upvalues: newVarNamePool(0), + Block: newCodeBlock(newVarNamePool(0), labelNoJump, nil, nil, 0), + regTop: 0, + labelId: 1, + labelPc: map[int]int{}, + gotosCount: 0, + unresolvedGotos: map[int]*gotoLabelDesc{}, } fc.Blocks = []*codeBlock{fc.Block} return fc } +func (fc *funcContext) CheckUnresolvedGoto() { + for i := fc.Block.firstGotoIndex; i < fc.gotosCount; i++ { + gotoLabel, ok := fc.unresolvedGotos[i] + if !ok { + continue + } + raiseCompileError(fc, fc.Proto.LastLineDefined, "no visible label '%s' for at line %d", gotoLabel.Name, gotoLabel.Line) + } +} + +func (fc *funcContext) AddUnresolvedGoto(label *gotoLabelDesc) { + fc.unresolvedGotos[fc.gotosCount] = label + fc.gotosCount++ +} + +func (fc *funcContext) AddNamedLabel(label *gotoLabelDesc) { + if old := fc.Block.AddLabel(label); old != nil { + raiseCompileError(fc, label.Line+1, "label '%s' already defined on line %d", label.Name, old.Line) + } + fc.SetLabelPc(label.Id, label.Pc) +} + +func (fc *funcContext) GetNamedLabel(name string) *gotoLabelDesc { + return fc.Block.GetLabel(name) +} + +func (fc *funcContext) ResolveGoto(from, to *gotoLabelDesc, index int) { + if from.NumActiveLocalVars < to.NumActiveLocalVars { + varName := fc.Block.LocalVars.Names()[len(fc.Block.LocalVars.Names())-1] + raiseCompileError(fc, to.Line+1, " at line %d jumps into the scope of local '%s'", to.Name, from.Line, varName) + } + fc.Code.SetSbx(from.Pc, to.Id) + delete(fc.unresolvedGotos, index) +} + +func (fc *funcContext) FindLabel(block *codeBlock, gotoLabel *gotoLabelDesc, i int) bool { + target := block.GetLabel(gotoLabel.Name) + if target != nil { + if gotoLabel.NumActiveLocalVars > target.NumActiveLocalVars && block.RefUpvalue { + fc.Code.SetA(gotoLabel.Pc-1, target.NumActiveLocalVars) + } + fc.ResolveGoto(gotoLabel, target, i) + return true + } + return false +} + +func (fc *funcContext) ResolveCurrentBlockGotosWithParentBlock() { + blockActiveLocalVars := fc.Block.Parent.LocalVarsCount() + for i := fc.Block.firstGotoIndex; i < fc.gotosCount; i++ { + gotoLabel, ok := fc.unresolvedGotos[i] + if !ok { + continue + } + if gotoLabel.NumActiveLocalVars > blockActiveLocalVars { + if fc.Block.RefUpvalue { + fc.Code.SetA(gotoLabel.Pc-1, blockActiveLocalVars) + } + gotoLabel.SetNumActiveLocalVars(blockActiveLocalVars) + } + fc.FindLabel(fc.Block.Parent, gotoLabel, i) + } +} + +func (fc *funcContext) ResolveForwardGoto(target *gotoLabelDesc) { + for i := fc.Block.firstGotoIndex; i <= fc.gotosCount; i++ { + gotoLabel, ok := fc.unresolvedGotos[i] + if !ok { + continue + } + if gotoLabel.Name == target.Name { + fc.ResolveGoto(gotoLabel, target, i) + } + } +} + func (fc *funcContext) NewLabel() int { ret := fc.labelId fc.labelId++ @@ -400,6 +532,13 @@ func (fc *funcContext) ConstIndex(value LValue) int { } return v } +func (fc *funcContext) BlockLocalVarsCount() int { + count := 0 + for block := fc.Block; block != nil; block = block.Parent { + count += len(block.LocalVars.Names()) + } + return count +} func (fc *funcContext) RegisterLocalVar(name string) int { ret := fc.Block.LocalVars.Register(name) @@ -431,7 +570,7 @@ func (fc *funcContext) LocalVars() []varNamePoolValue { } func (fc *funcContext) EnterBlock(blabel int, pos ast.PositionHolder) { - fc.Block = newCodeBlock(newVarNamePool(fc.RegTop()), blabel, fc.Block, pos) + fc.Block = newCodeBlock(newVarNamePool(fc.RegTop()), blabel, fc.Block, pos, fc.gotosCount) fc.Blocks = append(fc.Blocks, fc.Block) } @@ -447,6 +586,10 @@ func (fc *funcContext) CloseUpvalues() int { func (fc *funcContext) LeaveBlock() int { closed := fc.CloseUpvalues() fc.EndScope() + + if fc.Block.Parent != nil { + fc.ResolveCurrentBlockGotosWithParentBlock() + } fc.Block = fc.Block.Parent fc.SetRegTop(fc.Block.LocalVars.LastIndex()) return closed @@ -471,9 +614,17 @@ func (fc *funcContext) RegTop() int { /* FuncContext }}} */ -func compileChunk(context *funcContext, chunk []ast.Stmt) { // {{{ - for _, stmt := range chunk { - compileStmt(context, stmt) +func compileChunk(context *funcContext, chunk []ast.Stmt, untilFollows bool) { // {{{ + for i, stmt := range chunk { + lastStmt := true + for j := i + 1; j < len(chunk); j++ { + _, ok := chunk[j].(*ast.LabelStmt) + if !ok { + lastStmt = false + break + } + } + compileStmt(context, stmt, lastStmt && !untilFollows) } } // }}} @@ -485,13 +636,21 @@ func compileBlock(context *funcContext, chunk []ast.Stmt) { // {{{ ph.SetLine(sline(chunk[0])) ph.SetLastLine(eline(chunk[len(chunk)-1])) context.EnterBlock(labelNoJump, ph) - for _, stmt := range chunk { - compileStmt(context, stmt) + for i, stmt := range chunk { + lastStmt := true + for j := i + 1; j < len(chunk); j++ { + _, ok := chunk[j].(*ast.LabelStmt) + if !ok { + lastStmt = false + break + } + } + compileStmt(context, stmt, lastStmt) } context.LeaveBlock() } // }}} -func compileStmt(context *funcContext, stmt ast.Stmt) { // {{{ +func compileStmt(context *funcContext, stmt ast.Stmt, isLastStmt bool) { // {{{ switch st := stmt.(type) { case *ast.AssignStmt: compileAssignStmt(context, st) @@ -501,7 +660,7 @@ func compileStmt(context *funcContext, stmt ast.Stmt) { // {{{ compileFuncCallExpr(context, context.RegTop(), st.Expr.(*ast.FuncCallExpr), ecnone(-1)) case *ast.DoBlockStmt: context.EnterBlock(labelNoJump, st) - compileChunk(context, st.Stmts) + compileChunk(context, st.Stmts, false) context.LeaveBlock() case *ast.WhileStmt: compileWhileStmt(context, st) @@ -519,14 +678,17 @@ func compileStmt(context *funcContext, stmt ast.Stmt) { // {{{ compileNumberForStmt(context, st) case *ast.GenericForStmt: compileGenericForStmt(context, st) + case *ast.LabelStmt: + compileLabelStmt(context, st, isLastStmt) + case *ast.GotoStmt: + compileGotoStmt(context, st) } } // }}} func compileAssignStmtLeft(context *funcContext, stmt *ast.AssignStmt) (int, []*assigncontext) { // {{{ reg := context.RegTop() acs := make([]*assigncontext, 0, len(stmt.Lhs)) - for i, lhs := range stmt.Lhs { - islast := i == len(stmt.Lhs)-1 + for _, lhs := range stmt.Lhs { switch st := lhs.(type) { case *ast.IdentExpr: identtype := getIdentRefType(context, context, st) @@ -537,9 +699,7 @@ func compileAssignStmtLeft(context *funcContext, stmt *ast.AssignStmt) (int, []* case ecUpvalue: context.Upvalues.RegisterUnique(st.Value) case ecLocal: - if islast { - ec.reg = context.FindLocalVar(st.Value) - } + ec.reg = context.FindLocalVar(st.Value) } acs = append(acs, &assigncontext{ec, 0, 0, false, false}) case *ast.AttrGetExpr: @@ -825,7 +985,7 @@ func compileWhileStmt(context *funcContext, stmt *ast.WhileStmt) { // {{{ compileBranchCondition(context, context.RegTop(), stmt.Condition, thenlabel, elselabel, false) context.SetLabelPc(thenlabel, context.Code.LastPC()) context.EnterBlock(elselabel, stmt) - compileChunk(context, stmt.Stmts) + compileChunk(context, stmt.Stmts, false) context.CloseUpvalues() context.Code.AddASbx(OP_JMP, 0, condlabel, eline(stmt)) context.LeaveBlock() @@ -840,7 +1000,7 @@ func compileRepeatStmt(context *funcContext, stmt *ast.RepeatStmt) { // {{{ context.SetLabelPc(initlabel, context.Code.LastPC()) context.SetLabelPc(elselabel, context.Code.LastPC()) context.EnterBlock(thenlabel, stmt) - compileChunk(context, stmt.Stmts) + compileChunk(context, stmt.Stmts, true) compileBranchCondition(context, context.RegTop(), stmt.Condition, thenlabel, elselabel, false) context.SetLabelPc(thenlabel, context.Code.LastPC()) @@ -916,7 +1076,7 @@ func compileNumberForStmt(context *funcContext, stmt *ast.NumberForStmt) { // {{ context.RegisterLocalVar(stmt.Name) bodypc := code.LastPC() - compileChunk(context, stmt.Stmts) + compileChunk(context, stmt.Stmts, false) context.LeaveBlock() @@ -949,7 +1109,7 @@ func compileGenericForStmt(context *funcContext, stmt *ast.GenericForStmt) { // } context.SetLabelPc(bodylabel, code.LastPC()) - compileChunk(context, stmt.Stmts) + compileChunk(context, stmt.Stmts, false) context.LeaveBlock() @@ -960,6 +1120,24 @@ func compileGenericForStmt(context *funcContext, stmt *ast.GenericForStmt) { // context.SetLabelPc(endlabel, code.LastPC()) } // }}} +func compileLabelStmt(context *funcContext, stmt *ast.LabelStmt, isLastStmt bool) { // {{{ + labelId := context.NewLabel() + label := newLabelDesc(labelId, stmt.Name, context.Code.LastPC(), sline(stmt), context.BlockLocalVarsCount()) + context.AddNamedLabel(label) + if isLastStmt { + label.SetNumActiveLocalVars(context.Block.Parent.LocalVarsCount()) + } + context.ResolveForwardGoto(label) +} // }}} + +func compileGotoStmt(context *funcContext, stmt *ast.GotoStmt) { // {{{ + context.Code.AddABC(OP_CLOSE, 0, 0, 0, sline(stmt)) + context.Code.AddASbx(OP_JMP, 0, labelNoJump, sline(stmt)) + label := newLabelDesc(-1, stmt.Label, context.Code.LastPC(), sline(stmt), context.BlockLocalVarsCount()) + context.AddUnresolvedGoto(label) + context.FindLabel(context.Block, label, context.gotosCount-1) +} // }}} + func compileExpr(context *funcContext, reg int, expr ast.Expr, ec *expcontext) int { // {{{ code := context.Code sreg := savereg(ec, reg) @@ -1149,10 +1327,11 @@ func compileFunctionExpr(context *funcContext, funcexpr *ast.FunctionExpr, ec *e context.Proto.IsVarArg |= VarArgIsVarArg } - compileChunk(context, funcexpr.Stmts) + compileChunk(context, funcexpr.Stmts, false) context.Code.AddABC(OP_RETURN, 0, 1, 0, eline(funcexpr)) context.EndScope() + context.CheckUnresolvedGoto() context.Proto.Code = context.Code.List() context.Proto.DbgSourcePositions = context.Code.PosList() context.Proto.DbgUpvalues = context.Upvalues.Names() @@ -1468,7 +1647,17 @@ func compileLogicalOpExprAux(context *funcContext, reg int, expr ast.Expr, ec *e a := reg sreg := savereg(ec, a) - if !hasnextcond && thenlabel == elselabel { + isLastAnd := elselabel == lb.e && thenlabel != elselabel + isLastOr := thenlabel == lb.e && hasnextcond + + if ident, ok := expr.(*ast.IdentExpr); ok && (isLastAnd || isLastOr) && getIdentRefType(context, context, ident) == ecLocal { + b := context.FindLocalVar(ident.Value) + op := OP_TESTSET + if sreg == b { + op = OP_TEST + } + code.AddABC(op, sreg, b, 0^flip, sline(expr)) + } else if !hasnextcond && thenlabel == elselabel { reg += compileExpr(context, reg, expr, &expcontext{ec.ctype, intMax(a, sreg), ec.varargopt}) last := context.Code.Last() if opGetOpCode(last) == OP_MOVE && opGetArgA(last) == a { @@ -1478,7 +1667,7 @@ func compileLogicalOpExprAux(context *funcContext, reg int, expr ast.Expr, ec *e } } else { reg += compileExpr(context, reg, expr, ecnone(0)) - if sreg == a { + if !hasnextcond { code.AddABC(OP_TEST, a, 0, 0^flip, sline(expr)) } else { code.AddABC(OP_TESTSET, sreg, a, 0^flip, sline(expr)) @@ -1669,6 +1858,10 @@ func Compile(chunk []ast.Stmt, name string) (proto *FunctionProto, err error) { err = nil parlist := &ast.ParList{HasVargs: true, Names: []string{}} funcexpr := &ast.FunctionExpr{ParList: parlist, Stmts: chunk} + if len(chunk) > 0 { + funcexpr.SetLastLine(sline(chunk[0])) + funcexpr.SetLastLine(eline(chunk[len(chunk)-1]) + 1) + } context := newFuncContext(name, nil) compileFunctionExpr(context, funcexpr, ecnone(0)) proto = context.Proto diff --git a/vendor/github.com/yuin/gopher-lua/parse/lexer.go b/vendor/github.com/yuin/gopher-lua/parse/lexer.go index 6ad57ceed7da..c20a0bdd69ea 100644 --- a/vendor/github.com/yuin/gopher-lua/parse/lexer.go +++ b/vendor/github.com/yuin/gopher-lua/parse/lexer.go @@ -4,11 +4,12 @@ import ( "bufio" "bytes" "fmt" - "github.com/yuin/gopher-lua/ast" "io" "reflect" "strconv" "strings" + + "github.com/yuin/gopher-lua/ast" ) const EOF = -1 @@ -286,7 +287,7 @@ var reservedWords = map[string]int{ "end": TEnd, "false": TFalse, "for": TFor, "function": TFunction, "if": TIf, "in": TIn, "local": TLocal, "nil": TNil, "not": TNot, "or": TOr, "return": TReturn, "repeat": TRepeat, "then": TThen, "true": TTrue, - "until": TUntil, "while": TWhile} + "until": TUntil, "while": TWhile, "goto": TGoto} func (sc *Scanner) Scan(lexer *Lexer) (ast.Token, error) { redo: @@ -408,7 +409,16 @@ redo: tok.Type = '.' } tok.Str = buf.String() - case '+', '*', '/', '%', '^', '#', '(', ')', '{', '}', ']', ';', ':', ',': + case ':': + if sc.Peek() == ':' { + tok.Type = T2Colon + tok.Str = "::" + sc.Next() + } else { + tok.Type = ch + tok.Str = string(rune(ch)) + } + case '+', '*', '/', '%', '^', '#', '(', ')', '{', '}', ']', ';', ',': tok.Type = ch tok.Str = string(rune(ch)) default: diff --git a/vendor/github.com/yuin/gopher-lua/parse/parser.go b/vendor/github.com/yuin/gopher-lua/parse/parser.go index c75658164900..aee06c8c8122 100644 --- a/vendor/github.com/yuin/gopher-lua/parse/parser.go +++ b/vendor/github.com/yuin/gopher-lua/parse/parser.go @@ -54,16 +54,18 @@ const TThen = 57363 const TTrue = 57364 const TUntil = 57365 const TWhile = 57366 -const TEqeq = 57367 -const TNeq = 57368 -const TLte = 57369 -const TGte = 57370 -const T2Comma = 57371 -const T3Comma = 57372 -const TIdent = 57373 -const TNumber = 57374 -const TString = 57375 -const UNARY = 57376 +const TGoto = 57367 +const TEqeq = 57368 +const TNeq = 57369 +const TLte = 57370 +const TGte = 57371 +const T2Comma = 57372 +const T3Comma = 57373 +const T2Colon = 57374 +const TIdent = 57375 +const TNumber = 57376 +const TString = 57377 +const UNARY = 57378 var yyToknames = [...]string{ "$end", @@ -90,12 +92,14 @@ var yyToknames = [...]string{ "TTrue", "TUntil", "TWhile", + "TGoto", "TEqeq", "TNeq", "TLte", "TGte", "T2Comma", "T3Comma", + "T2Colon", "TIdent", "TNumber", "TString", @@ -128,7 +132,7 @@ const yyEofCode = 1 const yyErrCode = 2 const yyInitialStackSize = 16 -//line parser.go.y:517 +//line parser.go.y:525 func TokenName(c int) string { if c >= TAnd && c-TAnd < len(yyToknames) { @@ -144,200 +148,207 @@ var yyExca = [...]int8{ -1, 1, 1, -1, -2, 0, - -1, 17, - 46, 31, - 47, 31, - -2, 68, - -1, 93, - 46, 32, - 47, 32, - -2, 68, + -1, 19, + 48, 33, + 49, 33, + -2, 70, + -1, 97, + 48, 34, + 49, 34, + -2, 70, } const yyPrivate = 57344 -const yyLast = 579 +const yyLast = 616 var yyAct = [...]uint8{ - 24, 88, 50, 23, 45, 84, 56, 65, 137, 153, - 136, 113, 52, 142, 54, 53, 33, 134, 65, 132, - 62, 63, 32, 61, 108, 109, 48, 111, 106, 41, - 42, 105, 49, 155, 166, 81, 82, 83, 138, 104, - 22, 91, 131, 80, 95, 92, 162, 74, 48, 85, - 150, 99, 165, 148, 49, 149, 75, 76, 77, 78, - 79, 67, 80, 107, 106, 148, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 72, 73, 71, 70, 74, 65, 39, 40, - 47, 139, 133, 68, 69, 75, 76, 77, 78, 79, - 60, 80, 141, 144, 143, 146, 145, 31, 67, 147, - 9, 48, 110, 97, 48, 152, 151, 49, 38, 62, - 49, 17, 66, 77, 78, 79, 96, 80, 59, 72, - 73, 71, 70, 74, 154, 102, 91, 156, 55, 157, - 68, 69, 75, 76, 77, 78, 79, 21, 80, 187, - 94, 20, 26, 184, 37, 179, 163, 112, 25, 35, - 178, 93, 170, 172, 27, 171, 164, 173, 19, 159, - 175, 174, 29, 89, 28, 39, 40, 20, 182, 181, - 100, 34, 135, 183, 67, 39, 40, 47, 186, 64, - 51, 1, 90, 87, 36, 130, 86, 30, 66, 18, - 46, 44, 43, 8, 58, 72, 73, 71, 70, 74, - 57, 67, 168, 169, 167, 3, 68, 69, 75, 76, - 77, 78, 79, 160, 80, 66, 4, 2, 0, 0, - 0, 158, 72, 73, 71, 70, 74, 0, 0, 0, - 0, 0, 0, 68, 69, 75, 76, 77, 78, 79, - 26, 80, 37, 0, 0, 0, 25, 35, 140, 0, - 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, - 29, 21, 28, 39, 40, 20, 26, 0, 37, 34, - 0, 0, 25, 35, 0, 0, 0, 0, 27, 0, - 0, 0, 36, 98, 0, 0, 29, 89, 28, 39, - 40, 20, 26, 0, 37, 34, 0, 0, 25, 35, - 0, 0, 0, 0, 27, 67, 90, 176, 36, 0, - 0, 0, 29, 21, 28, 39, 40, 20, 0, 66, - 0, 34, 0, 0, 0, 0, 72, 73, 71, 70, - 74, 0, 67, 0, 36, 0, 0, 68, 69, 75, - 76, 77, 78, 79, 0, 80, 66, 0, 177, 0, - 0, 0, 0, 72, 73, 71, 70, 74, 0, 67, - 0, 185, 0, 0, 68, 69, 75, 76, 77, 78, - 79, 0, 80, 66, 0, 161, 0, 0, 0, 0, - 72, 73, 71, 70, 74, 0, 67, 0, 0, 0, - 0, 68, 69, 75, 76, 77, 78, 79, 0, 80, - 66, 0, 0, 180, 0, 0, 0, 72, 73, 71, - 70, 74, 0, 67, 0, 0, 0, 0, 68, 69, - 75, 76, 77, 78, 79, 0, 80, 66, 0, 0, - 103, 0, 0, 0, 72, 73, 71, 70, 74, 0, - 67, 0, 101, 0, 0, 68, 69, 75, 76, 77, - 78, 79, 0, 80, 66, 0, 0, 0, 0, 0, - 0, 72, 73, 71, 70, 74, 0, 67, 0, 0, - 0, 0, 68, 69, 75, 76, 77, 78, 79, 0, - 80, 66, 0, 0, 0, 0, 0, 0, 72, 73, - 71, 70, 74, 0, 0, 0, 0, 0, 0, 68, - 69, 75, 76, 77, 78, 79, 0, 80, 72, 73, - 71, 70, 74, 0, 0, 0, 0, 0, 0, 68, - 69, 75, 76, 77, 78, 79, 0, 80, 7, 10, - 0, 0, 0, 0, 14, 15, 13, 0, 16, 0, - 0, 0, 6, 12, 0, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 21, 0, 0, 0, 20, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 5, + 26, 92, 52, 25, 47, 88, 158, 58, 142, 118, + 141, 167, 54, 69, 56, 55, 35, 139, 41, 42, + 49, 160, 34, 67, 63, 137, 50, 64, 112, 113, + 69, 109, 51, 48, 46, 45, 147, 85, 86, 87, + 115, 110, 24, 95, 43, 44, 99, 96, 78, 136, + 50, 171, 143, 103, 69, 108, 51, 84, 79, 80, + 81, 82, 83, 89, 84, 111, 110, 41, 42, 49, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 81, 82, 83, 170, + 84, 153, 155, 33, 154, 144, 9, 138, 40, 23, + 153, 19, 62, 22, 114, 101, 146, 149, 148, 151, + 150, 71, 100, 152, 66, 50, 65, 61, 50, 157, + 156, 51, 57, 64, 51, 70, 116, 106, 192, 21, + 173, 174, 172, 76, 77, 75, 74, 78, 98, 159, + 189, 95, 161, 97, 162, 72, 73, 79, 80, 81, + 82, 83, 68, 84, 184, 183, 177, 169, 164, 104, + 140, 168, 117, 53, 1, 91, 135, 175, 32, 20, + 176, 8, 178, 60, 59, 180, 179, 3, 165, 28, + 4, 39, 2, 187, 186, 27, 37, 0, 188, 0, + 0, 29, 0, 191, 71, 0, 0, 0, 0, 0, + 31, 0, 93, 30, 41, 42, 22, 0, 70, 0, + 36, 0, 0, 0, 0, 0, 76, 77, 75, 74, + 78, 94, 0, 38, 71, 90, 0, 0, 72, 73, + 79, 80, 81, 82, 83, 0, 84, 0, 70, 0, + 0, 0, 0, 163, 0, 0, 76, 77, 75, 74, + 78, 0, 0, 0, 0, 0, 0, 0, 72, 73, + 79, 80, 81, 82, 83, 28, 84, 39, 0, 0, + 0, 27, 37, 145, 0, 0, 0, 29, 0, 0, + 0, 0, 0, 0, 0, 0, 31, 0, 23, 30, + 41, 42, 22, 28, 0, 39, 36, 0, 0, 27, + 37, 0, 0, 0, 0, 29, 0, 0, 0, 38, + 102, 0, 0, 0, 31, 0, 93, 30, 41, 42, + 22, 28, 0, 39, 36, 0, 0, 27, 37, 0, + 0, 0, 0, 29, 0, 94, 71, 38, 181, 0, + 0, 0, 31, 0, 23, 30, 41, 42, 22, 0, + 70, 0, 36, 0, 0, 0, 0, 0, 76, 77, + 75, 74, 78, 71, 0, 38, 0, 0, 0, 0, + 72, 73, 79, 80, 81, 82, 83, 70, 84, 0, + 0, 182, 0, 0, 0, 76, 77, 75, 74, 78, + 71, 0, 190, 0, 0, 0, 0, 72, 73, 79, + 80, 81, 82, 83, 70, 84, 0, 0, 166, 0, + 0, 0, 76, 77, 75, 74, 78, 71, 0, 0, + 0, 0, 0, 0, 72, 73, 79, 80, 81, 82, + 83, 70, 84, 0, 185, 0, 0, 0, 0, 76, + 77, 75, 74, 78, 71, 0, 0, 0, 0, 0, + 0, 72, 73, 79, 80, 81, 82, 83, 70, 84, + 0, 107, 0, 0, 0, 0, 76, 77, 75, 74, + 78, 71, 0, 105, 0, 0, 0, 0, 72, 73, + 79, 80, 81, 82, 83, 70, 84, 0, 0, 0, + 0, 0, 0, 76, 77, 75, 74, 78, 71, 0, + 0, 0, 0, 0, 0, 72, 73, 79, 80, 81, + 82, 83, 70, 84, 0, 0, 0, 0, 0, 0, + 76, 77, 75, 74, 78, 0, 0, 0, 0, 0, + 0, 0, 72, 73, 79, 80, 81, 82, 83, 0, + 84, 7, 10, 0, 0, 0, 0, 14, 15, 13, + 0, 16, 71, 0, 0, 6, 12, 0, 0, 0, + 11, 18, 0, 0, 0, 0, 0, 0, 17, 23, + 0, 0, 0, 22, 76, 77, 75, 74, 78, 0, + 0, 0, 0, 5, 0, 0, 72, 73, 79, 80, + 81, 82, 83, 0, 84, 76, 77, 75, 74, 78, + 0, 0, 0, 0, 0, 0, 0, 72, 73, 79, + 80, 81, 82, 83, 0, 84, } var yyPact = [...]int16{ - -1000, -1000, 533, -5, -1000, -1000, 292, -1000, -17, 152, - -1000, 292, -1000, 292, 107, 97, 88, -1000, -1000, -1000, - 292, -1000, -1000, -29, 473, -1000, -1000, -1000, -1000, -1000, - -1000, 152, -1000, -1000, 292, 292, 292, 14, -1000, -1000, - 142, 292, 116, 292, 95, -1000, 82, 240, -1000, -1000, - 171, -1000, 446, 112, 419, -7, 17, 14, -24, -1000, - 81, -19, -1000, 104, -42, 292, 292, 292, 292, 292, - 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, - 292, -1, -1, -1, -1000, -11, -1000, -37, -1000, -8, - 292, 473, -29, -1000, 152, 207, -1000, 55, -1000, -40, - -1000, -1000, 292, -1000, 292, 292, 34, -1000, 24, 19, - 14, 292, -1000, -1000, 473, 57, 493, 18, 18, 18, - 18, 18, 18, 18, 83, 83, -1, -1, -1, -1, - -44, -1000, -1000, -14, -1000, 266, -1000, -1000, 292, 180, - -1000, -1000, -1000, 160, 473, -1000, 338, 40, -1000, -1000, - -1000, -1000, -29, -1000, 157, 22, -1000, 473, -12, -1000, - 205, 292, -1000, 154, -1000, -1000, 292, -1000, -1000, 292, - 311, 151, -1000, 473, 146, 392, -1000, 292, -1000, -1000, - -1000, 144, 365, -1000, -1000, -1000, 140, -1000, + -1000, -1000, 536, -5, -1000, -1000, 311, -1000, -4, -17, + -1000, 311, -1000, 311, 89, 84, 90, 83, 81, -1000, + -1000, -1000, 311, -1000, -1000, -36, 494, -1000, -1000, -1000, + -1000, -1000, -1000, -17, -1000, -1000, 311, 311, 311, 26, + -1000, -1000, 169, 311, 66, 311, 79, -1000, 72, 255, + -1000, -1000, 150, -1000, 467, 104, 440, 7, 17, 26, + -22, -1000, 71, -8, -1000, 94, -1000, 107, -46, 311, + 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, + 311, 311, 311, 311, 311, 11, 11, 11, -1000, -6, + -1000, -39, -1000, 4, 311, 494, -36, -1000, -17, 220, + -1000, 32, -1000, -19, -1000, -1000, 311, -1000, 311, 311, + 67, -1000, 61, 59, 26, 311, -1000, -1000, -1000, 494, + 548, 569, 18, 18, 18, 18, 18, 18, 18, 44, + 44, 11, 11, 11, 11, -49, -1000, -1000, -28, -1000, + 283, -1000, -1000, 311, 190, -1000, -1000, -1000, 149, 494, + -1000, 359, 5, -1000, -1000, -1000, -1000, -36, -1000, 148, + 58, -1000, 494, 3, -1000, 123, 311, -1000, 147, -1000, + -1000, 311, -1000, -1000, 311, 332, 146, -1000, 494, 145, + 413, -1000, 311, -1000, -1000, -1000, 131, 386, -1000, -1000, + -1000, 119, -1000, } var yyPgo = [...]uint8{ - 0, 190, 227, 2, 226, 223, 215, 210, 204, 203, - 118, 6, 3, 0, 22, 107, 168, 199, 4, 197, - 5, 195, 16, 193, 1, 182, + 0, 163, 182, 2, 180, 178, 177, 174, 173, 171, + 98, 7, 3, 0, 22, 93, 129, 169, 4, 168, + 5, 166, 16, 165, 1, 160, } var yyR1 = [...]int8{ 0, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, - 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, + 4, 4, 4, 4, 5, 5, 6, 6, 6, 7, + 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, + 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 14, 15, 15, - 15, 15, 17, 16, 16, 18, 18, 18, 18, 19, - 20, 20, 21, 21, 21, 22, 22, 23, 23, 23, - 24, 24, 24, 25, 25, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, + 15, 15, 15, 15, 17, 16, 16, 18, 18, 18, + 18, 19, 20, 20, 21, 21, 21, 22, 22, 23, + 23, 23, 24, 24, 24, 25, 25, } var yyR2 = [...]int8{ 0, 1, 2, 3, 0, 2, 2, 1, 3, 1, 3, 5, 4, 6, 8, 9, 11, 7, 3, 4, - 4, 2, 0, 5, 1, 2, 1, 1, 3, 1, - 3, 1, 3, 1, 4, 3, 1, 3, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, - 1, 3, 3, 2, 4, 2, 3, 1, 1, 2, - 5, 4, 1, 1, 3, 2, 3, 1, 3, 2, - 3, 5, 1, 1, 1, + 4, 2, 3, 2, 0, 5, 1, 2, 1, 1, + 3, 1, 3, 1, 3, 1, 4, 3, 1, 3, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, + 1, 1, 1, 3, 3, 2, 4, 2, 3, 1, + 1, 2, 5, 4, 1, 1, 3, 2, 3, 1, + 3, 2, 3, 5, 1, 1, 1, } var yyChk = [...]int16{ - -1000, -1, -2, -6, -4, 45, 19, 5, -9, -15, - 6, 24, 20, 13, 11, 12, 15, -10, -17, -16, - 35, 31, 45, -12, -13, 16, 10, 22, 32, 30, - -19, -15, -14, -22, 39, 17, 52, 12, -10, 33, - 34, 46, 47, 50, 49, -18, 48, 35, -22, -14, - -3, -1, -13, -3, -13, 31, -11, -7, -8, 31, - 12, -11, 31, -13, -16, 47, 18, 4, 36, 37, - 28, 27, 25, 26, 29, 38, 39, 40, 41, 42, - 44, -13, -13, -13, -20, 35, 54, -23, -24, 31, - 50, -13, -12, -10, -15, -13, 31, 31, 53, -12, - 9, 6, 23, 21, 46, 14, 47, -20, 48, 49, - 31, 46, 53, 53, -13, -13, -13, -13, -13, -13, + -1000, -1, -2, -6, -4, 47, 19, 5, -9, -15, + 6, 24, 20, 13, 11, 12, 15, 32, 25, -10, + -17, -16, 37, 33, 47, -12, -13, 16, 10, 22, + 34, 31, -19, -15, -14, -22, 41, 17, 54, 12, + -10, 35, 36, 48, 49, 52, 51, -18, 50, 37, + -22, -14, -3, -1, -13, -3, -13, 33, -11, -7, + -8, 33, 12, -11, 33, 33, 33, -13, -16, 49, + 18, 4, 38, 39, 29, 28, 26, 27, 30, 40, + 41, 42, 43, 44, 46, -13, -13, -13, -20, 37, + 56, -23, -24, 33, 52, -13, -12, -10, -15, -13, + 33, 33, 55, -12, 9, 6, 23, 21, 48, 14, + 49, -20, 50, 51, 33, 48, 32, 55, 55, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, - -21, 53, 30, -11, 54, -25, 47, 45, 46, -13, - 51, -18, 53, -3, -13, -3, -13, -12, 31, 31, - 31, -20, -12, 53, -3, 47, -24, -13, 51, 9, - -5, 47, 6, -3, 9, 30, 46, 9, 7, 8, - -13, -3, 9, -13, -3, -13, 6, 47, 9, 9, - 21, -3, -13, -3, 9, 6, -3, 9, + -13, -13, -13, -13, -13, -21, 55, 31, -11, 56, + -25, 49, 47, 48, -13, 53, -18, 55, -3, -13, + -3, -13, -12, 33, 33, 33, -20, -12, 55, -3, + 49, -24, -13, 53, 9, -5, 49, 6, -3, 9, + 31, 48, 9, 7, 8, -13, -3, 9, -13, -3, + -13, 6, 49, 9, 9, 21, -3, -13, -3, 9, + 6, -3, 9, } var yyDef = [...]int8{ - 4, -2, 1, 2, 5, 6, 24, 26, 0, 9, - 4, 0, 4, 0, 0, 0, 0, -2, 69, 70, - 0, 33, 3, 25, 38, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 0, 0, 0, 0, 68, 67, - 0, 0, 0, 0, 0, 73, 0, 0, 77, 78, - 0, 7, 0, 0, 0, 36, 0, 0, 27, 29, - 0, 21, 36, 0, 70, 0, 0, 0, 0, 0, + 4, -2, 1, 2, 5, 6, 26, 28, 0, 9, + 4, 0, 4, 0, 0, 0, 0, 0, 0, -2, + 71, 72, 0, 35, 3, 27, 40, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 0, 0, 0, 0, + 70, 69, 0, 0, 0, 0, 0, 75, 0, 0, + 79, 80, 0, 7, 0, 0, 0, 38, 0, 0, + 29, 31, 0, 21, 38, 0, 23, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 64, 65, 66, 79, 0, 85, 0, 87, 33, - 0, 92, 8, -2, 0, 0, 35, 0, 75, 0, - 10, 4, 0, 4, 0, 0, 0, 18, 0, 0, - 0, 0, 71, 72, 39, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 0, 4, 82, 83, 86, 89, 93, 94, 0, 0, - 34, 74, 76, 0, 12, 22, 0, 0, 37, 28, - 30, 19, 20, 4, 0, 0, 88, 90, 0, 11, - 0, 0, 4, 0, 81, 84, 0, 13, 4, 0, - 0, 0, 80, 91, 0, 0, 4, 0, 17, 14, - 4, 0, 0, 23, 15, 4, 0, 16, + 0, 0, 0, 0, 0, 66, 67, 68, 81, 0, + 87, 0, 89, 35, 0, 94, 8, -2, 0, 0, + 37, 0, 77, 0, 10, 4, 0, 4, 0, 0, + 0, 18, 0, 0, 0, 0, 22, 73, 74, 41, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 4, 84, 85, 88, + 91, 95, 96, 0, 0, 36, 76, 78, 0, 12, + 24, 0, 0, 39, 30, 32, 19, 20, 4, 0, + 0, 90, 92, 0, 11, 0, 0, 4, 0, 83, + 86, 0, 13, 4, 0, 0, 0, 82, 93, 0, + 0, 4, 0, 17, 14, 4, 0, 0, 25, 15, + 4, 0, 16, } var yyTok1 = [...]int8{ 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 52, 3, 42, 3, 3, - 35, 53, 40, 38, 47, 39, 49, 41, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 48, 45, - 37, 46, 36, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 54, 3, 44, 3, 3, + 37, 55, 42, 40, 49, 41, 51, 43, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 50, 47, + 39, 48, 38, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 50, 3, 51, 44, 3, 3, 3, 3, 3, + 3, 52, 3, 53, 46, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 34, 3, 54, + 3, 3, 3, 36, 3, 56, } var yyTok2 = [...]int8{ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 43, + 32, 33, 34, 35, 45, } var yyTok3 = [...]int8{ @@ -856,61 +867,75 @@ yydefault: yyVAL.stmt.SetLine(yyDollar[1].token.Pos.Line) } case 22: + yyDollar = yyS[yypt-3 : yypt+1] +//line parser.go.y:191 + { + yyVAL.stmt = &ast.LabelStmt{Name: yyDollar[2].token.Str} + yyVAL.stmt.SetLine(yyDollar[1].token.Pos.Line) + } + case 23: + yyDollar = yyS[yypt-2 : yypt+1] +//line parser.go.y:195 + { + yyVAL.stmt = &ast.GotoStmt{Label: yyDollar[2].token.Str} + yyVAL.stmt.SetLine(yyDollar[1].token.Pos.Line) + } + case 24: yyDollar = yyS[yypt-0 : yypt+1] -//line parser.go.y:193 +//line parser.go.y:201 { yyVAL.stmts = []ast.Stmt{} } - case 23: + case 25: yyDollar = yyS[yypt-5 : yypt+1] -//line parser.go.y:196 +//line parser.go.y:204 { yyVAL.stmts = append(yyDollar[1].stmts, &ast.IfStmt{Condition: yyDollar[3].expr, Then: yyDollar[5].stmts}) yyVAL.stmts[len(yyVAL.stmts)-1].SetLine(yyDollar[2].token.Pos.Line) } - case 24: + case 26: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:202 +//line parser.go.y:210 { yyVAL.stmt = &ast.ReturnStmt{Exprs: nil} yyVAL.stmt.SetLine(yyDollar[1].token.Pos.Line) } - case 25: + case 27: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:206 +//line parser.go.y:214 { yyVAL.stmt = &ast.ReturnStmt{Exprs: yyDollar[2].exprlist} yyVAL.stmt.SetLine(yyDollar[1].token.Pos.Line) } - case 26: + case 28: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:210 +//line parser.go.y:218 { yyVAL.stmt = &ast.BreakStmt{} yyVAL.stmt.SetLine(yyDollar[1].token.Pos.Line) } - case 27: + case 29: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:216 +//line parser.go.y:224 { yyVAL.funcname = yyDollar[1].funcname } - case 28: + case 30: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:219 +//line parser.go.y:227 { yyVAL.funcname = &ast.FuncName{Func: nil, Receiver: yyDollar[1].funcname.Func, Method: yyDollar[3].token.Str} } - case 29: + case 31: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:224 +//line parser.go.y:232 { yyVAL.funcname = &ast.FuncName{Func: &ast.IdentExpr{Value: yyDollar[1].token.Str}} yyVAL.funcname.Func.SetLine(yyDollar[1].token.Pos.Line) } - case 30: + case 32: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:228 +//line parser.go.y:236 { key := &ast.StringExpr{Value: yyDollar[3].token.Str} key.SetLine(yyDollar[3].token.Pos.Line) @@ -918,278 +943,278 @@ yydefault: fn.SetLine(yyDollar[3].token.Pos.Line) yyVAL.funcname = &ast.FuncName{Func: fn} } - case 31: + case 33: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:237 +//line parser.go.y:245 { yyVAL.exprlist = []ast.Expr{yyDollar[1].expr} } - case 32: + case 34: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:240 +//line parser.go.y:248 { yyVAL.exprlist = append(yyDollar[1].exprlist, yyDollar[3].expr) } - case 33: + case 35: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:245 +//line parser.go.y:253 { yyVAL.expr = &ast.IdentExpr{Value: yyDollar[1].token.Str} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } - case 34: + case 36: yyDollar = yyS[yypt-4 : yypt+1] -//line parser.go.y:249 +//line parser.go.y:257 { yyVAL.expr = &ast.AttrGetExpr{Object: yyDollar[1].expr, Key: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } - case 35: + case 37: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:253 +//line parser.go.y:261 { key := &ast.StringExpr{Value: yyDollar[3].token.Str} key.SetLine(yyDollar[3].token.Pos.Line) yyVAL.expr = &ast.AttrGetExpr{Object: yyDollar[1].expr, Key: key} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } - case 36: - yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:261 - { - yyVAL.namelist = []string{yyDollar[1].token.Str} - } - case 37: - yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:264 - { - yyVAL.namelist = append(yyDollar[1].namelist, yyDollar[3].token.Str) - } case 38: yyDollar = yyS[yypt-1 : yypt+1] //line parser.go.y:269 { - yyVAL.exprlist = []ast.Expr{yyDollar[1].expr} + yyVAL.namelist = []string{yyDollar[1].token.Str} } case 39: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:272 { - yyVAL.exprlist = append(yyDollar[1].exprlist, yyDollar[3].expr) + yyVAL.namelist = append(yyDollar[1].namelist, yyDollar[3].token.Str) } case 40: yyDollar = yyS[yypt-1 : yypt+1] //line parser.go.y:277 { - yyVAL.expr = &ast.NilExpr{} - yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) + yyVAL.exprlist = []ast.Expr{yyDollar[1].expr} } case 41: - yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:281 + yyDollar = yyS[yypt-3 : yypt+1] +//line parser.go.y:280 { - yyVAL.expr = &ast.FalseExpr{} - yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) + yyVAL.exprlist = append(yyDollar[1].exprlist, yyDollar[3].expr) } case 42: yyDollar = yyS[yypt-1 : yypt+1] //line parser.go.y:285 { - yyVAL.expr = &ast.TrueExpr{} + yyVAL.expr = &ast.NilExpr{} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } case 43: yyDollar = yyS[yypt-1 : yypt+1] //line parser.go.y:289 { - yyVAL.expr = &ast.NumberExpr{Value: yyDollar[1].token.Str} + yyVAL.expr = &ast.FalseExpr{} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } case 44: yyDollar = yyS[yypt-1 : yypt+1] //line parser.go.y:293 { - yyVAL.expr = &ast.Comma3Expr{} + yyVAL.expr = &ast.TrueExpr{} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } case 45: yyDollar = yyS[yypt-1 : yypt+1] //line parser.go.y:297 { - yyVAL.expr = yyDollar[1].expr + yyVAL.expr = &ast.NumberExpr{Value: yyDollar[1].token.Str} + yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } case 46: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:300 +//line parser.go.y:301 { - yyVAL.expr = yyDollar[1].expr + yyVAL.expr = &ast.Comma3Expr{} + yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } case 47: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:303 +//line parser.go.y:305 { yyVAL.expr = yyDollar[1].expr } case 48: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:306 +//line parser.go.y:308 { yyVAL.expr = yyDollar[1].expr } case 49: - yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:309 + yyDollar = yyS[yypt-1 : yypt+1] +//line parser.go.y:311 { - yyVAL.expr = &ast.LogicalOpExpr{Lhs: yyDollar[1].expr, Operator: "or", Rhs: yyDollar[3].expr} - yyVAL.expr.SetLine(yyDollar[1].expr.Line()) + yyVAL.expr = yyDollar[1].expr } case 50: - yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:313 + yyDollar = yyS[yypt-1 : yypt+1] +//line parser.go.y:314 { - yyVAL.expr = &ast.LogicalOpExpr{Lhs: yyDollar[1].expr, Operator: "and", Rhs: yyDollar[3].expr} - yyVAL.expr.SetLine(yyDollar[1].expr.Line()) + yyVAL.expr = yyDollar[1].expr } case 51: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:317 { - yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: ">", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.LogicalOpExpr{Lhs: yyDollar[1].expr, Operator: "or", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 52: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:321 { - yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "<", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.LogicalOpExpr{Lhs: yyDollar[1].expr, Operator: "and", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 53: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:325 { - yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: ">=", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: ">", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 54: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:329 { - yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "<=", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "<", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 55: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:333 { - yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "==", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: ">=", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 56: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:337 { - yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "~=", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "<=", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 57: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:341 { - yyVAL.expr = &ast.StringConcatOpExpr{Lhs: yyDollar[1].expr, Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "==", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 58: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:345 { - yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "+", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.RelationalOpExpr{Lhs: yyDollar[1].expr, Operator: "~=", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 59: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:349 { - yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "-", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.StringConcatOpExpr{Lhs: yyDollar[1].expr, Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 60: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:353 { - yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "*", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "+", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 61: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:357 { - yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "/", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "-", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 62: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:361 { - yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "%", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "*", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 63: yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:365 { - yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "^", Rhs: yyDollar[3].expr} + yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "/", Rhs: yyDollar[3].expr} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } case 64: - yyDollar = yyS[yypt-2 : yypt+1] + yyDollar = yyS[yypt-3 : yypt+1] //line parser.go.y:369 + { + yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "%", Rhs: yyDollar[3].expr} + yyVAL.expr.SetLine(yyDollar[1].expr.Line()) + } + case 65: + yyDollar = yyS[yypt-3 : yypt+1] +//line parser.go.y:373 + { + yyVAL.expr = &ast.ArithmeticOpExpr{Lhs: yyDollar[1].expr, Operator: "^", Rhs: yyDollar[3].expr} + yyVAL.expr.SetLine(yyDollar[1].expr.Line()) + } + case 66: + yyDollar = yyS[yypt-2 : yypt+1] +//line parser.go.y:377 { yyVAL.expr = &ast.UnaryMinusOpExpr{Expr: yyDollar[2].expr} yyVAL.expr.SetLine(yyDollar[2].expr.Line()) } - case 65: + case 67: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:373 +//line parser.go.y:381 { yyVAL.expr = &ast.UnaryNotOpExpr{Expr: yyDollar[2].expr} yyVAL.expr.SetLine(yyDollar[2].expr.Line()) } - case 66: + case 68: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:377 +//line parser.go.y:385 { yyVAL.expr = &ast.UnaryLenOpExpr{Expr: yyDollar[2].expr} yyVAL.expr.SetLine(yyDollar[2].expr.Line()) } - case 67: + case 69: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:383 +//line parser.go.y:391 { yyVAL.expr = &ast.StringExpr{Value: yyDollar[1].token.Str} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } - case 68: + case 70: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:389 +//line parser.go.y:397 { yyVAL.expr = yyDollar[1].expr } - case 69: + case 71: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:392 +//line parser.go.y:400 { yyVAL.expr = yyDollar[1].expr } - case 70: + case 72: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:395 +//line parser.go.y:403 { yyVAL.expr = yyDollar[1].expr } - case 71: + case 73: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:398 +//line parser.go.y:406 { if ex, ok := yyDollar[2].expr.(*ast.Comma3Expr); ok { ex.AdjustRet = true @@ -1197,161 +1222,161 @@ yydefault: yyVAL.expr = yyDollar[2].expr yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } - case 72: + case 74: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:407 +//line parser.go.y:415 { yyDollar[2].expr.(*ast.FuncCallExpr).AdjustRet = true yyVAL.expr = yyDollar[2].expr } - case 73: + case 75: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:413 +//line parser.go.y:421 { yyVAL.expr = &ast.FuncCallExpr{Func: yyDollar[1].expr, Args: yyDollar[2].exprlist} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } - case 74: + case 76: yyDollar = yyS[yypt-4 : yypt+1] -//line parser.go.y:417 +//line parser.go.y:425 { yyVAL.expr = &ast.FuncCallExpr{Method: yyDollar[3].token.Str, Receiver: yyDollar[1].expr, Args: yyDollar[4].exprlist} yyVAL.expr.SetLine(yyDollar[1].expr.Line()) } - case 75: + case 77: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:423 +//line parser.go.y:431 { if yylex.(*Lexer).PNewLine { yylex.(*Lexer).TokenError(yyDollar[1].token, "ambiguous syntax (function call x new statement)") } yyVAL.exprlist = []ast.Expr{} } - case 76: + case 78: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:429 +//line parser.go.y:437 { if yylex.(*Lexer).PNewLine { yylex.(*Lexer).TokenError(yyDollar[1].token, "ambiguous syntax (function call x new statement)") } yyVAL.exprlist = yyDollar[2].exprlist } - case 77: + case 79: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:435 +//line parser.go.y:443 { yyVAL.exprlist = []ast.Expr{yyDollar[1].expr} } - case 78: + case 80: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:438 +//line parser.go.y:446 { yyVAL.exprlist = []ast.Expr{yyDollar[1].expr} } - case 79: + case 81: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:443 +//line parser.go.y:451 { yyVAL.expr = &ast.FunctionExpr{ParList: yyDollar[2].funcexpr.ParList, Stmts: yyDollar[2].funcexpr.Stmts} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) yyVAL.expr.SetLastLine(yyDollar[2].funcexpr.LastLine()) } - case 80: + case 82: yyDollar = yyS[yypt-5 : yypt+1] -//line parser.go.y:450 +//line parser.go.y:458 { yyVAL.funcexpr = &ast.FunctionExpr{ParList: yyDollar[2].parlist, Stmts: yyDollar[4].stmts} yyVAL.funcexpr.SetLine(yyDollar[1].token.Pos.Line) yyVAL.funcexpr.SetLastLine(yyDollar[5].token.Pos.Line) } - case 81: + case 83: yyDollar = yyS[yypt-4 : yypt+1] -//line parser.go.y:455 +//line parser.go.y:463 { yyVAL.funcexpr = &ast.FunctionExpr{ParList: &ast.ParList{HasVargs: false, Names: []string{}}, Stmts: yyDollar[3].stmts} yyVAL.funcexpr.SetLine(yyDollar[1].token.Pos.Line) yyVAL.funcexpr.SetLastLine(yyDollar[4].token.Pos.Line) } - case 82: + case 84: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:462 +//line parser.go.y:470 { yyVAL.parlist = &ast.ParList{HasVargs: true, Names: []string{}} } - case 83: + case 85: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:465 +//line parser.go.y:473 { yyVAL.parlist = &ast.ParList{HasVargs: false, Names: []string{}} yyVAL.parlist.Names = append(yyVAL.parlist.Names, yyDollar[1].namelist...) } - case 84: + case 86: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:469 +//line parser.go.y:477 { yyVAL.parlist = &ast.ParList{HasVargs: true, Names: []string{}} yyVAL.parlist.Names = append(yyVAL.parlist.Names, yyDollar[1].namelist...) } - case 85: + case 87: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:476 +//line parser.go.y:484 { yyVAL.expr = &ast.TableExpr{Fields: []*ast.Field{}} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } - case 86: + case 88: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:480 +//line parser.go.y:488 { yyVAL.expr = &ast.TableExpr{Fields: yyDollar[2].fieldlist} yyVAL.expr.SetLine(yyDollar[1].token.Pos.Line) } - case 87: + case 89: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:487 +//line parser.go.y:495 { yyVAL.fieldlist = []*ast.Field{yyDollar[1].field} } - case 88: + case 90: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:490 +//line parser.go.y:498 { yyVAL.fieldlist = append(yyDollar[1].fieldlist, yyDollar[3].field) } - case 89: + case 91: yyDollar = yyS[yypt-2 : yypt+1] -//line parser.go.y:493 +//line parser.go.y:501 { yyVAL.fieldlist = yyDollar[1].fieldlist } - case 90: + case 92: yyDollar = yyS[yypt-3 : yypt+1] -//line parser.go.y:498 +//line parser.go.y:506 { yyVAL.field = &ast.Field{Key: &ast.StringExpr{Value: yyDollar[1].token.Str}, Value: yyDollar[3].expr} yyVAL.field.Key.SetLine(yyDollar[1].token.Pos.Line) } - case 91: + case 93: yyDollar = yyS[yypt-5 : yypt+1] -//line parser.go.y:502 +//line parser.go.y:510 { yyVAL.field = &ast.Field{Key: yyDollar[2].expr, Value: yyDollar[5].expr} } - case 92: + case 94: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:505 +//line parser.go.y:513 { yyVAL.field = &ast.Field{Value: yyDollar[1].expr} } - case 93: + case 95: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:510 +//line parser.go.y:518 { yyVAL.fieldsep = "," } - case 94: + case 96: yyDollar = yyS[yypt-1 : yypt+1] -//line parser.go.y:513 +//line parser.go.y:521 { yyVAL.fieldsep = ";" } diff --git a/vendor/github.com/yuin/gopher-lua/parse/parser.go.y b/vendor/github.com/yuin/gopher-lua/parse/parser.go.y index 9a9f831e6119..52bcd55fab4d 100644 --- a/vendor/github.com/yuin/gopher-lua/parse/parser.go.y +++ b/vendor/github.com/yuin/gopher-lua/parse/parser.go.y @@ -52,10 +52,10 @@ import ( } /* Reserved words */ -%token TAnd TBreak TDo TElse TElseIf TEnd TFalse TFor TFunction TIf TIn TLocal TNil TNot TOr TReturn TRepeat TThen TTrue TUntil TWhile +%token TAnd TBreak TDo TElse TElseIf TEnd TFalse TFor TFunction TIf TIn TLocal TNil TNot TOr TReturn TRepeat TThen TTrue TUntil TWhile TGoto /* Literals */ -%token TEqeq TNeq TLte TGte T2Comma T3Comma TIdent TNumber TString '{' '(' +%token TEqeq TNeq TLte TGte T2Comma T3Comma T2Colon TIdent TNumber TString '{' '(' /* Operators */ %left TOr @@ -187,6 +187,14 @@ stat: TLocal namelist { $$ = &ast.LocalAssignStmt{Names: $2, Exprs:[]ast.Expr{}} $$.SetLine($1.Pos.Line) + } | + T2Colon TIdent T2Colon { + $$ = &ast.LabelStmt{Name: $2.Str} + $$.SetLine($1.Pos.Line) + } | + TGoto TIdent { + $$ = &ast.GotoStmt{Label: $2.Str} + $$.SetLine($1.Pos.Line) } elseifs: diff --git a/vendor/github.com/yuin/gopher-lua/vm.go b/vendor/github.com/yuin/gopher-lua/vm.go index aaa04dc9aada..470855f2af65 100644 --- a/vendor/github.com/yuin/gopher-lua/vm.go +++ b/vendor/github.com/yuin/gopher-lua/vm.go @@ -1533,7 +1533,7 @@ func luaModulo(lhs, rhs LNumber) LNumber { flhs := float64(lhs) frhs := float64(rhs) v := math.Mod(flhs, frhs) - if flhs < 0 || frhs < 0 && !(flhs < 0 && frhs < 0) { + if frhs > 0 && v < 0 || frhs < 0 && v > 0 { v += frhs } return LNumber(v) diff --git a/vendor/modules.txt b/vendor/modules.txt index c11b26a8ed89..4648ec56952a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -231,7 +231,7 @@ github.com/alecthomas/units # github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a ## explicit github.com/alicebob/gopher-json -# github.com/alicebob/miniredis/v2 v2.30.0 +# github.com/alicebob/miniredis/v2 v2.30.2 ## explicit; go 1.14 github.com/alicebob/miniredis/v2 github.com/alicebob/miniredis/v2/geohash @@ -1371,7 +1371,7 @@ github.com/xdg-go/scram # github.com/xdg-go/stringprep v1.0.4 ## explicit; go 1.11 github.com/xdg-go/stringprep -# github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 +# github.com/yuin/gopher-lua v1.1.0 ## explicit; go 1.17 github.com/yuin/gopher-lua github.com/yuin/gopher-lua/ast From 905d14bee78c6596cd287b57f2f4310835a9b7ab Mon Sep 17 00:00:00 2001 From: BlakeFernandez <97479131+BlakeFernandez@users.noreply.github.com> Date: Fri, 26 May 2023 04:29:14 -0500 Subject: [PATCH 21/23] Add Prometheus Link for scrape_configs (#9270) **What this PR does / why we need it**: Adds some context to the scrape configs section in Promtail Config Docs to ensure clarity around the connection to Prometheus Here is a link to a slack thread where the customer was confused on this: https://raintank-corp.slack.com/archives/C04KY6NJSCE/p1681761335754199 --------- Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Co-authored-by: J Stickler --- docs/sources/clients/promtail/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/clients/promtail/configuration.md b/docs/sources/clients/promtail/configuration.md index cb64028738a0..3d0bf77677a4 100644 --- a/docs/sources/clients/promtail/configuration.md +++ b/docs/sources/clients/promtail/configuration.md @@ -356,7 +356,7 @@ is restarted to allow it to continue from where it left off. ## scrape_configs The `scrape_configs` block configures how Promtail can scrape logs from a series -of targets using a specified discovery method: +of targets using a specified discovery method. Promtail uses the same [Prometheus scrape_configs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config). This means if you already own a Prometheus instance, the config will be very similar: ```yaml # Name to identify this scrape config in the Promtail UI. From a70d092df646ec1fcd5d8cd6b71c85d3692ea8d9 Mon Sep 17 00:00:00 2001 From: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Date: Fri, 26 May 2023 12:51:20 +0100 Subject: [PATCH 22/23] Add help target to Makefile (#9531) **What this PR does / why we need it**: Add a help target to the Makefile. Only the main targets were added. ``` % make help Usage: make Targets: help Display this help and any documented user-facing targets. Other undocumented targets may be present in the Makefile. all build all executables (loki, logcli, promtail, loki-canary) logcli build logcli executable logcli-debug build debug logcli executable logcli-image build logcli docker image loki build loki executable loki-debug build loki debug executable loki-canary build loki-canary executable helm-test run helm tests helm-lint run helm linter loki-querytee build loki-querytee executable promtail build promtail executable promtail-debug build debug promtail executable loki-mixin compile the loki mixin loki-mixin-check check the loki mixin is up to date lint run linters test run the unit tests clean clean the generated files docker-driver build the docker-driver executable fluent-bit-plugin build the fluent-bit plugin fluent-bit-image build the fluent-bit plugin docker image fluent-bit-push push the fluent-bit plugin docker image fluentd-plugin build the fluentd plugin fluentd-plugin-push push the fluentd plugin fluentd-image build the fluentd docker image fluentd-image-push push the fluentd docker image logstash-image build the logstash image logstash-push push the logstash image promtail-image build the promtail docker image promtail-debug-image build the promtail debug docker image loki-image build the loki docker image loki-debug-image build the debug loki docker image loki-canary-image build the loki canary docker image helm-test-image build the helm test image helm-test-push push the helm test image logql-analyzer-image build the LogQL Analyzer image logql-analyzer-push push the LogQL Analyzer image build-image build the docker build image build-image-push push the docker build image doc Generates the config file documentation check-doc Check the documentation files are up to date ``` **Checklist** - [X] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [ ] Documentation added - [ ] Tests updated - [ ] `CHANGELOG.md` updated - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` - [ ] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213) Signed-off-by: Michel Hollands --- Makefile | 82 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index 93dc6b7c05e4..49450c30cf1e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +# Adapted from https://www.thapaliya.com/en/writings/well-documented-makefiles/ +.PHONY: help +help: ## Display this help and any documented user-facing targets. Other undocumented targets may be present in the Makefile. +help: + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " %-45s %s\n", $$1, $$2 }' $(MAKEFILE_LIST) + .DEFAULT_GOAL := all .PHONY: all images check-generated-files logcli loki loki-debug promtail promtail-debug loki-canary lint test clean yacc protos touch-protobuf-sources .PHONY: format check-format @@ -114,7 +120,7 @@ binfmt: ################ # Main Targets # ################ -all: promtail logcli loki loki-canary +all: promtail logcli loki loki-canary ## build all executables (loki, logcli, promtail, loki-canary) # This is really a check for the CI to make sure generated files are built and checked in manually check-generated-files: yacc ragel fmt-proto protos clients/pkg/promtail/server/ui/assets_vfsdata.go @@ -130,10 +136,10 @@ check-generated-files: yacc ragel fmt-proto protos clients/pkg/promtail/server/u # Logcli # ########## .PHONY: cmd/logcli/logcli -logcli: cmd/logcli/logcli -logcli-debug: cmd/logcli/logcli-debug +logcli: cmd/logcli/logcli ## build logcli executable +logcli-debug: cmd/logcli/logcli-debug ## build debug logcli executable -logcli-image: +logcli-image: ## build logcli docker image $(SUDO) docker build -t $(IMAGE_PREFIX)/logcli:$(IMAGE_TAG) -f cmd/logcli/Dockerfile . cmd/logcli/logcli: @@ -145,8 +151,8 @@ cmd/logcli/logcli-debug: # Loki # ######## .PHONY: cmd/loki/loki cmd/loki/loki-debug -loki: cmd/loki/loki -loki-debug: cmd/loki/loki-debug +loki: cmd/loki/loki ## build loki executable +loki-debug: cmd/loki/loki-debug ## build loki debug executable cmd/loki/loki: CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D) @@ -158,7 +164,7 @@ cmd/loki/loki-debug: # Loki-Canary # ############### .PHONY: cmd/loki-canary/loki-canary -loki-canary: cmd/loki-canary/loki-canary +loki-canary: cmd/loki-canary/loki-canary ## build loki-canary executable cmd/loki-canary/loki-canary: CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D) @@ -167,20 +173,20 @@ cmd/loki-canary/loki-canary: # Helm # ############### .PHONY: production/helm/loki/src/helm-test/helm-test -helm-test: production/helm/loki/src/helm-test/helm-test +helm-test: production/helm/loki/src/helm-test/helm-test ## run helm tests # Package Helm tests but do not run them. production/helm/loki/src/helm-test/helm-test: CGO_ENABLED=0 go test $(GO_FLAGS) --tags=helm_test -c -o $@ ./$(@D) -helm-lint: +helm-lint: ## run helm linter $(MAKE) -BC production/helm/loki lint ################# # Loki-QueryTee # ################# .PHONY: cmd/querytee/querytee -loki-querytee: cmd/querytee/querytee +loki-querytee: cmd/querytee/querytee ## build loki-querytee executable cmd/querytee/querytee: CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D) @@ -207,8 +213,8 @@ ifeq ($(PROMTAIL_JOURNAL_ENABLED), true) PROMTAIL_GO_TAGS = promtail_journal_enabled endif .PHONY: clients/cmd/promtail/promtail clients/cmd/promtail/promtail-debug -promtail: clients/cmd/promtail/promtail -promtail-debug: clients/cmd/promtail/promtail-debug +promtail: clients/cmd/promtail/promtail ## build promtail executable +promtail-debug: clients/cmd/promtail/promtail-debug ## build debug promtail executable promtail-clean-assets: rm -rf clients/pkg/promtail/server/ui/assets_vfsdata.go @@ -232,7 +238,7 @@ MIXIN_PATH := production/loki-mixin MIXIN_OUT_PATH := production/loki-mixin-compiled MIXIN_OUT_PATH_SSD := production/loki-mixin-compiled-ssd -loki-mixin: +loki-mixin: ## compile the loki mixin ifeq ($(BUILD_IN_CONTAINER),true) $(SUDO) docker run $(RM) $(TTY) -i \ -v $(shell pwd):/src/loki$(MOUNT_FLAGS) \ @@ -247,7 +253,7 @@ else @mixtool generate all --output-alerts $(MIXIN_OUT_PATH_SSD)/alerts.yaml --output-rules $(MIXIN_OUT_PATH_SSD)/rules.yaml --directory $(MIXIN_OUT_PATH_SSD)/dashboards ${MIXIN_PATH}/mixin-ssd.libsonnet endif -loki-mixin-check: loki-mixin +loki-mixin-check: loki-mixin ## check the loki mixin is up to date @echo "Checking diff" @git diff --exit-code -- $(MIXIN_OUT_PATH) || (echo "Please build mixin by running 'make loki-mixin'" && false) @git diff --exit-code -- $(MIXIN_OUT_PATH_SSD) || (echo "Please build mixin by running 'make loki-mixin'" && false) @@ -289,7 +295,7 @@ publish: packages # To run this efficiently on your workstation, run this from the root dir: # docker run --rm --tty -i -v $(pwd)/.cache:/go/cache -v $(pwd)/.pkg:/go/pkg -v $(pwd):/src/loki grafana/loki-build-image:0.24.1 lint -lint: +lint: ## run linters go version golangci-lint version GO111MODULE=on golangci-lint run -v @@ -299,7 +305,7 @@ lint: # Test # ######## -test: all +test: all ## run the unit tests $(GOTEST) -covermode=atomic -coverprofile=coverage.txt -p=4 ./... | sed "s:$$: ${DRONE_STEP_NAME} ${DRONE_SOURCE_BRANCH}:" | tee test_results.txt compare-coverage: @@ -312,7 +318,7 @@ compare-coverage: clean-protos: rm -rf $(PROTO_GOS) -clean: +clean: ## clean the generated files rm -rf clients/cmd/promtail/promtail rm -rf cmd/loki/loki rm -rf cmd/logcli/logcli @@ -421,7 +427,7 @@ define build-rootfs docker rmi rootfsimage -f endef -docker-driver: docker-driver-clean +docker-driver: docker-driver-clean ## build the docker-driver executable $(build-rootfs) docker plugin create $(LOKI_DOCKER_DRIVER):$(PLUGIN_TAG)$(PLUGIN_ARCH) clients/cmd/docker-driver @@ -454,13 +460,13 @@ docker-driver-clean: ##################### # fluent-bit plugin # ##################### -fluent-bit-plugin: +fluent-bit-plugin: ## build the fluent-bit plugin go build $(DYN_GO_FLAGS) -buildmode=c-shared -o clients/cmd/fluent-bit/out_grafana_loki.so ./clients/cmd/fluent-bit/ -fluent-bit-image: +fluent-bit-image: ## build the fluent-bit plugin docker image $(SUDO) docker build -t $(IMAGE_PREFIX)/fluent-bit-plugin-loki:$(IMAGE_TAG) --build-arg LDFLAGS="-s -w $(GO_LDFLAGS)" -f clients/cmd/fluent-bit/Dockerfile . -fluent-bit-push: +fluent-bit-push: ## push the fluent-bit plugin docker image $(SUDO) $(PUSH_OCI) $(IMAGE_PREFIX)/fluent-bit-plugin-loki:$(IMAGE_TAG) fluent-bit-test: LOKI_URL ?= http://localhost:3100/loki/api/ @@ -472,17 +478,17 @@ fluent-bit-test: ################## # fluentd plugin # ################## -fluentd-plugin: +fluentd-plugin: ## build the fluentd plugin $(MAKE) -BC clients/cmd/fluentd $@ -fluentd-plugin-push: +fluentd-plugin-push: ## push the fluentd plugin $(MAKE) -BC clients/cmd/fluentd $@ -fluentd-image: +fluentd-image: ## build the fluentd docker image $(SUDO) docker build -t $(IMAGE_PREFIX)/fluent-plugin-loki:$(IMAGE_TAG) -f clients/cmd/fluentd/Dockerfile . fluentd-push: -fluentd-image-push: +fluentd-image-push: ## push the fluentd docker image $(SUDO) $(PUSH_OCI) $(IMAGE_PREFIX)/fluent-plugin-loki:$(IMAGE_TAG) fluentd-test: LOKI_URL ?= http://loki:3100 @@ -492,7 +498,7 @@ fluentd-test: ################## # logstash plugin # ################## -logstash-image: +logstash-image: ## build the logstash image $(SUDO) docker build -t $(IMAGE_PREFIX)/logstash-output-loki:$(IMAGE_TAG) -f clients/cmd/logstash/Dockerfile ./ # Send 10 lines to the local Loki instance. @@ -501,7 +507,7 @@ logstash-push-test-logs: $(SUDO) docker run -e LOKI_URL="$(LOKI_URL)" -v `pwd`/clients/cmd/logstash/loki-test.conf:/home/logstash/loki.conf --rm \ $(IMAGE_PREFIX)/logstash-output-loki:$(IMAGE_TAG) -f loki.conf -logstash-push: +logstash-push: ## push the logstash image $(SUDO) $(PUSH_OCI) $(IMAGE_PREFIX)/logstash-output-loki:$(IMAGE_TAG) # Enter an env already configure to build and test logstash output plugin. @@ -543,41 +549,41 @@ define push-image endef # promtail -promtail-image: +promtail-image: ## build the promtail docker image $(SUDO) docker build -t $(IMAGE_PREFIX)/promtail:$(IMAGE_TAG) -f clients/cmd/promtail/Dockerfile . promtail-image-cross: $(SUDO) $(BUILD_OCI) -t $(IMAGE_PREFIX)/promtail:$(IMAGE_TAG) -f clients/cmd/promtail/Dockerfile.cross . promtail-debug-image: OCI_PLATFORMS= -promtail-debug-image: +promtail-debug-image: ## build the promtail debug docker image $(SUDO) $(BUILD_OCI) -t $(IMAGE_PREFIX)/promtail:$(IMAGE_TAG)-debug -f clients/cmd/promtail/Dockerfile.debug . promtail-push: promtail-image-cross $(call push-image,promtail) # loki -loki-image: +loki-image: ## build the loki docker image $(SUDO) docker build -t $(IMAGE_PREFIX)/loki:$(IMAGE_TAG) -f cmd/loki/Dockerfile . loki-image-cross: $(SUDO) $(BUILD_OCI) -t $(IMAGE_PREFIX)/loki:$(IMAGE_TAG) -f cmd/loki/Dockerfile.cross . loki-debug-image: OCI_PLATFORMS= -loki-debug-image: +loki-debug-image: ## build the debug loki docker image $(SUDO) $(BUILD_OCI) -t $(IMAGE_PREFIX)/loki:$(IMAGE_TAG)-debug -f cmd/loki/Dockerfile.debug . loki-push: loki-image-cross $(call push-image,loki) # loki-canary -loki-canary-image: +loki-canary-image: ## build the loki canary docker image $(SUDO) docker build -t $(IMAGE_PREFIX)/loki-canary:$(IMAGE_TAG) -f cmd/loki-canary/Dockerfile . loki-canary-image-cross: $(SUDO) $(BUILD_OCI) -t $(IMAGE_PREFIX)/loki-canary:$(IMAGE_TAG) -f cmd/loki-canary/Dockerfile.cross . loki-canary-push: loki-canary-image-cross $(SUDO) $(PUSH_OCI) $(IMAGE_PREFIX)/loki-canary:$(IMAGE_TAG) -helm-test-image: +helm-test-image: ## build the helm test image $(SUDO) docker build -t $(IMAGE_PREFIX)/loki-helm-test:$(IMAGE_TAG) -f production/helm/loki/src/helm-test/Dockerfile . -helm-test-push: helm-test-image +helm-test-push: helm-test-image ## push the helm test image $(SUDO) $(PUSH_OCI) $(IMAGE_PREFIX)/loki-helm-test:$(IMAGE_TAG) # loki-querytee @@ -593,17 +599,17 @@ migrate-image: $(SUDO) docker build -t $(IMAGE_PREFIX)/loki-migrate:$(IMAGE_TAG) -f cmd/migrate/Dockerfile . # LogQL Analyzer -logql-analyzer-image: +logql-analyzer-image: ## build the LogQL Analyzer image $(SUDO) docker build -t $(IMAGE_PREFIX)/logql-analyzer:$(IMAGE_TAG) -f cmd/logql-analyzer/Dockerfile . -logql-analyzer-push: logql-analyzer-image +logql-analyzer-push: logql-analyzer-image ## push the LogQL Analyzer image $(call push-image,logql-analyzer) # build-image (only amd64) build-image: OCI_PLATFORMS= -build-image: +build-image: ## build the docker build image $(SUDO) $(BUILD_OCI) -t $(IMAGE_PREFIX)/loki-build-image:$(IMAGE_TAG) ./loki-build-image -build-image-push: build-image +build-image-push: build-image ## push the docker build image ifneq (,$(findstring WIP,$(IMAGE_TAG))) @echo "Cannot push a WIP image, commit changes first"; \ false; From bb963269530d39caa7999efc5719151450a6953e Mon Sep 17 00:00:00 2001 From: Bayan Taani <86984560+btaani@users.noreply.github.com> Date: Fri, 26 May 2023 13:56:04 +0200 Subject: [PATCH 23/23] operator: Include runtime-config in compiling the SHA1 checksum (#9448) --- operator/CHANGELOG.md | 1 + operator/internal/manifests/config.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/operator/CHANGELOG.md b/operator/CHANGELOG.md index 05c8c8da259b..ce2cefd6e7b8 100644 --- a/operator/CHANGELOG.md +++ b/operator/CHANGELOG.md @@ -1,5 +1,6 @@ ## Main +- [9448](https://github.com/grafana/loki/pull/9448) **btaani**: Include runtime-config in compiling the SHA1 checksum - [9511](https://github.com/grafana/loki/pull/9511) **xperimental**: Do not update status after setting degraded condition - [9405](https://github.com/grafana/loki/pull/9405) **periklis**: Add support for configuring HTTP server timeouts - [9378](https://github.com/grafana/loki/pull/9378) **aminesnow**: Add zone aware API spec validation diff --git a/operator/internal/manifests/config.go b/operator/internal/manifests/config.go index 6ac16a2add03..fe3f097210f1 100644 --- a/operator/internal/manifests/config.go +++ b/operator/internal/manifests/config.go @@ -32,6 +32,10 @@ func LokiConfigMap(opt Options) (*corev1.ConfigMap, string, error) { if err != nil { return nil, "", err } + _, err = s.Write(rc) + if err != nil { + return nil, "", err + } sha1C := fmt.Sprintf("%x", s.Sum(nil)) return &corev1.ConfigMap{