diff --git a/go.mod b/go.mod index 05a81235a3..b6b2d9549c 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( gocloud.dev/docstore/mongodocstore v0.28.0 gocloud.dev/pubsub/kafkapubsub v0.28.0 golang.org/x/crypto v0.6.0 - google.golang.org/grpc v1.52.3 + google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.28.1 gopkg.in/square/go-jose.v2 v2.6.0 gopkg.in/yaml.v2 v2.4.0 @@ -69,7 +69,7 @@ require ( 4d63.com/gochecknoglobals v0.2.1 // indirect bitbucket.org/creachadair/shell v0.0.7 // indirect cloud.google.com/go v0.107.0 // indirect - cloud.google.com/go/compute v1.14.0 // indirect + cloud.google.com/go/compute v1.15.1 // indirect cloud.google.com/go/firestore v1.9.0 // indirect cloud.google.com/go/iam v0.8.0 // indirect cloud.google.com/go/kms v1.8.0 // indirect @@ -148,14 +148,14 @@ require ( github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20221024190013-b3ef35877348 // indirect github.com/chrismellard/docker-credential-acr-env v0.0.0-20221002210726-e883f69e0206 // indirect github.com/clbanning/mxj/v2 v2.5.6 // indirect github.com/cloudevents/sdk-go/v2 v2.13.0 // indirect - github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect - github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc // indirect + github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect + github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b // indirect github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect github.com/containerd/stargz-snapshotter/estargz v0.12.1 // indirect github.com/coreos/go-oidc/v3 v3.5.0 // indirect @@ -179,7 +179,7 @@ require ( github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/envoyproxy/go-control-plane v0.10.3 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.13 // indirect + github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect github.com/esimonov/ifshort v1.0.4 // indirect github.com/ettle/strcase v0.1.1 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect diff --git a/go.sum b/go.sum index 19e6e4d8b4..4779cce78f 100644 --- a/go.sum +++ b/go.sum @@ -127,8 +127,8 @@ cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOt 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 h1:hfm2+FfxVmnRlh6LpB7cg1ZNU+5edAHmW679JePztk0= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= 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= @@ -823,8 +823,9 @@ github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5P github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charithe/durationcheck v0.0.9 h1:mPP4ucLrf/rKZiIG/a9IPXHGlh8p4CzgpyTy6EEutYk= github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= github.com/chavacava/garif v0.0.0-20221024190013-b3ef35877348 h1:cy5GCEZLUCshCGCRRUjxHrDUqkB4l5cuUt3ShEckQEo= @@ -858,15 +859,17 @@ github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GK github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= 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 h1:PYXxkRUBGUMa5xgMVMDl62vEklZvKpVaxQeN9ie7Hfk= 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 h1:ACGZRIr7HsgBKHsueQ1yM4WaVaXh21ynwqsF8M8tXhA= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= @@ -1117,8 +1120,9 @@ github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.3.0-java/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.6.13 h1:TvDcILLkjuZV3ER58VkBmncKsLUBqBDxra/XctCzuMM= github.com/envoyproxy/protoc-gen-validate v0.6.13/go.mod h1:qEySVqXrEugbHKvmhI8ZqtQi75/RHSSRNpffvB4I6Bw= +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/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE= @@ -3727,8 +3731,8 @@ google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -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/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= diff --git a/vendor/cloud.google.com/go/compute/internal/version.go b/vendor/cloud.google.com/go/compute/internal/version.go index c9ba91825c..7dd6a0aa86 100644 --- a/vendor/cloud.google.com/go/compute/internal/version.go +++ b/vendor/cloud.google.com/go/compute/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.14.0" +const Version = "1.15.1" diff --git a/vendor/github.com/cespare/xxhash/v2/README.md b/vendor/github.com/cespare/xxhash/v2/README.md index 792b4a60b3..8bf0e5b781 100644 --- a/vendor/github.com/cespare/xxhash/v2/README.md +++ b/vendor/github.com/cespare/xxhash/v2/README.md @@ -3,8 +3,7 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2) [![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml) -xxhash is a Go implementation of the 64-bit -[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a +xxhash is a Go implementation of the 64-bit [xxHash] algorithm, XXH64. This is a high-quality hashing algorithm that is much faster than anything in the Go standard library. @@ -25,8 +24,11 @@ func (*Digest) WriteString(string) (int, error) func (*Digest) Sum64() uint64 ``` -This implementation provides a fast pure-Go implementation and an even faster -assembly implementation for amd64. +The package is written with optimized pure Go and also contains even faster +assembly implementations for amd64 and arm64. If desired, the `purego` build tag +opts into using the Go code even on those architectures. + +[xxHash]: http://cyan4973.github.io/xxHash/ ## Compatibility @@ -45,19 +47,20 @@ I recommend using the latest release of Go. Here are some quick benchmarks comparing the pure-Go and assembly implementations of Sum64. -| input size | purego | asm | -| --- | --- | --- | -| 5 B | 979.66 MB/s | 1291.17 MB/s | -| 100 B | 7475.26 MB/s | 7973.40 MB/s | -| 4 KB | 17573.46 MB/s | 17602.65 MB/s | -| 10 MB | 17131.46 MB/s | 17142.16 MB/s | +| input size | purego | asm | +| ---------- | --------- | --------- | +| 4 B | 1.3 GB/s | 1.2 GB/s | +| 16 B | 2.9 GB/s | 3.5 GB/s | +| 100 B | 6.9 GB/s | 8.1 GB/s | +| 4 KB | 11.7 GB/s | 16.7 GB/s | +| 10 MB | 12.0 GB/s | 17.3 GB/s | -These numbers were generated on Ubuntu 18.04 with an Intel i7-8700K CPU using -the following commands under Go 1.11.2: +These numbers were generated on Ubuntu 20.04 with an Intel Xeon Platinum 8252C +CPU using the following commands under Go 1.19.2: ``` -$ go test -tags purego -benchtime 10s -bench '/xxhash,direct,bytes' -$ go test -benchtime 10s -bench '/xxhash,direct,bytes' +benchstat <(go test -tags purego -benchtime 500ms -count 15 -bench 'Sum64$') +benchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$') ``` ## Projects using this package diff --git a/vendor/github.com/cespare/xxhash/v2/testall.sh b/vendor/github.com/cespare/xxhash/v2/testall.sh new file mode 100644 index 0000000000..94b9c44398 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/testall.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -eu -o pipefail + +# Small convenience script for running the tests with various combinations of +# arch/tags. This assumes we're running on amd64 and have qemu available. + +go test ./... +go test -tags purego ./... +GOARCH=arm64 go test +GOARCH=arm64 go test -tags purego diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash.go b/vendor/github.com/cespare/xxhash/v2/xxhash.go index 15c835d541..a9e0d45c9d 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash.go @@ -16,19 +16,11 @@ const ( prime5 uint64 = 2870177450012600261 ) -// NOTE(caleb): I'm using both consts and vars of the primes. Using consts where -// possible in the Go code is worth a small (but measurable) performance boost -// by avoiding some MOVQs. Vars are needed for the asm and also are useful for -// convenience in the Go code in a few places where we need to intentionally -// avoid constant arithmetic (e.g., v1 := prime1 + prime2 fails because the -// result overflows a uint64). -var ( - prime1v = prime1 - prime2v = prime2 - prime3v = prime3 - prime4v = prime4 - prime5v = prime5 -) +// Store the primes in an array as well. +// +// The consts are used when possible in Go code to avoid MOVs but we need a +// contiguous array of the assembly code. +var primes = [...]uint64{prime1, prime2, prime3, prime4, prime5} // Digest implements hash.Hash64. type Digest struct { @@ -50,10 +42,10 @@ func New() *Digest { // Reset clears the Digest's state so that it can be reused. func (d *Digest) Reset() { - d.v1 = prime1v + prime2 + d.v1 = primes[0] + prime2 d.v2 = prime2 d.v3 = 0 - d.v4 = -prime1v + d.v4 = -primes[0] d.total = 0 d.n = 0 } @@ -69,21 +61,23 @@ func (d *Digest) Write(b []byte) (n int, err error) { n = len(b) d.total += uint64(n) + memleft := d.mem[d.n&(len(d.mem)-1):] + if d.n+n < 32 { // This new data doesn't even fill the current block. - copy(d.mem[d.n:], b) + copy(memleft, b) d.n += n return } if d.n > 0 { // Finish off the partial block. - copy(d.mem[d.n:], b) + c := copy(memleft, b) d.v1 = round(d.v1, u64(d.mem[0:8])) d.v2 = round(d.v2, u64(d.mem[8:16])) d.v3 = round(d.v3, u64(d.mem[16:24])) d.v4 = round(d.v4, u64(d.mem[24:32])) - b = b[32-d.n:] + b = b[c:] d.n = 0 } @@ -133,21 +127,20 @@ func (d *Digest) Sum64() uint64 { h += d.total - i, end := 0, d.n - for ; i+8 <= end; i += 8 { - k1 := round(0, u64(d.mem[i:i+8])) + b := d.mem[:d.n&(len(d.mem)-1)] + for ; len(b) >= 8; b = b[8:] { + k1 := round(0, u64(b[:8])) h ^= k1 h = rol27(h)*prime1 + prime4 } - if i+4 <= end { - h ^= uint64(u32(d.mem[i:i+4])) * prime1 + if len(b) >= 4 { + h ^= uint64(u32(b[:4])) * prime1 h = rol23(h)*prime2 + prime3 - i += 4 + b = b[4:] } - for i < end { - h ^= uint64(d.mem[i]) * prime5 + for ; len(b) > 0; b = b[1:] { + h ^= uint64(b[0]) * prime5 h = rol11(h) * prime1 - i++ } h ^= h >> 33 diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s index be8db5bf79..3e8b132579 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s @@ -1,215 +1,209 @@ +//go:build !appengine && gc && !purego // +build !appengine // +build gc // +build !purego #include "textflag.h" -// Register allocation: -// AX h -// SI pointer to advance through b -// DX n -// BX loop end -// R8 v1, k1 -// R9 v2 -// R10 v3 -// R11 v4 -// R12 tmp -// R13 prime1v -// R14 prime2v -// DI prime4v - -// round reads from and advances the buffer pointer in SI. -// It assumes that R13 has prime1v and R14 has prime2v. -#define round(r) \ - MOVQ (SI), R12 \ - ADDQ $8, SI \ - IMULQ R14, R12 \ - ADDQ R12, r \ - ROLQ $31, r \ - IMULQ R13, r - -// mergeRound applies a merge round on the two registers acc and val. -// It assumes that R13 has prime1v, R14 has prime2v, and DI has prime4v. -#define mergeRound(acc, val) \ - IMULQ R14, val \ - ROLQ $31, val \ - IMULQ R13, val \ - XORQ val, acc \ - IMULQ R13, acc \ - ADDQ DI, acc +// Registers: +#define h AX +#define d AX +#define p SI // pointer to advance through b +#define n DX +#define end BX // loop end +#define v1 R8 +#define v2 R9 +#define v3 R10 +#define v4 R11 +#define x R12 +#define prime1 R13 +#define prime2 R14 +#define prime4 DI + +#define round(acc, x) \ + IMULQ prime2, x \ + ADDQ x, acc \ + ROLQ $31, acc \ + IMULQ prime1, acc + +// round0 performs the operation x = round(0, x). +#define round0(x) \ + IMULQ prime2, x \ + ROLQ $31, x \ + IMULQ prime1, x + +// mergeRound applies a merge round on the two registers acc and x. +// It assumes that prime1, prime2, and prime4 have been loaded. +#define mergeRound(acc, x) \ + round0(x) \ + XORQ x, acc \ + IMULQ prime1, acc \ + ADDQ prime4, acc + +// blockLoop processes as many 32-byte blocks as possible, +// updating v1, v2, v3, and v4. It assumes that there is at least one block +// to process. +#define blockLoop() \ +loop: \ + MOVQ +0(p), x \ + round(v1, x) \ + MOVQ +8(p), x \ + round(v2, x) \ + MOVQ +16(p), x \ + round(v3, x) \ + MOVQ +24(p), x \ + round(v4, x) \ + ADDQ $32, p \ + CMPQ p, end \ + JLE loop // func Sum64(b []byte) uint64 -TEXT ·Sum64(SB), NOSPLIT, $0-32 +TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32 // Load fixed primes. - MOVQ ·prime1v(SB), R13 - MOVQ ·prime2v(SB), R14 - MOVQ ·prime4v(SB), DI + MOVQ ·primes+0(SB), prime1 + MOVQ ·primes+8(SB), prime2 + MOVQ ·primes+24(SB), prime4 // Load slice. - MOVQ b_base+0(FP), SI - MOVQ b_len+8(FP), DX - LEAQ (SI)(DX*1), BX + MOVQ b_base+0(FP), p + MOVQ b_len+8(FP), n + LEAQ (p)(n*1), end // The first loop limit will be len(b)-32. - SUBQ $32, BX + SUBQ $32, end // Check whether we have at least one block. - CMPQ DX, $32 + CMPQ n, $32 JLT noBlocks // Set up initial state (v1, v2, v3, v4). - MOVQ R13, R8 - ADDQ R14, R8 - MOVQ R14, R9 - XORQ R10, R10 - XORQ R11, R11 - SUBQ R13, R11 - - // Loop until SI > BX. -blockLoop: - round(R8) - round(R9) - round(R10) - round(R11) - - CMPQ SI, BX - JLE blockLoop - - MOVQ R8, AX - ROLQ $1, AX - MOVQ R9, R12 - ROLQ $7, R12 - ADDQ R12, AX - MOVQ R10, R12 - ROLQ $12, R12 - ADDQ R12, AX - MOVQ R11, R12 - ROLQ $18, R12 - ADDQ R12, AX - - mergeRound(AX, R8) - mergeRound(AX, R9) - mergeRound(AX, R10) - mergeRound(AX, R11) + MOVQ prime1, v1 + ADDQ prime2, v1 + MOVQ prime2, v2 + XORQ v3, v3 + XORQ v4, v4 + SUBQ prime1, v4 + + blockLoop() + + MOVQ v1, h + ROLQ $1, h + MOVQ v2, x + ROLQ $7, x + ADDQ x, h + MOVQ v3, x + ROLQ $12, x + ADDQ x, h + MOVQ v4, x + ROLQ $18, x + ADDQ x, h + + mergeRound(h, v1) + mergeRound(h, v2) + mergeRound(h, v3) + mergeRound(h, v4) JMP afterBlocks noBlocks: - MOVQ ·prime5v(SB), AX + MOVQ ·primes+32(SB), h afterBlocks: - ADDQ DX, AX - - // Right now BX has len(b)-32, and we want to loop until SI > len(b)-8. - ADDQ $24, BX - - CMPQ SI, BX - JG fourByte - -wordLoop: - // Calculate k1. - MOVQ (SI), R8 - ADDQ $8, SI - IMULQ R14, R8 - ROLQ $31, R8 - IMULQ R13, R8 - - XORQ R8, AX - ROLQ $27, AX - IMULQ R13, AX - ADDQ DI, AX - - CMPQ SI, BX - JLE wordLoop - -fourByte: - ADDQ $4, BX - CMPQ SI, BX - JG singles - - MOVL (SI), R8 - ADDQ $4, SI - IMULQ R13, R8 - XORQ R8, AX - - ROLQ $23, AX - IMULQ R14, AX - ADDQ ·prime3v(SB), AX - -singles: - ADDQ $4, BX - CMPQ SI, BX + ADDQ n, h + + ADDQ $24, end + CMPQ p, end + JG try4 + +loop8: + MOVQ (p), x + ADDQ $8, p + round0(x) + XORQ x, h + ROLQ $27, h + IMULQ prime1, h + ADDQ prime4, h + + CMPQ p, end + JLE loop8 + +try4: + ADDQ $4, end + CMPQ p, end + JG try1 + + MOVL (p), x + ADDQ $4, p + IMULQ prime1, x + XORQ x, h + + ROLQ $23, h + IMULQ prime2, h + ADDQ ·primes+16(SB), h + +try1: + ADDQ $4, end + CMPQ p, end JGE finalize -singlesLoop: - MOVBQZX (SI), R12 - ADDQ $1, SI - IMULQ ·prime5v(SB), R12 - XORQ R12, AX +loop1: + MOVBQZX (p), x + ADDQ $1, p + IMULQ ·primes+32(SB), x + XORQ x, h + ROLQ $11, h + IMULQ prime1, h - ROLQ $11, AX - IMULQ R13, AX - - CMPQ SI, BX - JL singlesLoop + CMPQ p, end + JL loop1 finalize: - MOVQ AX, R12 - SHRQ $33, R12 - XORQ R12, AX - IMULQ R14, AX - MOVQ AX, R12 - SHRQ $29, R12 - XORQ R12, AX - IMULQ ·prime3v(SB), AX - MOVQ AX, R12 - SHRQ $32, R12 - XORQ R12, AX - - MOVQ AX, ret+24(FP) + MOVQ h, x + SHRQ $33, x + XORQ x, h + IMULQ prime2, h + MOVQ h, x + SHRQ $29, x + XORQ x, h + IMULQ ·primes+16(SB), h + MOVQ h, x + SHRQ $32, x + XORQ x, h + + MOVQ h, ret+24(FP) RET -// writeBlocks uses the same registers as above except that it uses AX to store -// the d pointer. - // func writeBlocks(d *Digest, b []byte) int -TEXT ·writeBlocks(SB), NOSPLIT, $0-40 +TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 // Load fixed primes needed for round. - MOVQ ·prime1v(SB), R13 - MOVQ ·prime2v(SB), R14 + MOVQ ·primes+0(SB), prime1 + MOVQ ·primes+8(SB), prime2 // Load slice. - MOVQ b_base+8(FP), SI - MOVQ b_len+16(FP), DX - LEAQ (SI)(DX*1), BX - SUBQ $32, BX + MOVQ b_base+8(FP), p + MOVQ b_len+16(FP), n + LEAQ (p)(n*1), end + SUBQ $32, end // Load vN from d. - MOVQ d+0(FP), AX - MOVQ 0(AX), R8 // v1 - MOVQ 8(AX), R9 // v2 - MOVQ 16(AX), R10 // v3 - MOVQ 24(AX), R11 // v4 + MOVQ s+0(FP), d + MOVQ 0(d), v1 + MOVQ 8(d), v2 + MOVQ 16(d), v3 + MOVQ 24(d), v4 // We don't need to check the loop condition here; this function is // always called with at least one block of data to process. -blockLoop: - round(R8) - round(R9) - round(R10) - round(R11) - - CMPQ SI, BX - JLE blockLoop + blockLoop() // Copy vN back to d. - MOVQ R8, 0(AX) - MOVQ R9, 8(AX) - MOVQ R10, 16(AX) - MOVQ R11, 24(AX) - - // The number of bytes written is SI minus the old base pointer. - SUBQ b_base+8(FP), SI - MOVQ SI, ret+32(FP) + MOVQ v1, 0(d) + MOVQ v2, 8(d) + MOVQ v3, 16(d) + MOVQ v4, 24(d) + + // The number of bytes written is p minus the old base pointer. + SUBQ b_base+8(FP), p + MOVQ p, ret+32(FP) RET diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s new file mode 100644 index 0000000000..7e3145a221 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s @@ -0,0 +1,183 @@ +//go:build !appengine && gc && !purego +// +build !appengine +// +build gc +// +build !purego + +#include "textflag.h" + +// Registers: +#define digest R1 +#define h R2 // return value +#define p R3 // input pointer +#define n R4 // input length +#define nblocks R5 // n / 32 +#define prime1 R7 +#define prime2 R8 +#define prime3 R9 +#define prime4 R10 +#define prime5 R11 +#define v1 R12 +#define v2 R13 +#define v3 R14 +#define v4 R15 +#define x1 R20 +#define x2 R21 +#define x3 R22 +#define x4 R23 + +#define round(acc, x) \ + MADD prime2, acc, x, acc \ + ROR $64-31, acc \ + MUL prime1, acc + +// round0 performs the operation x = round(0, x). +#define round0(x) \ + MUL prime2, x \ + ROR $64-31, x \ + MUL prime1, x + +#define mergeRound(acc, x) \ + round0(x) \ + EOR x, acc \ + MADD acc, prime4, prime1, acc + +// blockLoop processes as many 32-byte blocks as possible, +// updating v1, v2, v3, and v4. It assumes that n >= 32. +#define blockLoop() \ + LSR $5, n, nblocks \ + PCALIGN $16 \ + loop: \ + LDP.P 16(p), (x1, x2) \ + LDP.P 16(p), (x3, x4) \ + round(v1, x1) \ + round(v2, x2) \ + round(v3, x3) \ + round(v4, x4) \ + SUB $1, nblocks \ + CBNZ nblocks, loop + +// func Sum64(b []byte) uint64 +TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32 + LDP b_base+0(FP), (p, n) + + LDP ·primes+0(SB), (prime1, prime2) + LDP ·primes+16(SB), (prime3, prime4) + MOVD ·primes+32(SB), prime5 + + CMP $32, n + CSEL LT, prime5, ZR, h // if n < 32 { h = prime5 } else { h = 0 } + BLT afterLoop + + ADD prime1, prime2, v1 + MOVD prime2, v2 + MOVD $0, v3 + NEG prime1, v4 + + blockLoop() + + ROR $64-1, v1, x1 + ROR $64-7, v2, x2 + ADD x1, x2 + ROR $64-12, v3, x3 + ROR $64-18, v4, x4 + ADD x3, x4 + ADD x2, x4, h + + mergeRound(h, v1) + mergeRound(h, v2) + mergeRound(h, v3) + mergeRound(h, v4) + +afterLoop: + ADD n, h + + TBZ $4, n, try8 + LDP.P 16(p), (x1, x2) + + round0(x1) + + // NOTE: here and below, sequencing the EOR after the ROR (using a + // rotated register) is worth a small but measurable speedup for small + // inputs. + ROR $64-27, h + EOR x1 @> 64-27, h, h + MADD h, prime4, prime1, h + + round0(x2) + ROR $64-27, h + EOR x2 @> 64-27, h, h + MADD h, prime4, prime1, h + +try8: + TBZ $3, n, try4 + MOVD.P 8(p), x1 + + round0(x1) + ROR $64-27, h + EOR x1 @> 64-27, h, h + MADD h, prime4, prime1, h + +try4: + TBZ $2, n, try2 + MOVWU.P 4(p), x2 + + MUL prime1, x2 + ROR $64-23, h + EOR x2 @> 64-23, h, h + MADD h, prime3, prime2, h + +try2: + TBZ $1, n, try1 + MOVHU.P 2(p), x3 + AND $255, x3, x1 + LSR $8, x3, x2 + + MUL prime5, x1 + ROR $64-11, h + EOR x1 @> 64-11, h, h + MUL prime1, h + + MUL prime5, x2 + ROR $64-11, h + EOR x2 @> 64-11, h, h + MUL prime1, h + +try1: + TBZ $0, n, finalize + MOVBU (p), x4 + + MUL prime5, x4 + ROR $64-11, h + EOR x4 @> 64-11, h, h + MUL prime1, h + +finalize: + EOR h >> 33, h + MUL prime2, h + EOR h >> 29, h + MUL prime3, h + EOR h >> 32, h + + MOVD h, ret+24(FP) + RET + +// func writeBlocks(d *Digest, b []byte) int +TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 + LDP ·primes+0(SB), (prime1, prime2) + + // Load state. Assume v[1-4] are stored contiguously. + MOVD d+0(FP), digest + LDP 0(digest), (v1, v2) + LDP 16(digest), (v3, v4) + + LDP b_base+8(FP), (p, n) + + blockLoop() + + // Store updated state. + STP (v1, v2), 0(digest) + STP (v3, v4), 16(digest) + + BIC $31, n + MOVD n, ret+32(FP) + RET diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go similarity index 73% rename from vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go rename to vendor/github.com/cespare/xxhash/v2/xxhash_asm.go index ad14b807f4..9216e0a40c 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go @@ -1,3 +1,5 @@ +//go:build (amd64 || arm64) && !appengine && gc && !purego +// +build amd64 arm64 // +build !appengine // +build gc // +build !purego diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go index 4a5a821603..26df13bba4 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go @@ -1,4 +1,5 @@ -// +build !amd64 appengine !gc purego +//go:build (!amd64 && !arm64) || appengine || !gc || purego +// +build !amd64,!arm64 appengine !gc purego package xxhash @@ -14,10 +15,10 @@ func Sum64(b []byte) uint64 { var h uint64 if n >= 32 { - v1 := prime1v + prime2 + v1 := primes[0] + prime2 v2 := prime2 v3 := uint64(0) - v4 := -prime1v + v4 := -primes[0] for len(b) >= 32 { v1 = round(v1, u64(b[0:8:len(b)])) v2 = round(v2, u64(b[8:16:len(b)])) @@ -36,19 +37,18 @@ func Sum64(b []byte) uint64 { h += uint64(n) - i, end := 0, len(b) - for ; i+8 <= end; i += 8 { - k1 := round(0, u64(b[i:i+8:len(b)])) + for ; len(b) >= 8; b = b[8:] { + k1 := round(0, u64(b[:8])) h ^= k1 h = rol27(h)*prime1 + prime4 } - if i+4 <= end { - h ^= uint64(u32(b[i:i+4:len(b)])) * prime1 + if len(b) >= 4 { + h ^= uint64(u32(b[:4])) * prime1 h = rol23(h)*prime2 + prime3 - i += 4 + b = b[4:] } - for ; i < end; i++ { - h ^= uint64(b[i]) * prime5 + for ; len(b) > 0; b = b[1:] { + h ^= uint64(b[0]) * prime5 h = rol11(h) * prime1 } diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go index fc9bea7a31..e86f1b5fd8 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go @@ -1,3 +1,4 @@ +//go:build appengine // +build appengine // This file contains the safe implementations of otherwise unsafe-using code. diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go index 376e0ca2e4..1c1638fd88 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go @@ -1,3 +1,4 @@ +//go:build !appengine // +build !appengine // This file encapsulates usage of unsafe. @@ -11,7 +12,7 @@ import ( // In the future it's possible that compiler optimizations will make these // XxxString functions unnecessary by realizing that calls such as -// Sum64([]byte(s)) don't need to copy s. See https://golang.org/issue/2205. +// Sum64([]byte(s)) don't need to copy s. See https://go.dev/issue/2205. // If that happens, even if we keep these functions they can be replaced with // the trivial safe code. diff --git a/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.go b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.go index e6d4b9e207..3536641675 100644 --- a/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.go +++ b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.go @@ -31,11 +31,13 @@ type OrcaLoadReport struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"` - MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"` - Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"` - RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"` + MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"` + // Deprecated: Do not use. + Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"` + RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + RpsFractional float64 `protobuf:"fixed64,6,opt,name=rps_fractional,json=rpsFractional,proto3" json:"rps_fractional,omitempty"` } func (x *OrcaLoadReport) Reset() { @@ -84,6 +86,7 @@ func (x *OrcaLoadReport) GetMemUtilization() float64 { return 0 } +// Deprecated: Do not use. func (x *OrcaLoadReport) GetRps() uint64 { if x != nil { return x.Rps @@ -105,6 +108,13 @@ func (x *OrcaLoadReport) GetUtilization() map[string]float64 { return nil } +func (x *OrcaLoadReport) GetRpsFractional() float64 { + if x != nil { + return x.RpsFractional + } + return 0 +} + var File_xds_data_orca_v3_orca_load_report_proto protoreflect.FileDescriptor var file_xds_data_orca_v3_orca_load_report_proto_rawDesc = []byte{ @@ -113,7 +123,7 @@ var file_xds_data_orca_v3_orca_load_report_proto_rawDesc = []byte{ 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, 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, 0x83, 0x04, 0x0a, 0x0e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x04, 0x0a, 0x0e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x1c, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -123,36 +133,39 @@ var file_xds_data_orca_v3_orca_load_report_proto_rawDesc = []byte{ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x1c, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x03, 0x72, 0x70, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, - 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x7b, 0x0a, - 0x0b, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, - 0x63, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x26, 0xfa, 0x42, 0x10, 0x9a, 0x01, 0x0d, 0x2a, 0x0b, 0x12, - 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x42, 0x10, 0x9a, 0x01, 0x0d, - 0x2a, 0x0b, 0x12, 0x09, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x52, 0x0b, 0x75, - 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3e, 0x0a, 0x10, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, 0x74, 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, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x55, 0x74, - 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x5d, 0x0a, 0x1b, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4f, 0x72, 0x63, 0x61, 0x4c, - 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, - 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x64, 0x61, 0x74, - 0x61, 0x2f, 0x6f, 0x72, 0x63, 0x61, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x03, 0x72, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x72, 0x70, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, + 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, + 0x74, 0x12, 0x7b, 0x0a, 0x0b, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, + 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x26, 0xfa, 0x42, 0x10, 0x9a, 0x01, + 0x0d, 0x2a, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x42, + 0x10, 0x9a, 0x01, 0x0d, 0x2a, 0x0b, 0x12, 0x09, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x3f, 0x52, 0x0b, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, + 0x0a, 0x0e, 0x72, 0x70, 0x73, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0d, 0x72, 0x70, 0x73, 0x46, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x1a, 0x3e, 0x0a, 0x10, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x43, 0x6f, 0x73, 0x74, 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, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 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, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x5d, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, + 0x61, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6f, 0x72, 0x63, + 0x61, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.validate.go index 1c446c8a34..19750a09a9 100644 --- a/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.validate.go +++ b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.validate.go @@ -73,6 +73,13 @@ func (m *OrcaLoadReport) Validate() error { } + if m.GetRpsFractional() < 0 { + return OrcaLoadReportValidationError{ + field: "RpsFractional", + reason: "value must be greater than or equal to 0", + } + } + return nil } diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go new file mode 100644 index 0000000000..24b19ac0ae --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go @@ -0,0 +1,167 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/cel.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/type/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CelMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"` +} + +func (x *CelMatcher) Reset() { + *x = CelMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CelMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CelMatcher) ProtoMessage() {} + +func (x *CelMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_cel_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 CelMatcher.ProtoReflect.Descriptor instead. +func (*CelMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_cel_proto_rawDescGZIP(), []int{0} +} + +func (x *CelMatcher) GetExprMatch() *v3.CelExpression { + if x != nil { + return x.ExprMatch + } + return nil +} + +var File_xds_type_matcher_v3_cel_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_cel_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 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, 0x51, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, + 0x78, 0x70, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x60, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, + 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, + 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_cel_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_cel_proto_rawDescData = file_xds_type_matcher_v3_cel_proto_rawDesc +) + +func file_xds_type_matcher_v3_cel_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_cel_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_cel_proto_rawDescData) + }) + return file_xds_type_matcher_v3_cel_proto_rawDescData +} + +var file_xds_type_matcher_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_xds_type_matcher_v3_cel_proto_goTypes = []interface{}{ + (*CelMatcher)(nil), // 0: xds.type.matcher.v3.CelMatcher + (*v3.CelExpression)(nil), // 1: xds.type.v3.CelExpression +} +var file_xds_type_matcher_v3_cel_proto_depIdxs = []int32{ + 1, // 0: xds.type.matcher.v3.CelMatcher.expr_match:type_name -> xds.type.v3.CelExpression + 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_xds_type_matcher_v3_cel_proto_init() } +func file_xds_type_matcher_v3_cel_proto_init() { + if File_xds_type_matcher_v3_cel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CelMatcher); 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_xds_type_matcher_v3_cel_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_cel_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_cel_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_cel_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_cel_proto = out.File + file_xds_type_matcher_v3_cel_proto_rawDesc = nil + file_xds_type_matcher_v3_cel_proto_goTypes = nil + file_xds_type_matcher_v3_cel_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go new file mode 100644 index 0000000000..c079a2a9d7 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/cel.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "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{} +) + +// Validate checks the field values on CelMatcher with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *CelMatcher) Validate() error { + if m == nil { + return nil + } + + if m.GetExprMatch() == nil { + return CelMatcherValidationError{ + field: "ExprMatch", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetExprMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelMatcherValidationError{ + field: "ExprMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// CelMatcherValidationError is the validation error returned by +// CelMatcher.Validate if the designated constraints aren't met. +type CelMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CelMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CelMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CelMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CelMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CelMatcherValidationError) ErrorName() string { return "CelMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e CelMatcherValidationError) 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 %sCelMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CelMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CelMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go new file mode 100644 index 0000000000..38d9f57b2e --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/domain.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ServerNameMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DomainMatchers []*ServerNameMatcher_DomainMatcher `protobuf:"bytes,1,rep,name=domain_matchers,json=domainMatchers,proto3" json:"domain_matchers,omitempty"` +} + +func (x *ServerNameMatcher) Reset() { + *x = ServerNameMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNameMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNameMatcher) ProtoMessage() {} + +func (x *ServerNameMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_domain_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 ServerNameMatcher.ProtoReflect.Descriptor instead. +func (*ServerNameMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0} +} + +func (x *ServerNameMatcher) GetDomainMatchers() []*ServerNameMatcher_DomainMatcher { + if x != nil { + return x.DomainMatchers + } + return nil +} + +type ServerNameMatcher_DomainMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Domains []string `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *ServerNameMatcher_DomainMatcher) Reset() { + *x = ServerNameMatcher_DomainMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNameMatcher_DomainMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNameMatcher_DomainMatcher) ProtoMessage() {} + +func (x *ServerNameMatcher_DomainMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_domain_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 ServerNameMatcher_DomainMatcher.ProtoReflect.Descriptor instead. +func (*ServerNameMatcher_DomainMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ServerNameMatcher_DomainMatcher) GetDomains() []string { + if x != nil { + return x.Domains + } + return nil +} + +func (x *ServerNameMatcher_DomainMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +var File_xds_type_matcher_v3_domain_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_domain_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 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, 0xe8, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0f, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x74, 0x0a, 0x0d, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x07, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f, + 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x6e, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_domain_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_domain_proto_rawDescData = file_xds_type_matcher_v3_domain_proto_rawDesc +) + +func file_xds_type_matcher_v3_domain_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_domain_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_domain_proto_rawDescData) + }) + return file_xds_type_matcher_v3_domain_proto_rawDescData +} + +var file_xds_type_matcher_v3_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_matcher_v3_domain_proto_goTypes = []interface{}{ + (*ServerNameMatcher)(nil), // 0: xds.type.matcher.v3.ServerNameMatcher + (*ServerNameMatcher_DomainMatcher)(nil), // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher + (*Matcher_OnMatch)(nil), // 2: xds.type.matcher.v3.Matcher.OnMatch +} +var file_xds_type_matcher_v3_domain_proto_depIdxs = []int32{ + 1, // 0: xds.type.matcher.v3.ServerNameMatcher.domain_matchers:type_name -> xds.type.matcher.v3.ServerNameMatcher.DomainMatcher + 2, // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 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_xds_type_matcher_v3_domain_proto_init() } +func file_xds_type_matcher_v3_domain_proto_init() { + if File_xds_type_matcher_v3_domain_proto != nil { + return + } + file_xds_type_matcher_v3_matcher_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNameMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNameMatcher_DomainMatcher); 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_xds_type_matcher_v3_domain_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_domain_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_domain_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_domain_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_domain_proto = out.File + file_xds_type_matcher_v3_domain_proto_rawDesc = nil + file_xds_type_matcher_v3_domain_proto_goTypes = nil + file_xds_type_matcher_v3_domain_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go new file mode 100644 index 0000000000..de964c6345 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/domain.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "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{} +) + +// Validate checks the field values on ServerNameMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *ServerNameMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetDomainMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerNameMatcherValidationError{ + field: fmt.Sprintf("DomainMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ServerNameMatcherValidationError is the validation error returned by +// ServerNameMatcher.Validate if the designated constraints aren't met. +type ServerNameMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerNameMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerNameMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerNameMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerNameMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerNameMatcherValidationError) ErrorName() string { + return "ServerNameMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e ServerNameMatcherValidationError) 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 %sServerNameMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerNameMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerNameMatcherValidationError{} + +// Validate checks the field values on ServerNameMatcher_DomainMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ServerNameMatcher_DomainMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetDomains()) < 1 { + return ServerNameMatcher_DomainMatcherValidationError{ + field: "Domains", + reason: "value must contain at least 1 item(s)", + } + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerNameMatcher_DomainMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ServerNameMatcher_DomainMatcherValidationError is the validation error +// returned by ServerNameMatcher_DomainMatcher.Validate if the designated +// constraints aren't met. +type ServerNameMatcher_DomainMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerNameMatcher_DomainMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerNameMatcher_DomainMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerNameMatcher_DomainMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerNameMatcher_DomainMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerNameMatcher_DomainMatcherValidationError) ErrorName() string { + return "ServerNameMatcher_DomainMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e ServerNameMatcher_DomainMatcherValidationError) 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 %sServerNameMatcher_DomainMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerNameMatcher_DomainMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerNameMatcher_DomainMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go new file mode 100644 index 0000000000..c2b50933e2 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/http_inputs.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HttpAttributesCelMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HttpAttributesCelMatchInput) Reset() { + *x = HttpAttributesCelMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpAttributesCelMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpAttributesCelMatchInput) ProtoMessage() {} + +func (x *HttpAttributesCelMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_http_inputs_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 HttpAttributesCelMatchInput.ProtoReflect.Descriptor instead. +func (*HttpAttributesCelMatchInput) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0} +} + +var File_xds_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_http_inputs_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, + 0x1b, 0x48, 0x74, 0x74, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, + 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x67, 0x0a, 0x1e, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, + 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, + 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, + 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_http_inputs_proto_rawDescData = file_xds_type_matcher_v3_http_inputs_proto_rawDesc +) + +func file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_http_inputs_proto_rawDescData) + }) + return file_xds_type_matcher_v3_http_inputs_proto_rawDescData +} + +var file_xds_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_xds_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{ + (*HttpAttributesCelMatchInput)(nil), // 0: xds.type.matcher.v3.HttpAttributesCelMatchInput +} +var file_xds_type_matcher_v3_http_inputs_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_xds_type_matcher_v3_http_inputs_proto_init() } +func file_xds_type_matcher_v3_http_inputs_proto_init() { + if File_xds_type_matcher_v3_http_inputs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpAttributesCelMatchInput); 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_xds_type_matcher_v3_http_inputs_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_http_inputs_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_http_inputs_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_http_inputs_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_http_inputs_proto = out.File + file_xds_type_matcher_v3_http_inputs_proto_rawDesc = nil + file_xds_type_matcher_v3_http_inputs_proto_goTypes = nil + file_xds_type_matcher_v3_http_inputs_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go new file mode 100644 index 0000000000..1760d8f9d7 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go @@ -0,0 +1,102 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/http_inputs.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "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{} +) + +// Validate checks the field values on HttpAttributesCelMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *HttpAttributesCelMatchInput) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// HttpAttributesCelMatchInputValidationError is the validation error returned +// by HttpAttributesCelMatchInput.Validate if the designated constraints +// aren't met. +type HttpAttributesCelMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpAttributesCelMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpAttributesCelMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpAttributesCelMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpAttributesCelMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpAttributesCelMatchInputValidationError) ErrorName() string { + return "HttpAttributesCelMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpAttributesCelMatchInputValidationError) 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 %sHttpAttributesCelMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpAttributesCelMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpAttributesCelMatchInputValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go new file mode 100644 index 0000000000..0fd975a2e5 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go @@ -0,0 +1,298 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/v3/cel.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CelExpression struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ExprSpecifier: + // *CelExpression_ParsedExpr + // *CelExpression_CheckedExpr + ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` +} + +func (x *CelExpression) Reset() { + *x = CelExpression{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_cel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CelExpression) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CelExpression) ProtoMessage() {} + +func (x *CelExpression) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_cel_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 CelExpression.ProtoReflect.Descriptor instead. +func (*CelExpression) Descriptor() ([]byte, []int) { + return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{0} +} + +func (m *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier { + if m != nil { + return m.ExprSpecifier + } + return nil +} + +func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { + if x, ok := x.GetExprSpecifier().(*CelExpression_ParsedExpr); ok { + return x.ParsedExpr + } + return nil +} + +func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { + if x, ok := x.GetExprSpecifier().(*CelExpression_CheckedExpr); ok { + return x.CheckedExpr + } + return nil +} + +type isCelExpression_ExprSpecifier interface { + isCelExpression_ExprSpecifier() +} + +type CelExpression_ParsedExpr struct { + ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"` +} + +type CelExpression_CheckedExpr struct { + CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"` +} + +func (*CelExpression_ParsedExpr) isCelExpression_ExprSpecifier() {} + +func (*CelExpression_CheckedExpr) isCelExpression_ExprSpecifier() {} + +type CelExtractString struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"` + DefaultValue *wrappers.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` +} + +func (x *CelExtractString) Reset() { + *x = CelExtractString{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_cel_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CelExtractString) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CelExtractString) ProtoMessage() {} + +func (x *CelExtractString) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_cel_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 CelExtractString.ProtoReflect.Descriptor instead. +func (*CelExtractString) Descriptor() ([]byte, []int) { + return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{1} +} + +func (x *CelExtractString) GetExprExtract() *CelExpression { + if x != nil { + return x.ExprExtract + } + return nil +} + +func (x *CelExtractString) GetDefaultValue() *wrappers.StringValue { + if x != nil { + return x.DefaultValue + } + return nil +} + +var File_xds_type_v3_cel_proto protoreflect.FileDescriptor + +var file_xds_type_v3_cel_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 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, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 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, 0xbb, 0x01, + 0x0a, 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x47, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, + 0x45, 0x78, 0x70, 0x72, 0x42, 0x15, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x10, + 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x78, + 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 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, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_v3_cel_proto_rawDescOnce sync.Once + file_xds_type_v3_cel_proto_rawDescData = file_xds_type_v3_cel_proto_rawDesc +) + +func file_xds_type_v3_cel_proto_rawDescGZIP() []byte { + file_xds_type_v3_cel_proto_rawDescOnce.Do(func() { + file_xds_type_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_cel_proto_rawDescData) + }) + return file_xds_type_v3_cel_proto_rawDescData +} + +var file_xds_type_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_v3_cel_proto_goTypes = []interface{}{ + (*CelExpression)(nil), // 0: xds.type.v3.CelExpression + (*CelExtractString)(nil), // 1: xds.type.v3.CelExtractString + (*v1alpha1.ParsedExpr)(nil), // 2: google.api.expr.v1alpha1.ParsedExpr + (*v1alpha1.CheckedExpr)(nil), // 3: google.api.expr.v1alpha1.CheckedExpr + (*wrappers.StringValue)(nil), // 4: google.protobuf.StringValue +} +var file_xds_type_v3_cel_proto_depIdxs = []int32{ + 2, // 0: xds.type.v3.CelExpression.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr + 3, // 1: xds.type.v3.CelExpression.checked_expr:type_name -> google.api.expr.v1alpha1.CheckedExpr + 0, // 2: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression + 4, // 3: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_xds_type_v3_cel_proto_init() } +func file_xds_type_v3_cel_proto_init() { + if File_xds_type_v3_cel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CelExpression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_v3_cel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CelExtractString); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_xds_type_v3_cel_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*CelExpression_ParsedExpr)(nil), + (*CelExpression_CheckedExpr)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_v3_cel_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_v3_cel_proto_goTypes, + DependencyIndexes: file_xds_type_v3_cel_proto_depIdxs, + MessageInfos: file_xds_type_v3_cel_proto_msgTypes, + }.Build() + File_xds_type_v3_cel_proto = out.File + file_xds_type_v3_cel_proto_rawDesc = nil + file_xds_type_v3_cel_proto_goTypes = nil + file_xds_type_v3_cel_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go new file mode 100644 index 0000000000..c28fb4eda3 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go @@ -0,0 +1,225 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/v3/cel.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "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{} +) + +// Validate checks the field values on CelExpression with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *CelExpression) Validate() error { + if m == nil { + return nil + } + + switch m.ExprSpecifier.(type) { + + case *CelExpression_ParsedExpr: + + if v, ok := interface{}(m.GetParsedExpr()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExpressionValidationError{ + field: "ParsedExpr", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *CelExpression_CheckedExpr: + + if v, ok := interface{}(m.GetCheckedExpr()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExpressionValidationError{ + field: "CheckedExpr", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + return CelExpressionValidationError{ + field: "ExprSpecifier", + reason: "value is required", + } + + } + + return nil +} + +// CelExpressionValidationError is the validation error returned by +// CelExpression.Validate if the designated constraints aren't met. +type CelExpressionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CelExpressionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CelExpressionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CelExpressionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CelExpressionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CelExpressionValidationError) ErrorName() string { return "CelExpressionValidationError" } + +// Error satisfies the builtin error interface +func (e CelExpressionValidationError) 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 %sCelExpression.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CelExpressionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CelExpressionValidationError{} + +// Validate checks the field values on CelExtractString with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *CelExtractString) Validate() error { + if m == nil { + return nil + } + + if m.GetExprExtract() == nil { + return CelExtractStringValidationError{ + field: "ExprExtract", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetExprExtract()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExtractStringValidationError{ + field: "ExprExtract", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExtractStringValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// CelExtractStringValidationError is the validation error returned by +// CelExtractString.Validate if the designated constraints aren't met. +type CelExtractStringValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CelExtractStringValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CelExtractStringValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CelExtractStringValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CelExtractStringValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CelExtractStringValidationError) ErrorName() string { return "CelExtractStringValidationError" } + +// Error satisfies the builtin error interface +func (e CelExtractStringValidationError) 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 %sCelExtractString.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CelExtractStringValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CelExtractStringValidationError{} 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 8dfcd84e44..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 334ff39864..0000000000 --- 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 5f54d1e717..0000000000 --- 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.0 -// protoc v3.19.4 -// 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" - any "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() *any.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 *any.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 - (*any.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 fa6c1f45ab..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/common.pb.validate.go +++ /dev/null @@ -1,1061 +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 m.ConfigType.(type) { - - case *PrivateKeyProvider_Config: - - 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 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, - } - } - } - - } - - 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 a7dc17ffbd..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 e175f7cfd5..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/secret.pb.validate.go +++ /dev/null @@ -1,524 +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 m.Type.(type) { - - case *Secret_TlsCertificate: - - 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 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 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 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, - } - } - } - - } - - 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 6b1f9e09b6..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 66a7b7658a..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/auth/tls.pb.validate.go +++ /dev/null @@ -1,1001 +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 m.SessionTicketKeysType.(type) { - - case *DownstreamTlsContext_SessionTicketKeys: - - 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 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: - // no validation rules for DisableStatelessSessionResumption - - } - - 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 m.ValidationContextType.(type) { - - case *CommonTlsContext_ValidationContext: - - 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 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 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, - } - } - } - - } - - 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 a5d77e5f6c..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 9589430e41..0000000000 --- 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 ee0bbadd1f..0000000000 --- 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.0 -// protoc v3.19.4 -// 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" - any "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]*any.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]*any.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 *any.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() *any.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 *any.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() *any.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 - (*any.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 5ab26afec6..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster.pb.validate.go +++ /dev/null @@ -1,3756 +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 m.ClusterDiscoveryType.(type) { - - case *Cluster_Type: - - 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 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, - } - } - } - - } - - switch m.LbConfig.(type) { - - case *Cluster_RingHashLbConfig_: - - 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 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 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, - } - } - } - - } - - 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 m.LocalityConfigSpecifier.(type) { - - case *Cluster_CommonLbConfig_ZoneAwareLbConfig_: - - 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 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, - } - } - } - - } - - 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 db9520be20..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 85d02ee61b..0000000000 --- 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 3e63af86c3..0000000000 --- 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.0 -// protoc v3.19.4 -// source: envoy/api/v2/cluster/filter.proto - -package cluster - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - _ "github.com/envoyproxy/protoc-gen-validate/validate" - any "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 *any.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() *any.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 - (*any.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 ad1e36a947..0000000000 --- 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 c6198b79b0..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 5xx responses or local origin errors that are mapped - // to 5xx error codes 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 39216b500c..0000000000 --- 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 f2cf61718b..0000000000 --- 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.0 -// protoc v3.19.4 -// 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" - any "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 []*any.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() []*any.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 *any.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() *any.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 - (*any.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 ddf87860d4..0000000000 --- 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 9af78cb890..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 1f701fd911..0000000000 --- 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 26b8517577..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 6164e74e87..0000000000 --- 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 b3b7453f81..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 fe87961133..0000000000 --- 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 d95828afb6..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 5f2e707f3e..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint/endpoint_components.pb.validate.go +++ /dev/null @@ -1,717 +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 m.HostIdentifier.(type) { - - case *LbEndpoint_Endpoint: - - 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: - // no validation rules for EndpointName - - } - - 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 7159bfc58d..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 8023c3941f..0000000000 --- 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 7b92014647..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 64fa51146e..0000000000 --- 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 fb1e248933..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 0cf510b80f..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener.pb.validate.go +++ /dev/null @@ -1,1034 +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 - - switch m.BalanceType.(type) { - - case *Listener_ConnectionBalanceConfig_ExactBalance_: - - 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: - 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 34f5f6836e..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 69bcff355c..0000000000 --- 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 32dbe53dc2..0000000000 --- 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.0 -// protoc v3.19.4 -// 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" - any "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() *any.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 *any.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() *any.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 *any.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 - (*any.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 042bd6b19e..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/listener_components.pb.validate.go +++ /dev/null @@ -1,1347 +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 m.ConfigType.(type) { - - case *Filter_Config: - - 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 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{} - -// 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 - - switch m.Rule.(type) { - - case *ListenerFilterChainMatchPredicate_OrMatch: - - 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 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 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 m.GetAnyMatch() != true { - err := ListenerFilterChainMatchPredicateValidationError{ - field: "AnyMatch", - reason: "value must equal true", - } - if !all { - return err - } - errors = append(errors, err) - } - - case *ListenerFilterChainMatchPredicate_DestinationPortRange: - - 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: - 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 m.ConfigType.(type) { - - case *ListenerFilter_Config: - - 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 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, - } - } - } - - } - - 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 b4147ce61d..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 e88fe3fe67..0000000000 --- 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 b790182771..0000000000 --- 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.0 -// protoc v3.19.4 -// source: envoy/api/v2/listener/udp_listener_config.proto - -package listener - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - any "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() *any.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 *any.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 - (*any.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 50a96f0443..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/listener/udp_listener_config.pb.validate.go +++ /dev/null @@ -1,308 +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 m.ConfigType.(type) { - - case *UdpListenerConfig_Config: - - 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 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, - } - } - } - - } - - 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 1eb6238cdf..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 02644be4af..0000000000 --- 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 a50d7de188..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 444ab92de5..0000000000 --- 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 b9e9e8f894..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 baf7bd1223..0000000000 --- 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 b39b554475..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.go +++ /dev/null @@ -1,6404 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.19.4 -// 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" - any "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]*any.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 *any.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]*any.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() *any.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 *any.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() *any.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]*any.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]*any.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 *any.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() *any.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* or *logical_dns*. 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, which defaults to 100. - 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]*any.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]*any.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() *any.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 *any.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() *any.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 *any.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 - (*any.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 d7bf80eee3..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/route/route_components.pb.validate.go +++ /dev/null @@ -1,8223 +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.RoutingPriority(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, - } - } - } - - switch m.Action.(type) { - - case *Route_Route: - - 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 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 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 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: - 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, - } - } - } - - switch m.PathSpecifier.(type) { - - case *RouteMatch_Prefix: - // no validation rules for Prefix - - case *RouteMatch_Path: - // no validation rules for Path - - case *RouteMatch_Regex: - - 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 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: - 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 m.EnabledSpecifier.(type) { - - case *CorsPolicy_Enabled: - - 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 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, - } - } - } - - } - - 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, - } - } - } - - switch m.ClusterSpecifier.(type) { - - case *RouteAction_Cluster: - - 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 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 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: - err := RouteActionValidationError{ - field: "ClusterSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - - } - - switch m.HostRewriteSpecifier.(type) { - - case *RouteAction_HostRewrite: - - 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 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 !_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) - } - - } - - 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 m.SchemeRewriteSpecifier.(type) { - - case *RedirectAction_HttpsRedirect: - // no validation rules for HttpsRedirect - - case *RedirectAction_SchemeRedirect: - // no validation rules for SchemeRedirect - - } - - switch m.PathRewriteSpecifier.(type) { - - case *RedirectAction_PathRedirect: - - 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 !_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) - } - - } - - 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 m.HeaderMatchSpecifier.(type) { - - case *HeaderMatcher_ExactMatch: - // no validation rules for ExactMatch - - case *HeaderMatcher_RegexMatch: - - 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 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 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: - // no validation rules for PresentMatch - - case *HeaderMatcher_PrefixMatch: - - 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 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) - } - - } - - 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 m.QueryParameterMatchSpecifier.(type) { - - case *QueryParameterMatcher_StringMatch: - - 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: - // no validation rules for PresentMatch - - } - - 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 - - switch m.PolicySpecifier.(type) { - - case *RouteAction_HashPolicy_Header_: - - 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 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 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 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 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: - 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 m.ConfigType.(type) { - - case *RetryPolicy_RetryPriority_Config: - - 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 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, - } - } - } - - } - - 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 m.ConfigType.(type) { - - case *RetryPolicy_RetryHostPredicate_Config: - - 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 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, - } - } - } - - } - - 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 - - switch m.ActionSpecifier.(type) { - - case *RateLimit_Action_SourceCluster_: - - 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 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 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 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 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 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: - 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 1d6091b3bd..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 8beb4099c5..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/api/v2/scoped_route.pb.validate.go +++ /dev/null @@ -1,470 +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 - - switch m.Type.(type) { - - case *ScopedRouteConfiguration_Key_Fragment_StringKey: - // no validation rules for StringKey - - default: - 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 1cd543cdf7..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 fd29f29536..0000000000 --- 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 84c0df6eb9..0000000000 --- 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.0 -// protoc v3.19.4 -// 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" - any "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() *any.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 *any.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() *any.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 *any.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 - (*any.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 973157f116..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2/accesslog.pb.validate.go +++ /dev/null @@ -1,2304 +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 m.ConfigType.(type) { - - case *AccessLog_Config: - - 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 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, - } - } - } - - } - - 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 - - switch m.FilterSpecifier.(type) { - - case *AccessLogFilter_StatusCodeFilter: - - 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 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 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 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 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 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 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 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 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 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 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: - 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 m.ConfigType.(type) { - - case *ExtensionFilter_Config: - - 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 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, - } - } - } - - } - - 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 82453516bd..0000000000 --- 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.0 -// protoc v3.19.4 -// source: envoy/config/listener/v2/api_listener.proto - -package listenerv2 - -import ( - _ "github.com/cncf/xds/go/udpa/annotations" - any "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 *any.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() *any.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 - (*any.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 e1a8103861..0000000000 --- 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 59a806c8d6..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 7b1e54779b..0000000000 --- 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 44b6938f45..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 123866045d..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/hds.pb.validate.go +++ /dev/null @@ -1,1240 +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 m.RequestType.(type) { - - case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: - - 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 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, - } - } - } - - } - - 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 58fdb7198c..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 4917a198b7..0000000000 --- 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 340851e084..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 33239814b6..0000000000 --- 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 ce30f225d2..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 7edaaf8023..0000000000 --- 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 dcf1aa741b..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 d3fd0be4c0..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2/metadata.pb.validate.go +++ /dev/null @@ -1,965 +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 - - switch m.Kind.(type) { - - case *MetadataKind_Request_: - - 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 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 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 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: - 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 - - switch m.Segment.(type) { - - case *MetadataKey_PathSegment_Key: - - 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: - 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 c0fd66f657..0000000000 --- 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.0 -// protoc v3.19.4 -// 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 c0d58bcec6..0000000000 --- a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2/custom_tag.pb.validate.go +++ /dev/null @@ -1,800 +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) - } - - switch m.Type.(type) { - - case *CustomTag_Literal_: - - 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 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 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 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: - 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/envoyproxy/protoc-gen-validate/validate/validate.pb.go b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go index 61e19b95d7..825774fe4f 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.17.3 +// protoc-gen-go v1.28.1 +// protoc v3.21.9 // source: validate/validate.proto package validate @@ -94,6 +94,7 @@ type FieldRules struct { Message *MessageRules `protobuf:"bytes,17,opt,name=message" json:"message,omitempty"` // Types that are assignable to Type: + // // *FieldRules_Float // *FieldRules_Double // *FieldRules_Int32 @@ -1966,7 +1967,6 @@ type StringRules struct { // characters may differ from the number of bytes in the string. MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` // LenBytes specifies that this field must be the specified number of bytes - // at a minimum LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` // MinBytes specifies that this field must be the specified number of bytes // at a minimum @@ -2000,6 +2000,7 @@ type StringRules struct { // patterns // // Types that are assignable to WellKnown: + // // *StringRules_Email // *StringRules_Hostname // *StringRules_Ip @@ -2371,6 +2372,7 @@ type BytesRules struct { // patterns // // Types that are assignable to WellKnown: + // // *BytesRules_Ip // *BytesRules_Ipv4 // *BytesRules_Ipv6 diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index 392b21fb2d..09d61dd1b5 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 dd15810d0a..6d698229a3 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 dab1959418..e56006d713 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 0456689045..d607d4e9e2 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 c748fd21ce..d475cbc089 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 ce2bbc10a1..877b7cd21a 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 3c62491f7b..7ed5c53ba4 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 8f5b536f11..4866da101c 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 711763d54f..07a5861352 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 ca820bd47d..a3bb173c24 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 b5560b47ec..5de66e40d3 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 ae17801fe2..c1f7e75c3e 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 85e3ff2816..d71e441778 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 c2fdd58b31..264de387c2 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 7edd196bd3..5ba9d94d49 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 af09711a3e..04136882c7 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 e53b8ffc83..6e455fb0a8 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 fd0ee3dcaf..0a76d9de6e 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 b08ac30adf..09a667f33c 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 c6e08221ff..afac56572a 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 0000000000..8927823d09 --- /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 0000000000..6a08a94a09 --- /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 0000000000..9832bf3057 --- /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 0000000000..f831b95f41 --- /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 0000000000..9ddef6de15 --- /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 0000000000..ff276e4d0c --- /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 0000000000..6bd3bc0bea --- /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 0000000000..efe4019a08 --- /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 0000000000..dfd647336d --- /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 0000000000..c9b596d885 --- /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 0000000000..6c9486329d --- /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 aaa9c859a3..9097385e1a 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 9fa306b2e0..bc8ee07474 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 ebe8bfe330..e6626bf96e 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 3e582a2853..79ee8aea0a 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 37e089bc84..bc3da70672 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 6cff20c8e0..0ac77ea4f8 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 a5d5516ee0..c525dc070f 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 b3a55481b9..fc91b4d266 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 967cbc7373..654e9ce69f 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 934fc1aa01..cb7020ebec 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 2808b7c83e..d5a6e78be4 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 01bbb2025a..f22acace42 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 0f8e6c0149..93231af2ac 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 6410a0b96c..fe552c315b 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 1d03c09148..3728aed04f 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 0d71f8f857..551757b800 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/internal/balancer/cdsbalancer/cdsbalancer.go b/vendor/google.golang.org/grpc/xds/internal/balancer/cdsbalancer/cdsbalancer.go index 14c1c2e769..4a0beab131 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 7a639f51a5..703b00811d 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 17f57a576d..28062c51ee 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 ea7778bb56..7e8ccbd335 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 916f94ec0c..4655bf4184 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 4278b0636c..4763120fa6 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 a167cc5fa2..4c39e85739 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 f473fcbaa7..09b3356301 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 817cb7338f..3d4f99e88d 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 97fe4a8b07..23eff2d639 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 976b86fe34..6e380b27d5 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 4b2b8cfd39..8335f9a88a 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 e9224cb1a3..261b6bf48f 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 623420ccc7..2531b39472 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 69407d20ca..b9d0499301 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 cba5afd454..e53df3f1ed 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 50bdbe4e23..0000000000 --- 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 7095a83944..77c4a614a2 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 520da06a10..0000000000 --- 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 a28cc95dc6..0000000000 --- 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 526aefae29..0000000000 --- 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 968947b066..0000000000 --- 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 da5128ac45..0000000000 --- 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 4cacd94dd1..0000000000 --- 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 f8d866bb1a..0000000000 --- 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 f79a21e294..0000000000 --- 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 2ff19a9016..0000000000 --- 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 334ec101e2..0000000000 --- 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 95e8ac7730..0000000000 --- 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 9ae6ae9767..0000000000 --- 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 bef179936a..0000000000 --- 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 408a27cf62..4c42ae4249 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 0000000000..58a2e5dedb --- /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 0000000000..814ca5f872 --- /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 a252979339..87e6dbd119 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 2ba7e494ae..dc1c09da08 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 442389f1cc..6b2fff9f6f 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 6946c5647f..6fced7784d 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 9c7465fd7d..31be4d6aeb 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 faf34f98e3..d9c78997cf 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 eda1108876..28ae41e43a 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 3621d61209..f04939182b 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 e091d0ddea..a1809a62fc 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 2e59c0605c..6b273e82f9 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 32c48d46b6..819e47d32f 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 5ab8a5a980..f7003f6cd5 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 7c479f5f8a..706e11c494 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 a5b7a128cf..4f5ee3e20e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -13,7 +13,7 @@ cloud.google.com/go/internal cloud.google.com/go/internal/optional cloud.google.com/go/internal/trace cloud.google.com/go/internal/version -# cloud.google.com/go/compute v1.14.0 +# cloud.google.com/go/compute v1.15.1 ## explicit; go 1.19 cloud.google.com/go/compute/internal # cloud.google.com/go/compute/metadata v0.2.3 @@ -389,7 +389,7 @@ github.com/census-instrumentation/opencensus-proto/gen-go/agent/trace/v1 github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1 github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1 github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1 -# github.com/cespare/xxhash/v2 v2.1.2 +# github.com/cespare/xxhash/v2 v2.2.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 # github.com/charithe/durationcheck v0.0.9 @@ -422,10 +422,10 @@ github.com/cloudevents/sdk-go/v2/event/datacodec/xml github.com/cloudevents/sdk-go/v2/protocol github.com/cloudevents/sdk-go/v2/protocol/http github.com/cloudevents/sdk-go/v2/types -# github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 +# github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe ## explicit; go 1.11 github.com/cncf/udpa/go/udpa/type/v1 -# github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc +# github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b ## explicit; go 1.11 github.com/cncf/xds/go/udpa/annotations github.com/cncf/xds/go/udpa/type/v1 @@ -524,21 +524,13 @@ github.com/emirpasic/gods/utils ## explicit; go 1.16 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 @@ -553,22 +545,18 @@ 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.6.13 -## explicit; go 1.12 +# github.com/envoyproxy/protoc-gen-validate v0.9.1 +## explicit; go 1.17 github.com/envoyproxy/protoc-gen-validate/validate # github.com/esimonov/ifshort v1.0.4 ## explicit; go 1.17 @@ -2440,7 +2428,7 @@ google.golang.org/genproto/protobuf/api google.golang.org/genproto/protobuf/field_mask google.golang.org/genproto/protobuf/ptype google.golang.org/genproto/protobuf/source_context -# google.golang.org/grpc v1.52.3 +# google.golang.org/grpc v1.53.0 ## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes @@ -2506,6 +2494,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 @@ -2546,12 +2535,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.28.1