From 25c89759986ef7858af011b1c3ead87b6e5f0571 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:45:50 +0800 Subject: [PATCH 01/28] Bump github.com/cyphar/filepath-securejoin from 0.2.3 to 0.2.4 (#387) Bumps [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) from 0.2.3 to 0.2.4. - [Release notes](https://github.com/cyphar/filepath-securejoin/releases) - [Commits](https://github.com/cyphar/filepath-securejoin/compare/v0.2.3...v0.2.4) --- updated-dependencies: - dependency-name: github.com/cyphar/filepath-securejoin dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c5068744..ae6cc888 100644 --- a/go.mod +++ b/go.mod @@ -77,7 +77,7 @@ require ( github.com/chai2010/gettext-go v1.0.2 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/coreos/go-oidc/v3 v3.6.0 // indirect - github.com/cyphar/filepath-securejoin v0.2.3 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/docker/cli v24.0.4+incompatible // indirect diff --git a/go.sum b/go.sum index d6d0607f..4ab8c449 100644 --- a/go.sum +++ b/go.sum @@ -195,8 +195,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= From 1011e10cf8da1bc0a8cdd5ac1124a984095be753 Mon Sep 17 00:00:00 2001 From: woluohenga <297417151@qq.com> Date: Wed, 11 Oct 2023 20:38:44 +0800 Subject: [PATCH 02/28] add for tencent governance (#382) Signed-off-by: woluohenga Co-authored-by: woluohenga --- GOVERNANCE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 5ce9b309..35e20deb 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -44,6 +44,7 @@ future direction. Seats will be tied to organizations and not individuals and wi | [Tanjun Chen](https://github.com/tanjunchen) | Baidu | 7/31/2024 | [huanghuangzym](https://github.com/huanghuangzym) | Alauda | 7/31/2024 | [Shilin Qin](https://github.com/Sad-polar-bear) | Boss Zhipin | 7/31/2024 + | [Heng Luo](https://github.com/woluohenga) | Tencent | 7/31/2024 Steering seats will be evaluated once per year and new people/organizations can be nominated for being added to the steering committee based on contribution to the project or being a From 5e7bb3d354e1fbd24219298922c0bb5c041d23da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:48:52 +0800 Subject: [PATCH 03/28] Bump google.golang.org/grpc from 1.57.0 to 1.57.1 (#394) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.57.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.57.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ae6cc888..342b8f8a 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( go.uber.org/atomic v1.11.0 golang.org/x/net v0.13.0 golang.org/x/sync v0.3.0 - google.golang.org/grpc v1.57.0 + google.golang.org/grpc v1.57.1 google.golang.org/protobuf v1.31.0 istio.io/api v1.19.0-alpha.1.0.20230810203008-3cdd517bf131 istio.io/client-go v1.19.0-alpha.1.0.20230810203904-45e85278e0fc diff --git a/go.sum b/go.sum index 4ab8c449..ae2d99ac 100644 --- a/go.sum +++ b/go.sum @@ -1460,8 +1460,8 @@ google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.57.1 h1:upNTNqv0ES+2ZOOqACwVtS3Il8M12/+Hz41RCPzAjQg= +google.golang.org/grpc v1.57.1/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= From 27f61303c74585dfb501e54dd5f6c2077995be70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:49:20 +0800 Subject: [PATCH 04/28] Bump golang.org/x/net from 0.13.0 to 0.17.0 (#393) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.13.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.13.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 15 ++++++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 342b8f8a..6a02561b 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/zhaohuabing/debounce v1.0.0 go.uber.org/atomic v1.11.0 - golang.org/x/net v0.13.0 + golang.org/x/net v0.17.0 golang.org/x/sync v0.3.0 google.golang.org/grpc v1.57.1 google.golang.org/protobuf v1.31.0 @@ -183,13 +183,13 @@ require ( go.starlark.net v0.0.0-20211013185944-b0039bd2cfe3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.11.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum index ae2d99ac..926eed30 100644 --- a/go.sum +++ b/go.sum @@ -953,8 +953,9 @@ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1068,8 +1069,9 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1197,8 +1199,9 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1209,8 +1212,9 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1227,8 +1231,9 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 0ae8e7ebe88ea4275fb3c9629d639cdd07145b53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:55:30 +0800 Subject: [PATCH 05/28] Bump github.com/docker/docker (#395) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.2+incompatible to 24.0.7+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v24.0.2...v24.0.7) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6a02561b..377f4839 100644 --- a/go.mod +++ b/go.mod @@ -82,7 +82,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/docker/cli v24.0.4+incompatible // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.2+incompatible // indirect + github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.1 // indirect diff --git a/go.sum b/go.sum index 926eed30..89b18a92 100644 --- a/go.sum +++ b/go.sum @@ -210,8 +210,8 @@ github.com/docker/cli v24.0.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvM github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= -github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= From c429093d1b1ca325bd55a8d1be827a1c8f1fd291 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 16:55:47 +0800 Subject: [PATCH 06/28] Bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 (#397) Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/go-jose/go-jose/releases) - [Changelog](https://github.com/go-jose/go-jose/blob/v3/CHANGELOG.md) - [Commits](https://github.com/go-jose/go-jose/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: github.com/go-jose/go-jose/v3 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 377f4839..0b79d22c 100644 --- a/go.mod +++ b/go.mod @@ -94,7 +94,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fvbommel/sortorder v1.0.2 // indirect github.com/go-errors/errors v1.4.2 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect + github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.2.4 // indirect diff --git a/go.sum b/go.sum index 89b18a92..d6fcabba 100644 --- a/go.sum +++ b/go.sum @@ -271,8 +271,8 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= +github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= From b9fb43095817b0538b6e6cd2aa8627cf1893f9f3 Mon Sep 17 00:00:00 2001 From: shencurl521 <150639126+shencurl521@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:44:11 +0800 Subject: [PATCH 07/28] fix aeraki memory leak when node info update (#399) * fix aeraki memory leak when node info update Signed-off-by: shenyixiong * fix aeraki memory leak when reconnect to istiod Signed-off-by: shenyixiong --------- Co-authored-by: shenyixiong --- internal/controller/istio/controller.go | 10 ++++------ internal/xds/cache_mgr.go | 4 ++++ internal/xds/callbacks.go | 1 + internal/xds/server.go | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/controller/istio/controller.go b/internal/controller/istio/controller.go index 69b988cb..66490139 100644 --- a/internal/controller/istio/controller.go +++ b/internal/controller/istio/controller.go @@ -84,10 +84,6 @@ func (c *Controller) Run(stop <-chan struct{}) { go c.configCache.Run(stop) go func() { c.connectIstio() - for { - time.Sleep(30 * time.Minute) - c.reconnectIstio() - } }() } @@ -125,9 +121,10 @@ func (c *Controller) connectIstio() { sm, err := c.newSecretManager() if err != nil { controllerLog.Errorf("failed to create SecretManager %s %v", c.options.IstiodAddr, err) - } else { - config.SecretManager = sm + time.Sleep(5 * time.Second) + continue } + config.SecretManager = sm } c.xdsMCP, err = adsc.New(c.options.IstiodAddr, &config) if err != nil { @@ -139,6 +136,7 @@ func (c *Controller) connectIstio() { c.xdsMCP.Store = configController if err = c.xdsMCP.Run(); err != nil { controllerLog.Errorf("adsc: failed running %v", err) + c.closeConnection() time.Sleep(5 * time.Second) continue } diff --git a/internal/xds/cache_mgr.go b/internal/xds/cache_mgr.go index 96096280..a84db9b2 100644 --- a/internal/xds/cache_mgr.go +++ b/internal/xds/cache_mgr.go @@ -455,6 +455,10 @@ func (c *CacheMgr) initNode(_ string) { c.pushChannel <- istiomodel.EventUpdate } +func (c *CacheMgr) clearNode(node string) { + c.routeCache.ClearSnapshot(node) +} + func (c *CacheMgr) hasNode(node string) bool { if _, err := c.routeCache.GetSnapshot(node); err != nil { return false diff --git a/internal/xds/callbacks.go b/internal/xds/callbacks.go index ea7c5f36..19f4de65 100644 --- a/internal/xds/callbacks.go +++ b/internal/xds/callbacks.go @@ -47,6 +47,7 @@ func (cb *callbacks) OnStreamOpen(_ context.Context, id int64, typ string) error } func (cb *callbacks) OnStreamClosed(id int64, node *core.Node) { xdsLog.Infof("node %s stream %d closed\n", node.Id, id) + cb.cacheMgr.clearNode(node.Id) } func (cb *callbacks) OnDeltaStreamOpen(_ context.Context, id int64, typ string) error { diff --git a/internal/xds/server.go b/internal/xds/server.go index 2bfb0496..5ca68cd7 100644 --- a/internal/xds/server.go +++ b/internal/xds/server.go @@ -35,6 +35,7 @@ type cacheMgr interface { initNode(node string) hasNode(node string) bool cache() cachev3.SnapshotCache + clearNode(node string) } // Server serves xDS resources to Envoy sidecars From a0b970512db995c8b60ec9c62859adce96b6bf99 Mon Sep 17 00:00:00 2001 From: wsd0543 <502192434@qq.com> Date: Thu, 14 Dec 2023 09:20:28 +0800 Subject: [PATCH 08/28] add startup parameters to config log (#400) Signed-off-by: wangshuide Co-authored-by: wangshuide2020 --- cmd/aeraki/main.go | 8 +++++++- docker/Dockerfile | 2 +- go.mod | 2 +- k8s/aeraki.yaml | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cmd/aeraki/main.go b/cmd/aeraki/main.go index f5ae23d0..83cf8edf 100644 --- a/cmd/aeraki/main.go +++ b/cmd/aeraki/main.go @@ -15,7 +15,6 @@ package main import ( - "flag" "os" "os/signal" "strings" @@ -24,6 +23,8 @@ import ( "github.com/google/uuid" "istio.io/pkg/log" + flag "github.com/spf13/pflag" + "github.com/aeraki-mesh/aeraki/internal/bootstrap" "github.com/aeraki-mesh/aeraki/internal/config/constants" "github.com/aeraki-mesh/aeraki/internal/envoyfilter" @@ -63,6 +64,8 @@ func main() { flag.StringVar(&args.KubeDomainSuffix, "domain", defaultKubernetesDomain, "Kubernetes DNS domain suffix") flag.StringVar(&args.HTTPSAddr, "httpsAddr", ":15017", "validation service HTTPS address") flag.StringVar(&args.HTTPAddr, "httpAddr", ":8080", "Aeraki readiness service HTTP address") + loggingOptions := log.DefaultOptions() + loggingOptions.AttachFlags(flag.StringArrayVar, flag.StringVar, flag.IntVar, flag.BoolVar) flag.Parse() flag.VisitAll(func(flag *flag.Flag) { @@ -77,6 +80,9 @@ func main() { log.Infof("Aeraki bootstrap parameter: %v", args) setLogLevels(args.LogLevel) + if err := log.Configure(loggingOptions); err != nil { + log.Error("Failed to init Aeraki log: %v", err) + } // Create the stop channel for all of the servers. stopChan := make(chan struct{}, 1) args.Protocols = initGenerators() diff --git a/docker/Dockerfile b/docker/Dockerfile index addf4731..fe29c93b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -26,4 +26,4 @@ RUN apk update && \ apk add curl COPY ${AERAKI_ROOT_BIN_DIR}/${ARCH}/${OS}/aeraki /usr/local/bin/ -ENTRYPOINT /usr/local/bin/aeraki +ENTRYPOINT ["/usr/local/bin/aeraki"] diff --git a/go.mod b/go.mod index 0b79d22c..11b0e33c 100644 --- a/go.mod +++ b/go.mod @@ -37,6 +37,7 @@ require ( github.com/google/uuid v1.3.0 github.com/hashicorp/go-multierror v1.1.1 github.com/pkg/errors v0.9.1 + github.com/spf13/pflag v1.0.5 github.com/zhaohuabing/debounce v1.0.0 go.uber.org/atomic v1.11.0 golang.org/x/net v0.17.0 @@ -169,7 +170,6 @@ require ( github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/vbatts/tar-split v0.11.3 // indirect diff --git a/k8s/aeraki.yaml b/k8s/aeraki.yaml index a75c5558..8d912834 100644 --- a/k8s/aeraki.yaml +++ b/k8s/aeraki.yaml @@ -37,9 +37,10 @@ spec: - name: aeraki image: ${AERAKI_IMAGE}:${AERAKI_TAG} args: - - /usr/local/bin/aeraki - --master=true - --enable-envoy-filter-namespace-scope=false + - --log_output_level=all:info + - --log_rotate=/home/aeraki_run.log # imagePullPolicy should be set to Never so Minikube can use local image for e2e testing imagePullPolicy: ${AERAKI_IMG_PULL_POLICY} ports: From 8df74623a528bdb4b283b66edeaf078f19dab5fc Mon Sep 17 00:00:00 2001 From: Huabing Zhao Date: Sun, 17 Dec 2023 15:04:18 +0800 Subject: [PATCH 09/28] support trpc (#403) Signed-off-by: huabing zhao --- Makefile | 2 +- demo/metaprotocol-brpc/brpc-sample.yaml | 6 +++--- demo/metaprotocol-dubbo-app-level/dubbo-sample.yaml | 8 ++++---- demo/metaprotocol-dubbo/dubbo-sample.yaml | 8 ++++---- demo/metaprotocol-qza/qza-sample.yaml | 6 +++--- .../outlier-detection/outlier-detection.yaml | 2 +- demo/metaprotocol-thrift/thrift-sample.yaml | 6 +++--- demo/metaprotocol-trpc/trpc-sample.yaml | 12 ++++++------ .../metaprotocol-videopacket/videopacket-sample.yaml | 6 +++--- .../metaprotocol/testdata/metaprotocol-sample.yaml | 8 ++++---- .../testdata/ingress-gateway.yaml | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index 04ae4e3a..5b3e5bc3 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ e2e-thrift: go test -v github.com/aeraki-mesh/aeraki/test/e2e/thrift/... e2e-kafka-zookeeper: go test -v github.com/aeraki-mesh/aeraki/test/e2e/kafka/... -e2e-redis: + e2e-redis: go test -v github.com/aeraki-mesh/aeraki/test/e2e/redis/... e2e-metaprotocol: go test -v github.com/aeraki-mesh/aeraki/test/e2e/metaprotocol/... diff --git a/demo/metaprotocol-brpc/brpc-sample.yaml b/demo/metaprotocol-brpc/brpc-sample.yaml index d86f49e9..2d0b2d91 100644 --- a/demo/metaprotocol-brpc/brpc-sample.yaml +++ b/demo/metaprotocol-brpc/brpc-sample.yaml @@ -28,7 +28,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: brpc-echo-server version: v1 @@ -57,7 +57,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: brpc-echo-server version: v2 @@ -86,7 +86,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: brpc-echo-client spec: diff --git a/demo/metaprotocol-dubbo-app-level/dubbo-sample.yaml b/demo/metaprotocol-dubbo-app-level/dubbo-sample.yaml index 0ef67506..021629f8 100644 --- a/demo/metaprotocol-dubbo-app-level/dubbo-sample.yaml +++ b/demo/metaprotocol-dubbo-app-level/dubbo-sample.yaml @@ -40,7 +40,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-provider version: v1 @@ -76,7 +76,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-provider version: v2 @@ -112,7 +112,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-second-provider version: v2 @@ -139,7 +139,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-consumer spec: diff --git a/demo/metaprotocol-dubbo/dubbo-sample.yaml b/demo/metaprotocol-dubbo/dubbo-sample.yaml index 29c5f6ba..3169f2ba 100644 --- a/demo/metaprotocol-dubbo/dubbo-sample.yaml +++ b/demo/metaprotocol-dubbo/dubbo-sample.yaml @@ -40,7 +40,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-provider version: v1 @@ -76,7 +76,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-provider version: v2 @@ -112,7 +112,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-second-provider version: v2 @@ -139,7 +139,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-consumer spec: diff --git a/demo/metaprotocol-qza/qza-sample.yaml b/demo/metaprotocol-qza/qza-sample.yaml index 1f7cac5c..045d4a8e 100644 --- a/demo/metaprotocol-qza/qza-sample.yaml +++ b/demo/metaprotocol-qza/qza-sample.yaml @@ -28,7 +28,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: qza-sample-server version: v1 @@ -57,7 +57,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: qza-sample-server version: v2 @@ -86,7 +86,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: qza-sample-client spec: diff --git a/demo/metaprotocol-thrift/outlier-detection/outlier-detection.yaml b/demo/metaprotocol-thrift/outlier-detection/outlier-detection.yaml index 1a522b0f..7dd231a2 100644 --- a/demo/metaprotocol-thrift/outlier-detection/outlier-detection.yaml +++ b/demo/metaprotocol-thrift/outlier-detection/outlier-detection.yaml @@ -29,7 +29,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 sidecar.istio.io/rewriteAppHTTPProbers: "false" labels: app: thrift-sample-server diff --git a/demo/metaprotocol-thrift/thrift-sample.yaml b/demo/metaprotocol-thrift/thrift-sample.yaml index 1d20a9b2..fac87d27 100644 --- a/demo/metaprotocol-thrift/thrift-sample.yaml +++ b/demo/metaprotocol-thrift/thrift-sample.yaml @@ -28,7 +28,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 sidecar.istio.io/rewriteAppHTTPProbers: "false" labels: app: thrift-sample-server @@ -55,7 +55,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 sidecar.istio.io/rewriteAppHTTPProbers: "false" labels: app: thrift-sample-server @@ -82,7 +82,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 sidecar.istio.io/rewriteAppHTTPProbers: "false" labels: app: thrift-sample-client diff --git a/demo/metaprotocol-trpc/trpc-sample.yaml b/demo/metaprotocol-trpc/trpc-sample.yaml index eee691d3..504bd7ae 100644 --- a/demo/metaprotocol-trpc/trpc-sample.yaml +++ b/demo/metaprotocol-trpc/trpc-sample.yaml @@ -28,7 +28,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: trpc-sample-server version: v1 @@ -54,7 +54,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: trpc-sample-server version: v2 @@ -80,7 +80,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: trpc-sample-client-unary spec: @@ -110,7 +110,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: trpc-sample-client-stream spec: @@ -140,7 +140,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: trpc-sample-server-stream spec: @@ -170,7 +170,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: trpc-sample-client-bidirection-stream spec: diff --git a/demo/metaprotocol-videopacket/videopacket-sample.yaml b/demo/metaprotocol-videopacket/videopacket-sample.yaml index 36b35376..ff221be5 100644 --- a/demo/metaprotocol-videopacket/videopacket-sample.yaml +++ b/demo/metaprotocol-videopacket/videopacket-sample.yaml @@ -28,7 +28,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 sidecar.istio.io/rewriteAppHTTPProbers: "false" labels: app: videopacket-sample-server @@ -58,7 +58,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 sidecar.istio.io/rewriteAppHTTPProbers: "false" labels: app: videopacket-sample-server @@ -88,7 +88,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy-tcm-debug:1.2.2 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 sidecar.istio.io/rewriteAppHTTPProbers: "false" labels: app: videopacket-sample-client diff --git a/test/e2e/metaprotocol/testdata/metaprotocol-sample.yaml b/test/e2e/metaprotocol/testdata/metaprotocol-sample.yaml index 20d1a068..61eead52 100644 --- a/test/e2e/metaprotocol/testdata/metaprotocol-sample.yaml +++ b/test/e2e/metaprotocol/testdata/metaprotocol-sample.yaml @@ -40,7 +40,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-provider version: v1 @@ -76,7 +76,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-provider version: v2 @@ -112,7 +112,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-second-provider version: v2 @@ -148,7 +148,7 @@ spec: metadata: annotations: sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config - sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + sidecar.istio.io/proxyImage: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 labels: app: dubbo-sample-consumer spec: diff --git a/test/e2e/metaprotocolgateway/testdata/ingress-gateway.yaml b/test/e2e/metaprotocolgateway/testdata/ingress-gateway.yaml index f43603f7..cc4b0f53 100644 --- a/test/e2e/metaprotocolgateway/testdata/ingress-gateway.yaml +++ b/test/e2e/metaprotocolgateway/testdata/ingress-gateway.yaml @@ -149,7 +149,7 @@ spec: fieldPath: metadata.labels['service.istio.io/canonical-revision'] - name: ISTIO_META_ROUTER_MODE value: standard - image: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.1 + image: ghcr.io/aeraki-mesh/meta-protocol-proxy:1.4.2 imagePullPolicy: IfNotPresent name: istio-proxy ports: From 6271691703c2698234f2995af60182eaef3195b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 13:12:54 +0800 Subject: [PATCH 10/28] Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#404) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 11b0e33c..b5a7a6be 100644 --- a/go.mod +++ b/go.mod @@ -183,13 +183,13 @@ require ( go.starlark.net v0.0.0-20211013185944-b0039bd2cfe3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.11.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum index d6fcabba..ba0fb593 100644 --- a/go.sum +++ b/go.sum @@ -954,8 +954,8 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1200,8 +1200,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1213,8 +1213,8 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1232,8 +1232,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 9cf99cd5a58bddb029970af7413282487b7eb476 Mon Sep 17 00:00:00 2001 From: wsd0543 <502192434@qq.com> Date: Tue, 19 Dec 2023 21:10:40 +0800 Subject: [PATCH 11/28] aeraki and envoy communicate through mTLS (#401) Signed-off-by: wangshuide --- internal/bootstrap/server.go | 24 +++++++++++ .../kube/sidecar_bootstrap_config.go | 42 +++++++++++++++++++ internal/xds/server.go | 10 ++++- k8s/aeraki-bootstrap-config.yaml | 42 +++++++++++++++++++ 4 files changed, 116 insertions(+), 2 deletions(-) diff --git a/internal/bootstrap/server.go b/internal/bootstrap/server.go index 9775f673..280fe98e 100644 --- a/internal/bootstrap/server.go +++ b/internal/bootstrap/server.go @@ -18,10 +18,12 @@ import ( "bytes" "context" "crypto/tls" + "crypto/x509" "errors" "fmt" "net" "net/http" + "os" //nolint _ "net/http/pprof" // pprof @@ -163,6 +165,9 @@ func NewServer(args *AerakiArgs) (*Server, error) { if err := server.initRootCA(); err != nil { return nil, fmt.Errorf("error initializing root ca: %v", err) } + if err := server.initXdsServer(); err != nil { + return nil, fmt.Errorf("error initializing xds server: %v", err) + } if err := server.initSecureWebhookServer(args); err != nil { return nil, fmt.Errorf("error initializing webhook server: %v", err) } @@ -177,6 +182,25 @@ func NewServer(args *AerakiArgs) (*Server, error) { return server, err } +func (s *Server) initXdsServer() error { + pool := x509.NewCertPool() + istiodCACertPath := "/var/run/secrets/istio/root-cert.pem" + caCrt, err := os.ReadFile(istiodCACertPath) + if err != nil { + return fmt.Errorf("failed to read istio ca cert file: %v", err) + } + pool.AppendCertsFromPEM(caCrt) + + s.xdsServer.TLSConfig = tls.Config{ + GetCertificate: s.getAerakiCertificate, + MinVersion: tls.VersionTLS12, + ClientAuth: tls.RequireAndVerifyClientCert, + ClientCAs: pool, + } + + return nil +} + func (s *Server) initAerakiServer(args *AerakiArgs) { // make sure we have a readiness probe before serving HTTP to avoid marking ready too soon s.initReadinessProbes() diff --git a/internal/controller/kube/sidecar_bootstrap_config.go b/internal/controller/kube/sidecar_bootstrap_config.go index 730613ee..f5ecf9d4 100644 --- a/internal/controller/kube/sidecar_bootstrap_config.go +++ b/internal/controller/kube/sidecar_bootstrap_config.go @@ -72,6 +72,48 @@ var bootstrapConfig = ` ] } ] + }, + "transport_socket": { + "name": "envoy.transport_sockets.tls", + "typed_config": { + "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", + "common_tls_context": { + "validation_context_sds_secret_config": { + "name": "ROOTCA", + "sds_config": { + "api_config_source": { + "api_type": "GRPC", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "sds-grpc" + } + }], + "set_node_on_first_message_only": true, + "transport_api_version": "V3" + }, + "initial_fetch_timeout": "0s", + "resource_api_version": "V3" + } + }, + "tls_certificate_sds_secret_configs": [{ + "name": "default", + "sds_config": { + "api_config_source": { + "api_type": "GRPC", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "sds-grpc" + } + }], + "set_node_on_first_message_only": true, + "transport_api_version": "V3" + }, + "initial_fetch_timeout": "0s", + "resource_api_version": "V3" + } + }] + } + } } } ] diff --git a/internal/xds/server.go b/internal/xds/server.go index 5ca68cd7..3d7c70b4 100644 --- a/internal/xds/server.go +++ b/internal/xds/server.go @@ -16,8 +16,11 @@ package xds import ( "context" + "crypto/tls" "net" + "google.golang.org/grpc/credentials" + routeservice "github.com/envoyproxy/go-control-plane/envoy/service/route/v3" cachev3 "github.com/envoyproxy/go-control-plane/pkg/cache/v3" serverv3 "github.com/envoyproxy/go-control-plane/pkg/server/v3" @@ -40,8 +43,9 @@ type cacheMgr interface { // Server serves xDS resources to Envoy sidecars type Server struct { - addr string - cacheMgr cacheMgr + addr string + cacheMgr cacheMgr + TLSConfig tls.Config } // NewServer creates a xDS server @@ -60,6 +64,8 @@ func (s *Server) Run(stopCh <-chan struct{}) { // availability problems. var grpcOptions []grpc.ServerOption grpcOptions = append(grpcOptions, grpc.MaxConcurrentStreams(grpcMaxConcurrentStreams)) + tlsCreds := credentials.NewTLS(&s.TLSConfig) + grpcOptions = append(grpcOptions, grpc.Creds(tlsCreds)) grpcServer := grpc.NewServer(grpcOptions...) lis, err := net.Listen("tcp", s.addr) diff --git a/k8s/aeraki-bootstrap-config.yaml b/k8s/aeraki-bootstrap-config.yaml index 745fc79a..b9611988 100644 --- a/k8s/aeraki-bootstrap-config.yaml +++ b/k8s/aeraki-bootstrap-config.yaml @@ -69,6 +69,48 @@ data: ] } ] + }, + "transport_socket": { + "name": "envoy.transport_sockets.tls", + "typed_config": { + "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext", + "common_tls_context": { + "validation_context_sds_secret_config": { + "name": "ROOTCA", + "sds_config": { + "api_config_source": { + "api_type": "GRPC", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "sds-grpc" + } + }], + "set_node_on_first_message_only": true, + "transport_api_version": "V3" + }, + "initial_fetch_timeout": "0s", + "resource_api_version": "V3" + } + }, + "tls_certificate_sds_secret_configs": [{ + "name": "default", + "sds_config": { + "api_config_source": { + "api_type": "GRPC", + "grpc_services": [{ + "envoy_grpc": { + "cluster_name": "sds-grpc" + } + }], + "set_node_on_first_message_only": true, + "transport_api_version": "V3" + }, + "initial_fetch_timeout": "0s", + "resource_api_version": "V3" + } + }] + } + } } } ] From b98c319e48248b45ab37d257ddeee9874d6e444b Mon Sep 17 00:00:00 2001 From: shencurl521 <150639126+shencurl521@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:05:20 +0800 Subject: [PATCH 12/28] fix: fail to dail to xds istiod.istio-system.svc:15012 (#402) Signed-off-by: shenyixiong Co-authored-by: shenyixiong --- internal/controller/istio/controller.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/internal/controller/istio/controller.go b/internal/controller/istio/controller.go index 66490139..61c8f7b7 100644 --- a/internal/controller/istio/controller.go +++ b/internal/controller/istio/controller.go @@ -23,12 +23,14 @@ import ( networking "istio.io/api/networking/v1alpha3" "istio.io/istio/pilot/pkg/config/memory" istiomodel "istio.io/istio/pilot/pkg/model" + securityModel "istio.io/istio/pilot/pkg/security/model" "istio.io/istio/pkg/adsc" istioconfig "istio.io/istio/pkg/config" "istio.io/istio/pkg/config/schema/collection" "istio.io/istio/pkg/config/schema/collections" "istio.io/istio/pkg/config/schema/gvk" "istio.io/istio/pkg/security" + "istio.io/istio/security/pkg/credentialfetcher/plugin" "istio.io/istio/security/pkg/nodeagent/cache" citadel "istio.io/istio/security/pkg/nodeagent/caclient/providers/citadel" "istio.io/pkg/log" @@ -319,11 +321,13 @@ func (c *Controller) newSecretManager() (*cache.SecretManagerClient, error) { // rootCert may be nil - in which case the system roots are used, and the CA is expected to have public key // Otherwise assume the injection has mounted /etc/certs/root-cert.pem o := &security.Options{ - CAEndpoint: c.options.IstiodAddr, - ClusterID: c.options.ClusterID, - WorkloadNamespace: c.options.NameSpace, - TrustDomain: "cluster.local", - ServiceAccount: "aeraki", + CAEndpoint: c.options.IstiodAddr, + ClusterID: c.options.ClusterID, + WorkloadNamespace: c.options.NameSpace, + TrustDomain: "cluster.local", + ServiceAccount: "aeraki", + WorkloadRSAKeySize: 2048, + CredFetcher: plugin.CreateTokenPlugin(securityModel.K8sSAJwtFileName), } tlsOpts := &citadel.TLSOptions{} tlsOpts.RootCert = istiodCACertPath From 09e181dbe1d53f92e9c14d99af28f71bb992d891 Mon Sep 17 00:00:00 2001 From: shencurl521 <150639126+shencurl521@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:07:02 +0800 Subject: [PATCH 13/28] fix: update lestrrat-go/jwx to v1.2.27 to fix CVE-2023-49290 (#405) Signed-off-by: shenyixiong Co-authored-by: shenyixiong --- go.mod | 4 ++-- go.sum | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index b5a7a6be..96534af3 100644 --- a/go.mod +++ b/go.mod @@ -132,10 +132,10 @@ require ( github.com/klauspost/compress v1.16.5 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect - github.com/lestrrat-go/blackmagic v1.0.1 // indirect + github.com/lestrrat-go/blackmagic v1.0.2 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect github.com/lestrrat-go/iter v1.0.2 // indirect - github.com/lestrrat-go/jwx v1.2.26 // indirect + github.com/lestrrat-go/jwx v1.2.27 // indirect github.com/lestrrat-go/option v1.0.1 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.7 // indirect diff --git a/go.sum b/go.sum index ba0fb593..7f957a10 100644 --- a/go.sum +++ b/go.sum @@ -576,14 +576,14 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= -github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80= -github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= +github.com/lestrrat-go/blackmagic v1.0.2 h1:Cg2gVSc9h7sz9NOByczrbUvLopQmXrfFx//N+AkAr5k= +github.com/lestrrat-go/blackmagic v1.0.2/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= -github.com/lestrrat-go/jwx v1.2.26 h1:4iFo8FPRZGDYe1t19mQP0zTRqA7n8HnJ5lkIiDvJcB0= -github.com/lestrrat-go/jwx v1.2.26/go.mod h1:MaiCdGbn3/cckbOFSCluJlJMmp9dmZm5hDuIkx8ftpQ= +github.com/lestrrat-go/jwx v1.2.27 h1:cvnTnda/YzdyFuWdEAMkI6BsLtItSrASEVCI3C/IUEQ= +github.com/lestrrat-go/jwx v1.2.27/go.mod h1:Stob9LjSqR3lOmNdxF0/TvZo60V3hUGv8Fr7Bwzla3k= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= @@ -952,8 +952,8 @@ golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= From 37e78e55863083d710e1b210a7c33427476340fe Mon Sep 17 00:00:00 2001 From: shencurl521 <150639126+shencurl521@users.noreply.github.com> Date: Sat, 17 Feb 2024 21:06:26 +0800 Subject: [PATCH 14/28] fix: ConfigStore duplicate lead to aeraki unable to get istiod connection status update (#408) Signed-off-by: shenyixiong Co-authored-by: shenyixiong --- internal/controller/istio/controller.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/controller/istio/controller.go b/internal/controller/istio/controller.go index 61c8f7b7..8725cc04 100644 --- a/internal/controller/istio/controller.go +++ b/internal/controller/istio/controller.go @@ -134,8 +134,14 @@ func (c *Controller) connectIstio() { time.Sleep(5 * time.Second) continue } - configController := memory.NewController(c.Store) - c.xdsMCP.Store = configController + + if c.configCache == nil { + controllerLog.Warn("configCache is nil") + c.xdsMCP.Store = memory.NewController(c.Store) + } else { + c.xdsMCP.Store = c.configCache + } + if err = c.xdsMCP.Run(); err != nil { controllerLog.Errorf("adsc: failed running %v", err) c.closeConnection() From 974bcbbf2bfbd888967559c7f45cbe9192fd9ba8 Mon Sep 17 00:00:00 2001 From: "Hanlu (Lulu) Ye" Date: Fri, 29 Mar 2024 00:28:17 -0600 Subject: [PATCH 15/28] Remove errant whitespace from deployment.yaml (#416) --- manifests/charts/aeraki/templates/deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/charts/aeraki/templates/deployment.yaml b/manifests/charts/aeraki/templates/deployment.yaml index 20eb363a..026f9a28 100644 --- a/manifests/charts/aeraki/templates/deployment.yaml +++ b/manifests/charts/aeraki/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: periodSeconds: 3 timeoutSeconds: 5 resources: - { { - toYaml .Values.resources | nindent 12 } } + {{ - toYaml .Values.resources | nindent 12 }} env: - name: AERAKI_IS_MASTER value: {{ .Values.AERAKI_ENV.AERAKI_IS_MASTER }} @@ -76,7 +76,7 @@ spec: - name: AERAKI_XDS_ADDR value: {{ .Values.AERAKI_ENV.AERAKI_XDS_ADDR }} - name: AERAKI_XDS_PORT - value: { { .Values.AERAKI_ENV.AERAKI_XDS_PORT } } + value: {{ .Values.AERAKI_ENV.AERAKI_XDS_PORT }} - name: AERAKI_LOG_LEVEL value: {{ .Values.AERAKI_ENV.AERAKI_LOG_LEVEL }} - name: AERAKI_NAMESPACE @@ -107,4 +107,4 @@ spec: {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }} From 4ca05656d6fd3939ec5ed066e4b1d487fc19bc66 Mon Sep 17 00:00:00 2001 From: Paul O'Connor <465717+pauloconnor@users.noreply.github.com> Date: Sat, 30 Mar 2024 04:37:54 +0000 Subject: [PATCH 16/28] fix: ClusterRole webhook permissions (#418) Signed-off-by: Paul O'Connor <465717+pauloconnor@users.noreply.github.com> --- manifests/charts/aeraki/templates/clusterrole.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manifests/charts/aeraki/templates/clusterrole.yaml b/manifests/charts/aeraki/templates/clusterrole.yaml index e4ce150b..39ae0686 100644 --- a/manifests/charts/aeraki/templates/clusterrole.yaml +++ b/manifests/charts/aeraki/templates/clusterrole.yaml @@ -63,3 +63,9 @@ rules: - patch - create - delete + - apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + verbs: + - '*' From 2d27a8e71c033e001b2139aa2567dad781410fc3 Mon Sep 17 00:00:00 2001 From: shencurl521 <150639126+shencurl521@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:34:03 +0800 Subject: [PATCH 17/28] fix: update lestrrat-go/jwx to v1.2.28 to fix CVE-2024-21664 (#409) Signed-off-by: shenyixiong Co-authored-by: shenyixiong --- go.mod | 2 +- go.sum | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 96534af3..03546a0b 100644 --- a/go.mod +++ b/go.mod @@ -135,7 +135,7 @@ require ( github.com/lestrrat-go/blackmagic v1.0.2 // indirect github.com/lestrrat-go/httpcc v1.0.1 // indirect github.com/lestrrat-go/iter v1.0.2 // indirect - github.com/lestrrat-go/jwx v1.2.27 // indirect + github.com/lestrrat-go/jwx v1.2.28 // indirect github.com/lestrrat-go/option v1.0.1 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.7 // indirect diff --git a/go.sum b/go.sum index 7f957a10..af3b2040 100644 --- a/go.sum +++ b/go.sum @@ -582,8 +582,8 @@ github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZ github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= -github.com/lestrrat-go/jwx v1.2.27 h1:cvnTnda/YzdyFuWdEAMkI6BsLtItSrASEVCI3C/IUEQ= -github.com/lestrrat-go/jwx v1.2.27/go.mod h1:Stob9LjSqR3lOmNdxF0/TvZo60V3hUGv8Fr7Bwzla3k= +github.com/lestrrat-go/jwx v1.2.28 h1:uadI6o0WpOVrBSf498tRXZIwPpEtLnR9CvqPFXeI5sA= +github.com/lestrrat-go/jwx v1.2.28/go.mod h1:nF+91HEMh/MYFVwKPl5HHsBGMPscqbQb+8IDQdIazP8= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= @@ -953,7 +953,6 @@ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= From 8ef3c348da0c25e4309f36fcb304eaad7d6e6a56 Mon Sep 17 00:00:00 2001 From: Paul O'Connor <465717+pauloconnor@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:34:39 +0100 Subject: [PATCH 18/28] fix: Errant space in deployment.yaml (#417) Signed-off-by: Paul O'Connor <465717+pauloconnor@users.noreply.github.com> --- manifests/charts/aeraki/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/charts/aeraki/templates/deployment.yaml b/manifests/charts/aeraki/templates/deployment.yaml index 026f9a28..afbc598c 100644 --- a/manifests/charts/aeraki/templates/deployment.yaml +++ b/manifests/charts/aeraki/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: periodSeconds: 3 timeoutSeconds: 5 resources: - {{ - toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.resources | nindent 12 }} env: - name: AERAKI_IS_MASTER value: {{ .Values.AERAKI_ENV.AERAKI_IS_MASTER }} From 2c1c132dbb90885e58dd36c57254a5f9434505f3 Mon Sep 17 00:00:00 2001 From: Paul O'Connor <465717+pauloconnor@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:28:16 +0100 Subject: [PATCH 19/28] Update network-multitool docker address (#419) --- demo/thrift/thrift-sample.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/thrift/thrift-sample.yaml b/demo/thrift/thrift-sample.yaml index aaa4e118..6803fb1b 100644 --- a/demo/thrift/thrift-sample.yaml +++ b/demo/thrift/thrift-sample.yaml @@ -114,4 +114,4 @@ spec: # spec: # containers: # - name: network-tool -# image: praqma/network-multitool +# image: wbitt/network-multitool From 4f5a2b7b85d7b2e311ce245b89143529579a2739 Mon Sep 17 00:00:00 2001 From: "Huabing (Robin) Zhao" Date: Sat, 29 Mar 2025 12:27:51 +0800 Subject: [PATCH 20/28] Update README.md (#428) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d4312992..e04fb7d1 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ We follow the [CNCF Code of Conduct](CODE_OF_CONDUCT.md) ## Landscapes

-   +

-Aeraki Mesh is a CNCF sandbox project. -

\ No newline at end of file +Aeraki Mesh is a CNCF sandbox project. +

From de3135895160052a3df8468e02b436a129f10cfb Mon Sep 17 00:00:00 2001 From: "Huabing (Robin) Zhao" Date: Sat, 29 Mar 2025 12:56:15 +0800 Subject: [PATCH 21/28] chore: fix ci (#427) * fix ci Signed-off-by: Huabing (Robin) Zhao * fix lint Signed-off-by: Huabing (Robin) Zhao * fix test Signed-off-by: Huabing (Robin) Zhao --------- Signed-off-by: Huabing (Robin) Zhao --- .github/workflows/ci.yaml | 12 +- .../workflows/e2e-metaprotocol-gateway.yaml | 2 +- .github/workflows/e2e-metaprotocol.yaml | 18 +- .github/workflows/e2e-redis.yaml | 2 +- .golangci.yml | 185 +- api/README.md | 3 - .../v1alpha1/dubbo.aeraki.io.v1alpha1.pb.html | 375 -- .../dubbo_authorization_policy.gen.json | 149 - .../v1alpha1/dubbo_authorization_policy.pb.go | 1867 ------- .../v1alpha1/dubbo_authorization_policy.proto | 229 - ...dubbo_authorization_policy_deepcopy.gen.go | 149 - .../dubbo_authorization_policy_json.gen.go | 96 - .../metaprotocol.aeraki.io.v1alpha1.pb.html | 836 --- .../metaprotocol_application_protocol.pb.go | 419 -- .../metaprotocol_application_protocol.proto | 61 - ...tocol_application_protocol_deepcopy.gen.go | 53 - ...aprotocol_application_protocol_json.gen.go | 50 - .../v1alpha1/metaprotocol_metarouter.pb.go | 4699 ----------------- .../v1alpha1/metaprotocol_metarouter.proto | 338 -- .../metaprotocol_metarouter_deepcopy.gen.go | 369 -- .../metaprotocol_metarouter_json.gen.go | 236 - .../v1alpha1/redis.aeraki.io.v1alpha1.pb.html | 1024 ---- api/redis/v1alpha1/redisdestination.gen.json | 186 - api/redis/v1alpha1/redisdestination.pb.go | 2057 -------- api/redis/v1alpha1/redisdestination.proto | 88 - .../v1alpha1/redisdestination_deepcopy.gen.go | 167 - .../v1alpha1/redisdestination_json.gen.go | 104 - api/redis/v1alpha1/redisservice.gen.json | 306 -- api/redis/v1alpha1/redisservice.pb.go | 3135 ----------- api/redis/v1alpha1/redisservice.proto | 191 - .../v1alpha1/redisservice_deepcopy.gen.go | 208 - api/redis/v1alpha1/redisservice_json.gen.go | 125 - client-go/README.md | 3 - client-go/pkg/apis/dubbo/v1alpha1/doc.go | 23 - .../pkg/apis/dubbo/v1alpha1/register.gen.go | 51 - .../pkg/apis/dubbo/v1alpha1/types.gen.go | 70 - .../v1alpha1/zz_generated.deepcopy.gen.go | 85 - .../pkg/apis/metaprotocol/v1alpha1/doc.go | 23 - .../metaprotocol/v1alpha1/register.gen.go | 53 - .../apis/metaprotocol/v1alpha1/types.gen.go | 115 - .../v1alpha1/zz_generated.deepcopy.gen.go | 146 - client-go/pkg/apis/redis/v1alpha1/doc.go | 23 - .../pkg/apis/redis/v1alpha1/register.gen.go | 53 - .../pkg/apis/redis/v1alpha1/types.gen.go | 121 - .../v1alpha1/zz_generated.deepcopy.gen.go | 146 - .../pkg/clientset/versioned/clientset.gen.go | 124 - client-go/pkg/clientset/versioned/doc.go | 18 - .../versioned/fake/clientset_generated.gen.go | 94 - client-go/pkg/clientset/versioned/fake/doc.go | 18 - .../clientset/versioned/fake/register.gen.go | 58 - .../pkg/clientset/versioned/scheme/doc.go | 18 - .../versioned/scheme/register.gen.go | 58 - .../versioned/typed/dubbo/v1alpha1/doc.go | 18 - .../typed/dubbo/v1alpha1/dubbo_client.gen.go | 87 - .../v1alpha1/dubboauthorizationpolicy.gen.go | 193 - .../typed/dubbo/v1alpha1/fake/doc.go | 18 - .../v1alpha1/fake/fake_dubbo_client.gen.go | 38 - .../fake/fake_dubboauthorizationpolicy.gen.go | 140 - .../dubbo/v1alpha1/generated_expansion.gen.go | 19 - .../v1alpha1/applicationprotocol.gen.go | 193 - .../typed/metaprotocol/v1alpha1/doc.go | 18 - .../typed/metaprotocol/v1alpha1/fake/doc.go | 18 - .../fake/fake_applicationprotocol.gen.go | 140 - .../fake/fake_metaprotocol_client.gen.go | 42 - .../v1alpha1/fake/fake_metarouter.gen.go | 140 - .../v1alpha1/generated_expansion.gen.go | 21 - .../v1alpha1/metaprotocol_client.gen.go | 92 - .../metaprotocol/v1alpha1/metarouter.gen.go | 193 - .../versioned/typed/redis/v1alpha1/doc.go | 18 - .../typed/redis/v1alpha1/fake/doc.go | 18 - .../v1alpha1/fake/fake_redis_client.gen.go | 42 - .../fake/fake_redisdestination.gen.go | 140 - .../v1alpha1/fake/fake_redisservice.gen.go | 140 - .../redis/v1alpha1/generated_expansion.gen.go | 21 - .../typed/redis/v1alpha1/redis_client.gen.go | 92 - .../redis/v1alpha1/redisdestination.gen.go | 193 - .../typed/redis/v1alpha1/redisservice.gen.go | 193 - .../externalversions/dubbo/interface.gen.go | 44 - .../v1alpha1/dubboauthorizationpolicy.gen.go | 88 - .../dubbo/v1alpha1/interface.gen.go | 43 - .../informers/externalversions/factory.gen.go | 190 - .../informers/externalversions/generic.gen.go | 74 - .../factory_interfaces.gen.go | 38 - .../metaprotocol/interface.gen.go | 44 - .../v1alpha1/applicationprotocol.gen.go | 88 - .../metaprotocol/v1alpha1/interface.gen.go | 50 - .../metaprotocol/v1alpha1/metarouter.gen.go | 88 - .../externalversions/redis/interface.gen.go | 44 - .../redis/v1alpha1/interface.gen.go | 50 - .../redis/v1alpha1/redisdestination.gen.go | 88 - .../redis/v1alpha1/redisservice.gen.go | 88 - .../v1alpha1/dubboauthorizationpolicy.gen.go | 97 - .../dubbo/v1alpha1/expansion_generated.gen.go | 25 - .../v1alpha1/applicationprotocol.gen.go | 97 - .../v1alpha1/expansion_generated.gen.go | 33 - .../metaprotocol/v1alpha1/metarouter.gen.go | 98 - .../redis/v1alpha1/expansion_generated.gen.go | 33 - .../redis/v1alpha1/redisdestination.gen.go | 97 - .../redis/v1alpha1/redisservice.gen.go | 97 - go.mod | 5 +- go.sum | 18 +- internal/bootstrap/server.go | 4 +- internal/controller/kube/dubbo.go | 4 +- internal/controller/kube/metaprotocol.go | 4 +- internal/controller/kube/metarouter.go | 4 +- internal/controller/kube/namesapce.go | 6 +- internal/controller/kube/redis.go | 4 +- internal/controller/kube/serviceentry.go | 6 +- internal/envoyfilter/controller.go | 8 +- internal/plugin/dubbo/authz/matcher/cidr.go | 2 +- .../plugin/dubbo/authz/model/generator.go | 2 +- internal/plugin/dubbo/route.go | 4 +- internal/plugin/metaprotocol/accesslog.go | 2 +- internal/plugin/redis/outboundcluster.go | 4 +- internal/plugin/redis/util.go | 4 +- internal/plugin/thrift/route.go | 4 +- internal/webhook/validation/server/server.go | 2 +- internal/xds/utils.go | 2 +- test/e2e/metaprotocol/metaprotocol_test.go | 2 +- 119 files changed, 155 insertions(+), 22796 deletions(-) delete mode 100644 api/README.md delete mode 100644 api/dubbo/v1alpha1/dubbo.aeraki.io.v1alpha1.pb.html delete mode 100644 api/dubbo/v1alpha1/dubbo_authorization_policy.gen.json delete mode 100644 api/dubbo/v1alpha1/dubbo_authorization_policy.pb.go delete mode 100644 api/dubbo/v1alpha1/dubbo_authorization_policy.proto delete mode 100644 api/dubbo/v1alpha1/dubbo_authorization_policy_deepcopy.gen.go delete mode 100644 api/dubbo/v1alpha1/dubbo_authorization_policy_json.gen.go delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol.aeraki.io.v1alpha1.pb.html delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_application_protocol.pb.go delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_application_protocol_deepcopy.gen.go delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_application_protocol_json.gen.go delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_metarouter.pb.go delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_metarouter_deepcopy.gen.go delete mode 100644 api/metaprotocol/v1alpha1/metaprotocol_metarouter_json.gen.go delete mode 100644 api/redis/v1alpha1/redis.aeraki.io.v1alpha1.pb.html delete mode 100644 api/redis/v1alpha1/redisdestination.gen.json delete mode 100644 api/redis/v1alpha1/redisdestination.pb.go delete mode 100644 api/redis/v1alpha1/redisdestination.proto delete mode 100644 api/redis/v1alpha1/redisdestination_deepcopy.gen.go delete mode 100644 api/redis/v1alpha1/redisdestination_json.gen.go delete mode 100644 api/redis/v1alpha1/redisservice.gen.json delete mode 100644 api/redis/v1alpha1/redisservice.pb.go delete mode 100644 api/redis/v1alpha1/redisservice.proto delete mode 100644 api/redis/v1alpha1/redisservice_deepcopy.gen.go delete mode 100644 api/redis/v1alpha1/redisservice_json.gen.go delete mode 100644 client-go/README.md delete mode 100644 client-go/pkg/apis/dubbo/v1alpha1/doc.go delete mode 100644 client-go/pkg/apis/dubbo/v1alpha1/register.gen.go delete mode 100644 client-go/pkg/apis/dubbo/v1alpha1/types.gen.go delete mode 100644 client-go/pkg/apis/dubbo/v1alpha1/zz_generated.deepcopy.gen.go delete mode 100644 client-go/pkg/apis/metaprotocol/v1alpha1/doc.go delete mode 100644 client-go/pkg/apis/metaprotocol/v1alpha1/register.gen.go delete mode 100644 client-go/pkg/apis/metaprotocol/v1alpha1/types.gen.go delete mode 100644 client-go/pkg/apis/metaprotocol/v1alpha1/zz_generated.deepcopy.gen.go delete mode 100644 client-go/pkg/apis/redis/v1alpha1/doc.go delete mode 100644 client-go/pkg/apis/redis/v1alpha1/register.gen.go delete mode 100644 client-go/pkg/apis/redis/v1alpha1/types.gen.go delete mode 100644 client-go/pkg/apis/redis/v1alpha1/zz_generated.deepcopy.gen.go delete mode 100644 client-go/pkg/clientset/versioned/clientset.gen.go delete mode 100644 client-go/pkg/clientset/versioned/doc.go delete mode 100644 client-go/pkg/clientset/versioned/fake/clientset_generated.gen.go delete mode 100644 client-go/pkg/clientset/versioned/fake/doc.go delete mode 100644 client-go/pkg/clientset/versioned/fake/register.gen.go delete mode 100644 client-go/pkg/clientset/versioned/scheme/doc.go delete mode 100644 client-go/pkg/clientset/versioned/scheme/register.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/doc.go delete mode 100644 client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubbo_client.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/doc.go delete mode 100644 client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubbo_client.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubboauthorizationpolicy.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/generated_expansion.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/applicationprotocol.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/doc.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/doc.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_applicationprotocol.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metaprotocol_client.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metarouter.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/generated_expansion.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metaprotocol_client.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metarouter.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/doc.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/doc.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redis_client.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisdestination.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisservice.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/generated_expansion.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redis_client.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisdestination.gen.go delete mode 100644 client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisservice.gen.go delete mode 100644 client-go/pkg/informers/externalversions/dubbo/interface.gen.go delete mode 100644 client-go/pkg/informers/externalversions/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go delete mode 100644 client-go/pkg/informers/externalversions/dubbo/v1alpha1/interface.gen.go delete mode 100644 client-go/pkg/informers/externalversions/factory.gen.go delete mode 100644 client-go/pkg/informers/externalversions/generic.gen.go delete mode 100644 client-go/pkg/informers/externalversions/internalinterfaces/factory_interfaces.gen.go delete mode 100644 client-go/pkg/informers/externalversions/metaprotocol/interface.gen.go delete mode 100644 client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/applicationprotocol.gen.go delete mode 100644 client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/interface.gen.go delete mode 100644 client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/metarouter.gen.go delete mode 100644 client-go/pkg/informers/externalversions/redis/interface.gen.go delete mode 100644 client-go/pkg/informers/externalversions/redis/v1alpha1/interface.gen.go delete mode 100644 client-go/pkg/informers/externalversions/redis/v1alpha1/redisdestination.gen.go delete mode 100644 client-go/pkg/informers/externalversions/redis/v1alpha1/redisservice.gen.go delete mode 100644 client-go/pkg/listers/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go delete mode 100644 client-go/pkg/listers/dubbo/v1alpha1/expansion_generated.gen.go delete mode 100644 client-go/pkg/listers/metaprotocol/v1alpha1/applicationprotocol.gen.go delete mode 100644 client-go/pkg/listers/metaprotocol/v1alpha1/expansion_generated.gen.go delete mode 100644 client-go/pkg/listers/metaprotocol/v1alpha1/metarouter.gen.go delete mode 100644 client-go/pkg/listers/redis/v1alpha1/expansion_generated.gen.go delete mode 100644 client-go/pkg/listers/redis/v1alpha1/redisdestination.gen.go delete mode 100644 client-go/pkg/listers/redis/v1alpha1/redisservice.gen.go diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 03b89f6f..cb008b6e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,7 @@ jobs: with: config_file: .ci/yamllint.yml strict: true + file_or_dir: '.' build-and-test: name: build-and-test runs-on: ubuntu-latest @@ -36,7 +37,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v1 with: - go-version: '1.20' + go-version: '1.24' - name: Build run: go build -race ./internal/... - name: Test @@ -54,9 +55,9 @@ jobs: - name: Setup Go uses: actions/setup-go@v1 with: - go-version: '1.20' + go-version: '1.24' - name: golangci-lint - uses: golangci/golangci-lint-action@v3.7.0 + uses: golangci/golangci-lint-action@v7.0.0 with: args: --timeout=10m --tests="false" style-check: @@ -68,11 +69,12 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version go install golang.org/x/tools/cmd/goimports@latest + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - name: gofmt and goimports run: make style-check checkgomod: @@ -82,7 +84,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v1 with: - go-version: '1.20' + go-version: '1.24' - run: go mod tidy - name: Check for changes in go.mod or go.sum run: | diff --git a/.github/workflows/e2e-metaprotocol-gateway.yaml b/.github/workflows/e2e-metaprotocol-gateway.yaml index 06a76ac7..f47922d5 100644 --- a/.github/workflows/e2e-metaprotocol-gateway.yaml +++ b/.github/workflows/e2e-metaprotocol-gateway.yaml @@ -36,7 +36,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version diff --git a/.github/workflows/e2e-metaprotocol.yaml b/.github/workflows/e2e-metaprotocol.yaml index 512b7dfb..5bd09ad4 100644 --- a/.github/workflows/e2e-metaprotocol.yaml +++ b/.github/workflows/e2e-metaprotocol.yaml @@ -36,7 +36,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -65,7 +65,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -94,7 +94,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -123,7 +123,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -152,7 +152,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -181,7 +181,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -210,7 +210,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -239,7 +239,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version @@ -268,7 +268,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go version diff --git a/.github/workflows/e2e-redis.yaml b/.github/workflows/e2e-redis.yaml index c2132f42..b3dc8137 100644 --- a/.github/workflows/e2e-redis.yaml +++ b/.github/workflows/e2e-redis.yaml @@ -36,7 +36,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: '1.20' + go-version: '1.24' - name: Install dependencies run: | go install golang.org/x/tools/cmd/goimports@latest diff --git a/.golangci.yml b/.golangci.yml index 5cd5ddeb..f9c8faef 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,114 +13,97 @@ # limitations under the License. --- -linters-settings: - depguard: - rules: - Main: - deny: - - pkg: github.com/gogo/protobuf - desc: "gogo/protobuf is deprecated, use golang/protobuf" - - pkg: gopkg.in/yaml.v2 - desc: "use sigs.k8s.io/yaml instead" - - pkg: gopkg.in/yaml.v3 - desc: "use sigs.k8s.io/yaml instead" - dupl: - threshold: 100 - funlen: - lines: 80 - statements: 50 - goconst: - min-len: 2 - min-occurrences: 3 - gocritic: - enabled-tags: - - diagnostic - - experimental - - opinionated - - performance - - style - disabled-checks: - - dupImport # https://github.com/go-critic/go-critic/issues/845 - - ifElseChain - - octalLiteral - - whyNoLint - - wrapperFunc - gocyclo: - min-complexity: 15 - goimports: - local-prefixes: github.com/aeraki-mesh/aeraki - gomnd: - # don't include the "operation" and "assign" - checks: - - argument - - case - - condition - - return - ignored-numbers: - - '0' - - '1' - - '2' - - '3' - ignored-functions: - - strings.SplitN - - govet: - check-shadowing: true - settings: - printf: - funcs: - lll: - line-length: 120 - misspell: - locale: US - nolintlint: - allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) - allow-unused: false # report any unused nolint directives - require-explanation: false # don't require an explanation for nolint directives - require-specific: false # don't require nolint directives to be specific about which linter is being skipped - +version: "2" linters: - disable-all: true + default: none enable: - - stylecheck - bodyclose - - exportloopref - - gofmt - - goimports - - goheader - gocritic + - goheader - gosec - misspell - revive + - staticcheck - unconvert - unparam + settings: + depguard: + rules: + Main: + deny: + - pkg: github.com/gogo/protobuf + desc: gogo/protobuf is deprecated, use golang/protobuf + - pkg: gopkg.in/yaml.v2 + desc: use sigs.k8s.io/yaml instead + - pkg: gopkg.in/yaml.v3 + desc: use sigs.k8s.io/yaml instead + dupl: + threshold: 100 + funlen: + lines: 80 + statements: 50 + goconst: + min-len: 2 + min-occurrences: 3 + gocritic: + disabled-checks: + - dupImport + - ifElseChain + - octalLiteral + - whyNoLint + - wrapperFunc + enabled-tags: + - diagnostic + - experimental + - opinionated + - performance + - style + gocyclo: + min-complexity: 15 + govet: + settings: + printf: + funcs: null + lll: + line-length: 120 + misspell: + locale: US + nolintlint: + require-explanation: false + require-specific: false + allow-unused: false + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + rules: + - path: (.+)\.go$ + text: declaration of "(err|ctx)" shadows declaration at + - path: (.+)\.go$ + text: shadow of imported from + - path: (.+)\.go$ + text: 'singleCaseSwitch: should rewrite switch statement to if statement' + paths: + - third_party$ + - builtin$ + - examples$ + - test - # don't enable: - # - asciicheck - # - scopelint - # - gochecknoglobals - # - gocognit - # - godot - # - godox - # - goerr113 - # - interfacer - # - maligned - # - nestif - # - prealloc - # - testpackage - # - revive - # - wsl - -issues: - exclude: - - 'declaration of "(err|ctx)" shadows declaration at' - - 'shadow of imported from' - - "singleCaseSwitch: should rewrite switch statement to if statement" - -run: - timeout: 5m - go: '1.17' - skip-dirs: - - api - - client-go - - test +formatters: + enable: + - gofmt + - goimports + settings: + goimports: + local-prefixes: + - github.com/aeraki-mesh/aeraki + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ + - test diff --git a/api/README.md b/api/README.md deleted file mode 100644 index 9a8f3f14..00000000 --- a/api/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This package is deprecated! - -Aeraki API has been moved to a standalone reposition: https://github.com/aeraki-mesh/api. diff --git a/api/dubbo/v1alpha1/dubbo.aeraki.io.v1alpha1.pb.html b/api/dubbo/v1alpha1/dubbo.aeraki.io.v1alpha1.pb.html deleted file mode 100644 index abd9cb46..00000000 --- a/api/dubbo/v1alpha1/dubbo.aeraki.io.v1alpha1.pb.html +++ /dev/null @@ -1,375 +0,0 @@ ---- -title: Authorization Policy -description: Configuration for access control on Dubbo services. -layout: protoc-gen-docs -generator: protoc-gen-docs -schema: dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy -number_of_entries: 8 ---- -

Authorization Policy scope (target) is determined by “metadata/namespace” and - an optional “selector”.

- -
    -
  • “metadata/namespace” tells which namespace the policy applies. If set to root -namespace, the policy applies to all namespaces in a mesh.
  • -
- -

DubboAuthorizationPolicy

-
-

DubboAuthorizationPolicy enables access control on Dubbo services.

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
rulesRule[] -

Optional. A list of rules to match the request. A match occurs when at least -one rule matches the request.

- -

If not set, the match will never occur. This is equivalent to setting a -default of deny for the target workloads.

- -
-No -
actionAction -

Optional. The action to take if the request is matched with the rules.

- -
-No -
-
-

Rule

-
-

Rule matches requests from a list of sources that perform a list of operations subject to a -list of conditions. A match occurs when at least one source, one operation and all conditions -matches the request. An empty rule is always matched.

- -

Any string field in the rule supports Exact, Prefix, Suffix and Presence match:

- -
    -
  • Exact match: “abc” will match on value “abc”.
  • -
  • Prefix match: “abc*” will match on value “abc” and “abcd”.
  • -
  • Suffix match: “*abc” will match on value “abc” and “xabc”.
  • -
  • Presence match: “*” will match when value is not empty.
  • -
- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
fromFrom[] -

Optional. from specifies the source of a request.

- -

If not set, any source is allowed.

- -
-No -
toTo[] -

Optional. to specifies the operation of a request.

- -

If not set, any operation is allowed.

- -
-No -
-
-

Source

-
-

Source specifies the source identities of a request. Fields in the source are -ANDed together.

- -

For example, the following source matches if the principal is “admin” or “dev” -and the namespace is “prod” or “test”.

- -
principals: ["admin", "dev"]
-namespaces: ["prod", "test"]
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
principalsstring[] -

Optional. A list of source peer identities (i.e. service account), which -matches to the “source.principal” attribute. This field requires mTLS enabled.

- -

If not set, any principal is allowed.

- -
-No -
notPrincipalsstring[] -

Optional. A list of negative match of source peer identities.

- -
-No -
namespacesstring[] -

Optional. A list of namespaces, which matches to the “source.namespace” -attribute. This field requires mTLS enabled.

- -

If not set, any namespace is allowed.

- -
-No -
notNamespacesstring[] -

Optional. A list of negative match of namespaces.

- -
-No -
-
-

Operation

-
-

Operation specifies the operations of a request. Fields in the operation are -ANDed together.

- -

For example, the following operation matches if the Dubbo interface is “org.apache.dubbo.samples.basic.api.DemoService” -and the method is “sayHello”.

- -
interfaces: ["org.apache.dubbo.samples.basic.api.DemoService"]
-methods: ["sayHello"]
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
interfacesstring[] -

Optional. A list of interfaces, which matches to the Dubbo interface.

- -

If not set, any interfaces is allowed.

- -
-No -
notInterfacesstring[] -

Optional. A list of negative match of interfaces.

- -
-No -
methodsstring[] -

Optional. A list of methods, which matches to the Dubbo methods.

- -

If not set, any method is allowed.

- -
-No -
notMethodsstring[] -

Optional. A list of negative match of methods.

- -
-No -
-
-

Rule.From

-
-

From includes a list or sources.

- - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
sourceSource -

Source specifies the source of a request.

- -
-No -
-
-

Rule.To

-
-

To includes a list or operations.

- - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
operationOperation -

Operation specifies the operation of a request.

- -
-No -
-
-

DubboAuthorizationPolicy.Action

-
-

Action specifies the operation to take.

- - - - - - - - - - - - - - - - - - -
NameDescription
ALLOW -

Allow a request only if it matches the rules. This is the default type.

- -
DENY -

Deny a request if it matches any of the rules.

- -
-
-

DubboAuthorizationPolicy.Action

-
-

Action specifies the operation to take.

- - - - - - - - - - - - - - - - - - -
NameDescription
ALLOW -

Allow a request only if it matches the rules. This is the default type.

- -
DENY -

Deny a request if it matches any of the rules.

- -
-
diff --git a/api/dubbo/v1alpha1/dubbo_authorization_policy.gen.json b/api/dubbo/v1alpha1/dubbo_authorization_policy.gen.json deleted file mode 100644 index eb9dcc4a..00000000 --- a/api/dubbo/v1alpha1/dubbo_authorization_policy.gen.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Configuration for access control on Dubbo services.", - "version": "v1alpha1" - }, - "components": { - "schemas": { - "dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy": { - "description": "DubboAuthorizationPolicy enables access control on Dubbo services.", - "type": "object", - "properties": { - "rules": { - "description": "Optional. A list of rules to match the request. A match occurs when at least one rule matches the request.", - "type": "array", - "items": { - "$ref": "#/components/schemas/dubbo.aeraki.io.v1alpha1.Rule" - } - }, - "action": { - "$ref": "#/components/schemas/dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy.Action" - } - } - }, - "dubbo.aeraki.io.v1alpha1.Rule": { - "description": "Rule matches requests from a list of sources that perform a list of operations subject to a list of conditions. A match occurs when at least one source, one operation and all conditions matches the request. An empty rule is always matched.", - "type": "object", - "properties": { - "from": { - "description": "Optional. from specifies the source of a request.", - "type": "array", - "items": { - "$ref": "#/components/schemas/dubbo.aeraki.io.v1alpha1.Rule.From" - } - }, - "to": { - "description": "Optional. to specifies the operation of a request.", - "type": "array", - "items": { - "$ref": "#/components/schemas/dubbo.aeraki.io.v1alpha1.Rule.To" - } - } - } - }, - "dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy.Action": { - "description": "Action specifies the operation to take.", - "type": "string", - "enum": [ - "ALLOW", - "DENY" - ] - }, - "dubbo.aeraki.io.v1alpha1.Rule.From": { - "description": "From includes a list or sources.", - "type": "object", - "properties": { - "source": { - "$ref": "#/components/schemas/dubbo.aeraki.io.v1alpha1.Source" - } - } - }, - "dubbo.aeraki.io.v1alpha1.Rule.To": { - "description": "To includes a list or operations.", - "type": "object", - "properties": { - "operation": { - "$ref": "#/components/schemas/dubbo.aeraki.io.v1alpha1.Operation" - } - } - }, - "dubbo.aeraki.io.v1alpha1.Source": { - "description": "Source specifies the source identities of a request. Fields in the source are ANDed together.", - "type": "object", - "properties": { - "principals": { - "description": "Optional. A list of source peer identities (i.e. service account), which matches to the \"source.principal\" attribute. This field requires mTLS enabled.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - }, - "notPrincipals": { - "description": "Optional. A list of negative match of source peer identities.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - }, - "namespaces": { - "description": "Optional. A list of namespaces, which matches to the \"source.namespace\" attribute. This field requires mTLS enabled.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - }, - "notNamespaces": { - "description": "Optional. A list of negative match of namespaces.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - } - } - }, - "dubbo.aeraki.io.v1alpha1.Operation": { - "description": "Operation specifies the operations of a request. Fields in the operation are ANDed together.", - "type": "object", - "properties": { - "interfaces": { - "description": "Optional. A list of interfaces, which matches to the Dubbo interface.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - }, - "notInterfaces": { - "description": "Optional. A list of negative match of interfaces.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - }, - "methods": { - "description": "Optional. A list of methods, which matches to the Dubbo methods.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - }, - "notMethods": { - "description": "Optional. A list of negative match of methods.", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/api/dubbo/v1alpha1/dubbo_authorization_policy.pb.go b/api/dubbo/v1alpha1/dubbo_authorization_policy.pb.go deleted file mode 100644 index efdab16b..00000000 --- a/api/dubbo/v1alpha1/dubbo_authorization_policy.pb.go +++ /dev/null @@ -1,1867 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/dubbo/v1alpha1/dubbo_authorization_policy.proto - -// -// Authorization Policy scope (target) is determined by "metadata/namespace" and -// an optional "selector". -// -// - "metadata/namespace" tells which namespace the policy applies. If set to root -// namespace, the policy applies to all namespaces in a mesh. - -// deprecated -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Action specifies the operation to take. -type DubboAuthorizationPolicy_Action int32 - -const ( - // Allow a request only if it matches the rules. This is the default type. - DubboAuthorizationPolicy_ALLOW DubboAuthorizationPolicy_Action = 0 - // Deny a request if it matches any of the rules. - DubboAuthorizationPolicy_DENY DubboAuthorizationPolicy_Action = 1 -) - -var DubboAuthorizationPolicy_Action_name = map[int32]string{ - 0: "ALLOW", - 1: "DENY", -} - -var DubboAuthorizationPolicy_Action_value = map[string]int32{ - "ALLOW": 0, - "DENY": 1, -} - -func (x DubboAuthorizationPolicy_Action) String() string { - return proto.EnumName(DubboAuthorizationPolicy_Action_name, int32(x)) -} - -func (DubboAuthorizationPolicy_Action) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f805ac8c1ee0a237, []int{0, 0} -} - -// DubboAuthorizationPolicy enables access control on Dubbo services. -// -// -// -// -type DubboAuthorizationPolicy struct { - // Optional. A list of rules to match the request. A match occurs when at least - // one rule matches the request. - // - // If not set, the match will never occur. This is equivalent to setting a - // default of deny for the target workloads. - Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` - // Optional. The action to take if the request is matched with the rules. - Action DubboAuthorizationPolicy_Action `protobuf:"varint,3,opt,name=action,proto3,enum=dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy_Action" json:"action,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DubboAuthorizationPolicy) Reset() { *m = DubboAuthorizationPolicy{} } -func (m *DubboAuthorizationPolicy) String() string { return proto.CompactTextString(m) } -func (*DubboAuthorizationPolicy) ProtoMessage() {} -func (*DubboAuthorizationPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_f805ac8c1ee0a237, []int{0} -} -func (m *DubboAuthorizationPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DubboAuthorizationPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DubboAuthorizationPolicy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DubboAuthorizationPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_DubboAuthorizationPolicy.Merge(m, src) -} -func (m *DubboAuthorizationPolicy) XXX_Size() int { - return m.Size() -} -func (m *DubboAuthorizationPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_DubboAuthorizationPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_DubboAuthorizationPolicy proto.InternalMessageInfo - -func (m *DubboAuthorizationPolicy) GetRules() []*Rule { - if m != nil { - return m.Rules - } - return nil -} - -func (m *DubboAuthorizationPolicy) GetAction() DubboAuthorizationPolicy_Action { - if m != nil { - return m.Action - } - return DubboAuthorizationPolicy_ALLOW -} - -// Rule matches requests from a list of sources that perform a list of operations subject to a -// list of conditions. A match occurs when at least one source, one operation and all conditions -// matches the request. An empty rule is always matched. -// -// Any string field in the rule supports Exact, Prefix, Suffix and Presence match: -// -// - Exact match: "abc" will match on value "abc". -// - Prefix match: "abc*" will match on value "abc" and "abcd". -// - Suffix match: "*abc" will match on value "abc" and "xabc". -// - Presence match: "*" will match when value is not empty. -type Rule struct { - // Optional. from specifies the source of a request. - // - // If not set, any source is allowed. - From []*Rule_From `protobuf:"bytes,1,rep,name=from,proto3" json:"from,omitempty"` - // Optional. to specifies the operation of a request. - // - // If not set, any operation is allowed. - To []*Rule_To `protobuf:"bytes,2,rep,name=to,proto3" json:"to,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Rule) Reset() { *m = Rule{} } -func (m *Rule) String() string { return proto.CompactTextString(m) } -func (*Rule) ProtoMessage() {} -func (*Rule) Descriptor() ([]byte, []int) { - return fileDescriptor_f805ac8c1ee0a237, []int{1} -} -func (m *Rule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Rule.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Rule) XXX_Merge(src proto.Message) { - xxx_messageInfo_Rule.Merge(m, src) -} -func (m *Rule) XXX_Size() int { - return m.Size() -} -func (m *Rule) XXX_DiscardUnknown() { - xxx_messageInfo_Rule.DiscardUnknown(m) -} - -var xxx_messageInfo_Rule proto.InternalMessageInfo - -func (m *Rule) GetFrom() []*Rule_From { - if m != nil { - return m.From - } - return nil -} - -func (m *Rule) GetTo() []*Rule_To { - if m != nil { - return m.To - } - return nil -} - -// From includes a list or sources. -type Rule_From struct { - // Source specifies the source of a request. - Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Rule_From) Reset() { *m = Rule_From{} } -func (m *Rule_From) String() string { return proto.CompactTextString(m) } -func (*Rule_From) ProtoMessage() {} -func (*Rule_From) Descriptor() ([]byte, []int) { - return fileDescriptor_f805ac8c1ee0a237, []int{1, 0} -} -func (m *Rule_From) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Rule_From) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Rule_From.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Rule_From) XXX_Merge(src proto.Message) { - xxx_messageInfo_Rule_From.Merge(m, src) -} -func (m *Rule_From) XXX_Size() int { - return m.Size() -} -func (m *Rule_From) XXX_DiscardUnknown() { - xxx_messageInfo_Rule_From.DiscardUnknown(m) -} - -var xxx_messageInfo_Rule_From proto.InternalMessageInfo - -func (m *Rule_From) GetSource() *Source { - if m != nil { - return m.Source - } - return nil -} - -// To includes a list or operations. -type Rule_To struct { - // Operation specifies the operation of a request. - Operation *Operation `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Rule_To) Reset() { *m = Rule_To{} } -func (m *Rule_To) String() string { return proto.CompactTextString(m) } -func (*Rule_To) ProtoMessage() {} -func (*Rule_To) Descriptor() ([]byte, []int) { - return fileDescriptor_f805ac8c1ee0a237, []int{1, 1} -} -func (m *Rule_To) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Rule_To) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Rule_To.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Rule_To) XXX_Merge(src proto.Message) { - xxx_messageInfo_Rule_To.Merge(m, src) -} -func (m *Rule_To) XXX_Size() int { - return m.Size() -} -func (m *Rule_To) XXX_DiscardUnknown() { - xxx_messageInfo_Rule_To.DiscardUnknown(m) -} - -var xxx_messageInfo_Rule_To proto.InternalMessageInfo - -func (m *Rule_To) GetOperation() *Operation { - if m != nil { - return m.Operation - } - return nil -} - -// Source specifies the source identities of a request. Fields in the source are -// ANDed together. -// -// For example, the following source matches if the principal is "admin" or "dev" -// and the namespace is "prod" or "test". -// -// ```yaml -// principals: ["admin", "dev"] -// namespaces: ["prod", "test"] -// ``` -type Source struct { - // Optional. A list of source peer identities (i.e. service account), which - // matches to the "source.principal" attribute. This field requires mTLS enabled. - // - // If not set, any principal is allowed. - Principals []string `protobuf:"bytes,1,rep,name=principals,proto3" json:"principals,omitempty"` - // Optional. A list of negative match of source peer identities. - NotPrincipals []string `protobuf:"bytes,2,rep,name=not_principals,json=notPrincipals,proto3" json:"not_principals,omitempty"` - // Optional. A list of namespaces, which matches to the "source.namespace" - // attribute. This field requires mTLS enabled. - // - // If not set, any namespace is allowed. - Namespaces []string `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"` - // Optional. A list of negative match of namespaces. - NotNamespaces []string `protobuf:"bytes,4,rep,name=not_namespaces,json=notNamespaces,proto3" json:"not_namespaces,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Source) Reset() { *m = Source{} } -func (m *Source) String() string { return proto.CompactTextString(m) } -func (*Source) ProtoMessage() {} -func (*Source) Descriptor() ([]byte, []int) { - return fileDescriptor_f805ac8c1ee0a237, []int{2} -} -func (m *Source) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Source.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Source) XXX_Merge(src proto.Message) { - xxx_messageInfo_Source.Merge(m, src) -} -func (m *Source) XXX_Size() int { - return m.Size() -} -func (m *Source) XXX_DiscardUnknown() { - xxx_messageInfo_Source.DiscardUnknown(m) -} - -var xxx_messageInfo_Source proto.InternalMessageInfo - -func (m *Source) GetPrincipals() []string { - if m != nil { - return m.Principals - } - return nil -} - -func (m *Source) GetNotPrincipals() []string { - if m != nil { - return m.NotPrincipals - } - return nil -} - -func (m *Source) GetNamespaces() []string { - if m != nil { - return m.Namespaces - } - return nil -} - -func (m *Source) GetNotNamespaces() []string { - if m != nil { - return m.NotNamespaces - } - return nil -} - -// Operation specifies the operations of a request. Fields in the operation are -// ANDed together. -// -// For example, the following operation matches if the Dubbo interface is "org.apache.dubbo.samples.basic.api.DemoService" -// and the method is "sayHello". -// -// ```yaml -// interfaces: ["org.apache.dubbo.samples.basic.api.DemoService"] -// methods: ["sayHello"] -// ``` -type Operation struct { - // Optional. A list of interfaces, which matches to the Dubbo interface. - // - // If not set, any interfaces is allowed. - Interfaces []string `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces,omitempty"` - // Optional. A list of negative match of interfaces. - NotInterfaces []string `protobuf:"bytes,5,rep,name=not_interfaces,json=notInterfaces,proto3" json:"not_interfaces,omitempty"` - // Optional. A list of methods, which matches to the Dubbo methods. - // - // If not set, any method is allowed. - Methods []string `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"` - // Optional. A list of negative match of methods. - NotMethods []string `protobuf:"bytes,7,rep,name=not_methods,json=notMethods,proto3" json:"not_methods,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Operation) Reset() { *m = Operation{} } -func (m *Operation) String() string { return proto.CompactTextString(m) } -func (*Operation) ProtoMessage() {} -func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_f805ac8c1ee0a237, []int{3} -} -func (m *Operation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Operation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Operation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Operation.Merge(m, src) -} -func (m *Operation) XXX_Size() int { - return m.Size() -} -func (m *Operation) XXX_DiscardUnknown() { - xxx_messageInfo_Operation.DiscardUnknown(m) -} - -var xxx_messageInfo_Operation proto.InternalMessageInfo - -func (m *Operation) GetInterfaces() []string { - if m != nil { - return m.Interfaces - } - return nil -} - -func (m *Operation) GetNotInterfaces() []string { - if m != nil { - return m.NotInterfaces - } - return nil -} - -func (m *Operation) GetMethods() []string { - if m != nil { - return m.Methods - } - return nil -} - -func (m *Operation) GetNotMethods() []string { - if m != nil { - return m.NotMethods - } - return nil -} - -func init() { - proto.RegisterEnum("dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy_Action", DubboAuthorizationPolicy_Action_name, DubboAuthorizationPolicy_Action_value) - proto.RegisterType((*DubboAuthorizationPolicy)(nil), "dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy") - proto.RegisterType((*Rule)(nil), "dubbo.aeraki.io.v1alpha1.Rule") - proto.RegisterType((*Rule_From)(nil), "dubbo.aeraki.io.v1alpha1.Rule.From") - proto.RegisterType((*Rule_To)(nil), "dubbo.aeraki.io.v1alpha1.Rule.To") - proto.RegisterType((*Source)(nil), "dubbo.aeraki.io.v1alpha1.Source") - proto.RegisterType((*Operation)(nil), "dubbo.aeraki.io.v1alpha1.Operation") -} - -func init() { - proto.RegisterFile("api/dubbo/v1alpha1/dubbo_authorization_policy.proto", fileDescriptor_f805ac8c1ee0a237) -} - -var fileDescriptor_f805ac8c1ee0a237 = []byte{ - // 476 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x41, 0x8b, 0xd3, 0x4c, - 0x18, 0xc7, 0xdf, 0x69, 0xd3, 0xec, 0xdb, 0xa7, 0xb8, 0x2c, 0x73, 0x0a, 0x05, 0xb3, 0x35, 0x22, - 0xf4, 0x62, 0x62, 0xbb, 0x82, 0x7a, 0x11, 0x2b, 0xab, 0x22, 0xac, 0xbb, 0x6b, 0x5c, 0x10, 0xbd, - 0x94, 0x49, 0x3a, 0x6d, 0x06, 0x93, 0x3c, 0x61, 0x32, 0x59, 0xd0, 0xef, 0xe0, 0xd5, 0x0f, 0xe4, - 0xc9, 0xa3, 0x1f, 0x41, 0xfa, 0x3d, 0x04, 0xc9, 0x24, 0x69, 0x02, 0xd2, 0xf5, 0x96, 0x79, 0xf2, - 0xfb, 0xff, 0xe6, 0x3f, 0x03, 0x03, 0x27, 0x2c, 0x13, 0xde, 0xaa, 0x08, 0x02, 0xf4, 0xae, 0x67, - 0x2c, 0xce, 0x22, 0x36, 0xab, 0x96, 0x4b, 0x56, 0xa8, 0x08, 0xa5, 0xf8, 0xc2, 0x94, 0xc0, 0x74, - 0x99, 0x61, 0x2c, 0xc2, 0xcf, 0x6e, 0x26, 0x51, 0x21, 0xb5, 0x34, 0xe1, 0x32, 0x2e, 0xd9, 0x27, - 0xe1, 0x0a, 0x74, 0x9b, 0xe8, 0xf8, 0x78, 0x83, 0xb8, 0x89, 0xb9, 0x57, 0x5a, 0xd7, 0x82, 0xc7, - 0xab, 0x65, 0xc0, 0x23, 0x76, 0x2d, 0x50, 0x56, 0x51, 0xe7, 0x3b, 0x01, 0xeb, 0xb4, 0x4c, 0x2f, - 0xba, 0xfa, 0x4b, 0x6d, 0xa7, 0x0f, 0x61, 0x20, 0x8b, 0x98, 0xe7, 0x56, 0x6f, 0xd2, 0x9f, 0x8e, - 0xe6, 0xb6, 0xbb, 0x6f, 0x1f, 0xd7, 0x2f, 0x62, 0xee, 0x57, 0x30, 0x7d, 0x0b, 0x26, 0x0b, 0x4b, - 0x8b, 0xd5, 0x9f, 0x90, 0xe9, 0xe1, 0xfc, 0xc9, 0xfe, 0xd8, 0xbe, 0x9d, 0xdd, 0x85, 0x16, 0xf8, - 0xb5, 0xc8, 0xb9, 0x0d, 0x66, 0x35, 0xa1, 0x43, 0x18, 0x2c, 0xce, 0xce, 0x2e, 0xde, 0x1f, 0xfd, - 0x47, 0xff, 0x07, 0xe3, 0xf4, 0xc5, 0xf9, 0x87, 0x23, 0xe2, 0xfc, 0x26, 0x60, 0x94, 0x0d, 0xe8, - 0x23, 0x30, 0xd6, 0x12, 0x13, 0x8b, 0xe8, 0xbe, 0x77, 0x6f, 0xee, 0xeb, 0xbe, 0x94, 0x98, 0xf8, - 0x3a, 0x40, 0x67, 0xd0, 0x53, 0x58, 0x1f, 0xf3, 0xce, 0x3f, 0x62, 0x57, 0xe8, 0xf7, 0x14, 0x8e, - 0x9f, 0x81, 0x51, 0x0a, 0xe8, 0x63, 0x30, 0x73, 0x2c, 0x64, 0xc8, 0x2d, 0x32, 0x21, 0xd3, 0xd1, - 0x7c, 0xb2, 0x3f, 0xfe, 0x4e, 0x73, 0x7e, 0xcd, 0x8f, 0x5f, 0x41, 0xef, 0x0a, 0xe9, 0x02, 0x86, - 0x98, 0x71, 0xa9, 0x4f, 0x5f, 0x2b, 0x6e, 0x28, 0x7e, 0xd1, 0xa0, 0x7e, 0x9b, 0x72, 0xbe, 0x11, - 0x30, 0x2b, 0x37, 0xb5, 0x01, 0x32, 0x29, 0xd2, 0x50, 0x64, 0x2c, 0xce, 0xf5, 0x3d, 0x0c, 0xfd, - 0xce, 0x84, 0xde, 0x83, 0xc3, 0x14, 0xd5, 0xb2, 0xc3, 0xf4, 0x34, 0x73, 0x2b, 0x45, 0x75, 0xd9, - 0x62, 0x36, 0x40, 0xca, 0x12, 0x9e, 0x67, 0x2c, 0xe4, 0xb9, 0xd5, 0xaf, 0x34, 0xed, 0xa4, 0xd1, - 0x74, 0x18, 0x63, 0xa7, 0x39, 0xdf, 0x0d, 0x9d, 0xaf, 0x04, 0x86, 0xbb, 0xc6, 0xa5, 0x54, 0xa4, - 0x8a, 0xcb, 0xb5, 0x0e, 0xd4, 0xdd, 0xda, 0x49, 0x23, 0xed, 0x30, 0x83, 0x9d, 0xf4, 0x75, 0x8b, - 0x59, 0x70, 0x90, 0x70, 0x15, 0xe1, 0xaa, 0x29, 0xd6, 0x2c, 0xe9, 0x31, 0x8c, 0x4a, 0x41, 0xf3, - 0xf7, 0xa0, 0xae, 0x8d, 0xea, 0x4d, 0x35, 0x79, 0xfe, 0xf4, 0xc7, 0xd6, 0x26, 0x3f, 0xb7, 0x36, - 0xf9, 0xb5, 0xb5, 0xc9, 0xc7, 0x07, 0x1b, 0xa1, 0xa2, 0x22, 0x70, 0x43, 0x4c, 0xbc, 0xea, 0xaa, - 0xef, 0x27, 0x3c, 0x8f, 0xea, 0x6f, 0xef, 0xef, 0x97, 0x18, 0x98, 0xfa, 0xd1, 0x9c, 0xfc, 0x09, - 0x00, 0x00, 0xff, 0xff, 0x51, 0x69, 0x2b, 0x62, 0xa6, 0x03, 0x00, 0x00, -} - -func (m *DubboAuthorizationPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DubboAuthorizationPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DubboAuthorizationPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Action != 0 { - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(m.Action)) - i-- - dAtA[i] = 0x18 - } - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - return len(dAtA) - i, nil -} - -func (m *Rule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Rule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Rule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.To) > 0 { - for iNdEx := len(m.To) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.To[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.From) > 0 { - for iNdEx := len(m.From) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.From[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Rule_From) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Rule_From) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Rule_From) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Source != nil { - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Rule_To) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Rule_To) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Rule_To) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Operation != nil { - { - size, err := m.Operation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Source) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Source) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Source) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.NotNamespaces) > 0 { - for iNdEx := len(m.NotNamespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NotNamespaces[iNdEx]) - copy(dAtA[i:], m.NotNamespaces[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.NotNamespaces[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Namespaces) > 0 { - for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Namespaces[iNdEx]) - copy(dAtA[i:], m.Namespaces[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.NotPrincipals) > 0 { - for iNdEx := len(m.NotPrincipals) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NotPrincipals[iNdEx]) - copy(dAtA[i:], m.NotPrincipals[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.NotPrincipals[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Principals) > 0 { - for iNdEx := len(m.Principals) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Principals[iNdEx]) - copy(dAtA[i:], m.Principals[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.Principals[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Operation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Operation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Operation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.NotMethods) > 0 { - for iNdEx := len(m.NotMethods) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NotMethods[iNdEx]) - copy(dAtA[i:], m.NotMethods[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.NotMethods[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.NotInterfaces) > 0 { - for iNdEx := len(m.NotInterfaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NotInterfaces[iNdEx]) - copy(dAtA[i:], m.NotInterfaces[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.NotInterfaces[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Methods) > 0 { - for iNdEx := len(m.Methods) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Methods[iNdEx]) - copy(dAtA[i:], m.Methods[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.Methods[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Interfaces) > 0 { - for iNdEx := len(m.Interfaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Interfaces[iNdEx]) - copy(dAtA[i:], m.Interfaces[iNdEx]) - i = encodeVarintDubboAuthorizationPolicy(dAtA, i, uint64(len(m.Interfaces[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintDubboAuthorizationPolicy(dAtA []byte, offset int, v uint64) int { - offset -= sovDubboAuthorizationPolicy(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *DubboAuthorizationPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if m.Action != 0 { - n += 1 + sovDubboAuthorizationPolicy(uint64(m.Action)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Rule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.From) > 0 { - for _, e := range m.From { - l = e.Size() - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if len(m.To) > 0 { - for _, e := range m.To { - l = e.Size() - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Rule_From) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Rule_To) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Operation != nil { - l = m.Operation.Size() - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Source) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Principals) > 0 { - for _, s := range m.Principals { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if len(m.NotPrincipals) > 0 { - for _, s := range m.NotPrincipals { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if len(m.Namespaces) > 0 { - for _, s := range m.Namespaces { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if len(m.NotNamespaces) > 0 { - for _, s := range m.NotNamespaces { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Operation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Interfaces) > 0 { - for _, s := range m.Interfaces { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if len(m.Methods) > 0 { - for _, s := range m.Methods { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if len(m.NotInterfaces) > 0 { - for _, s := range m.NotInterfaces { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if len(m.NotMethods) > 0 { - for _, s := range m.NotMethods { - l = len(s) - n += 1 + l + sovDubboAuthorizationPolicy(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovDubboAuthorizationPolicy(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDubboAuthorizationPolicy(x uint64) (n int) { - return sovDubboAuthorizationPolicy(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *DubboAuthorizationPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DubboAuthorizationPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DubboAuthorizationPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, &Rule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - m.Action = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Action |= DubboAuthorizationPolicy_Action(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDubboAuthorizationPolicy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Rule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Rule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.From = append(m.From, &Rule_From{}) - if err := m.From[len(m.From)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = append(m.To, &Rule_To{}) - if err := m.To[len(m.To)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDubboAuthorizationPolicy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Rule_From) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: From: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: From: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &Source{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDubboAuthorizationPolicy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Rule_To) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: To: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: To: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Operation == nil { - m.Operation = &Operation{} - } - if err := m.Operation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDubboAuthorizationPolicy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Source) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Source: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Source: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Principals = append(m.Principals, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotPrincipals", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NotPrincipals = append(m.NotPrincipals, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotNamespaces", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NotNamespaces = append(m.NotNamespaces, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDubboAuthorizationPolicy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Operation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Operation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interfaces", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Interfaces = append(m.Interfaces, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Methods = append(m.Methods, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotInterfaces", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NotInterfaces = append(m.NotInterfaces, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotMethods", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NotMethods = append(m.NotMethods, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDubboAuthorizationPolicy(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthDubboAuthorizationPolicy - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDubboAuthorizationPolicy(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDubboAuthorizationPolicy - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDubboAuthorizationPolicy - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDubboAuthorizationPolicy - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDubboAuthorizationPolicy - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDubboAuthorizationPolicy = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDubboAuthorizationPolicy = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDubboAuthorizationPolicy = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/dubbo/v1alpha1/dubbo_authorization_policy.proto b/api/dubbo/v1alpha1/dubbo_authorization_policy.proto deleted file mode 100644 index 06e2e24f..00000000 --- a/api/dubbo/v1alpha1/dubbo_authorization_policy.proto +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright Aeraki 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. -syntax = "proto3"; - -import "google/api/field_behavior.proto"; - -// $schema: dubbo.aeraki.io.v1alpha1.DubboAuthorizationPolicy -// $title: Authorization Policy -// $description: Configuration for access control on Dubbo services. -// -// Dubbo Authorization Policy enables access control on Dubbo services in the mesh. -// -// Authorization policy supports DENY and ALLOW actions for access control. When DENY and ALLOW actions -// are used for a workload at the same time, the DENY action is evaluated first, then the ALLOW action. -// The evaluation is determined by the following rules: -// -// 1. If there are any DENY policies that match the request, deny the request. -// 2. If there are no ALLOW policies for the workload, allow the request. -// 3. If any of the ALLOW policies match the request, allow the request. -// 4. Deny the request. -// -// Here is an example of Dubbo Authorization Policy: -// -// It sets the `action` to "ALLOW" to create an allow policy. The default action is "ALLOW" -// but it is useful to be explicit in the policy. -// -// It allows requests from: -// -// - service account "cluster.local/ns/dubbo/sa/dubbo-consumer" -// -// to access the Dubbo service with: -// -// - "sayHello" method at interface "org.apache.dubbo.samples.basic.api.DemoService" -// -// Any other requests will be denied. -// -// ```yaml -// apiVersion: dubbo.aeraki.io/v1alpha1 -// kind: DubboAuthorizationPolicy -// metadata: -// name: demo -// namespace: istio-system -// spec: -// action: ALLOW -// rules: -// - from: -// - source: -// principals: ["cluster.local/ns/dubbo/sa/dubbo-consumer"] -// to: -// - operation: -// interfaces: ["org.apache.dubbo.samples.basic.api.DemoService"] -// methods: ["sayHello"] -// ``` -// -// The following is another example that sets `action` to "DENY" to create a deny policy. -// It denies requests from the "dev" namespace to all the methods on all Interfaces -// in the "dubbo" namespace. -// -// ```yaml -// apiVersion: dubbo.aeraki.io/v1alpha1 -// kind: DubboAuthorizationPolicy -// metadata: -// name: demo -// namespace: dubbo -// spec: -// action: DENY -// rules: -// - from: -// - source: -// namespaces: ["dev"] -// to: -// - operation: -// interfaces: ["*"] -// methods: ["*"] -// ``` - -// -// Authorization Policy scope (target) is determined by "metadata/namespace" and -// an optional "selector". -// -// - "metadata/namespace" tells which namespace the policy applies. If set to root -// namespace, the policy applies to all namespaces in a mesh. -package dubbo.aeraki.io.v1alpha1; - -option go_package = "github.com/aeraki-mesh/aeraki/api/dubbo/v1alpha1"; - -// DubboAuthorizationPolicy enables access control on Dubbo services. -// -// -// -// -message DubboAuthorizationPolicy { - // Optional. A list of rules to match the request. A match occurs when at least - // one rule matches the request. - // - // If not set, the match will never occur. This is equivalent to setting a - // default of deny for the target workloads. - repeated Rule rules = 2; - - // Action specifies the operation to take. - enum Action { - // Allow a request only if it matches the rules. This is the default type. - ALLOW = 0; - - // Deny a request if it matches any of the rules. - DENY = 1; - } - - // Optional. The action to take if the request is matched with the rules. - Action action = 3; -} - -// Rule matches requests from a list of sources that perform a list of operations subject to a -// list of conditions. A match occurs when at least one source, one operation and all conditions -// matches the request. An empty rule is always matched. -// -// Any string field in the rule supports Exact, Prefix, Suffix and Presence match: -// -// - Exact match: "abc" will match on value "abc". -// - Prefix match: "abc*" will match on value "abc" and "abcd". -// - Suffix match: "*abc" will match on value "abc" and "xabc". -// - Presence match: "*" will match when value is not empty. -message Rule { - // From includes a list or sources. - message From { - // Source specifies the source of a request. - Source source = 1; - } - - // Optional. from specifies the source of a request. - // - // If not set, any source is allowed. - repeated From from = 1; - - // To includes a list or operations. - message To { - // Operation specifies the operation of a request. - Operation operation = 1; - } - - // Optional. to specifies the operation of a request. - // - // If not set, any operation is allowed. - repeated To to = 2; -} - -// Source specifies the source identities of a request. Fields in the source are -// ANDed together. -// -// For example, the following source matches if the principal is "admin" or "dev" -// and the namespace is "prod" or "test". -// -// ```yaml -// principals: ["admin", "dev"] -// namespaces: ["prod", "test"] -// ``` -message Source { - // Optional. A list of source peer identities (i.e. service account), which - // matches to the "source.principal" attribute. This field requires mTLS enabled. - // - // If not set, any principal is allowed. - repeated string principals = 1; - - // Optional. A list of negative match of source peer identities. - repeated string not_principals = 2; - - // Optional. A list of namespaces, which matches to the "source.namespace" - // attribute. This field requires mTLS enabled. - // - // If not set, any namespace is allowed. - repeated string namespaces = 3; - - // Optional. A list of negative match of namespaces. - repeated string not_namespaces = 4; -} - -// Operation specifies the operations of a request. Fields in the operation are -// ANDed together. -// -// For example, the following operation matches if the Dubbo interface is "org.apache.dubbo.samples.basic.api.DemoService" -// and the method is "sayHello". -// -// ```yaml -// interfaces: ["org.apache.dubbo.samples.basic.api.DemoService"] -// methods: ["sayHello"] -// ``` -message Operation { - // Optional. A list of interfaces, which matches to the Dubbo interface. - // - // If not set, any interfaces is allowed. - repeated string interfaces = 1; - - // Optional. A list of negative match of interfaces. - repeated string not_interfaces = 5; - - // Optional. A list of methods, which matches to the Dubbo methods. - // - // If not set, any method is allowed. - repeated string methods = 3; - - // Optional. A list of negative match of methods. - repeated string not_methods = 7; -} \ No newline at end of file diff --git a/api/dubbo/v1alpha1/dubbo_authorization_policy_deepcopy.gen.go b/api/dubbo/v1alpha1/dubbo_authorization_policy_deepcopy.gen.go deleted file mode 100644 index 3326b6c1..00000000 --- a/api/dubbo/v1alpha1/dubbo_authorization_policy_deepcopy.gen.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/dubbo/v1alpha1/dubbo_authorization_policy.proto - -// -// Authorization Policy scope (target) is determined by "metadata/namespace" and -// an optional "selector". -// -// - "metadata/namespace" tells which namespace the policy applies. If set to root -// namespace, the policy applies to all namespaces in a mesh. - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using DubboAuthorizationPolicy within kubernetes types, where deepcopy-gen is used. -func (in *DubboAuthorizationPolicy) DeepCopyInto(out *DubboAuthorizationPolicy) { - p := proto.Clone(in).(*DubboAuthorizationPolicy) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DubboAuthorizationPolicy. Required by controller-gen. -func (in *DubboAuthorizationPolicy) DeepCopy() *DubboAuthorizationPolicy { - if in == nil { - return nil - } - out := new(DubboAuthorizationPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new DubboAuthorizationPolicy. Required by controller-gen. -func (in *DubboAuthorizationPolicy) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Rule within kubernetes types, where deepcopy-gen is used. -func (in *Rule) DeepCopyInto(out *Rule) { - p := proto.Clone(in).(*Rule) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule. Required by controller-gen. -func (in *Rule) DeepCopy() *Rule { - if in == nil { - return nil - } - out := new(Rule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Rule. Required by controller-gen. -func (in *Rule) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Rule_From within kubernetes types, where deepcopy-gen is used. -func (in *Rule_From) DeepCopyInto(out *Rule_From) { - p := proto.Clone(in).(*Rule_From) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule_From. Required by controller-gen. -func (in *Rule_From) DeepCopy() *Rule_From { - if in == nil { - return nil - } - out := new(Rule_From) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Rule_From. Required by controller-gen. -func (in *Rule_From) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Rule_To within kubernetes types, where deepcopy-gen is used. -func (in *Rule_To) DeepCopyInto(out *Rule_To) { - p := proto.Clone(in).(*Rule_To) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule_To. Required by controller-gen. -func (in *Rule_To) DeepCopy() *Rule_To { - if in == nil { - return nil - } - out := new(Rule_To) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Rule_To. Required by controller-gen. -func (in *Rule_To) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Source within kubernetes types, where deepcopy-gen is used. -func (in *Source) DeepCopyInto(out *Source) { - p := proto.Clone(in).(*Source) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source. Required by controller-gen. -func (in *Source) DeepCopy() *Source { - if in == nil { - return nil - } - out := new(Source) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Source. Required by controller-gen. -func (in *Source) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Operation within kubernetes types, where deepcopy-gen is used. -func (in *Operation) DeepCopyInto(out *Operation) { - p := proto.Clone(in).(*Operation) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation. Required by controller-gen. -func (in *Operation) DeepCopy() *Operation { - if in == nil { - return nil - } - out := new(Operation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Operation. Required by controller-gen. -func (in *Operation) DeepCopyInterface() interface{} { - return in.DeepCopy() -} diff --git a/api/dubbo/v1alpha1/dubbo_authorization_policy_json.gen.go b/api/dubbo/v1alpha1/dubbo_authorization_policy_json.gen.go deleted file mode 100644 index d9cc0740..00000000 --- a/api/dubbo/v1alpha1/dubbo_authorization_policy_json.gen.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/dubbo/v1alpha1/dubbo_authorization_policy.proto - -// -// Authorization Policy scope (target) is determined by "metadata/namespace" and -// an optional "selector". -// -// - "metadata/namespace" tells which namespace the policy applies. If set to root -// namespace, the policy applies to all namespaces in a mesh. - -package v1alpha1 - -import ( - bytes "bytes" - fmt "fmt" - github.com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for DubboAuthorizationPolicy -func (this *DubboAuthorizationPolicy) MarshalJSON() ([]byte, error) { - str, err := DubboAuthorizationPolicyMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for DubboAuthorizationPolicy -func (this *DubboAuthorizationPolicy) UnmarshalJSON(b []byte) error { - return DubboAuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Rule -func (this *Rule) MarshalJSON() ([]byte, error) { - str, err := DubboAuthorizationPolicyMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Rule -func (this *Rule) UnmarshalJSON(b []byte) error { - return DubboAuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Rule_From -func (this *Rule_From) MarshalJSON() ([]byte, error) { - str, err := DubboAuthorizationPolicyMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Rule_From -func (this *Rule_From) UnmarshalJSON(b []byte) error { - return DubboAuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Rule_To -func (this *Rule_To) MarshalJSON() ([]byte, error) { - str, err := DubboAuthorizationPolicyMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Rule_To -func (this *Rule_To) UnmarshalJSON(b []byte) error { - return DubboAuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Source -func (this *Source) MarshalJSON() ([]byte, error) { - str, err := DubboAuthorizationPolicyMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Source -func (this *Source) UnmarshalJSON(b []byte) error { - return DubboAuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Operation -func (this *Operation) MarshalJSON() ([]byte, error) { - str, err := DubboAuthorizationPolicyMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Operation -func (this *Operation) UnmarshalJSON(b []byte) error { - return DubboAuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - DubboAuthorizationPolicyMarshaler = &github.com_gogo_protobuf_jsonpb.Marshaler{} - DubboAuthorizationPolicyUnmarshaler = &github.com_gogo_protobuf_jsonpb.Unmarshaler{AllowUnknownFields: true} -) diff --git a/api/metaprotocol/v1alpha1/metaprotocol.aeraki.io.v1alpha1.pb.html b/api/metaprotocol/v1alpha1/metaprotocol.aeraki.io.v1alpha1.pb.html deleted file mode 100644 index 82190096..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol.aeraki.io.v1alpha1.pb.html +++ /dev/null @@ -1,836 +0,0 @@ ---- -title: metaprotocol.aeraki.io.v1alpha1 -layout: protoc-gen-docs -generator: protoc-gen-docs -number_of_entries: 16 ---- -

$schema: metaprotocol.aeraki.io.v1alpha1.ApplicationProtocol -$title: Application Protocol -$description: ApplicationProtocol defines an application protocol built on top of MetaProtocol.

- -

ApplicationProtocol defines an application protocol built on top of MetaProtocol.

- -
apiVersion: metaprotocol.aeraki.io/v1alpha1
-kind: ApplicationProtocol
-metadata:
-  name: dubbo
-  namespace: istio-system
-spec:
-  protocol: dubbo
-  codec: aeraki.meta_protocol.codec.dubbo
-
- -

ApplicationProtocol

-
-

ApplicationProtocol defines an application protocol built on top of MetaProtocol.

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
protocolstring - -No -
codecstring - -No -
-
-

MetaRouter

-
-

MetaRouter defines route policies for MetaProtocol proxy.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
hostsstring[] -

The destination service to which traffic is being sent. -Note for Kubernetes users: It must be a fully qualified domain name -(FQDN), (e.g. “thrift-sample-server.meta-thrift.svc.cluster.local” ) -instead of a short name (e.g. “thrift-sample-server”). -Note: Only one host is supported now. If multiple hosts are specified, -Only the first one takes effect.

- -
-No -
gatewaysstring[] -

The names of gateways and sidecars that should apply these routes. The usage of - this field is the same as istio.io/VirtualService

- -
-No -
routesMetaRoute[] -

An ordered list of route rules for MetaProtocol traffic. The route rules -will be applied to service ports named “tcp-metaprotocol-${applicationProtocol}-*”, -(e.g. “tcp-metaprotocol-thrift-hello-server”). Order maters in the routes, -The first rule matching an incoming request is used.

- -
-No -
localRateLimitLocalRateLimit -

Loacal rate limit policy.

- -
-No -
globalRateLimitGlobalRateLimit -

Global rate limit policy.

- -
-No -
exportTostring[] -

A list of namespaces to which this MetaRouter is exported. Exporting a -MetaRouter allows it to be used by sidecars defined in other namespaces. -This feature provides a mechanism for service owners and mesh administrators -to control the visibility of MetaRouter across namespace boundaries.

- -

If no namespaces are specified then the MetaRouter is exported to all namespaces -by default.

- -

The value “.” is reserved and defines an export to the same namespace that -the MetaRouter is declared in. Similarly the value “*” is reserved and -defines an export to all namespaces.

- -
-No -
-
-

MetaRoute

-
-

Describes match conditions and actions for routing MetaProtocol.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
namestring -

The name assigned to the route for debugging purposes.

- -
-No -
matchMetaRouteMatch -

Match conditions to be satisfied for the rule to be activated. -All conditions inside a single match block have AND semantic.

- -
-No -
routeMetaRouteDestination[] -

A Route rule can forward (default) traffic. The forwarding target -can be one of several versions of a service (see glossary in -beginning of document). Weights associated with the service version -determine the proportion of traffic it receives.

- -
-No -
mirrorDestination - -No -
mirrorPercentagePercent -

Percentage of the traffic to be mirrored by the mirror field. -If this field is absent, all the traffic (100%) will be mirrored. -Max value is 100.

- -
-No -
requestMutationKeyValue[] -

Specifies a list of key-value pairs that should be mutated for each request. How to interpret the key-value pairs -depends on the codec implementation

- -
-No -
responseMutationKeyValue[] -

Specifies a list of key-value pairs that should be mutated for each response. How to interpret the key-value pairs -depends on the codec implementation

- -
-No -
-
-

KeyValue

-
-

KeyValue defines a Key /value pair.

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
keystring -

Key name.

- -
-Yes -
valuestring -

alue.

- -
-Yes -
-
-

MetaRouteMatch

-
- - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
attributesmap<string, StringMatch> -

If the value is empty and only the name of attribute is specified, presence of the attribute is checked.

- -
-No -
-
-

StringMatch

-
-

Describes how to match a given string in HTTP headers. Match is -case-sensitive.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
exactstring (oneof) -

exact string match

- -
-No -
prefixstring (oneof) -

prefix-based match

- -
-No -
regexstring (oneof) -

RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).

- -
-No -
-
-

MetaRouteDestination

-
- - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
destinationDestination -

Destination uniquely identifies the instances of a service -to which the request/connection should be forwarded to.

- -
-Yes -
weightuint32 -

The proportion of traffic to be forwarded to the service -version. (0-100). Sum of weights across destinations SHOULD BE == 100. -If there is only one destination in a rule, the weight value is assumed to -be 100.

- -
-No -
-
-

Destination

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
hoststring -

The name of a service from the service registry. Service -names are looked up from the platform’s service registry (e.g., -Kubernetes services, Consul services, etc.) and from the hosts -declared by ServiceEntry. Traffic -forwarded to destinations that are not found in either of the two, will be dropped.

- -

Note for Kubernetes users: When short names are used (e.g. “reviews” -instead of “reviews.default.svc.cluster.local”), Istio will interpret -the short name based on the namespace of the rule, not the service. A -rule in the “default” namespace containing a host “reviews will be -interpreted as “reviews.default.svc.cluster.local”, irrespective of -the actual namespace associated with the reviews service. To avoid -potential misconfiguration, it is recommended to always use fully -qualified domain names over short names.

- -
-Yes -
subsetstring -

The name of a subset within the service. Applicable only to services -within the mesh. The subset must be defined in a corresponding -DestinationRule.

- -
-No -
portPortSelector -

Specifies the port on the host that is being addressed. If a service -exposes only a single port it is not required to explicitly select the -port.

- -
-No -
-
-

PortSelector

-
-

PortSelector specifies the number of a port to be used for -matching or selection for final routing.

- - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
numberuint32 -

Valid port number

- -
-No -
-
-

LocalRateLimit

-
-

LocalRateLimit defines local rate limit policies for MetaProtocol proxy

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
tokenBucketTokenBucket -

The default token bucket configuration to use for rate limiting requests that are processed by -this filter. -Local rate limiter will first check the conditions, if a specific condition matches, then the token -bucket within that condition will be applied to the incoming request. All the other requests -that don’t match the conditions will be rate limited by the default token bucket. -If the default token bucket is not specified, then the requests that don’t match the conditions -will not be rate limited. -At least one of token_bucket or conditions should have value.

- -
-No -
conditionsCondition[] -

The more specific rate limit conditions, the first match will be used.

- -
-No -
-
-

GlobalRateLimit

-
-

GlobalRateLimit configures global rate limit service for MetaProtocol proxy

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
matchMetaRouteMatch -

Match conditions to be satisfied for the rate limit rule to be activated. -All conditions inside a single match block have AND semantic. -If the match is not specified, then all the incoming requests will be considered matched.

- -
-Yes -
domainstring -

The rate limit domain to use when calling the rate limit service.

- -
-Yes -
requestTimeoutDuration -

The timeout in milliseconds for the rate limit service RPC. If not -set, this defaults to 20ms.

- -
-No -
denyOnFailbool -

The filter’s behavior in case the rate limiting service does -not respond back. When it is set to true, Envoy will not allow traffic in case of -communication failure between rate limiting service and the proxy.

- -
-No -
rateLimitServicestring -

The cluster name of the external rate limit service provider.

- -
-Yes -
descriptorsDescriptor[] -

Defines what properties in the requests should be sent to the rate limit service

- -
-Yes -
-
-

Percent

-
-

Percent specifies a percentage in the range of [0.0, 100.0].

- - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
valuedouble - -No -
-
-

LocalRateLimit.TokenBucket

-
-

Configures a token bucket which is used for rate limiting.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
maxTokensuint32 -

The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket -initially contains. The value must be greater than 0.

- -
-No -
tokensPerFillUInt32Value -

The number of tokens added to the bucket during each fill interval. The value must be greater than 0. -If not specified, defaults to a single token.

- -
-No -
fillIntervalDuration -

The fill interval that tokens are added to the bucket. During each fill interval -tokens_per_fill are added to the bucket. The bucket will never contain more than -max_tokens tokens.

- -
-Yes -
-
-

LocalRateLimit.Condition

-
-

Condition defines a rate limit policy for a more specific condition

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
matchMetaRouteMatch -

Match conditions to be satisfied for the rate limit rule to be activated. -All conditions inside a single match block have AND semantic. -If the match is not specified, then all the incoming requests will be considered matched.

- -
-Yes -
tokenBucketTokenBucket -

The token bucket for this particular condition

- -
-Yes -
-
-

GlobalRateLimit.Descriptor

-
-

Descriptor defines the mapping between the property in the request and the descriptor key in the rate -limit server configuration -Normally the property is the same as the descriptor key, but adding a mapping layer allows more flexibility

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
propertystring -

The property extracted from the requests

- -
-Yes -
descriptorKeystring -

The corresponding descriptor key in the rate limit server configuration

- -
-Yes -
-
-

google.protobuf.UInt32Value

-
-

Wrapper message for uint32.

- -

The JSON representation for UInt32Value is JSON number.

- - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
valueuint32 -

The uint32 value.

- -
-No -
-
diff --git a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol.pb.go b/api/metaprotocol/v1alpha1/metaprotocol_application_protocol.pb.go deleted file mode 100644 index ea3a080b..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol.pb.go +++ /dev/null @@ -1,419 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto - -// $schema: metaprotocol.aeraki.io.v1alpha1.ApplicationProtocol -// $title: Application Protocol -// $description: ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: ApplicationProtocol -// metadata: -// name: dubbo -// namespace: istio-system -// spec: -// protocol: dubbo -// codec: aeraki.meta_protocol.codec.dubbo -// ``` - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// -// -// -type ApplicationProtocol struct { - Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` - Codec string `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ApplicationProtocol) Reset() { *m = ApplicationProtocol{} } -func (m *ApplicationProtocol) String() string { return proto.CompactTextString(m) } -func (*ApplicationProtocol) ProtoMessage() {} -func (*ApplicationProtocol) Descriptor() ([]byte, []int) { - return fileDescriptor_54bc1cd743033a01, []int{0} -} -func (m *ApplicationProtocol) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ApplicationProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ApplicationProtocol.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ApplicationProtocol) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplicationProtocol.Merge(m, src) -} -func (m *ApplicationProtocol) XXX_Size() int { - return m.Size() -} -func (m *ApplicationProtocol) XXX_DiscardUnknown() { - xxx_messageInfo_ApplicationProtocol.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplicationProtocol proto.InternalMessageInfo - -func (m *ApplicationProtocol) GetProtocol() string { - if m != nil { - return m.Protocol - } - return "" -} - -func (m *ApplicationProtocol) GetCodec() string { - if m != nil { - return m.Codec - } - return "" -} - -func init() { - proto.RegisterType((*ApplicationProtocol)(nil), "metaprotocol.aeraki.io.v1alpha1.ApplicationProtocol") -} - -func init() { - proto.RegisterFile("api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto", fileDescriptor_54bc1cd743033a01) -} - -var fileDescriptor_54bc1cd743033a01 = []byte{ - // 172 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4c, 0x2c, 0xc8, 0xd4, - 0xcf, 0x4d, 0x2d, 0x49, 0x2c, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x2f, 0x33, 0x4c, - 0xcc, 0x29, 0xc8, 0x48, 0x34, 0x44, 0x11, 0x8d, 0x4f, 0x2c, 0x28, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, - 0xc9, 0xcc, 0xcf, 0x8b, 0x87, 0x09, 0xea, 0x81, 0x19, 0x42, 0xf2, 0xc8, 0x0a, 0xf5, 0x12, 0x53, - 0x8b, 0x12, 0xb3, 0x33, 0xf5, 0x32, 0xf3, 0xf5, 0x60, 0x06, 0x29, 0xb9, 0x73, 0x09, 0x3b, 0x22, - 0xb4, 0x07, 0x40, 0x55, 0x0a, 0x49, 0x71, 0x71, 0xc0, 0x74, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, - 0x06, 0xc1, 0xf9, 0x42, 0x22, 0x5c, 0xac, 0xc9, 0xf9, 0x29, 0xa9, 0xc9, 0x12, 0x4c, 0x60, 0x09, - 0x08, 0xc7, 0xc9, 0xf5, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, - 0x8c, 0x32, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, 0xd8, 0xaa, - 0x9b, 0x9b, 0x5a, 0x9c, 0x01, 0x65, 0xeb, 0xe3, 0xf4, 0x58, 0x12, 0x1b, 0x58, 0xc8, 0x18, 0x10, - 0x00, 0x00, 0xff, 0xff, 0x0b, 0xd7, 0x29, 0x1b, 0xfc, 0x00, 0x00, 0x00, -} - -func (m *ApplicationProtocol) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ApplicationProtocol) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ApplicationProtocol) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Codec) > 0 { - i -= len(m.Codec) - copy(dAtA[i:], m.Codec) - i = encodeVarintMetaprotocolApplicationProtocol(dAtA, i, uint64(len(m.Codec))) - i-- - dAtA[i] = 0x12 - } - if len(m.Protocol) > 0 { - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintMetaprotocolApplicationProtocol(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintMetaprotocolApplicationProtocol(dAtA []byte, offset int, v uint64) int { - offset -= sovMetaprotocolApplicationProtocol(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ApplicationProtocol) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Protocol) - if l > 0 { - n += 1 + l + sovMetaprotocolApplicationProtocol(uint64(l)) - } - l = len(m.Codec) - if l > 0 { - n += 1 + l + sovMetaprotocolApplicationProtocol(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMetaprotocolApplicationProtocol(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetaprotocolApplicationProtocol(x uint64) (n int) { - return sovMetaprotocolApplicationProtocol(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ApplicationProtocol) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolApplicationProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ApplicationProtocol: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ApplicationProtocol: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolApplicationProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolApplicationProtocol - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolApplicationProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codec", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolApplicationProtocol - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolApplicationProtocol - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolApplicationProtocol - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Codec = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolApplicationProtocol(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolApplicationProtocol - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolApplicationProtocol - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetaprotocolApplicationProtocol(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetaprotocolApplicationProtocol - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetaprotocolApplicationProtocol - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetaprotocolApplicationProtocol - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetaprotocolApplicationProtocol - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetaprotocolApplicationProtocol - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetaprotocolApplicationProtocol - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetaprotocolApplicationProtocol = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetaprotocolApplicationProtocol = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetaprotocolApplicationProtocol = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto b/api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto deleted file mode 100644 index 146cd8a4..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright Aeraki 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. -syntax = "proto3"; - -//import "google/api/field_behavior.proto"; - -// $schema: metaprotocol.aeraki.io.v1alpha1.ApplicationProtocol -// $title: Application Protocol -// $description: ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: ApplicationProtocol -// metadata: -// name: dubbo -// namespace: istio-system -// spec: -// protocol: dubbo -// codec: aeraki.meta_protocol.codec.dubbo -// ``` -package metaprotocol.aeraki.io.v1alpha1; - -option go_package = "github.com/aeraki-mesh/aeraki/api/metaprotocol/v1alpha1"; - -// ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// -// -// -message ApplicationProtocol { - string protocol = 1; - string codec = 2; -} \ No newline at end of file diff --git a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol_deepcopy.gen.go b/api/metaprotocol/v1alpha1/metaprotocol_application_protocol_deepcopy.gen.go deleted file mode 100644 index d5771ec1..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol_deepcopy.gen.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto - -// $schema: metaprotocol.aeraki.io.v1alpha1.ApplicationProtocol -// $title: Application Protocol -// $description: ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: ApplicationProtocol -// metadata: -// name: dubbo -// namespace: istio-system -// spec: -// protocol: dubbo -// codec: aeraki.meta_protocol.codec.dubbo -// ``` - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using ApplicationProtocol within kubernetes types, where deepcopy-gen is used. -func (in *ApplicationProtocol) DeepCopyInto(out *ApplicationProtocol) { - p := proto.Clone(in).(*ApplicationProtocol) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationProtocol. Required by controller-gen. -func (in *ApplicationProtocol) DeepCopy() *ApplicationProtocol { - if in == nil { - return nil - } - out := new(ApplicationProtocol) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationProtocol. Required by controller-gen. -func (in *ApplicationProtocol) DeepCopyInterface() interface{} { - return in.DeepCopy() -} diff --git a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol_json.gen.go b/api/metaprotocol/v1alpha1/metaprotocol_application_protocol_json.gen.go deleted file mode 100644 index 67b3568b..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_application_protocol_json.gen.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/metaprotocol/v1alpha1/metaprotocol_application_protocol.proto - -// $schema: metaprotocol.aeraki.io.v1alpha1.ApplicationProtocol -// $title: Application Protocol -// $description: ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: ApplicationProtocol -// metadata: -// name: dubbo -// namespace: istio-system -// spec: -// protocol: dubbo -// codec: aeraki.meta_protocol.codec.dubbo -// ``` - -package v1alpha1 - -import ( - bytes "bytes" - fmt "fmt" - github.com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for ApplicationProtocol -func (this *ApplicationProtocol) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolApplicationProtocolMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ApplicationProtocol -func (this *ApplicationProtocol) UnmarshalJSON(b []byte) error { - return MetaprotocolApplicationProtocolUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - MetaprotocolApplicationProtocolMarshaler = &github.com_gogo_protobuf_jsonpb.Marshaler{} - MetaprotocolApplicationProtocolUnmarshaler = &github.com_gogo_protobuf_jsonpb.Unmarshaler{AllowUnknownFields: true} -) diff --git a/api/metaprotocol/v1alpha1/metaprotocol_metarouter.pb.go b/api/metaprotocol/v1alpha1/metaprotocol_metarouter.pb.go deleted file mode 100644 index e897b884..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_metarouter.pb.go +++ /dev/null @@ -1,4699 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto - -// $schema: metaprotocol.aeraki.io.v1alpha1.MetaRouter -// $title: MetaRouter -// $description: MetaRouter defines route policies for MetaProtocol proxy. -// -// MetaRouter defines route policies for MetaProtocol proxy. -// *Note*: Only one MetaRouter should be defined for a MetaProtocol service. -// If more than one MetaRouters are found for a service, Aeraki will choose -// a random one to apply to that service. -// -// *Note *: MetaRouter is a mesh-scoped resource, so no matter which namespace -// the MetaRouter is in, it will take effect on the services specified in the hosts. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: attribute-based-route -// namespace: istio-system -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// gateways: -// - istio-system/ingress-gateway -// routes: -// - name: v1 -// match: -// attributes: -// interface: -// exact: org.apache.dubbo.samples.basic.api.DemoService -// method: -// exact: sayHello -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// -// ``` -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: traffic-splitting -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// routes: -// - name: traffic-spilt -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// weight: 20 -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v2 -// weight: 80 - -package v1alpha1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MetaRouter defines route policies for MetaProtocol proxy. -// -// -// -// -type MetaRouter struct { - // The destination service to which traffic is being sent. - // *Note for Kubernetes users*: It must be a fully qualified domain name - // (FQDN), (e.g. "thrift-sample-server.meta-thrift.svc.cluster.local" ) - // instead of a short name (e.g. "thrift-sample-server"). - // *Note*: Only one host is supported now. If multiple hosts are specified, - // Only the first one takes effect. - Hosts []string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"` - // The names of gateways and sidecars that should apply these routes. The usage of - // this field is the same as istio.io/VirtualService - Gateways []string `protobuf:"bytes,2,rep,name=gateways,proto3" json:"gateways,omitempty"` - // An ordered list of route rules for MetaProtocol traffic. The route rules - // will be applied to service ports named "tcp-metaprotocol-${applicationProtocol}-*", - // (e.g. "tcp-metaprotocol-thrift-hello-server"). Order maters in the routes, - // The first rule matching an incoming request is used. - Routes []*MetaRoute `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` - // Loacal rate limit policy. - LocalRateLimit *LocalRateLimit `protobuf:"bytes,4,opt,name=local_rate_limit,json=localRateLimit,proto3" json:"local_rate_limit,omitempty"` - // Global rate limit policy. - GlobalRateLimit *GlobalRateLimit `protobuf:"bytes,5,opt,name=global_rate_limit,json=globalRateLimit,proto3" json:"global_rate_limit,omitempty"` - // A list of namespaces to which this MetaRouter is exported. Exporting a - // MetaRouter allows it to be used by sidecars defined in other namespaces. - // This feature provides a mechanism for service owners and mesh administrators - // to control the visibility of MetaRouter across namespace boundaries. - // - // If no namespaces are specified then the MetaRouter is exported to all namespaces - // by default. - // - // The value "." is reserved and defines an export to the same namespace that - // the MetaRouter is declared in. Similarly the value "*" is reserved and - // defines an export to all namespaces. - ExportTo []string `protobuf:"bytes,20,rep,name=export_to,json=exportTo,proto3" json:"export_to,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetaRouter) Reset() { *m = MetaRouter{} } -func (m *MetaRouter) String() string { return proto.CompactTextString(m) } -func (*MetaRouter) ProtoMessage() {} -func (*MetaRouter) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{0} -} -func (m *MetaRouter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetaRouter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetaRouter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetaRouter) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetaRouter.Merge(m, src) -} -func (m *MetaRouter) XXX_Size() int { - return m.Size() -} -func (m *MetaRouter) XXX_DiscardUnknown() { - xxx_messageInfo_MetaRouter.DiscardUnknown(m) -} - -var xxx_messageInfo_MetaRouter proto.InternalMessageInfo - -func (m *MetaRouter) GetHosts() []string { - if m != nil { - return m.Hosts - } - return nil -} - -func (m *MetaRouter) GetGateways() []string { - if m != nil { - return m.Gateways - } - return nil -} - -func (m *MetaRouter) GetRoutes() []*MetaRoute { - if m != nil { - return m.Routes - } - return nil -} - -func (m *MetaRouter) GetLocalRateLimit() *LocalRateLimit { - if m != nil { - return m.LocalRateLimit - } - return nil -} - -func (m *MetaRouter) GetGlobalRateLimit() *GlobalRateLimit { - if m != nil { - return m.GlobalRateLimit - } - return nil -} - -func (m *MetaRouter) GetExportTo() []string { - if m != nil { - return m.ExportTo - } - return nil -} - -// Describes match conditions and actions for routing MetaProtocol. -type MetaRoute struct { - // The name assigned to the route for debugging purposes. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Match conditions to be satisfied for the rule to be activated. - // All conditions inside a single match block have AND semantic. - Match *MetaRouteMatch `protobuf:"bytes,2,opt,name=match,proto3" json:"match,omitempty"` - // A Route rule can forward (default) traffic. The forwarding target - // can be one of several versions of a service (see glossary in - // beginning of document). Weights associated with the service version - // determine the proportion of traffic it receives. - Route []*MetaRouteDestination `protobuf:"bytes,3,rep,name=route,proto3" json:"route,omitempty"` - Mirror *Destination `protobuf:"bytes,5,opt,name=mirror,proto3" json:"mirror,omitempty"` - // Percentage of the traffic to be mirrored by the `mirror` field. - // If this field is absent, all the traffic (100%) will be mirrored. - // Max value is 100. - MirrorPercentage *Percent `protobuf:"bytes,6,opt,name=mirror_percentage,json=mirrorPercentage,proto3" json:"mirror_percentage,omitempty"` - // Specifies a list of key-value pairs that should be mutated for each request. How to interpret the key-value pairs - // depends on the codec implementation - RequestMutation []*KeyValue `protobuf:"bytes,19,rep,name=request_mutation,json=requestMutation,proto3" json:"request_mutation,omitempty"` - // Specifies a list of key-value pairs that should be mutated for each response. How to interpret the key-value pairs - // depends on the codec implementation - ResponseMutation []*KeyValue `protobuf:"bytes,20,rep,name=response_mutation,json=responseMutation,proto3" json:"response_mutation,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetaRoute) Reset() { *m = MetaRoute{} } -func (m *MetaRoute) String() string { return proto.CompactTextString(m) } -func (*MetaRoute) ProtoMessage() {} -func (*MetaRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{1} -} -func (m *MetaRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetaRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetaRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetaRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetaRoute.Merge(m, src) -} -func (m *MetaRoute) XXX_Size() int { - return m.Size() -} -func (m *MetaRoute) XXX_DiscardUnknown() { - xxx_messageInfo_MetaRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_MetaRoute proto.InternalMessageInfo - -func (m *MetaRoute) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MetaRoute) GetMatch() *MetaRouteMatch { - if m != nil { - return m.Match - } - return nil -} - -func (m *MetaRoute) GetRoute() []*MetaRouteDestination { - if m != nil { - return m.Route - } - return nil -} - -func (m *MetaRoute) GetMirror() *Destination { - if m != nil { - return m.Mirror - } - return nil -} - -func (m *MetaRoute) GetMirrorPercentage() *Percent { - if m != nil { - return m.MirrorPercentage - } - return nil -} - -func (m *MetaRoute) GetRequestMutation() []*KeyValue { - if m != nil { - return m.RequestMutation - } - return nil -} - -func (m *MetaRoute) GetResponseMutation() []*KeyValue { - if m != nil { - return m.ResponseMutation - } - return nil -} - -// KeyValue defines a Key /value pair. -type KeyValue struct { - // Key name. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // alue. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *KeyValue) Reset() { *m = KeyValue{} } -func (m *KeyValue) String() string { return proto.CompactTextString(m) } -func (*KeyValue) ProtoMessage() {} -func (*KeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{2} -} -func (m *KeyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValue.Merge(m, src) -} -func (m *KeyValue) XXX_Size() int { - return m.Size() -} -func (m *KeyValue) XXX_DiscardUnknown() { - xxx_messageInfo_KeyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyValue proto.InternalMessageInfo - -func (m *KeyValue) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *KeyValue) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -type MetaRouteMatch struct { - // If the value is empty and only the name of attribute is specified, presence of the attribute is checked. - Attributes map[string]*StringMatch `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetaRouteMatch) Reset() { *m = MetaRouteMatch{} } -func (m *MetaRouteMatch) String() string { return proto.CompactTextString(m) } -func (*MetaRouteMatch) ProtoMessage() {} -func (*MetaRouteMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{3} -} -func (m *MetaRouteMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetaRouteMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetaRouteMatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetaRouteMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetaRouteMatch.Merge(m, src) -} -func (m *MetaRouteMatch) XXX_Size() int { - return m.Size() -} -func (m *MetaRouteMatch) XXX_DiscardUnknown() { - xxx_messageInfo_MetaRouteMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_MetaRouteMatch proto.InternalMessageInfo - -func (m *MetaRouteMatch) GetAttributes() map[string]*StringMatch { - if m != nil { - return m.Attributes - } - return nil -} - -// Describes how to match a given string in HTTP headers. Match is -// case-sensitive. -type StringMatch struct { - // Types that are valid to be assigned to MatchType: - // *StringMatch_Exact - // *StringMatch_Prefix - // *StringMatch_Regex - MatchType isStringMatch_MatchType `protobuf_oneof:"match_type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StringMatch) Reset() { *m = StringMatch{} } -func (m *StringMatch) String() string { return proto.CompactTextString(m) } -func (*StringMatch) ProtoMessage() {} -func (*StringMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{4} -} -func (m *StringMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StringMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StringMatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StringMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringMatch.Merge(m, src) -} -func (m *StringMatch) XXX_Size() int { - return m.Size() -} -func (m *StringMatch) XXX_DiscardUnknown() { - xxx_messageInfo_StringMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_StringMatch proto.InternalMessageInfo - -type isStringMatch_MatchType interface { - isStringMatch_MatchType() - MarshalTo([]byte) (int, error) - Size() int -} - -type StringMatch_Exact struct { - Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof" json:"exact,omitempty"` -} -type StringMatch_Prefix struct { - Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` -} -type StringMatch_Regex struct { - Regex string `protobuf:"bytes,3,opt,name=regex,proto3,oneof" json:"regex,omitempty"` -} - -func (*StringMatch_Exact) isStringMatch_MatchType() {} -func (*StringMatch_Prefix) isStringMatch_MatchType() {} -func (*StringMatch_Regex) isStringMatch_MatchType() {} - -func (m *StringMatch) GetMatchType() isStringMatch_MatchType { - if m != nil { - return m.MatchType - } - return nil -} - -func (m *StringMatch) GetExact() string { - if x, ok := m.GetMatchType().(*StringMatch_Exact); ok { - return x.Exact - } - return "" -} - -func (m *StringMatch) GetPrefix() string { - if x, ok := m.GetMatchType().(*StringMatch_Prefix); ok { - return x.Prefix - } - return "" -} - -func (m *StringMatch) GetRegex() string { - if x, ok := m.GetMatchType().(*StringMatch_Regex); ok { - return x.Regex - } - return "" -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*StringMatch) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*StringMatch_Exact)(nil), - (*StringMatch_Prefix)(nil), - (*StringMatch_Regex)(nil), - } -} - -type MetaRouteDestination struct { - // Destination uniquely identifies the instances of a service - // to which the request/connection should be forwarded to. - Destination *Destination `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // The proportion of traffic to be forwarded to the service - // version. (0-100). Sum of weights across destinations SHOULD BE == 100. - // If there is only one destination in a rule, the weight value is assumed to - // be 100. - Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MetaRouteDestination) Reset() { *m = MetaRouteDestination{} } -func (m *MetaRouteDestination) String() string { return proto.CompactTextString(m) } -func (*MetaRouteDestination) ProtoMessage() {} -func (*MetaRouteDestination) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{5} -} -func (m *MetaRouteDestination) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetaRouteDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetaRouteDestination.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetaRouteDestination) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetaRouteDestination.Merge(m, src) -} -func (m *MetaRouteDestination) XXX_Size() int { - return m.Size() -} -func (m *MetaRouteDestination) XXX_DiscardUnknown() { - xxx_messageInfo_MetaRouteDestination.DiscardUnknown(m) -} - -var xxx_messageInfo_MetaRouteDestination proto.InternalMessageInfo - -func (m *MetaRouteDestination) GetDestination() *Destination { - if m != nil { - return m.Destination - } - return nil -} - -func (m *MetaRouteDestination) GetWeight() uint32 { - if m != nil { - return m.Weight - } - return 0 -} - -type Destination struct { - // The name of a service from the service registry. Service - // names are looked up from the platform's service registry (e.g., - // Kubernetes services, Consul services, etc.) and from the hosts - // declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic - // forwarded to destinations that are not found in either of the two, will be dropped. - // - // *Note for Kubernetes users*: When short names are used (e.g. "reviews" - // instead of "reviews.default.svc.cluster.local"), Istio will interpret - // the short name based on the namespace of the rule, not the service. A - // rule in the "default" namespace containing a host "reviews will be - // interpreted as "reviews.default.svc.cluster.local", irrespective of - // the actual namespace associated with the reviews service. To avoid - // potential misconfiguration, it is recommended to always use fully - // qualified domain names over short names. - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - // The name of a subset within the service. Applicable only to services - // within the mesh. The subset must be defined in a corresponding - // DestinationRule. - Subset string `protobuf:"bytes,2,opt,name=subset,proto3" json:"subset,omitempty"` - // Specifies the port on the host that is being addressed. If a service - // exposes only a single port it is not required to explicitly select the - // port. - Port *PortSelector `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Destination) Reset() { *m = Destination{} } -func (m *Destination) String() string { return proto.CompactTextString(m) } -func (*Destination) ProtoMessage() {} -func (*Destination) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{6} -} -func (m *Destination) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Destination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Destination.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Destination) XXX_Merge(src proto.Message) { - xxx_messageInfo_Destination.Merge(m, src) -} -func (m *Destination) XXX_Size() int { - return m.Size() -} -func (m *Destination) XXX_DiscardUnknown() { - xxx_messageInfo_Destination.DiscardUnknown(m) -} - -var xxx_messageInfo_Destination proto.InternalMessageInfo - -func (m *Destination) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *Destination) GetSubset() string { - if m != nil { - return m.Subset - } - return "" -} - -func (m *Destination) GetPort() *PortSelector { - if m != nil { - return m.Port - } - return nil -} - -// PortSelector specifies the number of a port to be used for -// matching or selection for final routing. -type PortSelector struct { - // Valid port number - Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PortSelector) Reset() { *m = PortSelector{} } -func (m *PortSelector) String() string { return proto.CompactTextString(m) } -func (*PortSelector) ProtoMessage() {} -func (*PortSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{7} -} -func (m *PortSelector) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PortSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PortSelector.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PortSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_PortSelector.Merge(m, src) -} -func (m *PortSelector) XXX_Size() int { - return m.Size() -} -func (m *PortSelector) XXX_DiscardUnknown() { - xxx_messageInfo_PortSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_PortSelector proto.InternalMessageInfo - -func (m *PortSelector) GetNumber() uint32 { - if m != nil { - return m.Number - } - return 0 -} - -// LocalRateLimit defines local rate limit policies for MetaProtocol proxy -type LocalRateLimit struct { - // The default token bucket configuration to use for rate limiting requests that are processed by - // this filter. - // Local rate limiter will first check the conditions, if a specific condition matches, then the token - // bucket within that condition will be applied to the incoming request. All the other requests - // that don't match the conditions will be rate limited by the default token bucket. - // If the default token bucket is not specified, then the requests that don't match the conditions - // will not be rate limited. - // At least one of token_bucket or conditions should have value. - TokenBucket *LocalRateLimit_TokenBucket `protobuf:"bytes,1,opt,name=token_bucket,json=tokenBucket,proto3" json:"token_bucket,omitempty"` - // The more specific rate limit conditions, the first match will be used. - Conditions []*LocalRateLimit_Condition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalRateLimit) Reset() { *m = LocalRateLimit{} } -func (m *LocalRateLimit) String() string { return proto.CompactTextString(m) } -func (*LocalRateLimit) ProtoMessage() {} -func (*LocalRateLimit) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{8} -} -func (m *LocalRateLimit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalRateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalRateLimit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalRateLimit) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalRateLimit.Merge(m, src) -} -func (m *LocalRateLimit) XXX_Size() int { - return m.Size() -} -func (m *LocalRateLimit) XXX_DiscardUnknown() { - xxx_messageInfo_LocalRateLimit.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalRateLimit proto.InternalMessageInfo - -func (m *LocalRateLimit) GetTokenBucket() *LocalRateLimit_TokenBucket { - if m != nil { - return m.TokenBucket - } - return nil -} - -func (m *LocalRateLimit) GetConditions() []*LocalRateLimit_Condition { - if m != nil { - return m.Conditions - } - return nil -} - -// Configures a token bucket which is used for rate limiting. -type LocalRateLimit_TokenBucket struct { - // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket - // initially contains. The value must be greater than 0. - MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` - // The number of tokens added to the bucket during each fill interval. The value must be greater than 0. - //If not specified, defaults to a single token. - TokensPerFill *types.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"` - // The fill interval that tokens are added to the bucket. During each fill interval - // `tokens_per_fill` are added to the bucket. The bucket will never contain more than - // `max_tokens` tokens. - FillInterval *types.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalRateLimit_TokenBucket) Reset() { *m = LocalRateLimit_TokenBucket{} } -func (m *LocalRateLimit_TokenBucket) String() string { return proto.CompactTextString(m) } -func (*LocalRateLimit_TokenBucket) ProtoMessage() {} -func (*LocalRateLimit_TokenBucket) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{8, 0} -} -func (m *LocalRateLimit_TokenBucket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalRateLimit_TokenBucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalRateLimit_TokenBucket.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalRateLimit_TokenBucket) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalRateLimit_TokenBucket.Merge(m, src) -} -func (m *LocalRateLimit_TokenBucket) XXX_Size() int { - return m.Size() -} -func (m *LocalRateLimit_TokenBucket) XXX_DiscardUnknown() { - xxx_messageInfo_LocalRateLimit_TokenBucket.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalRateLimit_TokenBucket proto.InternalMessageInfo - -func (m *LocalRateLimit_TokenBucket) GetMaxTokens() uint32 { - if m != nil { - return m.MaxTokens - } - return 0 -} - -func (m *LocalRateLimit_TokenBucket) GetTokensPerFill() *types.UInt32Value { - if m != nil { - return m.TokensPerFill - } - return nil -} - -func (m *LocalRateLimit_TokenBucket) GetFillInterval() *types.Duration { - if m != nil { - return m.FillInterval - } - return nil -} - -// Condition defines a rate limit policy for a more specific condition -type LocalRateLimit_Condition struct { - // Match conditions to be satisfied for the rate limit rule to be activated. - // All conditions inside a single match block have AND semantic. - // If the match is not specified, then all the incoming requests will be considered matched. - Match *MetaRouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // The token bucket for this particular condition - TokenBucket *LocalRateLimit_TokenBucket `protobuf:"bytes,2,opt,name=token_bucket,json=tokenBucket,proto3" json:"token_bucket,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LocalRateLimit_Condition) Reset() { *m = LocalRateLimit_Condition{} } -func (m *LocalRateLimit_Condition) String() string { return proto.CompactTextString(m) } -func (*LocalRateLimit_Condition) ProtoMessage() {} -func (*LocalRateLimit_Condition) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{8, 1} -} -func (m *LocalRateLimit_Condition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LocalRateLimit_Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LocalRateLimit_Condition.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LocalRateLimit_Condition) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalRateLimit_Condition.Merge(m, src) -} -func (m *LocalRateLimit_Condition) XXX_Size() int { - return m.Size() -} -func (m *LocalRateLimit_Condition) XXX_DiscardUnknown() { - xxx_messageInfo_LocalRateLimit_Condition.DiscardUnknown(m) -} - -var xxx_messageInfo_LocalRateLimit_Condition proto.InternalMessageInfo - -func (m *LocalRateLimit_Condition) GetMatch() *MetaRouteMatch { - if m != nil { - return m.Match - } - return nil -} - -func (m *LocalRateLimit_Condition) GetTokenBucket() *LocalRateLimit_TokenBucket { - if m != nil { - return m.TokenBucket - } - return nil -} - -// GlobalRateLimit configures global rate limit service for MetaProtocol proxy -type GlobalRateLimit struct { - // Match conditions to be satisfied for the rate limit rule to be activated. - // All conditions inside a single match block have AND semantic. - // If the match is not specified, then all the incoming requests will be considered matched. - Match *MetaRouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - // The rate limit domain to use when calling the rate limit service. - Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - RequestTimeout *types.Duration `protobuf:"bytes,3,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` - // The filter's behavior in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - DenyOnFail bool `protobuf:"varint,4,opt,name=deny_on_fail,json=denyOnFail,proto3" json:"deny_on_fail,omitempty"` - // The cluster name of the external rate limit service provider. - RateLimitService string `protobuf:"bytes,5,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"` - // Defines what properties in the requests should be sent to the rate limit service - Descriptors []*GlobalRateLimit_Descriptor `protobuf:"bytes,6,rep,name=descriptors,proto3" json:"descriptors,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GlobalRateLimit) Reset() { *m = GlobalRateLimit{} } -func (m *GlobalRateLimit) String() string { return proto.CompactTextString(m) } -func (*GlobalRateLimit) ProtoMessage() {} -func (*GlobalRateLimit) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{9} -} -func (m *GlobalRateLimit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GlobalRateLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GlobalRateLimit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GlobalRateLimit) XXX_Merge(src proto.Message) { - xxx_messageInfo_GlobalRateLimit.Merge(m, src) -} -func (m *GlobalRateLimit) XXX_Size() int { - return m.Size() -} -func (m *GlobalRateLimit) XXX_DiscardUnknown() { - xxx_messageInfo_GlobalRateLimit.DiscardUnknown(m) -} - -var xxx_messageInfo_GlobalRateLimit proto.InternalMessageInfo - -func (m *GlobalRateLimit) GetMatch() *MetaRouteMatch { - if m != nil { - return m.Match - } - return nil -} - -func (m *GlobalRateLimit) GetDomain() string { - if m != nil { - return m.Domain - } - return "" -} - -func (m *GlobalRateLimit) GetRequestTimeout() *types.Duration { - if m != nil { - return m.RequestTimeout - } - return nil -} - -func (m *GlobalRateLimit) GetDenyOnFail() bool { - if m != nil { - return m.DenyOnFail - } - return false -} - -func (m *GlobalRateLimit) GetRateLimitService() string { - if m != nil { - return m.RateLimitService - } - return "" -} - -func (m *GlobalRateLimit) GetDescriptors() []*GlobalRateLimit_Descriptor { - if m != nil { - return m.Descriptors - } - return nil -} - -// Descriptor defines the mapping between the property in the request and the descriptor key in the rate -// limit server configuration -// Normally the property is the same as the descriptor key, but adding a mapping layer allows more flexibility -type GlobalRateLimit_Descriptor struct { - // The property extracted from the requests - Property string `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"` - // The corresponding descriptor key in the rate limit server configuration - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GlobalRateLimit_Descriptor) Reset() { *m = GlobalRateLimit_Descriptor{} } -func (m *GlobalRateLimit_Descriptor) String() string { return proto.CompactTextString(m) } -func (*GlobalRateLimit_Descriptor) ProtoMessage() {} -func (*GlobalRateLimit_Descriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{9, 0} -} -func (m *GlobalRateLimit_Descriptor) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GlobalRateLimit_Descriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GlobalRateLimit_Descriptor.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GlobalRateLimit_Descriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_GlobalRateLimit_Descriptor.Merge(m, src) -} -func (m *GlobalRateLimit_Descriptor) XXX_Size() int { - return m.Size() -} -func (m *GlobalRateLimit_Descriptor) XXX_DiscardUnknown() { - xxx_messageInfo_GlobalRateLimit_Descriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_GlobalRateLimit_Descriptor proto.InternalMessageInfo - -func (m *GlobalRateLimit_Descriptor) GetProperty() string { - if m != nil { - return m.Property - } - return "" -} - -func (m *GlobalRateLimit_Descriptor) GetDescriptorKey() string { - if m != nil { - return m.DescriptorKey - } - return "" -} - -// Percent specifies a percentage in the range of [0.0, 100.0]. -type Percent struct { - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Percent) Reset() { *m = Percent{} } -func (m *Percent) String() string { return proto.CompactTextString(m) } -func (*Percent) ProtoMessage() {} -func (*Percent) Descriptor() ([]byte, []int) { - return fileDescriptor_1e2715e051935576, []int{10} -} -func (m *Percent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Percent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Percent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Percent) XXX_Merge(src proto.Message) { - xxx_messageInfo_Percent.Merge(m, src) -} -func (m *Percent) XXX_Size() int { - return m.Size() -} -func (m *Percent) XXX_DiscardUnknown() { - xxx_messageInfo_Percent.DiscardUnknown(m) -} - -var xxx_messageInfo_Percent proto.InternalMessageInfo - -func (m *Percent) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -func init() { - proto.RegisterType((*MetaRouter)(nil), "metaprotocol.aeraki.io.v1alpha1.MetaRouter") - proto.RegisterType((*MetaRoute)(nil), "metaprotocol.aeraki.io.v1alpha1.MetaRoute") - proto.RegisterType((*KeyValue)(nil), "metaprotocol.aeraki.io.v1alpha1.KeyValue") - proto.RegisterType((*MetaRouteMatch)(nil), "metaprotocol.aeraki.io.v1alpha1.MetaRouteMatch") - proto.RegisterMapType((map[string]*StringMatch)(nil), "metaprotocol.aeraki.io.v1alpha1.MetaRouteMatch.AttributesEntry") - proto.RegisterType((*StringMatch)(nil), "metaprotocol.aeraki.io.v1alpha1.StringMatch") - proto.RegisterType((*MetaRouteDestination)(nil), "metaprotocol.aeraki.io.v1alpha1.MetaRouteDestination") - proto.RegisterType((*Destination)(nil), "metaprotocol.aeraki.io.v1alpha1.Destination") - proto.RegisterType((*PortSelector)(nil), "metaprotocol.aeraki.io.v1alpha1.PortSelector") - proto.RegisterType((*LocalRateLimit)(nil), "metaprotocol.aeraki.io.v1alpha1.LocalRateLimit") - proto.RegisterType((*LocalRateLimit_TokenBucket)(nil), "metaprotocol.aeraki.io.v1alpha1.LocalRateLimit.TokenBucket") - proto.RegisterType((*LocalRateLimit_Condition)(nil), "metaprotocol.aeraki.io.v1alpha1.LocalRateLimit.Condition") - proto.RegisterType((*GlobalRateLimit)(nil), "metaprotocol.aeraki.io.v1alpha1.GlobalRateLimit") - proto.RegisterType((*GlobalRateLimit_Descriptor)(nil), "metaprotocol.aeraki.io.v1alpha1.GlobalRateLimit.Descriptor") - proto.RegisterType((*Percent)(nil), "metaprotocol.aeraki.io.v1alpha1.Percent") -} - -func init() { - proto.RegisterFile("api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto", fileDescriptor_1e2715e051935576) -} - -var fileDescriptor_1e2715e051935576 = []byte{ - // 1096 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x5b, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbb, 0xbe, 0x11, 0x1f, 0xe7, 0xe2, 0x0e, 0xa1, 0x6c, 0x5d, 0x48, 0x22, 0x3f, 0x85, - 0x8a, 0xae, 0xa9, 0x2b, 0x54, 0xa0, 0x48, 0xa8, 0x6e, 0x5a, 0x7a, 0x15, 0xd1, 0x26, 0xad, 0x14, - 0x84, 0x58, 0x8d, 0xd7, 0x27, 0xf6, 0x28, 0xbb, 0x3b, 0xcb, 0xec, 0x38, 0xb1, 0x1f, 0x11, 0x1f, - 0x8a, 0x17, 0x1e, 0x79, 0xe0, 0x11, 0xf1, 0xc4, 0x13, 0xaa, 0xf2, 0x41, 0x10, 0x9a, 0x8b, 0xed, - 0x75, 0xa0, 0x72, 0x0c, 0xbc, 0xf9, 0x9c, 0xe3, 0xff, 0x6f, 0xe6, 0xcc, 0x9c, 0x3d, 0x67, 0xe0, - 0x2e, 0x4d, 0x59, 0x2b, 0x46, 0x49, 0x53, 0xc1, 0x25, 0x0f, 0x79, 0xd4, 0x3a, 0xbd, 0x4d, 0xa3, - 0x74, 0x40, 0x6f, 0xcf, 0x79, 0x03, 0x65, 0x08, 0x3e, 0x94, 0x28, 0x3c, 0xed, 0x23, 0xdb, 0xf9, - 0xb0, 0x47, 0x51, 0xd0, 0x13, 0xe6, 0x31, 0xee, 0x4d, 0xe4, 0x8d, 0xed, 0x3e, 0xe7, 0xfd, 0x08, - 0x5b, 0x6a, 0x81, 0x63, 0x86, 0x51, 0x2f, 0xe8, 0xe2, 0x80, 0x9e, 0x32, 0x6e, 0x09, 0x8d, 0x2d, - 0xfb, 0x07, 0x6d, 0x75, 0x87, 0xc7, 0xad, 0xde, 0x50, 0x50, 0xc9, 0x78, 0xf2, 0xa6, 0xf8, 0x99, - 0xa0, 0x69, 0x8a, 0x22, 0x33, 0xf1, 0xe6, 0xef, 0x05, 0x80, 0x17, 0x28, 0xa9, 0xaf, 0xb7, 0x45, - 0x36, 0xa1, 0x3c, 0xe0, 0x99, 0xcc, 0x5c, 0x67, 0xa7, 0xb8, 0x5b, 0xf5, 0x8d, 0x41, 0x1a, 0xb0, - 0xd2, 0xa7, 0x12, 0xcf, 0xe8, 0x38, 0x73, 0x0b, 0x3a, 0x30, 0xb5, 0x49, 0x07, 0x2a, 0x3a, 0xa5, - 0xcc, 0x2d, 0xee, 0x14, 0x77, 0x6b, 0xed, 0x9b, 0xde, 0x82, 0x9c, 0xbc, 0xe9, 0x72, 0xbe, 0x55, - 0x92, 0x23, 0xa8, 0x47, 0x3c, 0xa4, 0x51, 0x20, 0xa8, 0xc4, 0x20, 0x62, 0x31, 0x93, 0x6e, 0x69, - 0xc7, 0xd9, 0xad, 0xb5, 0x5b, 0x0b, 0x69, 0xcf, 0x95, 0xd0, 0xa7, 0x12, 0x9f, 0x2b, 0x99, 0xbf, - 0x1e, 0xcd, 0xd9, 0xe4, 0x1b, 0xb8, 0xda, 0x8f, 0x78, 0x77, 0x9e, 0x5d, 0xd6, 0xec, 0x8f, 0x16, - 0xb2, 0xbf, 0xd4, 0xca, 0x19, 0x7c, 0xa3, 0x3f, 0xef, 0x20, 0x37, 0xa0, 0x8a, 0xa3, 0x94, 0x0b, - 0x19, 0x48, 0xee, 0x6e, 0x9a, 0x93, 0x31, 0x8e, 0x43, 0xde, 0xfc, 0xb3, 0x08, 0xd5, 0x69, 0xae, - 0x84, 0x40, 0x29, 0xa1, 0x31, 0xba, 0xce, 0x8e, 0xb3, 0x5b, 0xf5, 0xf5, 0x6f, 0xf2, 0x10, 0xca, - 0x31, 0x95, 0xe1, 0xc0, 0x2d, 0x5c, 0x32, 0xd9, 0x29, 0xee, 0x85, 0x92, 0xf9, 0x46, 0x4d, 0x9e, - 0x41, 0x59, 0x1f, 0xa4, 0xbd, 0x81, 0x8f, 0x2f, 0x8f, 0xd9, 0xc3, 0x4c, 0xb2, 0x44, 0xd7, 0x8b, - 0x6f, 0x18, 0x64, 0x0f, 0x2a, 0x31, 0x13, 0x82, 0x0b, 0x7b, 0x4a, 0x1f, 0x2e, 0xa4, 0xe5, 0x21, - 0x56, 0x4b, 0x5e, 0xc2, 0x55, 0xf3, 0x2b, 0x48, 0x51, 0x84, 0x98, 0x48, 0xda, 0x47, 0xb7, 0xa2, - 0x81, 0xbb, 0x0b, 0x81, 0xfb, 0x46, 0xe2, 0xd7, 0x0d, 0x62, 0x7f, 0x4a, 0x20, 0x87, 0x50, 0x17, - 0xf8, 0xdd, 0x10, 0x33, 0x19, 0xc4, 0x43, 0xa9, 0x97, 0x74, 0xdf, 0xd6, 0x49, 0x7f, 0xb0, 0x90, - 0xfa, 0x0c, 0xc7, 0xaf, 0x68, 0x34, 0x44, 0x7f, 0xc3, 0x22, 0x5e, 0x58, 0x02, 0x79, 0x05, 0x57, - 0x05, 0x66, 0x29, 0x4f, 0x32, 0x9c, 0x61, 0x37, 0x97, 0xc5, 0xd6, 0x27, 0x8c, 0x09, 0xb7, 0xf9, - 0x39, 0xac, 0x4c, 0xa2, 0xe4, 0x1d, 0x28, 0x9e, 0xe0, 0xd8, 0xdc, 0x7e, 0xa7, 0xf8, 0xfa, 0x7e, - 0xc1, 0x57, 0x36, 0xb9, 0x0e, 0xe5, 0x53, 0x15, 0xd7, 0x15, 0x60, 0x03, 0xc6, 0xd3, 0xfc, 0xc3, - 0x81, 0xf5, 0xf9, 0xfb, 0x26, 0x01, 0x00, 0x95, 0x52, 0xb0, 0xae, 0xfe, 0xde, 0x1c, 0xbd, 0xc3, - 0x2f, 0x96, 0x2c, 0x1a, 0xef, 0xfe, 0x94, 0xf0, 0x30, 0x91, 0x62, 0xec, 0xe7, 0x90, 0x8d, 0x13, - 0xd8, 0xb8, 0x10, 0x26, 0xf5, 0xdc, 0xc6, 0xcd, 0x9e, 0x3b, 0xf9, 0x3d, 0x5f, 0xa6, 0x40, 0x0e, - 0xa4, 0x60, 0x49, 0xdf, 0x96, 0xac, 0x96, 0x7e, 0x56, 0xf8, 0xc4, 0x69, 0x22, 0xd4, 0x72, 0x11, - 0x72, 0x0d, 0xca, 0x38, 0xa2, 0xa1, 0x34, 0x4b, 0x3d, 0xbe, 0xe2, 0x1b, 0x93, 0xb8, 0x50, 0x49, - 0x05, 0x1e, 0xb3, 0x91, 0x39, 0xa3, 0xc7, 0x57, 0x7c, 0x6b, 0x2b, 0x85, 0xc0, 0x3e, 0x8e, 0xdc, - 0xe2, 0x44, 0xa1, 0xcd, 0xce, 0x2a, 0x80, 0xfe, 0x30, 0x02, 0x39, 0x4e, 0xb1, 0xf9, 0x83, 0x03, - 0x9b, 0xff, 0x54, 0xf0, 0xe4, 0x00, 0x6a, 0xbd, 0x99, 0xa9, 0x97, 0x5d, 0xb2, 0xdc, 0xcd, 0x7d, - 0xe5, 0x29, 0xe4, 0x1a, 0x54, 0xce, 0x90, 0xf5, 0x07, 0x52, 0xef, 0x76, 0xcd, 0xb7, 0x56, 0xf3, - 0x7b, 0x07, 0x6a, 0xf9, 0xc5, 0xdf, 0x85, 0x92, 0xea, 0xad, 0xf9, 0x82, 0xd0, 0x0e, 0x05, 0xc8, - 0x86, 0xdd, 0x0c, 0x0d, 0xa0, 0xea, 0x5b, 0x8b, 0xdc, 0x87, 0x92, 0xea, 0x2b, 0x3a, 0xd7, 0x5a, - 0xfb, 0xd6, 0xe2, 0x8f, 0x88, 0x0b, 0x79, 0x80, 0x11, 0x86, 0x92, 0x0b, 0x5f, 0x4b, 0x9b, 0x6d, - 0x58, 0xcd, 0x7b, 0xd5, 0x52, 0xc9, 0x30, 0xee, 0xa2, 0xd0, 0xbb, 0x58, 0xf3, 0xad, 0xf5, 0xb4, - 0xb4, 0x52, 0xa8, 0x17, 0x4d, 0x8b, 0x6a, 0xfe, 0x5c, 0x82, 0xf5, 0xf9, 0x16, 0x4b, 0xbe, 0x85, - 0x55, 0xc9, 0x4f, 0x30, 0x09, 0xba, 0xc3, 0xf0, 0x04, 0xa5, 0x3d, 0xb8, 0x7b, 0x4b, 0x76, 0x6a, - 0xef, 0x50, 0x31, 0x3a, 0x1a, 0xe1, 0xd7, 0xe4, 0xcc, 0x20, 0x47, 0x00, 0x21, 0x4f, 0x7a, 0x4c, - 0x9d, 0x93, 0x99, 0x37, 0xb5, 0xf6, 0xa7, 0xcb, 0xd2, 0x1f, 0x4c, 0x08, 0x7e, 0x0e, 0xd6, 0xf8, - 0xd1, 0x81, 0x5a, 0x6e, 0x5d, 0xf2, 0xbe, 0xaa, 0x94, 0x51, 0xa0, 0x57, 0xcf, 0xec, 0x29, 0x54, - 0x63, 0x3a, 0xd2, 0xff, 0xc9, 0xc8, 0x1e, 0x6c, 0x98, 0x90, 0xea, 0x62, 0xc1, 0x31, 0x8b, 0x22, - 0x5b, 0xf3, 0xef, 0x79, 0x66, 0xac, 0x7a, 0x93, 0xb1, 0xea, 0xbd, 0x7c, 0x92, 0xc8, 0x3b, 0x6d, - 0xd3, 0x09, 0xd6, 0x8c, 0x68, 0x1f, 0xc5, 0x23, 0x16, 0x45, 0xe4, 0x01, 0xac, 0x29, 0x69, 0xc0, - 0x12, 0x89, 0xe2, 0x94, 0x46, 0xf6, 0x0a, 0xaf, 0xff, 0x8d, 0xb1, 0x67, 0x47, 0xb7, 0x29, 0x87, - 0x55, 0x25, 0x7a, 0x62, 0x35, 0x8d, 0x9f, 0x1c, 0xa8, 0x4e, 0x73, 0x22, 0x4f, 0x27, 0x83, 0xc3, - 0xf9, 0x57, 0x83, 0xc3, 0xf6, 0x19, 0x33, 0x3d, 0xc2, 0x0b, 0xd7, 0x59, 0xf8, 0xcf, 0xd7, 0x69, - 0x3f, 0x8b, 0xdc, 0x9d, 0x36, 0x7f, 0x2b, 0xc2, 0xc6, 0x85, 0x69, 0xfa, 0xbf, 0x26, 0x71, 0x03, - 0x2a, 0x3d, 0x1e, 0x53, 0x96, 0xe4, 0x1b, 0xa9, 0x75, 0x91, 0x0e, 0x4c, 0x5a, 0x7e, 0x20, 0x59, - 0x8c, 0x7c, 0x28, 0x17, 0x5e, 0x81, 0xbf, 0x6e, 0x15, 0x87, 0x46, 0x40, 0x76, 0x60, 0xb5, 0x87, - 0xc9, 0x38, 0xe0, 0x49, 0x70, 0x4c, 0x59, 0xa4, 0x9f, 0x27, 0x2b, 0x3e, 0x28, 0xdf, 0x57, 0xc9, - 0x23, 0xca, 0x22, 0x72, 0x1b, 0xc8, 0xec, 0x89, 0x11, 0x64, 0x28, 0x4e, 0x59, 0x88, 0x7a, 0x88, - 0xda, 0xed, 0xd4, 0xc5, 0x24, 0xf5, 0x03, 0x13, 0x24, 0x5d, 0xdd, 0x81, 0x42, 0xc1, 0x52, 0xc9, - 0x45, 0xe6, 0x56, 0x74, 0xa9, 0xdf, 0x5b, 0xf6, 0x59, 0xa2, 0x3a, 0x92, 0x65, 0xcc, 0x1a, 0xd2, - 0x04, 0xda, 0x38, 0x02, 0x98, 0xc5, 0xc9, 0x36, 0xac, 0xa4, 0x82, 0xa7, 0x28, 0xe4, 0xdc, 0x2c, - 0x9a, 0x3a, 0xc9, 0x4d, 0x58, 0x9f, 0xa9, 0x03, 0xd5, 0xf9, 0x73, 0x07, 0xba, 0x36, 0x0b, 0x3d, - 0xc3, 0x71, 0x73, 0x1b, 0xde, 0xb2, 0xb3, 0x59, 0xbd, 0x1b, 0xcd, 0x4c, 0x50, 0x50, 0xc7, 0x76, - 0xf9, 0xce, 0xc3, 0x5f, 0xce, 0xb7, 0x9c, 0x5f, 0xcf, 0xb7, 0x9c, 0xd7, 0xe7, 0x5b, 0xce, 0xd7, - 0x77, 0xfb, 0x4c, 0x0e, 0x86, 0x5d, 0x2f, 0xe4, 0x71, 0xcb, 0x64, 0x75, 0x2b, 0xc6, 0x6c, 0x60, - 0x7f, 0xb7, 0xde, 0xf8, 0x86, 0xee, 0x56, 0xb4, 0xeb, 0xce, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x81, 0x99, 0x95, 0xdc, 0x67, 0x0b, 0x00, 0x00, -} - -func (m *MetaRouter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetaRouter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetaRouter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ExportTo) > 0 { - for iNdEx := len(m.ExportTo) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExportTo[iNdEx]) - copy(dAtA[i:], m.ExportTo[iNdEx]) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.ExportTo[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if m.GlobalRateLimit != nil { - { - size, err := m.GlobalRateLimit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.LocalRateLimit != nil { - { - size, err := m.LocalRateLimit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Routes) > 0 { - for iNdEx := len(m.Routes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Routes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Gateways) > 0 { - for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Gateways[iNdEx]) - copy(dAtA[i:], m.Gateways[iNdEx]) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Gateways[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Hosts) > 0 { - for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Hosts[iNdEx]) - copy(dAtA[i:], m.Hosts[iNdEx]) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Hosts[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *MetaRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetaRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetaRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.ResponseMutation) > 0 { - for iNdEx := len(m.ResponseMutation) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResponseMutation[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if len(m.RequestMutation) > 0 { - for iNdEx := len(m.RequestMutation) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RequestMutation[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - } - if m.MirrorPercentage != nil { - { - size, err := m.MirrorPercentage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Mirror != nil { - { - size, err := m.Mirror.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Route) > 0 { - for iNdEx := len(m.Route) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Route[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Match != nil { - { - size, err := m.Match.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *KeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MetaRouteMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetaRouteMatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetaRouteMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *StringMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StringMatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StringMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.MatchType != nil { - { - size := m.MatchType.Size() - i -= size - if _, err := m.MatchType.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *StringMatch_Exact) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StringMatch_Exact) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Exact) - copy(dAtA[i:], m.Exact) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Exact))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *StringMatch_Prefix) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StringMatch_Prefix) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Prefix) - copy(dAtA[i:], m.Prefix) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Prefix))) - i-- - dAtA[i] = 0x12 - return len(dAtA) - i, nil -} -func (m *StringMatch_Regex) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StringMatch_Regex) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.Regex) - copy(dAtA[i:], m.Regex) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Regex))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *MetaRouteDestination) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetaRouteDestination) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetaRouteDestination) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Weight != 0 { - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x10 - } - if m.Destination != nil { - { - size, err := m.Destination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Destination) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Destination) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Destination) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Port != nil { - { - size, err := m.Port.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Subset) > 0 { - i -= len(m.Subset) - copy(dAtA[i:], m.Subset) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Subset))) - i-- - dAtA[i] = 0x12 - } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PortSelector) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PortSelector) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PortSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Number != 0 { - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LocalRateLimit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalRateLimit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalRateLimit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.TokenBucket != nil { - { - size, err := m.TokenBucket.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LocalRateLimit_TokenBucket) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalRateLimit_TokenBucket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalRateLimit_TokenBucket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.FillInterval != nil { - { - size, err := m.FillInterval.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.TokensPerFill != nil { - { - size, err := m.TokensPerFill.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.MaxTokens != 0 { - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(m.MaxTokens)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LocalRateLimit_Condition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalRateLimit_Condition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalRateLimit_Condition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TokenBucket != nil { - { - size, err := m.TokenBucket.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Match != nil { - { - size, err := m.Match.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GlobalRateLimit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GlobalRateLimit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GlobalRateLimit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Descriptors) > 0 { - for iNdEx := len(m.Descriptors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Descriptors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.RateLimitService) > 0 { - i -= len(m.RateLimitService) - copy(dAtA[i:], m.RateLimitService) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.RateLimitService))) - i-- - dAtA[i] = 0x2a - } - if m.DenyOnFail { - i-- - if m.DenyOnFail { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.RequestTimeout != nil { - { - size, err := m.RequestTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Domain) > 0 { - i -= len(m.Domain) - copy(dAtA[i:], m.Domain) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Domain))) - i-- - dAtA[i] = 0x12 - } - if m.Match != nil { - { - size, err := m.Match.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GlobalRateLimit_Descriptor) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GlobalRateLimit_Descriptor) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GlobalRateLimit_Descriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DescriptorKey) > 0 { - i -= len(m.DescriptorKey) - copy(dAtA[i:], m.DescriptorKey) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.DescriptorKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.Property) > 0 { - i -= len(m.Property) - copy(dAtA[i:], m.Property) - i = encodeVarintMetaprotocolMetarouter(dAtA, i, uint64(len(m.Property))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Percent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Percent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Percent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func encodeVarintMetaprotocolMetarouter(dAtA []byte, offset int, v uint64) int { - offset -= sovMetaprotocolMetarouter(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MetaRouter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Hosts) > 0 { - for _, s := range m.Hosts { - l = len(s) - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if len(m.Gateways) > 0 { - for _, s := range m.Gateways { - l = len(s) - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if len(m.Routes) > 0 { - for _, e := range m.Routes { - l = e.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if m.LocalRateLimit != nil { - l = m.LocalRateLimit.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.GlobalRateLimit != nil { - l = m.GlobalRateLimit.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if len(m.ExportTo) > 0 { - for _, s := range m.ExportTo { - l = len(s) - n += 2 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MetaRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.Match != nil { - l = m.Match.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if len(m.Route) > 0 { - for _, e := range m.Route { - l = e.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if m.Mirror != nil { - l = m.Mirror.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.MirrorPercentage != nil { - l = m.MirrorPercentage.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if len(m.RequestMutation) > 0 { - for _, e := range m.RequestMutation { - l = e.Size() - n += 2 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if len(m.ResponseMutation) > 0 { - for _, e := range m.ResponseMutation { - l = e.Size() - n += 2 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *KeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *MetaRouteMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMetaprotocolMetarouter(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMetaprotocolMetarouter(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMetaprotocolMetarouter(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StringMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MatchType != nil { - n += m.MatchType.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StringMatch_Exact) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Exact) - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - return n -} -func (m *StringMatch_Prefix) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Prefix) - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - return n -} -func (m *StringMatch_Regex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Regex) - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - return n -} -func (m *MetaRouteDestination) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Destination != nil { - l = m.Destination.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.Weight != 0 { - n += 1 + sovMetaprotocolMetarouter(uint64(m.Weight)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Destination) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - l = len(m.Subset) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.Port != nil { - l = m.Port.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PortSelector) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Number != 0 { - n += 1 + sovMetaprotocolMetarouter(uint64(m.Number)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LocalRateLimit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TokenBucket != nil { - l = m.TokenBucket.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LocalRateLimit_TokenBucket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MaxTokens != 0 { - n += 1 + sovMetaprotocolMetarouter(uint64(m.MaxTokens)) - } - if m.TokensPerFill != nil { - l = m.TokensPerFill.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.FillInterval != nil { - l = m.FillInterval.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *LocalRateLimit_Condition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Match != nil { - l = m.Match.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.TokenBucket != nil { - l = m.TokenBucket.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GlobalRateLimit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Match != nil { - l = m.Match.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - l = len(m.Domain) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.RequestTimeout != nil { - l = m.RequestTimeout.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.DenyOnFail { - n += 2 - } - l = len(m.RateLimitService) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if len(m.Descriptors) > 0 { - for _, e := range m.Descriptors { - l = e.Size() - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GlobalRateLimit_Descriptor) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Property) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - l = len(m.DescriptorKey) - if l > 0 { - n += 1 + l + sovMetaprotocolMetarouter(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Percent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovMetaprotocolMetarouter(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetaprotocolMetarouter(x uint64) (n int) { - return sovMetaprotocolMetarouter(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MetaRouter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetaRouter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetaRouter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateways = append(m.Gateways, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Routes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Routes = append(m.Routes, &MetaRoute{}) - if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalRateLimit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LocalRateLimit == nil { - m.LocalRateLimit = &LocalRateLimit{} - } - if err := m.LocalRateLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GlobalRateLimit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GlobalRateLimit == nil { - m.GlobalRateLimit = &GlobalRateLimit{} - } - if err := m.GlobalRateLimit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExportTo", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExportTo = append(m.ExportTo, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetaRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetaRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetaRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Match == nil { - m.Match = &MetaRouteMatch{} - } - if err := m.Match.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Route = append(m.Route, &MetaRouteDestination{}) - if err := m.Route[len(m.Route)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mirror", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Mirror == nil { - m.Mirror = &Destination{} - } - if err := m.Mirror.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MirrorPercentage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MirrorPercentage == nil { - m.MirrorPercentage = &Percent{} - } - if err := m.MirrorPercentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestMutation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestMutation = append(m.RequestMutation, &KeyValue{}) - if err := m.RequestMutation[len(m.RequestMutation)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseMutation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseMutation = append(m.ResponseMutation, &KeyValue{}) - if err := m.ResponseMutation[len(m.ResponseMutation)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetaRouteMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetaRouteMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetaRouteMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]*StringMatch) - } - var mapkey string - var mapvalue *StringMatch - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &StringMatch{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StringMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StringMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StringMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exact", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchType = &StringMatch_Exact{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchType = &StringMatch_Prefix{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MatchType = &StringMatch_Regex{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetaRouteDestination) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetaRouteDestination: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetaRouteDestination: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Destination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Destination == nil { - m.Destination = &Destination{} - } - if err := m.Destination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Destination) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Destination: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Destination: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subset", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subset = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Port == nil { - m.Port = &PortSelector{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PortSelector) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PortSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PortSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalRateLimit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalRateLimit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalRateLimit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenBucket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TokenBucket == nil { - m.TokenBucket = &LocalRateLimit_TokenBucket{} - } - if err := m.TokenBucket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, &LocalRateLimit_Condition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalRateLimit_TokenBucket) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenBucket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenBucket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxTokens", wireType) - } - m.MaxTokens = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxTokens |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokensPerFill", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TokensPerFill == nil { - m.TokensPerFill = &types.UInt32Value{} - } - if err := m.TokensPerFill.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FillInterval", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FillInterval == nil { - m.FillInterval = &types.Duration{} - } - if err := m.FillInterval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalRateLimit_Condition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Condition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Condition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Match == nil { - m.Match = &MetaRouteMatch{} - } - if err := m.Match.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenBucket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TokenBucket == nil { - m.TokenBucket = &LocalRateLimit_TokenBucket{} - } - if err := m.TokenBucket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GlobalRateLimit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GlobalRateLimit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GlobalRateLimit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Match == nil { - m.Match = &MetaRouteMatch{} - } - if err := m.Match.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Domain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Domain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestTimeout == nil { - m.RequestTimeout = &types.Duration{} - } - if err := m.RequestTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DenyOnFail", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DenyOnFail = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RateLimitService", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RateLimitService = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Descriptors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Descriptors = append(m.Descriptors, &GlobalRateLimit_Descriptor{}) - if err := m.Descriptors[len(m.Descriptors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GlobalRateLimit_Descriptor) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Descriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Descriptor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Property = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DescriptorKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DescriptorKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Percent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Percent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Percent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipMetaprotocolMetarouter(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthMetaprotocolMetarouter - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetaprotocolMetarouter(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetaprotocolMetarouter - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetaprotocolMetarouter - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetaprotocolMetarouter - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetaprotocolMetarouter - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetaprotocolMetarouter = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetaprotocolMetarouter = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetaprotocolMetarouter = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto b/api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto deleted file mode 100644 index c4148dac..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright Aeraki 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. -syntax = "proto3"; - -import "google/api/field_behavior.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -// $schema: metaprotocol.aeraki.io.v1alpha1.MetaRouter -// $title: MetaRouter -// $description: MetaRouter defines route policies for MetaProtocol proxy. -// -// MetaRouter defines route policies for MetaProtocol proxy. -// *Note*: Only one MetaRouter should be defined for a MetaProtocol service. -// If more than one MetaRouters are found for a service, Aeraki will choose -// a random one to apply to that service. -// -// *Note *: MetaRouter is a mesh-scoped resource, so no matter which namespace -// the MetaRouter is in, it will take effect on the services specified in the hosts. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: attribute-based-route -// namespace: istio-system -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// gateways: -// - istio-system/ingress-gateway -// routes: -// - name: v1 -// match: -// attributes: -// interface: -// exact: org.apache.dubbo.samples.basic.api.DemoService -// method: -// exact: sayHello -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// -// ``` -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: traffic-splitting -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// routes: -// - name: traffic-spilt -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// weight: 20 -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v2 -// weight: 80 -package metaprotocol.aeraki.io.v1alpha1; - -option go_package = "github.com/aeraki-mesh/aeraki/api/metaprotocol/v1alpha1"; - -// MetaRouter defines route policies for MetaProtocol proxy. -// -// -// -// -message MetaRouter { - // The destination service to which traffic is being sent. - // *Note for Kubernetes users*: It must be a fully qualified domain name - // (FQDN), (e.g. "thrift-sample-server.meta-thrift.svc.cluster.local" ) - // instead of a short name (e.g. "thrift-sample-server"). - // *Note*: Only one host is supported now. If multiple hosts are specified, - // Only the first one takes effect. - repeated string hosts = 1; - // The names of gateways and sidecars that should apply these routes. The usage of - // this field is the same as istio.io/VirtualService - repeated string gateways = 2; - // An ordered list of route rules for MetaProtocol traffic. The route rules - // will be applied to service ports named "tcp-metaprotocol-${applicationProtocol}-*", - // (e.g. "tcp-metaprotocol-thrift-hello-server"). Order maters in the routes, - // The first rule matching an incoming request is used. - repeated MetaRoute routes = 3; - // Loacal rate limit policy. - LocalRateLimit local_rate_limit= 4; - // Global rate limit policy. - GlobalRateLimit global_rate_limit= 5; - // A list of namespaces to which this MetaRouter is exported. Exporting a - // MetaRouter allows it to be used by sidecars defined in other namespaces. - // This feature provides a mechanism for service owners and mesh administrators - // to control the visibility of MetaRouter across namespace boundaries. - // - // If no namespaces are specified then the MetaRouter is exported to all namespaces - // by default. - // - // The value "." is reserved and defines an export to the same namespace that - // the MetaRouter is declared in. Similarly the value "*" is reserved and - // defines an export to all namespaces. - repeated string export_to = 20; -} - -// Describes match conditions and actions for routing MetaProtocol. -message MetaRoute { - // The name assigned to the route for debugging purposes. - string name = 1; - - // Match conditions to be satisfied for the rule to be activated. - // All conditions inside a single match block have AND semantic. - MetaRouteMatch match = 2; - - // A Route rule can forward (default) traffic. The forwarding target - // can be one of several versions of a service (see glossary in - // beginning of document). Weights associated with the service version - // determine the proportion of traffic it receives. - repeated MetaRouteDestination route = 3; - - //MetaFaultInjection fault = 4; - - Destination mirror = 5; - - // Percentage of the traffic to be mirrored by the `mirror` field. - // If this field is absent, all the traffic (100%) will be mirrored. - // Max value is 100. - Percent mirror_percentage = 6; - - // Specifies a list of key-value pairs that should be mutated for each request. How to interpret the key-value pairs - // depends on the codec implementation - repeated KeyValue request_mutation = 19; - - // Specifies a list of key-value pairs that should be mutated for each response. How to interpret the key-value pairs - // depends on the codec implementation - repeated KeyValue response_mutation = 20; -} - -// KeyValue defines a Key /value pair. -message KeyValue { - // Key name. - string key = 1 [(google.api.field_behavior) = REQUIRED]; - - // alue. - string value = 2 [(google.api.field_behavior) = REQUIRED]; -} - -message MetaRouteMatch { - // If the value is empty and only the name of attribute is specified, presence of the attribute is checked. - map attributes = 1; -} - -// Describes how to match a given string in HTTP headers. Match is -// case-sensitive. -message StringMatch { - oneof match_type { - - // exact string match - string exact = 1; - - // prefix-based match - string prefix = 2; - - // RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax). - string regex = 3; - } -} - -message MetaRouteDestination { - // Destination uniquely identifies the instances of a service - // to which the request/connection should be forwarded to. - Destination destination = 1 [(google.api.field_behavior) = REQUIRED]; - - // The proportion of traffic to be forwarded to the service - // version. (0-100). Sum of weights across destinations SHOULD BE == 100. - // If there is only one destination in a rule, the weight value is assumed to - // be 100. - uint32 weight = 2; - - // reserved 3 to 6; - // reserved "remove_response_headers", "append_response_headers", "remove_request_headers", "append_request_headers"; - - // Header manipulation rules - // Headers headers = 7; -} - -message Destination { - // The name of a service from the service registry. Service - // names are looked up from the platform's service registry (e.g., - // Kubernetes services, Consul services, etc.) and from the hosts - // declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic - // forwarded to destinations that are not found in either of the two, will be dropped. - // - // *Note for Kubernetes users*: When short names are used (e.g. "reviews" - // instead of "reviews.default.svc.cluster.local"), Istio will interpret - // the short name based on the namespace of the rule, not the service. A - // rule in the "default" namespace containing a host "reviews will be - // interpreted as "reviews.default.svc.cluster.local", irrespective of - // the actual namespace associated with the reviews service. To avoid - // potential misconfiguration, it is recommended to always use fully - // qualified domain names over short names. - string host = 1 [(google.api.field_behavior) = REQUIRED]; - - // The name of a subset within the service. Applicable only to services - // within the mesh. The subset must be defined in a corresponding - // DestinationRule. - string subset = 2; - - // Specifies the port on the host that is being addressed. If a service - // exposes only a single port it is not required to explicitly select the - // port. - PortSelector port = 3; -} - -// PortSelector specifies the number of a port to be used for -// matching or selection for final routing. -message PortSelector { - // Valid port number - uint32 number = 1; - - reserved 2; - reserved "name"; -} - -// LocalRateLimit defines local rate limit policies for MetaProtocol proxy -message LocalRateLimit { - // Configures a token bucket which is used for rate limiting. - message TokenBucket { - // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket - // initially contains. The value must be greater than 0. - uint32 max_tokens = 1; - - // The number of tokens added to the bucket during each fill interval. The value must be greater than 0. - //If not specified, defaults to a single token. - google.protobuf.UInt32Value tokens_per_fill = 2; - - // The fill interval that tokens are added to the bucket. During each fill interval - // `tokens_per_fill` are added to the bucket. The bucket will never contain more than - // `max_tokens` tokens. - google.protobuf.Duration fill_interval = 3 [(google.api.field_behavior) = REQUIRED]; - } - - // Condition defines a rate limit policy for a more specific condition - message Condition { - // Match conditions to be satisfied for the rate limit rule to be activated. - // All conditions inside a single match block have AND semantic. - // If the match is not specified, then all the incoming requests will be considered matched. - MetaRouteMatch match = 1 [(google.api.field_behavior) = REQUIRED]; - - // The token bucket for this particular condition - TokenBucket token_bucket = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // The default token bucket configuration to use for rate limiting requests that are processed by - // this filter. - // Local rate limiter will first check the conditions, if a specific condition matches, then the token - // bucket within that condition will be applied to the incoming request. All the other requests - // that don't match the conditions will be rate limited by the default token bucket. - // If the default token bucket is not specified, then the requests that don't match the conditions - // will not be rate limited. - // At least one of token_bucket or conditions should have value. - LocalRateLimit.TokenBucket token_bucket = 1; - - // The more specific rate limit conditions, the first match will be used. - repeated LocalRateLimit.Condition conditions = 2; -} - -// GlobalRateLimit configures global rate limit service for MetaProtocol proxy -message GlobalRateLimit { - - // Descriptor defines the mapping between the property in the request and the descriptor key in the rate - // limit server configuration - // Normally the property is the same as the descriptor key, but adding a mapping layer allows more flexibility - message Descriptor { - // The property extracted from the requests - string property = 1 [(google.api.field_behavior) = REQUIRED]; - - // The corresponding descriptor key in the rate limit server configuration - string descriptor_key = 2 [(google.api.field_behavior) = REQUIRED]; - } - - // Match conditions to be satisfied for the rate limit rule to be activated. - // All conditions inside a single match block have AND semantic. - // If the match is not specified, then all the incoming requests will be considered matched. - MetaRouteMatch match = 1 [(google.api.field_behavior) = REQUIRED]; - - // The rate limit domain to use when calling the rate limit service. - string domain = 2 [(google.api.field_behavior) = REQUIRED]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration request_timeout = 3; - - // The filter's behavior in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - bool deny_on_fail = 4; - - // The cluster name of the external rate limit service provider. - string rate_limit_service = 5 [(google.api.field_behavior) = REQUIRED]; - - // Defines what properties in the requests should be sent to the rate limit service - repeated GlobalRateLimit.Descriptor descriptors = 6 [(google.api.field_behavior) = REQUIRED]; -} - -// Percent specifies a percentage in the range of [0.0, 100.0]. -message Percent { - double value = 1; -} \ No newline at end of file diff --git a/api/metaprotocol/v1alpha1/metaprotocol_metarouter_deepcopy.gen.go b/api/metaprotocol/v1alpha1/metaprotocol_metarouter_deepcopy.gen.go deleted file mode 100644 index 3d8dd86e..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_metarouter_deepcopy.gen.go +++ /dev/null @@ -1,369 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto - -// $schema: metaprotocol.aeraki.io.v1alpha1.MetaRouter -// $title: MetaRouter -// $description: MetaRouter defines route policies for MetaProtocol proxy. -// -// MetaRouter defines route policies for MetaProtocol proxy. -// *Note*: Only one MetaRouter should be defined for a MetaProtocol service. -// If more than one MetaRouters are found for a service, Aeraki will choose -// a random one to apply to that service. -// -// *Note *: MetaRouter is a mesh-scoped resource, so no matter which namespace -// the MetaRouter is in, it will take effect on the services specified in the hosts. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: attribute-based-route -// namespace: istio-system -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// gateways: -// - istio-system/ingress-gateway -// routes: -// - name: v1 -// match: -// attributes: -// interface: -// exact: org.apache.dubbo.samples.basic.api.DemoService -// method: -// exact: sayHello -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// -// ``` -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: traffic-splitting -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// routes: -// - name: traffic-spilt -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// weight: 20 -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v2 -// weight: 80 - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using MetaRouter within kubernetes types, where deepcopy-gen is used. -func (in *MetaRouter) DeepCopyInto(out *MetaRouter) { - p := proto.Clone(in).(*MetaRouter) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouter. Required by controller-gen. -func (in *MetaRouter) DeepCopy() *MetaRouter { - if in == nil { - return nil - } - out := new(MetaRouter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouter. Required by controller-gen. -func (in *MetaRouter) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using MetaRoute within kubernetes types, where deepcopy-gen is used. -func (in *MetaRoute) DeepCopyInto(out *MetaRoute) { - p := proto.Clone(in).(*MetaRoute) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaRoute. Required by controller-gen. -func (in *MetaRoute) DeepCopy() *MetaRoute { - if in == nil { - return nil - } - out := new(MetaRoute) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new MetaRoute. Required by controller-gen. -func (in *MetaRoute) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using KeyValue within kubernetes types, where deepcopy-gen is used. -func (in *KeyValue) DeepCopyInto(out *KeyValue) { - p := proto.Clone(in).(*KeyValue) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyValue. Required by controller-gen. -func (in *KeyValue) DeepCopy() *KeyValue { - if in == nil { - return nil - } - out := new(KeyValue) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new KeyValue. Required by controller-gen. -func (in *KeyValue) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using MetaRouteMatch within kubernetes types, where deepcopy-gen is used. -func (in *MetaRouteMatch) DeepCopyInto(out *MetaRouteMatch) { - p := proto.Clone(in).(*MetaRouteMatch) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouteMatch. Required by controller-gen. -func (in *MetaRouteMatch) DeepCopy() *MetaRouteMatch { - if in == nil { - return nil - } - out := new(MetaRouteMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouteMatch. Required by controller-gen. -func (in *MetaRouteMatch) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using StringMatch within kubernetes types, where deepcopy-gen is used. -func (in *StringMatch) DeepCopyInto(out *StringMatch) { - p := proto.Clone(in).(*StringMatch) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringMatch. Required by controller-gen. -func (in *StringMatch) DeepCopy() *StringMatch { - if in == nil { - return nil - } - out := new(StringMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new StringMatch. Required by controller-gen. -func (in *StringMatch) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using MetaRouteDestination within kubernetes types, where deepcopy-gen is used. -func (in *MetaRouteDestination) DeepCopyInto(out *MetaRouteDestination) { - p := proto.Clone(in).(*MetaRouteDestination) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouteDestination. Required by controller-gen. -func (in *MetaRouteDestination) DeepCopy() *MetaRouteDestination { - if in == nil { - return nil - } - out := new(MetaRouteDestination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouteDestination. Required by controller-gen. -func (in *MetaRouteDestination) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Destination within kubernetes types, where deepcopy-gen is used. -func (in *Destination) DeepCopyInto(out *Destination) { - p := proto.Clone(in).(*Destination) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Destination. Required by controller-gen. -func (in *Destination) DeepCopy() *Destination { - if in == nil { - return nil - } - out := new(Destination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Destination. Required by controller-gen. -func (in *Destination) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using PortSelector within kubernetes types, where deepcopy-gen is used. -func (in *PortSelector) DeepCopyInto(out *PortSelector) { - p := proto.Clone(in).(*PortSelector) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortSelector. Required by controller-gen. -func (in *PortSelector) DeepCopy() *PortSelector { - if in == nil { - return nil - } - out := new(PortSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PortSelector. Required by controller-gen. -func (in *PortSelector) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using LocalRateLimit within kubernetes types, where deepcopy-gen is used. -func (in *LocalRateLimit) DeepCopyInto(out *LocalRateLimit) { - p := proto.Clone(in).(*LocalRateLimit) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalRateLimit. Required by controller-gen. -func (in *LocalRateLimit) DeepCopy() *LocalRateLimit { - if in == nil { - return nil - } - out := new(LocalRateLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LocalRateLimit. Required by controller-gen. -func (in *LocalRateLimit) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using LocalRateLimit_TokenBucket within kubernetes types, where deepcopy-gen is used. -func (in *LocalRateLimit_TokenBucket) DeepCopyInto(out *LocalRateLimit_TokenBucket) { - p := proto.Clone(in).(*LocalRateLimit_TokenBucket) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalRateLimit_TokenBucket. Required by controller-gen. -func (in *LocalRateLimit_TokenBucket) DeepCopy() *LocalRateLimit_TokenBucket { - if in == nil { - return nil - } - out := new(LocalRateLimit_TokenBucket) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LocalRateLimit_TokenBucket. Required by controller-gen. -func (in *LocalRateLimit_TokenBucket) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using LocalRateLimit_Condition within kubernetes types, where deepcopy-gen is used. -func (in *LocalRateLimit_Condition) DeepCopyInto(out *LocalRateLimit_Condition) { - p := proto.Clone(in).(*LocalRateLimit_Condition) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalRateLimit_Condition. Required by controller-gen. -func (in *LocalRateLimit_Condition) DeepCopy() *LocalRateLimit_Condition { - if in == nil { - return nil - } - out := new(LocalRateLimit_Condition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LocalRateLimit_Condition. Required by controller-gen. -func (in *LocalRateLimit_Condition) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using GlobalRateLimit within kubernetes types, where deepcopy-gen is used. -func (in *GlobalRateLimit) DeepCopyInto(out *GlobalRateLimit) { - p := proto.Clone(in).(*GlobalRateLimit) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit. Required by controller-gen. -func (in *GlobalRateLimit) DeepCopy() *GlobalRateLimit { - if in == nil { - return nil - } - out := new(GlobalRateLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit. Required by controller-gen. -func (in *GlobalRateLimit) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using GlobalRateLimit_Descriptor within kubernetes types, where deepcopy-gen is used. -func (in *GlobalRateLimit_Descriptor) DeepCopyInto(out *GlobalRateLimit_Descriptor) { - p := proto.Clone(in).(*GlobalRateLimit_Descriptor) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit_Descriptor. Required by controller-gen. -func (in *GlobalRateLimit_Descriptor) DeepCopy() *GlobalRateLimit_Descriptor { - if in == nil { - return nil - } - out := new(GlobalRateLimit_Descriptor) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit_Descriptor. Required by controller-gen. -func (in *GlobalRateLimit_Descriptor) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Percent within kubernetes types, where deepcopy-gen is used. -func (in *Percent) DeepCopyInto(out *Percent) { - p := proto.Clone(in).(*Percent) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Percent. Required by controller-gen. -func (in *Percent) DeepCopy() *Percent { - if in == nil { - return nil - } - out := new(Percent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Percent. Required by controller-gen. -func (in *Percent) DeepCopyInterface() interface{} { - return in.DeepCopy() -} diff --git a/api/metaprotocol/v1alpha1/metaprotocol_metarouter_json.gen.go b/api/metaprotocol/v1alpha1/metaprotocol_metarouter_json.gen.go deleted file mode 100644 index 0a10ffb3..00000000 --- a/api/metaprotocol/v1alpha1/metaprotocol_metarouter_json.gen.go +++ /dev/null @@ -1,236 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/metaprotocol/v1alpha1/metaprotocol_metarouter.proto - -// $schema: metaprotocol.aeraki.io.v1alpha1.MetaRouter -// $title: MetaRouter -// $description: MetaRouter defines route policies for MetaProtocol proxy. -// -// MetaRouter defines route policies for MetaProtocol proxy. -// *Note*: Only one MetaRouter should be defined for a MetaProtocol service. -// If more than one MetaRouters are found for a service, Aeraki will choose -// a random one to apply to that service. -// -// *Note *: MetaRouter is a mesh-scoped resource, so no matter which namespace -// the MetaRouter is in, it will take effect on the services specified in the hosts. -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: attribute-based-route -// namespace: istio-system -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// gateways: -// - istio-system/ingress-gateway -// routes: -// - name: v1 -// match: -// attributes: -// interface: -// exact: org.apache.dubbo.samples.basic.api.DemoService -// method: -// exact: sayHello -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// -// ``` -// -// ```yaml -// apiVersion: metaprotocol.aeraki.io/v1alpha1 -// kind: MetaRouter -// metadata: -// name: traffic-splitting -// spec: -// hosts: -// - org.apache.dubbo.samples.basic.api.demoservice -// routes: -// - name: traffic-spilt -// route: -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v1 -// weight: 20 -// - destination: -// host: org.apache.dubbo.samples.basic.api.demoservice -// subset: v2 -// weight: 80 - -package v1alpha1 - -import ( - bytes "bytes" - fmt "fmt" - github.com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for MetaRouter -func (this *MetaRouter) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for MetaRouter -func (this *MetaRouter) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for MetaRoute -func (this *MetaRoute) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for MetaRoute -func (this *MetaRoute) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for KeyValue -func (this *KeyValue) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for KeyValue -func (this *KeyValue) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for MetaRouteMatch -func (this *MetaRouteMatch) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for MetaRouteMatch -func (this *MetaRouteMatch) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for StringMatch -func (this *StringMatch) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for StringMatch -func (this *StringMatch) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for MetaRouteDestination -func (this *MetaRouteDestination) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for MetaRouteDestination -func (this *MetaRouteDestination) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Destination -func (this *Destination) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Destination -func (this *Destination) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for PortSelector -func (this *PortSelector) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for PortSelector -func (this *PortSelector) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LocalRateLimit -func (this *LocalRateLimit) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LocalRateLimit -func (this *LocalRateLimit) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LocalRateLimit_TokenBucket -func (this *LocalRateLimit_TokenBucket) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LocalRateLimit_TokenBucket -func (this *LocalRateLimit_TokenBucket) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for LocalRateLimit_Condition -func (this *LocalRateLimit_Condition) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for LocalRateLimit_Condition -func (this *LocalRateLimit_Condition) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for GlobalRateLimit -func (this *GlobalRateLimit) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for GlobalRateLimit -func (this *GlobalRateLimit) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for GlobalRateLimit_Descriptor -func (this *GlobalRateLimit_Descriptor) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for GlobalRateLimit_Descriptor -func (this *GlobalRateLimit_Descriptor) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Percent -func (this *Percent) MarshalJSON() ([]byte, error) { - str, err := MetaprotocolMetarouterMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Percent -func (this *Percent) UnmarshalJSON(b []byte) error { - return MetaprotocolMetarouterUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - MetaprotocolMetarouterMarshaler = &github.com_gogo_protobuf_jsonpb.Marshaler{} - MetaprotocolMetarouterUnmarshaler = &github.com_gogo_protobuf_jsonpb.Unmarshaler{AllowUnknownFields: true} -) diff --git a/api/redis/v1alpha1/redis.aeraki.io.v1alpha1.pb.html b/api/redis/v1alpha1/redis.aeraki.io.v1alpha1.pb.html deleted file mode 100644 index 4e68e62a..00000000 --- a/api/redis/v1alpha1/redis.aeraki.io.v1alpha1.pb.html +++ /dev/null @@ -1,1024 +0,0 @@ ---- -title: Redis Destination -description: Configuration affecting auth , discovery_endpoints etc. -layout: protoc-gen-docs -generator: protoc-gen-docs -schema: redis.aeraki.io.v1alpha1.RedisDestination -schema: redis.aeraki.io.v1alpha1.RedisService -number_of_entries: 25 ---- -

RedisDestination defines policies that apply to redis traffic intended for a redis service

- -

RedisDestination

-
-

RedisDestination defines policies that apply to redis traffic intended for a redis service

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
hoststring - -Yes -
trafficPolicyTrafficPolicy - -No -
-
-

ConnectionPoolSettings

-
-

Connection pool settings for an upstream host. The settings apply to -each individual host in the upstream service.

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
tcpTCPSettings - -No -
redisRedisSettings - -No -
-
-

Auth

-
-

Auth provide a way to get redis auth token.

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
secretSecretReference (oneof) -

Secret use the k8s secret in current namespace.

- -
-No -
plainPlainAuth (oneof) -

redis password.

- -
-No -
-
-

SecretReference

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
namestring - -No -
passwordFieldstring - -No -
usernameFieldstring - -No -
-
-

PlainAuth

-
- - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
passwordstring - -Yes -
usernamestring - -No -
-
-

RedisSettings

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
modeMode - -No -
authAuth - -No -
discoveryEndpointsstring[] - -No -
-
-

TrafficPolicy

-
- - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
connectionPoolConnectionPoolSettings - -No -
-
-

RedisService

-
-

RedisService provide a way to config redis service in service mesh.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
hoststring[] - -Yes -
settingsSettings - -No -
redisRoute[] - -Yes -
faultsFault[] -

List of faults to inject. Faults currently come in two flavors: -- Delay, which delays a request. -- Error, which responds to a request with an error. Errors can also have delays attached.

- -
-No -
-
-

Percent

-
-

Percent specifies a percentage in the range of [0.0, 100.0].

- - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
valuedouble - -No -
-
-

Fault

-
-

Fault defines redis faults used for fault injection.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
typeType -

Fault type.

- -
-No -
percentagePercent -

Percentage of requests fault applies to.

- -
-No -
delayDuration -

Delay for all faults. If not set, defaults to zero

- -
-No -
commandsstring[] -

Commands fault is restricted to, if any. If not set, fault applies to all commands -other than auth and ping (due to special handling of those commands in Envoy).

- -
-No -
-
-

RedisService.Settings

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
caseInsensitivebool -

Indicates that prefix matching should be case insensitive.

- -
-No -
opTimeoutDuration -

Per-operation timeout in milliseconds. The timer starts when the first -command of a pipeline is written to the backend connection. Each response received from Redis -resets the timer since it signifies that the next command is being processed by the backend. -The only exception to this behavior is when a connection to a backend is not yet established. -In that case, the connect timeout on the cluster will govern the timeout until the connection -is ready.

- -
-No -
enableCommandStatsbool -

Enable per-command statistics per upstream cluster, in addition to the filter level aggregate -count

- -
-No -
maxBufferSizeBeforeFlushuint32 -

Maximum size of encoded request buffer before flush is triggered and encoded requests -are sent upstream. If this is unset, the buffer flushes whenever it receives data -and performs no batching. -This feature makes it possible for multiple clients to send requests to Envoy and have -them batched- for example if one is running several worker processes, each with its own -Redis connection. There is no benefit to using this with a single downstream process. -Recommended size (if enabled) is 1024 bytes.

- -
-No -
bufferFlushTimeoutDuration -

The encoded request buffer is flushed N milliseconds after the first request has been -encoded, unless the buffer size has already exceeded max_buffer_size_before_flush. -If max_buffer_size_before_flush is not set, this flush timer is not used. Otherwise, -the timer should be set according to the number of clients, overall request rate and -desired maximum latency for a single command. For example, if there are many requests -being batched together at a high rate, the buffer will likely be filled before the timer -fires. Alternatively, if the request rate is lower the buffer will not be filled as often -before the timer fires. -If max_buffer_size_before_flush is set, but buffer_flush_timeout is not, the latter -defaults to 3ms.

- -
-No -
maxUpstreamUnknownConnectionsUInt32Value -

max_upstream_unknown_connections controls how many upstream connections to unknown hosts -can be created at any given time by any given worker thread (see enable_redirection for -more details). If the host is unknown and a connection cannot be created due to enforcing -this limit, then redirection will fail and the original redirection error will be passed -downstream unchanged. This limit defaults to 100.

- -
-No -
enableHashtaggingbool -

Use hash tagging on every redis key to guarantee that keys with the same hash tag will be -forwarded to the same upstream. The hash key used for determining the upstream in a -consistent hash ring configuration will be computed from the hash tagged key instead of the -whole key. The algorithm used to compute the hash tag is identical to the redis-cluster -implementation <https://redis.io/topics/cluster-spec#keys-hash-tags>_.

- -

Examples:

- -
    -
  • ’{user1000}.following’ and ‘{user1000}.followers’ will be sent to the same upstream
  • -
  • ’{user1000}.following’ and ‘{user1001}.following’ might be sent to the same upstream
  • -
- -
-No -
enableRedirectionbool -

Accept moved and ask redirection -<https://redis.io/topics/cluster-spec#redirection-and-resharding>_ errors from upstream -redis servers, and retry commands to the specified target server. The target server does not -need to be known to the cluster manager. If the command cannot be redirected, then the -original error is passed downstream unchanged. By default, this support is not enabled.

- -
-No -
readPolicyReadPolicy -

Read policy. The default is to read from the primary.

- -
-No -
authAuth -

Downstream auth.

- -
-No -
-
-

RedisService.KeyMatch

-
-

KeyMatch match the redis key prefix;

- - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
prefixstring -

String prefix that must match the beginning of the keys. Envoy will always favor the -longest match.

- -
-No -
removePrefixbool -

Indicates if the prefix needs to be removed from the key when forwarded.

- -
-No -
-
-

RedisService.RouteMatch

-
- - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
keyKeyMatch (oneof) - -No -
-
-

RedisService.Destination

-
- - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
hoststring - -Yes -
portuint32 - -No -
-
-

RedisService.Mirror

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
routeDestination - -No -
percentagePercent - -No -
excludeReadCommandsbool - -No -
-
-

RedisService.Route

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
matchRouteMatch - -No -
routeDestination - -No -
mirrorMirror[] - -No -
-
-

google.protobuf.UInt32Value

-
-

Wrapper message for uint32.

- -

The JSON representation for UInt32Value is JSON number.

- - - - - - - - - - - - - - - - - - -
FieldTypeDescriptionRequired
valueuint32 -

The uint32 value.

- -
-No -
-
-

RedisSettings.Mode

-
- - - - - - - - - - - - - - - - - -
NameDescription
PROXY -
CLUSTER -
-
-

RedisSettings.Mode

-
- - - - - - - - - - - - - - - - - -
NameDescription
PROXY -
CLUSTER -
-
-

RedisService.ReadPolicy

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
MASTER -
PREFER_MASTER -
REPLICA -
PREFER_REPLICA -
ANY -
-
-

Fault.Type

-
- - - - - - - - - - - - - - - - - -
NameDescription
DELAY -

Delays requests. This is the base fault; other faults can have delays added.

- -
ERROR -

Returns errors on requests.

- -
-
-

Fault.Type

-
- - - - - - - - - - - - - - - - - -
NameDescription
DELAY -

Delays requests. This is the base fault; other faults can have delays added.

- -
ERROR -

Returns errors on requests.

- -
-
-

Fault.Type

-
- - - - - - - - - - - - - - - - - -
NameDescription
DELAY -

Delays requests. This is the base fault; other faults can have delays added.

- -
ERROR -

Returns errors on requests.

- -
-
-

RedisService.ReadPolicy

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
MASTER -
PREFER_MASTER -
REPLICA -
PREFER_REPLICA -
ANY -
-
-

RedisService.ReadPolicy

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
MASTER -
PREFER_MASTER -
REPLICA -
PREFER_REPLICA -
ANY -
-
diff --git a/api/redis/v1alpha1/redisdestination.gen.json b/api/redis/v1alpha1/redisdestination.gen.json deleted file mode 100644 index 5b2c1234..00000000 --- a/api/redis/v1alpha1/redisdestination.gen.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Configuration affecting auth , discovery_endpoints etc.", - "version": "v1alpha1" - }, - "components": { - "schemas": { - "redis.aeraki.io.v1alpha1.TrafficPolicy": { - "type": "object", - "properties": { - "connectionPool": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.ConnectionPoolSettings" - } - } - }, - "redis.aeraki.io.v1alpha1.ConnectionPoolSettings": { - "description": "Connection pool settings for an upstream host. The settings apply to each individual host in the upstream service.", - "type": "object", - "properties": { - "tcp": { - "$ref": "#/components/schemas/istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings" - }, - "redis": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisSettings" - } - } - }, - "redis.aeraki.io.v1alpha1.RedisDestination": { - "description": "RedisDestination defines policies that apply to redis traffic intended for a redis service", - "type": "object", - "properties": { - "host": { - "type": "string", - "format": "string" - }, - "trafficPolicy": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.TrafficPolicy" - } - } - }, - "redis.aeraki.io.v1alpha1.RedisSettings": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisSettings.Mode" - }, - "auth": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.Auth" - }, - "discoveryEndpoints": { - "type": "array", - "items": { - "type": "string", - "format": "string" - } - } - } - }, - "redis.aeraki.io.v1alpha1.Auth": { - "description": "Auth provide a way to get redis auth token.", - "type": "object", - "oneOf": [ - { - "not": { - "anyOf": [ - { - "required": [ - "secret" - ], - "properties": { - "secret": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.SecretReference" - } - } - }, - { - "required": [ - "plain" - ], - "properties": { - "plain": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.PlainAuth" - } - } - } - ] - } - }, - { - "required": [ - "secret" - ], - "properties": { - "secret": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.SecretReference" - } - } - }, - { - "required": [ - "plain" - ], - "properties": { - "plain": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.PlainAuth" - } - } - } - ] - }, - "redis.aeraki.io.v1alpha1.SecretReference": { - "type": "object", - "properties": { - "name": { - "type": "string", - "format": "string" - }, - "passwordField": { - "type": "string", - "format": "string" - }, - "usernameField": { - "type": "string", - "format": "string" - } - } - }, - "redis.aeraki.io.v1alpha1.PlainAuth": { - "type": "object", - "properties": { - "password": { - "type": "string", - "format": "string" - }, - "username": { - "type": "string", - "format": "string" - } - } - }, - "redis.aeraki.io.v1alpha1.RedisSettings.Mode": { - "type": "string", - "enum": [ - "PROXY", - "CLUSTER" - ] - }, - "istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings": { - "type": "object", - "properties": { - "maxConnections": { - "description": "Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.", - "type": "integer", - "format": "int32" - }, - "connectTimeout": { - "description": "TCP connection timeout. format: 1h/1m/1s/1ms. MUST BE \u003e=1ms. Default is 10s.", - "type": "string" - }, - "tcpKeepalive": { - "$ref": "#/components/schemas/istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive" - } - } - }, - "istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive": { - "description": "If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.", - "type": "object", - "properties": { - "time": { - "description": "The time duration a connection needs to be idle before keep-alive probes start being sent. Default is to use the OS level configuration (unless overridden, Linux defaults to 7200s (ie 2 hours.)", - "type": "string" - }, - "probes": { - "description": "Maximum number of keepalive probes to send without response before deciding the connection is dead. Default is to use the OS level configuration (unless overridden, Linux defaults to 9.)", - "type": "integer" - }, - "interval": { - "description": "The time duration between keep-alive probes. Default is to use the OS level configuration (unless overridden, Linux defaults to 75s.)", - "type": "string" - } - } - } - } - } -} \ No newline at end of file diff --git a/api/redis/v1alpha1/redisdestination.pb.go b/api/redis/v1alpha1/redisdestination.pb.go deleted file mode 100644 index 99ec7376..00000000 --- a/api/redis/v1alpha1/redisdestination.pb.go +++ /dev/null @@ -1,2057 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/redis/v1alpha1/redisdestination.proto - -// RedisDestination defines policies that apply to redis traffic intended for a redis service - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - io "io" - v1alpha3 "istio.io/api/networking/v1alpha3" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type RedisSettings_Mode int32 - -const ( - RedisSettings_PROXY RedisSettings_Mode = 0 - RedisSettings_CLUSTER RedisSettings_Mode = 1 -) - -var RedisSettings_Mode_name = map[int32]string{ - 0: "PROXY", - 1: "CLUSTER", -} - -var RedisSettings_Mode_value = map[string]int32{ - "PROXY": 0, - "CLUSTER": 1, -} - -func (x RedisSettings_Mode) String() string { - return proto.EnumName(RedisSettings_Mode_name, int32(x)) -} - -func (RedisSettings_Mode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{5, 0} -} - -// RedisDestination defines policies that apply to redis traffic intended for a redis service -// -// -// -// -type RedisDestination struct { - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - TrafficPolicy *TrafficPolicy `protobuf:"bytes,2,opt,name=traffic_policy,json=trafficPolicy,proto3" json:"traffic_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisDestination) Reset() { *m = RedisDestination{} } -func (m *RedisDestination) String() string { return proto.CompactTextString(m) } -func (*RedisDestination) ProtoMessage() {} -func (*RedisDestination) Descriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{0} -} -func (m *RedisDestination) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisDestination.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisDestination) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisDestination.Merge(m, src) -} -func (m *RedisDestination) XXX_Size() int { - return m.Size() -} -func (m *RedisDestination) XXX_DiscardUnknown() { - xxx_messageInfo_RedisDestination.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisDestination proto.InternalMessageInfo - -func (m *RedisDestination) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *RedisDestination) GetTrafficPolicy() *TrafficPolicy { - if m != nil { - return m.TrafficPolicy - } - return nil -} - -// Connection pool settings for an upstream host. The settings apply to -// each individual host in the upstream service. -type ConnectionPoolSettings struct { - Tcp *v1alpha3.ConnectionPoolSettings_TCPSettings `protobuf:"bytes,1,opt,name=tcp,proto3" json:"tcp,omitempty"` - Redis *RedisSettings `protobuf:"bytes,2,opt,name=redis,proto3" json:"redis,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ConnectionPoolSettings) Reset() { *m = ConnectionPoolSettings{} } -func (m *ConnectionPoolSettings) String() string { return proto.CompactTextString(m) } -func (*ConnectionPoolSettings) ProtoMessage() {} -func (*ConnectionPoolSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{1} -} -func (m *ConnectionPoolSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConnectionPoolSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConnectionPoolSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConnectionPoolSettings) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConnectionPoolSettings.Merge(m, src) -} -func (m *ConnectionPoolSettings) XXX_Size() int { - return m.Size() -} -func (m *ConnectionPoolSettings) XXX_DiscardUnknown() { - xxx_messageInfo_ConnectionPoolSettings.DiscardUnknown(m) -} - -var xxx_messageInfo_ConnectionPoolSettings proto.InternalMessageInfo - -func (m *ConnectionPoolSettings) GetTcp() *v1alpha3.ConnectionPoolSettings_TCPSettings { - if m != nil { - return m.Tcp - } - return nil -} - -func (m *ConnectionPoolSettings) GetRedis() *RedisSettings { - if m != nil { - return m.Redis - } - return nil -} - -// Auth provide a way to get redis auth token. -type Auth struct { - // Types that are valid to be assigned to Auth: - // *Auth_Secret - // *Auth_Plain - Auth isAuth_Auth `protobuf_oneof:"auth"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Auth) Reset() { *m = Auth{} } -func (m *Auth) String() string { return proto.CompactTextString(m) } -func (*Auth) ProtoMessage() {} -func (*Auth) Descriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{2} -} -func (m *Auth) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Auth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Auth.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Auth) XXX_Merge(src proto.Message) { - xxx_messageInfo_Auth.Merge(m, src) -} -func (m *Auth) XXX_Size() int { - return m.Size() -} -func (m *Auth) XXX_DiscardUnknown() { - xxx_messageInfo_Auth.DiscardUnknown(m) -} - -var xxx_messageInfo_Auth proto.InternalMessageInfo - -type isAuth_Auth interface { - isAuth_Auth() - MarshalTo([]byte) (int, error) - Size() int -} - -type Auth_Secret struct { - Secret *SecretReference `protobuf:"bytes,1,opt,name=secret,proto3,oneof" json:"secret,omitempty"` -} -type Auth_Plain struct { - Plain *PlainAuth `protobuf:"bytes,2,opt,name=plain,proto3,oneof" json:"plain,omitempty"` -} - -func (*Auth_Secret) isAuth_Auth() {} -func (*Auth_Plain) isAuth_Auth() {} - -func (m *Auth) GetAuth() isAuth_Auth { - if m != nil { - return m.Auth - } - return nil -} - -func (m *Auth) GetSecret() *SecretReference { - if x, ok := m.GetAuth().(*Auth_Secret); ok { - return x.Secret - } - return nil -} - -func (m *Auth) GetPlain() *PlainAuth { - if x, ok := m.GetAuth().(*Auth_Plain); ok { - return x.Plain - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Auth) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Auth_Secret)(nil), - (*Auth_Plain)(nil), - } -} - -type SecretReference struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - PasswordField string `protobuf:"bytes,2,opt,name=password_field,json=passwordField,proto3" json:"password_field,omitempty"` - UsernameField string `protobuf:"bytes,3,opt,name=username_field,json=usernameField,proto3" json:"username_field,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SecretReference) Reset() { *m = SecretReference{} } -func (m *SecretReference) String() string { return proto.CompactTextString(m) } -func (*SecretReference) ProtoMessage() {} -func (*SecretReference) Descriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{3} -} -func (m *SecretReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SecretReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SecretReference.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SecretReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_SecretReference.Merge(m, src) -} -func (m *SecretReference) XXX_Size() int { - return m.Size() -} -func (m *SecretReference) XXX_DiscardUnknown() { - xxx_messageInfo_SecretReference.DiscardUnknown(m) -} - -var xxx_messageInfo_SecretReference proto.InternalMessageInfo - -func (m *SecretReference) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SecretReference) GetPasswordField() string { - if m != nil { - return m.PasswordField - } - return "" -} - -func (m *SecretReference) GetUsernameField() string { - if m != nil { - return m.UsernameField - } - return "" -} - -type PlainAuth struct { - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PlainAuth) Reset() { *m = PlainAuth{} } -func (m *PlainAuth) String() string { return proto.CompactTextString(m) } -func (*PlainAuth) ProtoMessage() {} -func (*PlainAuth) Descriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{4} -} -func (m *PlainAuth) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PlainAuth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PlainAuth.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PlainAuth) XXX_Merge(src proto.Message) { - xxx_messageInfo_PlainAuth.Merge(m, src) -} -func (m *PlainAuth) XXX_Size() int { - return m.Size() -} -func (m *PlainAuth) XXX_DiscardUnknown() { - xxx_messageInfo_PlainAuth.DiscardUnknown(m) -} - -var xxx_messageInfo_PlainAuth proto.InternalMessageInfo - -func (m *PlainAuth) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -func (m *PlainAuth) GetUsername() string { - if m != nil { - return m.Username - } - return "" -} - -type RedisSettings struct { - Mode RedisSettings_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=redis.aeraki.io.v1alpha1.RedisSettings_Mode" json:"mode,omitempty"` - Auth *Auth `protobuf:"bytes,2,opt,name=auth,proto3" json:"auth,omitempty"` - DiscoveryEndpoints []string `protobuf:"bytes,3,rep,name=discovery_endpoints,json=discoveryEndpoints,proto3" json:"discovery_endpoints,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisSettings) Reset() { *m = RedisSettings{} } -func (m *RedisSettings) String() string { return proto.CompactTextString(m) } -func (*RedisSettings) ProtoMessage() {} -func (*RedisSettings) Descriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{5} -} -func (m *RedisSettings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisSettings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisSettings) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisSettings.Merge(m, src) -} -func (m *RedisSettings) XXX_Size() int { - return m.Size() -} -func (m *RedisSettings) XXX_DiscardUnknown() { - xxx_messageInfo_RedisSettings.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisSettings proto.InternalMessageInfo - -func (m *RedisSettings) GetMode() RedisSettings_Mode { - if m != nil { - return m.Mode - } - return RedisSettings_PROXY -} - -func (m *RedisSettings) GetAuth() *Auth { - if m != nil { - return m.Auth - } - return nil -} - -func (m *RedisSettings) GetDiscoveryEndpoints() []string { - if m != nil { - return m.DiscoveryEndpoints - } - return nil -} - -type TrafficPolicy struct { - ConnectionPool *ConnectionPoolSettings `protobuf:"bytes,1,opt,name=connection_pool,json=connectionPool,proto3" json:"connection_pool,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TrafficPolicy) Reset() { *m = TrafficPolicy{} } -func (m *TrafficPolicy) String() string { return proto.CompactTextString(m) } -func (*TrafficPolicy) ProtoMessage() {} -func (*TrafficPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_237e307d114723c1, []int{6} -} -func (m *TrafficPolicy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TrafficPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TrafficPolicy.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TrafficPolicy) XXX_Merge(src proto.Message) { - xxx_messageInfo_TrafficPolicy.Merge(m, src) -} -func (m *TrafficPolicy) XXX_Size() int { - return m.Size() -} -func (m *TrafficPolicy) XXX_DiscardUnknown() { - xxx_messageInfo_TrafficPolicy.DiscardUnknown(m) -} - -var xxx_messageInfo_TrafficPolicy proto.InternalMessageInfo - -func (m *TrafficPolicy) GetConnectionPool() *ConnectionPoolSettings { - if m != nil { - return m.ConnectionPool - } - return nil -} - -func init() { - proto.RegisterEnum("redis.aeraki.io.v1alpha1.RedisSettings_Mode", RedisSettings_Mode_name, RedisSettings_Mode_value) - proto.RegisterType((*RedisDestination)(nil), "redis.aeraki.io.v1alpha1.RedisDestination") - proto.RegisterType((*ConnectionPoolSettings)(nil), "redis.aeraki.io.v1alpha1.ConnectionPoolSettings") - proto.RegisterType((*Auth)(nil), "redis.aeraki.io.v1alpha1.Auth") - proto.RegisterType((*SecretReference)(nil), "redis.aeraki.io.v1alpha1.SecretReference") - proto.RegisterType((*PlainAuth)(nil), "redis.aeraki.io.v1alpha1.PlainAuth") - proto.RegisterType((*RedisSettings)(nil), "redis.aeraki.io.v1alpha1.RedisSettings") - proto.RegisterType((*TrafficPolicy)(nil), "redis.aeraki.io.v1alpha1.TrafficPolicy") -} - -func init() { - proto.RegisterFile("api/redis/v1alpha1/redisdestination.proto", fileDescriptor_237e307d114723c1) -} - -var fileDescriptor_237e307d114723c1 = []byte{ - // 625 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdd, 0x4e, 0x13, 0x41, - 0x14, 0x66, 0x69, 0x41, 0x7a, 0x48, 0x0b, 0x19, 0x13, 0x6d, 0x88, 0x29, 0x64, 0x8d, 0x11, 0x12, - 0x9d, 0x85, 0x72, 0xe1, 0x85, 0xc1, 0x08, 0x15, 0xc3, 0x85, 0x4a, 0x33, 0x60, 0x22, 0xde, 0x34, - 0xd3, 0xdd, 0x69, 0x77, 0x64, 0x3b, 0xb3, 0x99, 0x99, 0x85, 0x10, 0x5f, 0xc2, 0xc7, 0xf0, 0x51, - 0xbc, 0xf4, 0xca, 0x6b, 0xc2, 0x93, 0x98, 0x9d, 0xd9, 0x2d, 0xe5, 0xa7, 0xd1, 0xbb, 0x99, 0x73, - 0xbe, 0xef, 0x7c, 0xdf, 0x39, 0x73, 0x32, 0xb0, 0x41, 0x53, 0x1e, 0x28, 0x16, 0x71, 0x1d, 0x9c, - 0x6d, 0xd1, 0x24, 0x8d, 0xe9, 0x96, 0xbb, 0x46, 0x4c, 0x1b, 0x2e, 0xa8, 0xe1, 0x52, 0xe0, 0x54, - 0x49, 0x23, 0x51, 0xd3, 0xc6, 0x31, 0x65, 0x8a, 0x9e, 0x72, 0xcc, 0x25, 0x2e, 0x09, 0x2b, 0x4f, - 0x86, 0x52, 0x0e, 0x13, 0x16, 0x58, 0x5c, 0x3f, 0x1b, 0x04, 0xda, 0xa8, 0x2c, 0x34, 0x8e, 0xb7, - 0xd2, 0xba, 0x9d, 0x8d, 0x32, 0x35, 0x51, 0xf7, 0x6e, 0xfe, 0x5c, 0xd1, 0x34, 0x65, 0x4a, 0x17, - 0xf9, 0xd5, 0x22, 0x9f, 0x3b, 0x1d, 0x70, 0x96, 0x44, 0xbd, 0x3e, 0x8b, 0xe9, 0x19, 0x97, 0xaa, - 0x00, 0xbc, 0xe2, 0xda, 0x70, 0x89, 0xb9, 0xb4, 0x10, 0xc1, 0xcc, 0xb9, 0x54, 0xa7, 0x5c, 0x0c, - 0xcb, 0x8e, 0xb6, 0x83, 0x89, 0x66, 0x7a, 0x2a, 0x4b, 0x98, 0x23, 0xfa, 0xdf, 0x61, 0x99, 0xe4, - 0x3d, 0xbd, 0xbb, 0x4e, 0xa3, 0xc7, 0x50, 0x8d, 0xa5, 0x36, 0x4d, 0x6f, 0xcd, 0x5b, 0xaf, 0xed, - 0x55, 0x2e, 0x77, 0x67, 0x89, 0x0d, 0xa0, 0x4f, 0xd0, 0x30, 0x8a, 0x0e, 0x06, 0x3c, 0xec, 0xa5, - 0x32, 0xe1, 0xe1, 0x45, 0x73, 0x76, 0xcd, 0x5b, 0x5f, 0x6c, 0x3f, 0xc7, 0xd3, 0xe6, 0x82, 0x8f, - 0x1d, 0xbe, 0x6b, 0xe1, 0xa4, 0x6e, 0x26, 0xaf, 0xfe, 0x4f, 0x0f, 0x1e, 0x75, 0xa4, 0x10, 0x2c, - 0xcc, 0x75, 0xbb, 0x52, 0x26, 0x47, 0xcc, 0x18, 0x2e, 0x86, 0x1a, 0x1d, 0x42, 0xc5, 0x84, 0xa9, - 0xb5, 0xb0, 0xd8, 0xde, 0xc1, 0xae, 0xbd, 0xeb, 0xbe, 0x4a, 0x81, 0x6d, 0x7c, 0x3f, 0x1f, 0x1f, - 0x77, 0xba, 0xe5, 0x99, 0xe4, 0x95, 0xd0, 0x0e, 0xcc, 0x59, 0x93, 0xff, 0xb6, 0x6c, 0xe7, 0x31, - 0x26, 0x3b, 0x96, 0xff, 0xc3, 0x83, 0xea, 0x6e, 0x66, 0x62, 0xd4, 0x81, 0x79, 0xcd, 0x42, 0xc5, - 0x4c, 0xe1, 0x6d, 0x63, 0x7a, 0xa1, 0x23, 0x8b, 0x23, 0x6c, 0xc0, 0x14, 0x13, 0x21, 0x3b, 0x98, - 0x21, 0x05, 0x15, 0xbd, 0x86, 0xb9, 0x34, 0xa1, 0x5c, 0x14, 0x66, 0x9e, 0x4e, 0xaf, 0xd1, 0xcd, - 0x61, 0xb9, 0xf0, 0xc1, 0x0c, 0x71, 0x9c, 0xbd, 0x79, 0xa8, 0xd2, 0xcc, 0xc4, 0xbe, 0x86, 0xa5, - 0x5b, 0x0a, 0x08, 0x41, 0x55, 0xd0, 0x11, 0x73, 0x2f, 0x47, 0xec, 0x19, 0x3d, 0x83, 0x46, 0x4a, - 0xb5, 0x3e, 0x97, 0x2a, 0xea, 0xd9, 0xdd, 0xb1, 0xa2, 0x35, 0x52, 0x2f, 0xa3, 0xef, 0xf3, 0x60, - 0x0e, 0xcb, 0x34, 0x53, 0x39, 0xa5, 0x80, 0x55, 0x1c, 0xac, 0x8c, 0x5a, 0x98, 0x7f, 0x00, 0xb5, - 0xb1, 0x25, 0xb4, 0x0a, 0x0b, 0x65, 0x91, 0xc9, 0x65, 0x19, 0x07, 0xd1, 0x0a, 0x2c, 0x94, 0xf4, - 0x42, 0x75, 0x7c, 0xf7, 0xff, 0x78, 0x50, 0xbf, 0x31, 0x6a, 0xf4, 0x16, 0xaa, 0x23, 0x19, 0x39, - 0xf7, 0x8d, 0xf6, 0x8b, 0xff, 0x7c, 0x21, 0xfc, 0x51, 0x46, 0x8c, 0x58, 0x26, 0x6a, 0xbb, 0xd1, - 0x14, 0x63, 0x6d, 0x4d, 0xaf, 0x90, 0xdb, 0x27, 0x16, 0x8b, 0x02, 0x78, 0x18, 0x71, 0x1d, 0xca, - 0x33, 0xa6, 0x2e, 0x7a, 0x4c, 0x44, 0xa9, 0xe4, 0xc2, 0xe8, 0x66, 0x65, 0xad, 0xb2, 0x5e, 0x23, - 0x68, 0x9c, 0xda, 0x2f, 0x33, 0x7e, 0x0b, 0xaa, 0xb9, 0x24, 0xaa, 0xc1, 0x5c, 0x97, 0x1c, 0x7e, - 0x39, 0x59, 0x9e, 0x41, 0x8b, 0xf0, 0xa0, 0xf3, 0xe1, 0xf3, 0xd1, 0xf1, 0x3e, 0x59, 0xf6, 0xfc, - 0x6f, 0x50, 0xbf, 0xb1, 0xf5, 0xe8, 0x04, 0x96, 0xc2, 0xf1, 0x96, 0xf6, 0x52, 0x29, 0x93, 0x62, - 0x77, 0x36, 0xa7, 0x1b, 0xbc, 0x7f, 0xad, 0x49, 0x23, 0xbc, 0x11, 0xdf, 0x7b, 0xf3, 0xeb, 0xaa, - 0xe5, 0xfd, 0xbe, 0x6a, 0x79, 0x97, 0x57, 0x2d, 0xef, 0xeb, 0xe6, 0x90, 0x9b, 0x38, 0xeb, 0xe3, - 0x50, 0x8e, 0x02, 0x57, 0xf3, 0xe5, 0x88, 0xe9, 0xb8, 0x38, 0x07, 0x77, 0xff, 0xb9, 0xfe, 0xbc, - 0xfd, 0x05, 0xb6, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x95, 0x13, 0x2f, 0xd6, 0x04, 0x05, 0x00, - 0x00, -} - -func (m *RedisDestination) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisDestination) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisDestination) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.TrafficPolicy != nil { - { - size, err := m.TrafficPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisdestination(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintRedisdestination(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConnectionPoolSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConnectionPoolSettings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConnectionPoolSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Redis != nil { - { - size, err := m.Redis.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisdestination(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Tcp != nil { - { - size, err := m.Tcp.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisdestination(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Auth) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Auth) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Auth) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Auth != nil { - { - size := m.Auth.Size() - i -= size - if _, err := m.Auth.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Auth_Secret) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Auth_Secret) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Secret != nil { - { - size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisdestination(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *Auth_Plain) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Auth_Plain) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Plain != nil { - { - size, err := m.Plain.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisdestination(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SecretReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecretReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecretReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.UsernameField) > 0 { - i -= len(m.UsernameField) - copy(dAtA[i:], m.UsernameField) - i = encodeVarintRedisdestination(dAtA, i, uint64(len(m.UsernameField))) - i-- - dAtA[i] = 0x1a - } - if len(m.PasswordField) > 0 { - i -= len(m.PasswordField) - copy(dAtA[i:], m.PasswordField) - i = encodeVarintRedisdestination(dAtA, i, uint64(len(m.PasswordField))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintRedisdestination(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PlainAuth) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PlainAuth) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PlainAuth) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Username) > 0 { - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintRedisdestination(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0x12 - } - if len(m.Password) > 0 { - i -= len(m.Password) - copy(dAtA[i:], m.Password) - i = encodeVarintRedisdestination(dAtA, i, uint64(len(m.Password))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RedisSettings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisSettings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DiscoveryEndpoints) > 0 { - for iNdEx := len(m.DiscoveryEndpoints) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DiscoveryEndpoints[iNdEx]) - copy(dAtA[i:], m.DiscoveryEndpoints[iNdEx]) - i = encodeVarintRedisdestination(dAtA, i, uint64(len(m.DiscoveryEndpoints[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if m.Auth != nil { - { - size, err := m.Auth.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisdestination(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Mode != 0 { - i = encodeVarintRedisdestination(dAtA, i, uint64(m.Mode)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TrafficPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TrafficPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TrafficPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ConnectionPool != nil { - { - size, err := m.ConnectionPool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisdestination(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintRedisdestination(dAtA []byte, offset int, v uint64) int { - offset -= sovRedisdestination(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RedisDestination) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovRedisdestination(uint64(l)) - } - if m.TrafficPolicy != nil { - l = m.TrafficPolicy.Size() - n += 1 + l + sovRedisdestination(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ConnectionPoolSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tcp != nil { - l = m.Tcp.Size() - n += 1 + l + sovRedisdestination(uint64(l)) - } - if m.Redis != nil { - l = m.Redis.Size() - n += 1 + l + sovRedisdestination(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Auth) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Auth != nil { - n += m.Auth.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Auth_Secret) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Secret != nil { - l = m.Secret.Size() - n += 1 + l + sovRedisdestination(uint64(l)) - } - return n -} -func (m *Auth_Plain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Plain != nil { - l = m.Plain.Size() - n += 1 + l + sovRedisdestination(uint64(l)) - } - return n -} -func (m *SecretReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovRedisdestination(uint64(l)) - } - l = len(m.PasswordField) - if l > 0 { - n += 1 + l + sovRedisdestination(uint64(l)) - } - l = len(m.UsernameField) - if l > 0 { - n += 1 + l + sovRedisdestination(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *PlainAuth) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Password) - if l > 0 { - n += 1 + l + sovRedisdestination(uint64(l)) - } - l = len(m.Username) - if l > 0 { - n += 1 + l + sovRedisdestination(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedisSettings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Mode != 0 { - n += 1 + sovRedisdestination(uint64(m.Mode)) - } - if m.Auth != nil { - l = m.Auth.Size() - n += 1 + l + sovRedisdestination(uint64(l)) - } - if len(m.DiscoveryEndpoints) > 0 { - for _, s := range m.DiscoveryEndpoints { - l = len(s) - n += 1 + l + sovRedisdestination(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TrafficPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConnectionPool != nil { - l = m.ConnectionPool.Size() - n += 1 + l + sovRedisdestination(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRedisdestination(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRedisdestination(x uint64) (n int) { - return sovRedisdestination(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RedisDestination) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedisDestination: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedisDestination: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrafficPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TrafficPolicy == nil { - m.TrafficPolicy = &TrafficPolicy{} - } - if err := m.TrafficPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisdestination(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConnectionPoolSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConnectionPoolSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConnectionPoolSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tcp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tcp == nil { - m.Tcp = &v1alpha3.ConnectionPoolSettings_TCPSettings{} - } - if err := m.Tcp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redis", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Redis == nil { - m.Redis = &RedisSettings{} - } - if err := m.Redis.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisdestination(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Auth) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Auth: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Auth: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SecretReference{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Auth = &Auth_Secret{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plain", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &PlainAuth{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Auth = &Auth_Plain{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisdestination(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecretReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecretReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecretReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PasswordField", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PasswordField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UsernameField", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UsernameField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisdestination(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PlainAuth) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PlainAuth: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PlainAuth: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisdestination(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedisSettings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedisSettings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedisSettings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - m.Mode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Mode |= RedisSettings_Mode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Auth == nil { - m.Auth = &Auth{} - } - if err := m.Auth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryEndpoints", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DiscoveryEndpoints = append(m.DiscoveryEndpoints, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisdestination(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TrafficPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TrafficPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TrafficPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisdestination - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisdestination - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConnectionPool == nil { - m.ConnectionPool = &ConnectionPoolSettings{} - } - if err := m.ConnectionPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisdestination(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisdestination - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRedisdestination(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRedisdestination - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRedisdestination - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRedisdestination - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRedisdestination - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthRedisdestination = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRedisdestination = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRedisdestination = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/redis/v1alpha1/redisdestination.proto b/api/redis/v1alpha1/redisdestination.proto deleted file mode 100644 index 1ea53d3c..00000000 --- a/api/redis/v1alpha1/redisdestination.proto +++ /dev/null @@ -1,88 +0,0 @@ -syntax = "proto3"; -import "google/protobuf/struct.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; -import "google/api/field_behavior.proto"; -import "istio.io/api/networking/v1alpha3/destination_rule.proto"; - -// $schema: redis.aeraki.io.v1alpha1.RedisDestination -// $title: Redis Destination -// $description: Configuration affecting auth , discovery_endpoints etc. - -// RedisDestination defines policies that apply to redis traffic intended for a redis service -package redis.aeraki.io.v1alpha1; - -option go_package = "github.com/aeraki-mesh/aeraki/api/redis/v1alpha1"; - -// RedisDestination defines policies that apply to redis traffic intended for a redis service -// -// -// -// -message RedisDestination { - string host = 1 [(google.api.field_behavior) = REQUIRED]; - TrafficPolicy traffic_policy = 2; -} - -// Connection pool settings for an upstream host. The settings apply to -// each individual host in the upstream service. -message ConnectionPoolSettings { - istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1; - RedisSettings redis = 2; -} - -// Auth provide a way to get redis auth token. -message Auth { - oneof auth { - // Secret use the k8s secret in current namespace. - SecretReference secret = 1; - // redis password. - PlainAuth plain = 2; - } -} - -message SecretReference { - string name = 1; - string password_field = 2; - string username_field = 3; -} - -message PlainAuth { - string password = 1 [(google.api.field_behavior) = REQUIRED]; - string username = 2; -} - -message RedisSettings { - enum Mode { - PROXY = 0; - CLUSTER = 1; - } - - Mode mode = 1; - - Auth auth = 2; - - repeated string discovery_endpoints = 3; -} - -message TrafficPolicy { - ConnectionPoolSettings connection_pool = 1; -} \ No newline at end of file diff --git a/api/redis/v1alpha1/redisdestination_deepcopy.gen.go b/api/redis/v1alpha1/redisdestination_deepcopy.gen.go deleted file mode 100644 index 5f9715d2..00000000 --- a/api/redis/v1alpha1/redisdestination_deepcopy.gen.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/redis/v1alpha1/redisdestination.proto - -// RedisDestination defines policies that apply to redis traffic intended for a redis service - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "istio.io/api/networking/v1alpha3" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using RedisDestination within kubernetes types, where deepcopy-gen is used. -func (in *RedisDestination) DeepCopyInto(out *RedisDestination) { - p := proto.Clone(in).(*RedisDestination) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisDestination. Required by controller-gen. -func (in *RedisDestination) DeepCopy() *RedisDestination { - if in == nil { - return nil - } - out := new(RedisDestination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisDestination. Required by controller-gen. -func (in *RedisDestination) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using ConnectionPoolSettings within kubernetes types, where deepcopy-gen is used. -func (in *ConnectionPoolSettings) DeepCopyInto(out *ConnectionPoolSettings) { - p := proto.Clone(in).(*ConnectionPoolSettings) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolSettings. Required by controller-gen. -func (in *ConnectionPoolSettings) DeepCopy() *ConnectionPoolSettings { - if in == nil { - return nil - } - out := new(ConnectionPoolSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionPoolSettings. Required by controller-gen. -func (in *ConnectionPoolSettings) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Auth within kubernetes types, where deepcopy-gen is used. -func (in *Auth) DeepCopyInto(out *Auth) { - p := proto.Clone(in).(*Auth) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Auth. Required by controller-gen. -func (in *Auth) DeepCopy() *Auth { - if in == nil { - return nil - } - out := new(Auth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Auth. Required by controller-gen. -func (in *Auth) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using SecretReference within kubernetes types, where deepcopy-gen is used. -func (in *SecretReference) DeepCopyInto(out *SecretReference) { - p := proto.Clone(in).(*SecretReference) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference. Required by controller-gen. -func (in *SecretReference) DeepCopy() *SecretReference { - if in == nil { - return nil - } - out := new(SecretReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference. Required by controller-gen. -func (in *SecretReference) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using PlainAuth within kubernetes types, where deepcopy-gen is used. -func (in *PlainAuth) DeepCopyInto(out *PlainAuth) { - p := proto.Clone(in).(*PlainAuth) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlainAuth. Required by controller-gen. -func (in *PlainAuth) DeepCopy() *PlainAuth { - if in == nil { - return nil - } - out := new(PlainAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PlainAuth. Required by controller-gen. -func (in *PlainAuth) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using RedisSettings within kubernetes types, where deepcopy-gen is used. -func (in *RedisSettings) DeepCopyInto(out *RedisSettings) { - p := proto.Clone(in).(*RedisSettings) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSettings. Required by controller-gen. -func (in *RedisSettings) DeepCopy() *RedisSettings { - if in == nil { - return nil - } - out := new(RedisSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisSettings. Required by controller-gen. -func (in *RedisSettings) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using TrafficPolicy within kubernetes types, where deepcopy-gen is used. -func (in *TrafficPolicy) DeepCopyInto(out *TrafficPolicy) { - p := proto.Clone(in).(*TrafficPolicy) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPolicy. Required by controller-gen. -func (in *TrafficPolicy) DeepCopy() *TrafficPolicy { - if in == nil { - return nil - } - out := new(TrafficPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new TrafficPolicy. Required by controller-gen. -func (in *TrafficPolicy) DeepCopyInterface() interface{} { - return in.DeepCopy() -} diff --git a/api/redis/v1alpha1/redisdestination_json.gen.go b/api/redis/v1alpha1/redisdestination_json.gen.go deleted file mode 100644 index a1becee8..00000000 --- a/api/redis/v1alpha1/redisdestination_json.gen.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/redis/v1alpha1/redisdestination.proto - -// RedisDestination defines policies that apply to redis traffic intended for a redis service - -package v1alpha1 - -import ( - bytes "bytes" - fmt "fmt" - github.com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "istio.io/api/networking/v1alpha3" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for RedisDestination -func (this *RedisDestination) MarshalJSON() ([]byte, error) { - str, err := RedisdestinationMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisDestination -func (this *RedisDestination) UnmarshalJSON(b []byte) error { - return RedisdestinationUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for ConnectionPoolSettings -func (this *ConnectionPoolSettings) MarshalJSON() ([]byte, error) { - str, err := RedisdestinationMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for ConnectionPoolSettings -func (this *ConnectionPoolSettings) UnmarshalJSON(b []byte) error { - return RedisdestinationUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Auth -func (this *Auth) MarshalJSON() ([]byte, error) { - str, err := RedisdestinationMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Auth -func (this *Auth) UnmarshalJSON(b []byte) error { - return RedisdestinationUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for SecretReference -func (this *SecretReference) MarshalJSON() ([]byte, error) { - str, err := RedisdestinationMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for SecretReference -func (this *SecretReference) UnmarshalJSON(b []byte) error { - return RedisdestinationUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for PlainAuth -func (this *PlainAuth) MarshalJSON() ([]byte, error) { - str, err := RedisdestinationMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for PlainAuth -func (this *PlainAuth) UnmarshalJSON(b []byte) error { - return RedisdestinationUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RedisSettings -func (this *RedisSettings) MarshalJSON() ([]byte, error) { - str, err := RedisdestinationMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisSettings -func (this *RedisSettings) UnmarshalJSON(b []byte) error { - return RedisdestinationUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for TrafficPolicy -func (this *TrafficPolicy) MarshalJSON() ([]byte, error) { - str, err := RedisdestinationMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for TrafficPolicy -func (this *TrafficPolicy) UnmarshalJSON(b []byte) error { - return RedisdestinationUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - RedisdestinationMarshaler = &github.com_gogo_protobuf_jsonpb.Marshaler{} - RedisdestinationUnmarshaler = &github.com_gogo_protobuf_jsonpb.Unmarshaler{AllowUnknownFields: true} -) diff --git a/api/redis/v1alpha1/redisservice.gen.json b/api/redis/v1alpha1/redisservice.gen.json deleted file mode 100644 index e4630080..00000000 --- a/api/redis/v1alpha1/redisservice.gen.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Istio Redis Service Extension.", - "version": "v1alpha1" - }, - "components": { - "schemas": { - "redis.aeraki.io.v1alpha1.Percent": { - "description": "Percent specifies a percentage in the range of [0.0, 100.0].", - "type": "object", - "properties": { - "value": { - "type": "number", - "format": "double" - } - } - }, - "redis.aeraki.io.v1alpha1.Auth": { - "description": "Auth provide a way to get redis auth token.", - "type": "object", - "oneOf": [ - { - "not": { - "anyOf": [ - { - "required": [ - "secret" - ], - "properties": { - "secret": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.SecretReference" - } - } - }, - { - "required": [ - "plain" - ], - "properties": { - "plain": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.PlainAuth" - } - } - } - ] - } - }, - { - "required": [ - "secret" - ], - "properties": { - "secret": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.SecretReference" - } - } - }, - { - "required": [ - "plain" - ], - "properties": { - "plain": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.PlainAuth" - } - } - } - ] - }, - "redis.aeraki.io.v1alpha1.SecretReference": { - "type": "object", - "properties": { - "name": { - "type": "string", - "format": "string" - }, - "passwordField": { - "type": "string", - "format": "string" - }, - "usernameField": { - "type": "string", - "format": "string" - } - } - }, - "redis.aeraki.io.v1alpha1.PlainAuth": { - "type": "object", - "properties": { - "password": { - "type": "string", - "format": "string" - }, - "username": { - "type": "string", - "format": "string" - } - } - }, - "redis.aeraki.io.v1alpha1.RedisService": { - "description": "RedisService provide a way to config redis service in service mesh.", - "type": "object", - "properties": { - "host": { - "type": "array", - "items": { - "type": "string", - "format": "string" - } - }, - "redis": { - "type": "array", - "items": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.Route" - } - }, - "settings": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.Settings" - }, - "faults": { - "description": "List of faults to inject. Faults currently come in two flavors: - Delay, which delays a request. - Error, which responds to a request with an error. Errors can also have delays attached.", - "type": "array", - "items": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.Fault" - } - } - } - }, - "redis.aeraki.io.v1alpha1.RedisService.Settings": { - "type": "object", - "properties": { - "auth": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.Auth" - }, - "caseInsensitive": { - "description": "Indicates that prefix matching should be case insensitive.", - "type": "boolean" - }, - "opTimeout": { - "description": "Per-operation timeout in milliseconds. The timer starts when the first command of a pipeline is written to the backend connection. Each response received from Redis resets the timer since it signifies that the next command is being processed by the backend. The only exception to this behavior is when a connection to a backend is not yet established. In that case, the connect timeout on the cluster will govern the timeout until the connection is ready.", - "type": "string" - }, - "enableCommandStats": { - "description": "Enable per-command statistics per upstream cluster, in addition to the filter level aggregate count", - "type": "boolean" - }, - "maxBufferSizeBeforeFlush": { - "description": "Maximum size of encoded request buffer before flush is triggered and encoded requests are sent upstream. If this is unset, the buffer flushes whenever it receives data and performs no batching. This feature makes it possible for multiple clients to send requests to Envoy and have them batched- for example if one is running several worker processes, each with its own Redis connection. There is no benefit to using this with a single downstream process. Recommended size (if enabled) is 1024 bytes.", - "type": "integer" - }, - "bufferFlushTimeout": { - "description": "The encoded request buffer is flushed N milliseconds after the first request has been encoded, unless the buffer size has already exceeded `max_buffer_size_before_flush`. If `max_buffer_size_before_flush` is not set, this flush timer is not used. Otherwise, the timer should be set according to the number of clients, overall request rate and desired maximum latency for a single command. For example, if there are many requests being batched together at a high rate, the buffer will likely be filled before the timer fires. Alternatively, if the request rate is lower the buffer will not be filled as often before the timer fires. If `max_buffer_size_before_flush` is set, but `buffer_flush_timeout` is not, the latter defaults to 3ms.", - "type": "string" - }, - "maxUpstreamUnknownConnections": { - "description": "`max_upstream_unknown_connections` controls how many upstream connections to unknown hosts can be created at any given time by any given worker thread (see `enable_redirection` for more details). If the host is unknown and a connection cannot be created due to enforcing this limit, then redirection will fail and the original redirection error will be passed downstream unchanged. This limit defaults to 100.", - "type": "integer", - "nullable": true - }, - "enableHashtagging": { - "description": "Use hash tagging on every redis key to guarantee that keys with the same hash tag will be forwarded to the same upstream. The hash key used for determining the upstream in a consistent hash ring configuration will be computed from the hash tagged key instead of the whole key. The algorithm used to compute the hash tag is identical to the `redis-cluster implementation \u003chttps://redis.io/topics/cluster-spec#keys-hash-tags\u003e`_.", - "type": "boolean" - }, - "enableRedirection": { - "description": "Accept `moved and ask redirection \u003chttps://redis.io/topics/cluster-spec#redirection-and-resharding\u003e`_ errors from upstream redis servers, and retry commands to the specified target server. The target server does not need to be known to the cluster manager. If the command cannot be redirected, then the original error is passed downstream unchanged. By default, this support is not enabled.", - "type": "boolean" - }, - "readPolicy": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.ReadPolicy" - } - } - }, - "redis.aeraki.io.v1alpha1.RedisService.Route": { - "type": "object", - "properties": { - "match": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.RouteMatch" - }, - "route": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.Destination" - }, - "mirror": { - "type": "array", - "items": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.Mirror" - } - } - } - }, - "redis.aeraki.io.v1alpha1.Fault": { - "description": "Fault defines redis faults used for fault injection.", - "type": "object", - "properties": { - "delay": { - "description": "Delay for all faults. If not set, defaults to zero", - "type": "string" - }, - "percentage": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.Percent" - }, - "type": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.Fault.Type" - }, - "commands": { - "description": "Commands fault is restricted to, if any. If not set, fault applies to all commands other than auth and ping (due to special handling of those commands in Envoy).", - "type": "array", - "items": { - "type": "string", - "format": "string" - } - } - } - }, - "redis.aeraki.io.v1alpha1.RedisService.ReadPolicy": { - "type": "string", - "enum": [ - "MASTER", - "PREFER_MASTER", - "REPLICA", - "PREFER_REPLICA", - "ANY" - ] - }, - "redis.aeraki.io.v1alpha1.RedisService.KeyMatch": { - "description": "KeyMatch match the redis key prefix;", - "type": "object", - "properties": { - "prefix": { - "description": "String prefix that must match the beginning of the keys. Envoy will always favor the longest match.", - "type": "string", - "format": "string" - }, - "removePrefix": { - "description": "Indicates if the prefix needs to be removed from the key when forwarded.", - "type": "boolean" - } - } - }, - "redis.aeraki.io.v1alpha1.RedisService.RouteMatch": { - "type": "object", - "oneOf": [ - { - "not": { - "anyOf": [ - { - "required": [ - "key" - ], - "properties": { - "key": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.KeyMatch" - } - } - } - ] - } - }, - { - "required": [ - "key" - ], - "properties": { - "key": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.KeyMatch" - } - } - } - ] - }, - "redis.aeraki.io.v1alpha1.RedisService.Destination": { - "type": "object", - "properties": { - "host": { - "type": "string", - "format": "string" - }, - "port": { - "type": "integer" - } - } - }, - "redis.aeraki.io.v1alpha1.RedisService.Mirror": { - "type": "object", - "properties": { - "route": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.RedisService.Destination" - }, - "percentage": { - "$ref": "#/components/schemas/redis.aeraki.io.v1alpha1.Percent" - }, - "excludeReadCommands": { - "type": "boolean" - } - } - }, - "redis.aeraki.io.v1alpha1.Fault.Type": { - "type": "string", - "enum": [ - "DELAY", - "ERROR" - ] - } - } - } -} \ No newline at end of file diff --git a/api/redis/v1alpha1/redisservice.pb.go b/api/redis/v1alpha1/redisservice.pb.go deleted file mode 100644 index 0646e7a1..00000000 --- a/api/redis/v1alpha1/redisservice.pb.go +++ /dev/null @@ -1,3135 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/redis/v1alpha1/redisservice.proto - -// `RedisService` provide a way to config redis service in service mesh. - -package v1alpha1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - types "github.com/gogo/protobuf/types" - io "io" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type RedisService_ReadPolicy int32 - -const ( - RedisService_MASTER RedisService_ReadPolicy = 0 - RedisService_PREFER_MASTER RedisService_ReadPolicy = 1 - RedisService_REPLICA RedisService_ReadPolicy = 2 - RedisService_PREFER_REPLICA RedisService_ReadPolicy = 3 - RedisService_ANY RedisService_ReadPolicy = 4 -) - -var RedisService_ReadPolicy_name = map[int32]string{ - 0: "MASTER", - 1: "PREFER_MASTER", - 2: "REPLICA", - 3: "PREFER_REPLICA", - 4: "ANY", -} - -var RedisService_ReadPolicy_value = map[string]int32{ - "MASTER": 0, - "PREFER_MASTER": 1, - "REPLICA": 2, - "PREFER_REPLICA": 3, - "ANY": 4, -} - -func (x RedisService_ReadPolicy) String() string { - return proto.EnumName(RedisService_ReadPolicy_name, int32(x)) -} - -func (RedisService_ReadPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0, 0} -} - -type Fault_Type int32 - -const ( - // Delays requests. This is the base fault; other faults can have delays added. - Fault_DELAY Fault_Type = 0 - // Returns errors on requests. - Fault_ERROR Fault_Type = 1 -) - -var Fault_Type_name = map[int32]string{ - 0: "DELAY", - 1: "ERROR", -} - -var Fault_Type_value = map[string]int32{ - "DELAY": 0, - "ERROR": 1, -} - -func (x Fault_Type) String() string { - return proto.EnumName(Fault_Type_name, int32(x)) -} - -func (Fault_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{2, 0} -} - -// RedisService provide a way to config redis service in service mesh. -// -// -// -// -type RedisService struct { - Host []string `protobuf:"bytes,1,rep,name=host,proto3" json:"host,omitempty"` - Settings *RedisService_Settings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"` - Redis []*RedisService_Route `protobuf:"bytes,3,rep,name=redis,proto3" json:"redis,omitempty"` - // List of faults to inject. Faults currently come in two flavors: - // - Delay, which delays a request. - // - Error, which responds to a request with an error. Errors can also have delays attached. - Faults []*Fault `protobuf:"bytes,4,rep,name=faults,proto3" json:"faults,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisService) Reset() { *m = RedisService{} } -func (m *RedisService) String() string { return proto.CompactTextString(m) } -func (*RedisService) ProtoMessage() {} -func (*RedisService) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0} -} -func (m *RedisService) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisService.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisService) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisService.Merge(m, src) -} -func (m *RedisService) XXX_Size() int { - return m.Size() -} -func (m *RedisService) XXX_DiscardUnknown() { - xxx_messageInfo_RedisService.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisService proto.InternalMessageInfo - -func (m *RedisService) GetHost() []string { - if m != nil { - return m.Host - } - return nil -} - -func (m *RedisService) GetSettings() *RedisService_Settings { - if m != nil { - return m.Settings - } - return nil -} - -func (m *RedisService) GetRedis() []*RedisService_Route { - if m != nil { - return m.Redis - } - return nil -} - -func (m *RedisService) GetFaults() []*Fault { - if m != nil { - return m.Faults - } - return nil -} - -type RedisService_Settings struct { - // Indicates that prefix matching should be case insensitive. - CaseInsensitive bool `protobuf:"varint,1,opt,name=case_insensitive,json=caseInsensitive,proto3" json:"case_insensitive,omitempty"` - // Per-operation timeout in milliseconds. The timer starts when the first - // command of a pipeline is written to the backend connection. Each response received from Redis - // resets the timer since it signifies that the next command is being processed by the backend. - // The only exception to this behavior is when a connection to a backend is not yet established. - // In that case, the connect timeout on the cluster will govern the timeout until the connection - // is ready. - OpTimeout *types.Duration `protobuf:"bytes,2,opt,name=op_timeout,json=opTimeout,proto3" json:"op_timeout,omitempty"` - // Enable per-command statistics per upstream cluster, in addition to the filter level aggregate - // count - EnableCommandStats bool `protobuf:"varint,3,opt,name=enable_command_stats,json=enableCommandStats,proto3" json:"enable_command_stats,omitempty"` - // Maximum size of encoded request buffer before flush is triggered and encoded requests - // are sent upstream. If this is unset, the buffer flushes whenever it receives data - // and performs no batching. - // This feature makes it possible for multiple clients to send requests to Envoy and have - // them batched- for example if one is running several worker processes, each with its own - // Redis connection. There is no benefit to using this with a single downstream process. - // Recommended size (if enabled) is 1024 bytes. - MaxBufferSizeBeforeFlush uint32 `protobuf:"varint,4,opt,name=max_buffer_size_before_flush,json=maxBufferSizeBeforeFlush,proto3" json:"max_buffer_size_before_flush,omitempty"` - // The encoded request buffer is flushed N milliseconds after the first request has been - // encoded, unless the buffer size has already exceeded `max_buffer_size_before_flush`. - // If `max_buffer_size_before_flush` is not set, this flush timer is not used. Otherwise, - // the timer should be set according to the number of clients, overall request rate and - // desired maximum latency for a single command. For example, if there are many requests - // being batched together at a high rate, the buffer will likely be filled before the timer - // fires. Alternatively, if the request rate is lower the buffer will not be filled as often - // before the timer fires. - // If `max_buffer_size_before_flush` is set, but `buffer_flush_timeout` is not, the latter - // defaults to 3ms. - BufferFlushTimeout *types.Duration `protobuf:"bytes,5,opt,name=buffer_flush_timeout,json=bufferFlushTimeout,proto3" json:"buffer_flush_timeout,omitempty"` - // `max_upstream_unknown_connections` controls how many upstream connections to unknown hosts - // can be created at any given time by any given worker thread (see `enable_redirection` for - // more details). If the host is unknown and a connection cannot be created due to enforcing - // this limit, then redirection will fail and the original redirection error will be passed - // downstream unchanged. This limit defaults to 100. - MaxUpstreamUnknownConnections *types.UInt32Value `protobuf:"bytes,6,opt,name=max_upstream_unknown_connections,json=maxUpstreamUnknownConnections,proto3" json:"max_upstream_unknown_connections,omitempty"` - // Use hash tagging on every redis key to guarantee that keys with the same hash tag will be - // forwarded to the same upstream. The hash key used for determining the upstream in a - // consistent hash ring configuration will be computed from the hash tagged key instead of the - // whole key. The algorithm used to compute the hash tag is identical to the `redis-cluster - // implementation `_. - // - // Examples: - // - // * '{user1000}.following' and '{user1000}.followers' **will** be sent to the same upstream - // * '{user1000}.following' and '{user1001}.following' **might** be sent to the same upstream - EnableHashtagging bool `protobuf:"varint,7,opt,name=enable_hashtagging,json=enableHashtagging,proto3" json:"enable_hashtagging,omitempty"` - // Accept `moved and ask redirection - // `_ errors from upstream - // redis servers, and retry commands to the specified target server. The target server does not - // need to be known to the cluster manager. If the command cannot be redirected, then the - // original error is passed downstream unchanged. By default, this support is not enabled. - EnableRedirection bool `protobuf:"varint,8,opt,name=enable_redirection,json=enableRedirection,proto3" json:"enable_redirection,omitempty"` - // Read policy. The default is to read from the primary. - ReadPolicy RedisService_ReadPolicy `protobuf:"varint,9,opt,name=read_policy,json=readPolicy,proto3,enum=redis.aeraki.io.v1alpha1.RedisService_ReadPolicy" json:"read_policy,omitempty"` - // Downstream auth. - Auth *Auth `protobuf:"bytes,10,opt,name=auth,proto3" json:"auth,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisService_Settings) Reset() { *m = RedisService_Settings{} } -func (m *RedisService_Settings) String() string { return proto.CompactTextString(m) } -func (*RedisService_Settings) ProtoMessage() {} -func (*RedisService_Settings) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0, 0} -} -func (m *RedisService_Settings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisService_Settings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisService_Settings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisService_Settings) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisService_Settings.Merge(m, src) -} -func (m *RedisService_Settings) XXX_Size() int { - return m.Size() -} -func (m *RedisService_Settings) XXX_DiscardUnknown() { - xxx_messageInfo_RedisService_Settings.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisService_Settings proto.InternalMessageInfo - -func (m *RedisService_Settings) GetCaseInsensitive() bool { - if m != nil { - return m.CaseInsensitive - } - return false -} - -func (m *RedisService_Settings) GetOpTimeout() *types.Duration { - if m != nil { - return m.OpTimeout - } - return nil -} - -func (m *RedisService_Settings) GetEnableCommandStats() bool { - if m != nil { - return m.EnableCommandStats - } - return false -} - -func (m *RedisService_Settings) GetMaxBufferSizeBeforeFlush() uint32 { - if m != nil { - return m.MaxBufferSizeBeforeFlush - } - return 0 -} - -func (m *RedisService_Settings) GetBufferFlushTimeout() *types.Duration { - if m != nil { - return m.BufferFlushTimeout - } - return nil -} - -func (m *RedisService_Settings) GetMaxUpstreamUnknownConnections() *types.UInt32Value { - if m != nil { - return m.MaxUpstreamUnknownConnections - } - return nil -} - -func (m *RedisService_Settings) GetEnableHashtagging() bool { - if m != nil { - return m.EnableHashtagging - } - return false -} - -func (m *RedisService_Settings) GetEnableRedirection() bool { - if m != nil { - return m.EnableRedirection - } - return false -} - -func (m *RedisService_Settings) GetReadPolicy() RedisService_ReadPolicy { - if m != nil { - return m.ReadPolicy - } - return RedisService_MASTER -} - -func (m *RedisService_Settings) GetAuth() *Auth { - if m != nil { - return m.Auth - } - return nil -} - -// KeyMatch match the redis key prefix; -type RedisService_KeyMatch struct { - // String prefix that must match the beginning of the keys. Envoy will always favor the - // longest match. - Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` - // Indicates if the prefix needs to be removed from the key when forwarded. - RemovePrefix bool `protobuf:"varint,2,opt,name=remove_prefix,json=removePrefix,proto3" json:"remove_prefix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisService_KeyMatch) Reset() { *m = RedisService_KeyMatch{} } -func (m *RedisService_KeyMatch) String() string { return proto.CompactTextString(m) } -func (*RedisService_KeyMatch) ProtoMessage() {} -func (*RedisService_KeyMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0, 1} -} -func (m *RedisService_KeyMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisService_KeyMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisService_KeyMatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisService_KeyMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisService_KeyMatch.Merge(m, src) -} -func (m *RedisService_KeyMatch) XXX_Size() int { - return m.Size() -} -func (m *RedisService_KeyMatch) XXX_DiscardUnknown() { - xxx_messageInfo_RedisService_KeyMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisService_KeyMatch proto.InternalMessageInfo - -func (m *RedisService_KeyMatch) GetPrefix() string { - if m != nil { - return m.Prefix - } - return "" -} - -func (m *RedisService_KeyMatch) GetRemovePrefix() bool { - if m != nil { - return m.RemovePrefix - } - return false -} - -type RedisService_RouteMatch struct { - // Types that are valid to be assigned to Match: - // *RedisService_RouteMatch_Key - Match isRedisService_RouteMatch_Match `protobuf_oneof:"match"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisService_RouteMatch) Reset() { *m = RedisService_RouteMatch{} } -func (m *RedisService_RouteMatch) String() string { return proto.CompactTextString(m) } -func (*RedisService_RouteMatch) ProtoMessage() {} -func (*RedisService_RouteMatch) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0, 2} -} -func (m *RedisService_RouteMatch) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisService_RouteMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisService_RouteMatch.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisService_RouteMatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisService_RouteMatch.Merge(m, src) -} -func (m *RedisService_RouteMatch) XXX_Size() int { - return m.Size() -} -func (m *RedisService_RouteMatch) XXX_DiscardUnknown() { - xxx_messageInfo_RedisService_RouteMatch.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisService_RouteMatch proto.InternalMessageInfo - -type isRedisService_RouteMatch_Match interface { - isRedisService_RouteMatch_Match() - MarshalTo([]byte) (int, error) - Size() int -} - -type RedisService_RouteMatch_Key struct { - Key *RedisService_KeyMatch `protobuf:"bytes,1,opt,name=key,proto3,oneof" json:"key,omitempty"` -} - -func (*RedisService_RouteMatch_Key) isRedisService_RouteMatch_Match() {} - -func (m *RedisService_RouteMatch) GetMatch() isRedisService_RouteMatch_Match { - if m != nil { - return m.Match - } - return nil -} - -func (m *RedisService_RouteMatch) GetKey() *RedisService_KeyMatch { - if x, ok := m.GetMatch().(*RedisService_RouteMatch_Key); ok { - return x.Key - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*RedisService_RouteMatch) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*RedisService_RouteMatch_Key)(nil), - } -} - -type RedisService_Destination struct { - Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` - Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisService_Destination) Reset() { *m = RedisService_Destination{} } -func (m *RedisService_Destination) String() string { return proto.CompactTextString(m) } -func (*RedisService_Destination) ProtoMessage() {} -func (*RedisService_Destination) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0, 3} -} -func (m *RedisService_Destination) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisService_Destination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisService_Destination.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisService_Destination) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisService_Destination.Merge(m, src) -} -func (m *RedisService_Destination) XXX_Size() int { - return m.Size() -} -func (m *RedisService_Destination) XXX_DiscardUnknown() { - xxx_messageInfo_RedisService_Destination.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisService_Destination proto.InternalMessageInfo - -func (m *RedisService_Destination) GetHost() string { - if m != nil { - return m.Host - } - return "" -} - -func (m *RedisService_Destination) GetPort() uint32 { - if m != nil { - return m.Port - } - return 0 -} - -type RedisService_Mirror struct { - Route *RedisService_Destination `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"` - Percentage *Percent `protobuf:"bytes,2,opt,name=percentage,proto3" json:"percentage,omitempty"` - ExcludeReadCommands bool `protobuf:"varint,3,opt,name=exclude_read_commands,json=excludeReadCommands,proto3" json:"exclude_read_commands,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisService_Mirror) Reset() { *m = RedisService_Mirror{} } -func (m *RedisService_Mirror) String() string { return proto.CompactTextString(m) } -func (*RedisService_Mirror) ProtoMessage() {} -func (*RedisService_Mirror) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0, 4} -} -func (m *RedisService_Mirror) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisService_Mirror) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisService_Mirror.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisService_Mirror) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisService_Mirror.Merge(m, src) -} -func (m *RedisService_Mirror) XXX_Size() int { - return m.Size() -} -func (m *RedisService_Mirror) XXX_DiscardUnknown() { - xxx_messageInfo_RedisService_Mirror.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisService_Mirror proto.InternalMessageInfo - -func (m *RedisService_Mirror) GetRoute() *RedisService_Destination { - if m != nil { - return m.Route - } - return nil -} - -func (m *RedisService_Mirror) GetPercentage() *Percent { - if m != nil { - return m.Percentage - } - return nil -} - -func (m *RedisService_Mirror) GetExcludeReadCommands() bool { - if m != nil { - return m.ExcludeReadCommands - } - return false -} - -type RedisService_Route struct { - Match *RedisService_RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` - Route *RedisService_Destination `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` - Mirror []*RedisService_Mirror `protobuf:"bytes,3,rep,name=mirror,proto3" json:"mirror,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RedisService_Route) Reset() { *m = RedisService_Route{} } -func (m *RedisService_Route) String() string { return proto.CompactTextString(m) } -func (*RedisService_Route) ProtoMessage() {} -func (*RedisService_Route) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{0, 5} -} -func (m *RedisService_Route) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedisService_Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedisService_Route.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedisService_Route) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedisService_Route.Merge(m, src) -} -func (m *RedisService_Route) XXX_Size() int { - return m.Size() -} -func (m *RedisService_Route) XXX_DiscardUnknown() { - xxx_messageInfo_RedisService_Route.DiscardUnknown(m) -} - -var xxx_messageInfo_RedisService_Route proto.InternalMessageInfo - -func (m *RedisService_Route) GetMatch() *RedisService_RouteMatch { - if m != nil { - return m.Match - } - return nil -} - -func (m *RedisService_Route) GetRoute() *RedisService_Destination { - if m != nil { - return m.Route - } - return nil -} - -func (m *RedisService_Route) GetMirror() []*RedisService_Mirror { - if m != nil { - return m.Mirror - } - return nil -} - -// Percent specifies a percentage in the range of [0.0, 100.0]. -type Percent struct { - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Percent) Reset() { *m = Percent{} } -func (m *Percent) String() string { return proto.CompactTextString(m) } -func (*Percent) ProtoMessage() {} -func (*Percent) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{1} -} -func (m *Percent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Percent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Percent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Percent) XXX_Merge(src proto.Message) { - xxx_messageInfo_Percent.Merge(m, src) -} -func (m *Percent) XXX_Size() int { - return m.Size() -} -func (m *Percent) XXX_DiscardUnknown() { - xxx_messageInfo_Percent.DiscardUnknown(m) -} - -var xxx_messageInfo_Percent proto.InternalMessageInfo - -func (m *Percent) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -// Fault defines redis faults used for fault injection. -type Fault struct { - // Fault type. - Type Fault_Type `protobuf:"varint,1,opt,name=type,proto3,enum=redis.aeraki.io.v1alpha1.Fault_Type" json:"type,omitempty"` - // Percentage of requests fault applies to. - Percentage *Percent `protobuf:"bytes,2,opt,name=percentage,proto3" json:"percentage,omitempty"` - // Delay for all faults. If not set, defaults to zero - Delay *types.Duration `protobuf:"bytes,3,opt,name=delay,proto3" json:"delay,omitempty"` - // Commands fault is restricted to, if any. If not set, fault applies to all commands - // other than auth and ping (due to special handling of those commands in Envoy). - Commands []string `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Fault) Reset() { *m = Fault{} } -func (m *Fault) String() string { return proto.CompactTextString(m) } -func (*Fault) ProtoMessage() {} -func (*Fault) Descriptor() ([]byte, []int) { - return fileDescriptor_abdd8295f47f99c5, []int{2} -} -func (m *Fault) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Fault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Fault.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Fault) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fault.Merge(m, src) -} -func (m *Fault) XXX_Size() int { - return m.Size() -} -func (m *Fault) XXX_DiscardUnknown() { - xxx_messageInfo_Fault.DiscardUnknown(m) -} - -var xxx_messageInfo_Fault proto.InternalMessageInfo - -func (m *Fault) GetType() Fault_Type { - if m != nil { - return m.Type - } - return Fault_DELAY -} - -func (m *Fault) GetPercentage() *Percent { - if m != nil { - return m.Percentage - } - return nil -} - -func (m *Fault) GetDelay() *types.Duration { - if m != nil { - return m.Delay - } - return nil -} - -func (m *Fault) GetCommands() []string { - if m != nil { - return m.Commands - } - return nil -} - -func init() { - proto.RegisterEnum("redis.aeraki.io.v1alpha1.RedisService_ReadPolicy", RedisService_ReadPolicy_name, RedisService_ReadPolicy_value) - proto.RegisterEnum("redis.aeraki.io.v1alpha1.Fault_Type", Fault_Type_name, Fault_Type_value) - proto.RegisterType((*RedisService)(nil), "redis.aeraki.io.v1alpha1.RedisService") - proto.RegisterType((*RedisService_Settings)(nil), "redis.aeraki.io.v1alpha1.RedisService.Settings") - proto.RegisterType((*RedisService_KeyMatch)(nil), "redis.aeraki.io.v1alpha1.RedisService.KeyMatch") - proto.RegisterType((*RedisService_RouteMatch)(nil), "redis.aeraki.io.v1alpha1.RedisService.RouteMatch") - proto.RegisterType((*RedisService_Destination)(nil), "redis.aeraki.io.v1alpha1.RedisService.Destination") - proto.RegisterType((*RedisService_Mirror)(nil), "redis.aeraki.io.v1alpha1.RedisService.Mirror") - proto.RegisterType((*RedisService_Route)(nil), "redis.aeraki.io.v1alpha1.RedisService.Route") - proto.RegisterType((*Percent)(nil), "redis.aeraki.io.v1alpha1.Percent") - proto.RegisterType((*Fault)(nil), "redis.aeraki.io.v1alpha1.Fault") -} - -func init() { - proto.RegisterFile("api/redis/v1alpha1/redisservice.proto", fileDescriptor_abdd8295f47f99c5) -} - -var fileDescriptor_abdd8295f47f99c5 = []byte{ - // 968 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0x1b, 0x37, - 0x17, 0xf5, 0x58, 0x3f, 0x96, 0xae, 0x7f, 0x3e, 0x85, 0x9f, 0xdb, 0x4e, 0x05, 0xd7, 0x56, 0xdd, - 0x16, 0x50, 0x80, 0x7a, 0x14, 0x2b, 0x8b, 0x06, 0x5d, 0x04, 0x90, 0x6d, 0x39, 0x36, 0x1c, 0xb7, - 0x06, 0x6d, 0x17, 0x48, 0x36, 0x03, 0x6a, 0x44, 0x69, 0x08, 0x6b, 0x86, 0x03, 0x92, 0xa3, 0x58, - 0x79, 0xc2, 0x76, 0xd7, 0x07, 0xe8, 0x22, 0xf5, 0x0b, 0xf4, 0x01, 0xba, 0x29, 0xf8, 0x23, 0x4b, - 0x6d, 0xa0, 0xc6, 0x45, 0xbb, 0x23, 0xef, 0x39, 0xf7, 0xcc, 0xe1, 0x25, 0xef, 0x1d, 0xf8, 0x8a, - 0x64, 0xac, 0x25, 0x68, 0x9f, 0xc9, 0xd6, 0x78, 0x9f, 0x8c, 0xb2, 0x98, 0xec, 0xdb, 0xad, 0xa4, - 0x62, 0xcc, 0x22, 0x1a, 0x64, 0x82, 0x2b, 0x8e, 0x7c, 0x13, 0x0b, 0x08, 0x15, 0xe4, 0x86, 0x05, - 0x8c, 0x07, 0x53, 0x72, 0x7d, 0x6b, 0xc8, 0xf9, 0x70, 0x44, 0x5b, 0x86, 0xd7, 0xcb, 0x07, 0x2d, - 0xa9, 0x44, 0x1e, 0x29, 0x9b, 0x57, 0xdf, 0xfe, 0x2b, 0xda, 0xcf, 0x05, 0x51, 0x8c, 0xa7, 0x8b, - 0xf0, 0x37, 0x82, 0x64, 0x19, 0x15, 0xd2, 0xe1, 0x3b, 0x0e, 0xd7, 0x2e, 0x07, 0x8c, 0x8e, 0xfa, - 0x61, 0x8f, 0xc6, 0x64, 0xcc, 0xb8, 0x70, 0x84, 0xc7, 0x8b, 0xfc, 0xf7, 0xa9, 0x54, 0x2c, 0x9d, - 0xfb, 0xd6, 0xee, 0x2f, 0x6b, 0xb0, 0x86, 0x35, 0x74, 0x69, 0x8f, 0x86, 0x3e, 0x81, 0x62, 0xcc, - 0xa5, 0xf2, 0xbd, 0x46, 0xa1, 0x59, 0x3d, 0x28, 0xbc, 0xeb, 0x2c, 0x63, 0x13, 0x40, 0x67, 0x50, - 0x91, 0x54, 0x29, 0x96, 0x0e, 0xa5, 0xbf, 0xdc, 0xf0, 0x9a, 0xab, 0xed, 0x56, 0xb0, 0xa8, 0x00, - 0xc1, 0xbc, 0x64, 0x70, 0xe9, 0xd2, 0xf0, 0xbd, 0x00, 0x7a, 0x01, 0x25, 0x93, 0xeb, 0x17, 0x1a, - 0x85, 0xe6, 0x6a, 0xfb, 0xeb, 0x07, 0x2a, 0x61, 0x9e, 0x2b, 0x6a, 0x4d, 0xd9, 0x7c, 0xf4, 0x0d, - 0x94, 0x07, 0x24, 0x1f, 0x29, 0xe9, 0x17, 0x8d, 0xd2, 0xce, 0x62, 0xa5, 0x63, 0xcd, 0xc3, 0x8e, - 0x5e, 0xff, 0xbd, 0x08, 0x95, 0xa9, 0x31, 0xf4, 0x18, 0x6a, 0x11, 0x91, 0x34, 0x64, 0xa9, 0xa4, - 0xa9, 0x64, 0x8a, 0x8d, 0xa9, 0xef, 0x35, 0xbc, 0x66, 0x05, 0xff, 0x4f, 0xc7, 0x4f, 0x67, 0x61, - 0xf4, 0x0c, 0x80, 0x67, 0xa1, 0x62, 0x09, 0xe5, 0xb9, 0x72, 0x85, 0xf8, 0x34, 0xb0, 0x37, 0x12, - 0x4c, 0x6f, 0x2c, 0x38, 0x72, 0x37, 0x8a, 0xab, 0x3c, 0xbb, 0xb2, 0x5c, 0xf4, 0x04, 0x36, 0x69, - 0x4a, 0x7a, 0x23, 0x1a, 0x46, 0x3c, 0x49, 0x48, 0xda, 0x0f, 0xa5, 0x22, 0x4a, 0x97, 0x40, 0x7f, - 0x08, 0x59, 0xec, 0xd0, 0x42, 0x97, 0x1a, 0x41, 0xcf, 0x61, 0x2b, 0x21, 0xb7, 0x61, 0x2f, 0x1f, - 0x0c, 0xa8, 0x08, 0x25, 0x7b, 0x4b, 0xc3, 0x1e, 0x1d, 0x70, 0x41, 0xc3, 0xc1, 0x28, 0x97, 0xb1, - 0x5f, 0x6c, 0x78, 0xcd, 0x75, 0xec, 0x27, 0xe4, 0xf6, 0xc0, 0x50, 0x2e, 0xd9, 0x5b, 0x7a, 0x60, - 0x08, 0xc7, 0x1a, 0x47, 0x67, 0xb0, 0xe9, 0x72, 0x0d, 0xff, 0xde, 0x75, 0xe9, 0x43, 0xae, 0x91, - 0x4d, 0x33, 0x2a, 0x53, 0xfb, 0x14, 0x1a, 0xda, 0x4c, 0x9e, 0x49, 0x25, 0x28, 0x49, 0xc2, 0x3c, - 0xbd, 0x49, 0xf9, 0x9b, 0x34, 0x8c, 0x78, 0x9a, 0xd2, 0x48, 0xa7, 0x49, 0xbf, 0x6c, 0x84, 0xb7, - 0xde, 0x13, 0xbe, 0x3e, 0x4d, 0xd5, 0xd3, 0xf6, 0x0f, 0x64, 0x94, 0x53, 0xfc, 0x59, 0x42, 0x6e, - 0xaf, 0x9d, 0xc8, 0xb5, 0xd5, 0x38, 0x9c, 0x49, 0xa0, 0x3d, 0x70, 0x95, 0x08, 0x63, 0x22, 0x63, - 0x45, 0x86, 0x43, 0x96, 0x0e, 0xfd, 0x15, 0x53, 0xa3, 0x47, 0x16, 0x39, 0x99, 0x01, 0x73, 0x74, - 0x7d, 0xef, 0xc2, 0xaa, 0xf8, 0x95, 0x79, 0x3a, 0x9e, 0x01, 0x08, 0xc3, 0xaa, 0xa0, 0xa4, 0x1f, - 0x66, 0x7c, 0xc4, 0xa2, 0x89, 0x5f, 0x6d, 0x78, 0xcd, 0x8d, 0xf6, 0xfe, 0x43, 0x5f, 0x1f, 0x25, - 0xfd, 0x0b, 0x93, 0x88, 0x41, 0xdc, 0xaf, 0x51, 0x1b, 0x8a, 0x24, 0x57, 0xb1, 0x0f, 0xe6, 0xf0, - 0xdb, 0x8b, 0xc5, 0x3a, 0xb9, 0x8a, 0xb1, 0xe1, 0xd6, 0x5f, 0x40, 0xe5, 0x8c, 0x4e, 0xce, 0x89, - 0x8a, 0x62, 0xf4, 0x31, 0x94, 0x33, 0x41, 0x07, 0xec, 0xd6, 0x3c, 0xb9, 0x2a, 0x76, 0x3b, 0xf4, - 0x05, 0xac, 0x0b, 0x9a, 0xf0, 0x31, 0x0d, 0x1d, 0xbc, 0x6c, 0x4e, 0xb5, 0x66, 0x83, 0x17, 0x26, - 0x56, 0x7f, 0x0d, 0x60, 0x9a, 0xc2, 0x4a, 0x1d, 0x42, 0xe1, 0x86, 0x4e, 0x8c, 0xce, 0xc3, 0xdb, - 0x73, 0x6a, 0xe4, 0x64, 0x09, 0xeb, 0xec, 0x83, 0x15, 0x28, 0x25, 0x7a, 0x5f, 0xff, 0x16, 0x56, - 0x8f, 0x66, 0x03, 0x63, 0x6e, 0x32, 0x78, 0x7f, 0x9e, 0x0c, 0x08, 0x8a, 0x19, 0x17, 0xb6, 0x19, - 0xd6, 0xb1, 0x59, 0xd7, 0x7f, 0xf2, 0xa0, 0x7c, 0xce, 0x84, 0xe0, 0x02, 0x9d, 0x40, 0x49, 0x68, - 0x8b, 0xce, 0x56, 0xfb, 0x81, 0xb6, 0xe6, 0x3e, 0x8d, 0xad, 0x00, 0xea, 0x00, 0x64, 0x54, 0x44, - 0x34, 0x55, 0x64, 0x48, 0x5d, 0xef, 0x7d, 0xbe, 0x58, 0xee, 0xc2, 0x72, 0xf1, 0x5c, 0x12, 0x6a, - 0xc3, 0x47, 0xf4, 0x36, 0x1a, 0xe5, 0x7d, 0xfd, 0x60, 0x48, 0x7f, 0xda, 0x8a, 0xd3, 0x2e, 0xfc, - 0xbf, 0x03, 0xf5, 0x55, 0xbb, 0x56, 0x94, 0xf5, 0x5f, 0x3d, 0x28, 0x99, 0x22, 0xeb, 0xb1, 0x65, - 0x4a, 0xe3, 0x8e, 0xb2, 0xff, 0x4f, 0xc6, 0x96, 0xa9, 0x31, 0xb6, 0xf9, 0xb3, 0x9a, 0x2c, 0xff, - 0xdb, 0x9a, 0x74, 0xa1, 0x9c, 0x98, 0x3a, 0xbb, 0x51, 0xba, 0xf7, 0x40, 0x29, 0x7b, 0x39, 0xd8, - 0x25, 0xef, 0x5e, 0x03, 0xcc, 0x9e, 0x37, 0x02, 0x28, 0x9f, 0x77, 0x2e, 0xaf, 0xba, 0xb8, 0xb6, - 0x84, 0x1e, 0xc1, 0xfa, 0x05, 0xee, 0x1e, 0x77, 0x71, 0xe8, 0x42, 0x1e, 0x5a, 0x85, 0x15, 0xdc, - 0xbd, 0x78, 0x79, 0x7a, 0xd8, 0xa9, 0x2d, 0x23, 0x04, 0x1b, 0x0e, 0x9f, 0xc6, 0x0a, 0x68, 0x05, - 0x0a, 0x9d, 0xef, 0x5e, 0xd5, 0x8a, 0xbb, 0x3b, 0xb0, 0xe2, 0x6e, 0x01, 0x6d, 0x42, 0x69, 0xac, - 0x07, 0x80, 0xa9, 0x9d, 0x87, 0xed, 0x66, 0xf7, 0x37, 0x0f, 0x4a, 0x66, 0x30, 0xa3, 0x67, 0x50, - 0x54, 0x93, 0xcc, 0xc2, 0x1b, 0xed, 0x2f, 0x3f, 0x30, 0xc7, 0x83, 0xab, 0x49, 0x46, 0xb1, 0xc9, - 0xf8, 0x2f, 0x9e, 0x45, 0x0b, 0x4a, 0x7d, 0x3a, 0x22, 0x13, 0xf3, 0x0c, 0xfe, 0x76, 0x34, 0x5a, - 0x1e, 0xaa, 0x43, 0xe5, 0xfe, 0xe9, 0xe8, 0x3f, 0x4f, 0x15, 0xdf, 0xef, 0x77, 0xb7, 0xa0, 0xa8, - 0xdd, 0xa1, 0x2a, 0x94, 0x8e, 0xba, 0x2f, 0x3b, 0xaf, 0x6a, 0x4b, 0x7a, 0xd9, 0xc5, 0xf8, 0x7b, - 0x5c, 0xf3, 0x0e, 0x9e, 0xff, 0x78, 0xb7, 0xed, 0xfd, 0x7c, 0xb7, 0xed, 0xbd, 0xbb, 0xdb, 0xf6, - 0x5e, 0x3f, 0x19, 0x32, 0x15, 0xe7, 0xbd, 0x20, 0xe2, 0x49, 0xcb, 0x7a, 0xdd, 0x4b, 0xa8, 0x8c, - 0xdd, 0xba, 0xf5, 0xfe, 0x8f, 0xbc, 0x57, 0x36, 0x9e, 0x9e, 0xfe, 0x11, 0x00, 0x00, 0xff, 0xff, - 0x93, 0xe3, 0x62, 0x40, 0xa5, 0x08, 0x00, 0x00, -} - -func (m *RedisService) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisService) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Faults) > 0 { - for iNdEx := len(m.Faults) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Faults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Redis) > 0 { - for iNdEx := len(m.Redis) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Redis[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Settings != nil { - { - size, err := m.Settings.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Host) > 0 { - for iNdEx := len(m.Host) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Host[iNdEx]) - copy(dAtA[i:], m.Host[iNdEx]) - i = encodeVarintRedisservice(dAtA, i, uint64(len(m.Host[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RedisService_Settings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisService_Settings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService_Settings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Auth != nil { - { - size, err := m.Auth.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.ReadPolicy != 0 { - i = encodeVarintRedisservice(dAtA, i, uint64(m.ReadPolicy)) - i-- - dAtA[i] = 0x48 - } - if m.EnableRedirection { - i-- - if m.EnableRedirection { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.EnableHashtagging { - i-- - if m.EnableHashtagging { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.MaxUpstreamUnknownConnections != nil { - { - size, err := m.MaxUpstreamUnknownConnections.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.BufferFlushTimeout != nil { - { - size, err := m.BufferFlushTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.MaxBufferSizeBeforeFlush != 0 { - i = encodeVarintRedisservice(dAtA, i, uint64(m.MaxBufferSizeBeforeFlush)) - i-- - dAtA[i] = 0x20 - } - if m.EnableCommandStats { - i-- - if m.EnableCommandStats { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.OpTimeout != nil { - { - size, err := m.OpTimeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.CaseInsensitive { - i-- - if m.CaseInsensitive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RedisService_KeyMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisService_KeyMatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService_KeyMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.RemovePrefix { - i-- - if m.RemovePrefix { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Prefix) > 0 { - i -= len(m.Prefix) - copy(dAtA[i:], m.Prefix) - i = encodeVarintRedisservice(dAtA, i, uint64(len(m.Prefix))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RedisService_RouteMatch) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisService_RouteMatch) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService_RouteMatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Match != nil { - { - size := m.Match.Size() - i -= size - if _, err := m.Match.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *RedisService_RouteMatch_Key) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService_RouteMatch_Key) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Key != nil { - { - size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *RedisService_Destination) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisService_Destination) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService_Destination) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Port != 0 { - i = encodeVarintRedisservice(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x10 - } - if len(m.Host) > 0 { - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintRedisservice(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RedisService_Mirror) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisService_Mirror) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService_Mirror) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.ExcludeReadCommands { - i-- - if m.ExcludeReadCommands { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.Percentage != nil { - { - size, err := m.Percentage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Route != nil { - { - size, err := m.Route.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RedisService_Route) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedisService_Route) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedisService_Route) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Mirror) > 0 { - for iNdEx := len(m.Mirror) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Mirror[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Route != nil { - { - size, err := m.Route.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Match != nil { - { - size, err := m.Match.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Percent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Percent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Percent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *Fault) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Fault) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Fault) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Commands) > 0 { - for iNdEx := len(m.Commands) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Commands[iNdEx]) - copy(dAtA[i:], m.Commands[iNdEx]) - i = encodeVarintRedisservice(dAtA, i, uint64(len(m.Commands[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if m.Delay != nil { - { - size, err := m.Delay.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Percentage != nil { - { - size, err := m.Percentage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRedisservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = encodeVarintRedisservice(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintRedisservice(dAtA []byte, offset int, v uint64) int { - offset -= sovRedisservice(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RedisService) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Host) > 0 { - for _, s := range m.Host { - l = len(s) - n += 1 + l + sovRedisservice(uint64(l)) - } - } - if m.Settings != nil { - l = m.Settings.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if len(m.Redis) > 0 { - for _, e := range m.Redis { - l = e.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - } - if len(m.Faults) > 0 { - for _, e := range m.Faults { - l = e.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedisService_Settings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CaseInsensitive { - n += 2 - } - if m.OpTimeout != nil { - l = m.OpTimeout.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.EnableCommandStats { - n += 2 - } - if m.MaxBufferSizeBeforeFlush != 0 { - n += 1 + sovRedisservice(uint64(m.MaxBufferSizeBeforeFlush)) - } - if m.BufferFlushTimeout != nil { - l = m.BufferFlushTimeout.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.MaxUpstreamUnknownConnections != nil { - l = m.MaxUpstreamUnknownConnections.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.EnableHashtagging { - n += 2 - } - if m.EnableRedirection { - n += 2 - } - if m.ReadPolicy != 0 { - n += 1 + sovRedisservice(uint64(m.ReadPolicy)) - } - if m.Auth != nil { - l = m.Auth.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedisService_KeyMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Prefix) - if l > 0 { - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.RemovePrefix { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedisService_RouteMatch) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Match != nil { - n += m.Match.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedisService_RouteMatch_Key) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Key != nil { - l = m.Key.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - return n -} -func (m *RedisService_Destination) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - if l > 0 { - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.Port != 0 { - n += 1 + sovRedisservice(uint64(m.Port)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedisService_Mirror) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Route != nil { - l = m.Route.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.Percentage != nil { - l = m.Percentage.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.ExcludeReadCommands { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *RedisService_Route) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Match != nil { - l = m.Match.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.Route != nil { - l = m.Route.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if len(m.Mirror) > 0 { - for _, e := range m.Mirror { - l = e.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Percent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Fault) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sovRedisservice(uint64(m.Type)) - } - if m.Percentage != nil { - l = m.Percentage.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if m.Delay != nil { - l = m.Delay.Size() - n += 1 + l + sovRedisservice(uint64(l)) - } - if len(m.Commands) > 0 { - for _, s := range m.Commands { - l = len(s) - n += 1 + l + sovRedisservice(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovRedisservice(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRedisservice(x uint64) (n int) { - return sovRedisservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RedisService) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedisService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedisService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = append(m.Host, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Settings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Settings == nil { - m.Settings = &RedisService_Settings{} - } - if err := m.Settings.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redis", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Redis = append(m.Redis, &RedisService_Route{}) - if err := m.Redis[len(m.Redis)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Faults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Faults = append(m.Faults, &Fault{}) - if err := m.Faults[len(m.Faults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedisService_Settings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Settings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Settings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CaseInsensitive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CaseInsensitive = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OpTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OpTimeout == nil { - m.OpTimeout = &types.Duration{} - } - if err := m.OpTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableCommandStats", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableCommandStats = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxBufferSizeBeforeFlush", wireType) - } - m.MaxBufferSizeBeforeFlush = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxBufferSizeBeforeFlush |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BufferFlushTimeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BufferFlushTimeout == nil { - m.BufferFlushTimeout = &types.Duration{} - } - if err := m.BufferFlushTimeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxUpstreamUnknownConnections", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxUpstreamUnknownConnections == nil { - m.MaxUpstreamUnknownConnections = &types.UInt32Value{} - } - if err := m.MaxUpstreamUnknownConnections.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableHashtagging", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableHashtagging = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableRedirection", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableRedirection = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadPolicy", wireType) - } - m.ReadPolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReadPolicy |= RedisService_ReadPolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Auth", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Auth == nil { - m.Auth = &Auth{} - } - if err := m.Auth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedisService_KeyMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RemovePrefix", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RemovePrefix = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedisService_RouteMatch) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteMatch: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteMatch: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &RedisService_KeyMatch{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Match = &RedisService_RouteMatch_Key{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedisService_Destination) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Destination: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Destination: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedisService_Mirror) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Mirror: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Mirror: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Route == nil { - m.Route = &RedisService_Destination{} - } - if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Percentage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Percentage == nil { - m.Percentage = &Percent{} - } - if err := m.Percentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExcludeReadCommands", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExcludeReadCommands = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedisService_Route) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Route: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Route: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Match", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Match == nil { - m.Match = &RedisService_RouteMatch{} - } - if err := m.Match.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Route == nil { - m.Route = &RedisService_Destination{} - } - if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mirror", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mirror = append(m.Mirror, &RedisService_Mirror{}) - if err := m.Mirror[len(m.Mirror)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Percent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Percent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Percent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Fault) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Fault: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Fault: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= Fault_Type(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Percentage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Percentage == nil { - m.Percentage = &Percent{} - } - if err := m.Percentage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delay", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Delay == nil { - m.Delay = &types.Duration{} - } - if err := m.Delay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commands", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRedisservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRedisservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRedisservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Commands = append(m.Commands, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRedisservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthRedisservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRedisservice(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRedisservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRedisservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRedisservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRedisservice - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRedisservice - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRedisservice - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthRedisservice = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRedisservice = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRedisservice = fmt.Errorf("proto: unexpected end of group") -) diff --git a/api/redis/v1alpha1/redisservice.proto b/api/redis/v1alpha1/redisservice.proto deleted file mode 100644 index 16b70fe8..00000000 --- a/api/redis/v1alpha1/redisservice.proto +++ /dev/null @@ -1,191 +0,0 @@ -syntax = "proto3"; -import "google/protobuf/struct.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; -import "google/api/field_behavior.proto"; -import "api/redis/v1alpha1/redisdestination.proto"; - -// $schema: redis.aeraki.io.v1alpha1.RedisService -// $title: Redis Service -// $description: Istio Redis Service Extension. - -// `RedisService` provide a way to config redis service in service mesh. -package redis.aeraki.io.v1alpha1; - -option go_package = "github.com/aeraki-mesh/aeraki/api/redis/v1alpha1"; - -// RedisService provide a way to config redis service in service mesh. -// -// -// -// -message RedisService { - - enum ReadPolicy { - MASTER = 0; - PREFER_MASTER = 1; - REPLICA = 2; - PREFER_REPLICA = 3; - ANY = 4; - } - - message Settings { - - // Indicates that prefix matching should be case insensitive. - bool case_insensitive = 1; - - // Per-operation timeout in milliseconds. The timer starts when the first - // command of a pipeline is written to the backend connection. Each response received from Redis - // resets the timer since it signifies that the next command is being processed by the backend. - // The only exception to this behavior is when a connection to a backend is not yet established. - // In that case, the connect timeout on the cluster will govern the timeout until the connection - // is ready. - google.protobuf.Duration op_timeout = 2; - - // Enable per-command statistics per upstream cluster, in addition to the filter level aggregate - // count - bool enable_command_stats = 3; - - // Maximum size of encoded request buffer before flush is triggered and encoded requests - // are sent upstream. If this is unset, the buffer flushes whenever it receives data - // and performs no batching. - // This feature makes it possible for multiple clients to send requests to Envoy and have - // them batched- for example if one is running several worker processes, each with its own - // Redis connection. There is no benefit to using this with a single downstream process. - // Recommended size (if enabled) is 1024 bytes. - uint32 max_buffer_size_before_flush = 4; - - // The encoded request buffer is flushed N milliseconds after the first request has been - // encoded, unless the buffer size has already exceeded `max_buffer_size_before_flush`. - // If `max_buffer_size_before_flush` is not set, this flush timer is not used. Otherwise, - // the timer should be set according to the number of clients, overall request rate and - // desired maximum latency for a single command. For example, if there are many requests - // being batched together at a high rate, the buffer will likely be filled before the timer - // fires. Alternatively, if the request rate is lower the buffer will not be filled as often - // before the timer fires. - // If `max_buffer_size_before_flush` is set, but `buffer_flush_timeout` is not, the latter - // defaults to 3ms. - google.protobuf.Duration buffer_flush_timeout = 5; - - // `max_upstream_unknown_connections` controls how many upstream connections to unknown hosts - // can be created at any given time by any given worker thread (see `enable_redirection` for - // more details). If the host is unknown and a connection cannot be created due to enforcing - // this limit, then redirection will fail and the original redirection error will be passed - // downstream unchanged. This limit defaults to 100. - google.protobuf.UInt32Value max_upstream_unknown_connections = 6; - - // Use hash tagging on every redis key to guarantee that keys with the same hash tag will be - // forwarded to the same upstream. The hash key used for determining the upstream in a - // consistent hash ring configuration will be computed from the hash tagged key instead of the - // whole key. The algorithm used to compute the hash tag is identical to the `redis-cluster - // implementation `_. - // - // Examples: - // - // * '{user1000}.following' and '{user1000}.followers' **will** be sent to the same upstream - // * '{user1000}.following' and '{user1001}.following' **might** be sent to the same upstream - bool enable_hashtagging = 7; - - // Accept `moved and ask redirection - // `_ errors from upstream - // redis servers, and retry commands to the specified target server. The target server does not - // need to be known to the cluster manager. If the command cannot be redirected, then the - // original error is passed downstream unchanged. By default, this support is not enabled. - bool enable_redirection = 8; - - // Read policy. The default is to read from the primary. - ReadPolicy read_policy = 9; - // Downstream auth. - Auth auth = 10; - } - - // KeyMatch match the redis key prefix; - message KeyMatch { - // String prefix that must match the beginning of the keys. Envoy will always favor the - // longest match. - string prefix = 1; - - // Indicates if the prefix needs to be removed from the key when forwarded. - bool remove_prefix = 2; - } - - message RouteMatch { - oneof match { - KeyMatch key = 1; - } - } - - message Destination { - string host = 1 [(google.api.field_behavior) = REQUIRED]; - uint32 port = 2; - } - - message Mirror { - Destination route = 1; - Percent percentage = 2; - bool exclude_read_commands = 3; - } - - message Route { - RouteMatch match = 1; - Destination route = 2; - repeated Mirror mirror = 3; - } - - repeated string host = 1 [(google.api.field_behavior) = REQUIRED]; - - Settings settings = 2; - - repeated Route redis = 3 [(google.api.field_behavior) = REQUIRED]; - - // List of faults to inject. Faults currently come in two flavors: - // - Delay, which delays a request. - // - Error, which responds to a request with an error. Errors can also have delays attached. - repeated Fault faults = 4; -} - -// Percent specifies a percentage in the range of [0.0, 100.0]. -message Percent { - double value = 1; -} - -// Fault defines redis faults used for fault injection. -message Fault { - enum Type { - // Delays requests. This is the base fault; other faults can have delays added. - DELAY = 0; - // Returns errors on requests. - ERROR = 1; - } - - // Fault type. - Type type = 1; - - // Percentage of requests fault applies to. - Percent percentage = 2; - - // Delay for all faults. If not set, defaults to zero - google.protobuf.Duration delay = 3; - - // Commands fault is restricted to, if any. If not set, fault applies to all commands - // other than auth and ping (due to special handling of those commands in Envoy). - repeated string commands = 4; -} \ No newline at end of file diff --git a/api/redis/v1alpha1/redisservice_deepcopy.gen.go b/api/redis/v1alpha1/redisservice_deepcopy.gen.go deleted file mode 100644 index 7d651537..00000000 --- a/api/redis/v1alpha1/redisservice_deepcopy.gen.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/redis/v1alpha1/redisservice.proto - -// `RedisService` provide a way to config redis service in service mesh. - -package v1alpha1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// DeepCopyInto supports using RedisService within kubernetes types, where deepcopy-gen is used. -func (in *RedisService) DeepCopyInto(out *RedisService) { - p := proto.Clone(in).(*RedisService) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService. Required by controller-gen. -func (in *RedisService) DeepCopy() *RedisService { - if in == nil { - return nil - } - out := new(RedisService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisService. Required by controller-gen. -func (in *RedisService) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using RedisService_Settings within kubernetes types, where deepcopy-gen is used. -func (in *RedisService_Settings) DeepCopyInto(out *RedisService_Settings) { - p := proto.Clone(in).(*RedisService_Settings) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Settings. Required by controller-gen. -func (in *RedisService_Settings) DeepCopy() *RedisService_Settings { - if in == nil { - return nil - } - out := new(RedisService_Settings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Settings. Required by controller-gen. -func (in *RedisService_Settings) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using RedisService_KeyMatch within kubernetes types, where deepcopy-gen is used. -func (in *RedisService_KeyMatch) DeepCopyInto(out *RedisService_KeyMatch) { - p := proto.Clone(in).(*RedisService_KeyMatch) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_KeyMatch. Required by controller-gen. -func (in *RedisService_KeyMatch) DeepCopy() *RedisService_KeyMatch { - if in == nil { - return nil - } - out := new(RedisService_KeyMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_KeyMatch. Required by controller-gen. -func (in *RedisService_KeyMatch) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using RedisService_RouteMatch within kubernetes types, where deepcopy-gen is used. -func (in *RedisService_RouteMatch) DeepCopyInto(out *RedisService_RouteMatch) { - p := proto.Clone(in).(*RedisService_RouteMatch) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_RouteMatch. Required by controller-gen. -func (in *RedisService_RouteMatch) DeepCopy() *RedisService_RouteMatch { - if in == nil { - return nil - } - out := new(RedisService_RouteMatch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_RouteMatch. Required by controller-gen. -func (in *RedisService_RouteMatch) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using RedisService_Destination within kubernetes types, where deepcopy-gen is used. -func (in *RedisService_Destination) DeepCopyInto(out *RedisService_Destination) { - p := proto.Clone(in).(*RedisService_Destination) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Destination. Required by controller-gen. -func (in *RedisService_Destination) DeepCopy() *RedisService_Destination { - if in == nil { - return nil - } - out := new(RedisService_Destination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Destination. Required by controller-gen. -func (in *RedisService_Destination) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using RedisService_Mirror within kubernetes types, where deepcopy-gen is used. -func (in *RedisService_Mirror) DeepCopyInto(out *RedisService_Mirror) { - p := proto.Clone(in).(*RedisService_Mirror) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Mirror. Required by controller-gen. -func (in *RedisService_Mirror) DeepCopy() *RedisService_Mirror { - if in == nil { - return nil - } - out := new(RedisService_Mirror) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Mirror. Required by controller-gen. -func (in *RedisService_Mirror) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using RedisService_Route within kubernetes types, where deepcopy-gen is used. -func (in *RedisService_Route) DeepCopyInto(out *RedisService_Route) { - p := proto.Clone(in).(*RedisService_Route) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Route. Required by controller-gen. -func (in *RedisService_Route) DeepCopy() *RedisService_Route { - if in == nil { - return nil - } - out := new(RedisService_Route) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RedisService_Route. Required by controller-gen. -func (in *RedisService_Route) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Percent within kubernetes types, where deepcopy-gen is used. -func (in *Percent) DeepCopyInto(out *Percent) { - p := proto.Clone(in).(*Percent) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Percent. Required by controller-gen. -func (in *Percent) DeepCopy() *Percent { - if in == nil { - return nil - } - out := new(Percent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Percent. Required by controller-gen. -func (in *Percent) DeepCopyInterface() interface{} { - return in.DeepCopy() -} - -// DeepCopyInto supports using Fault within kubernetes types, where deepcopy-gen is used. -func (in *Fault) DeepCopyInto(out *Fault) { - p := proto.Clone(in).(*Fault) - *out = *p -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Fault. Required by controller-gen. -func (in *Fault) DeepCopy() *Fault { - if in == nil { - return nil - } - out := new(Fault) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Fault. Required by controller-gen. -func (in *Fault) DeepCopyInterface() interface{} { - return in.DeepCopy() -} diff --git a/api/redis/v1alpha1/redisservice_json.gen.go b/api/redis/v1alpha1/redisservice_json.gen.go deleted file mode 100644 index 2f605cc7..00000000 --- a/api/redis/v1alpha1/redisservice_json.gen.go +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: api/redis/v1alpha1/redisservice.proto - -// `RedisService` provide a way to config redis service in service mesh. - -package v1alpha1 - -import ( - bytes "bytes" - fmt "fmt" - github.com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - _ "istio.io/gogo-genproto/googleapis/google/api" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// MarshalJSON is a custom marshaler for RedisService -func (this *RedisService) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisService -func (this *RedisService) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RedisService_Settings -func (this *RedisService_Settings) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisService_Settings -func (this *RedisService_Settings) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RedisService_KeyMatch -func (this *RedisService_KeyMatch) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisService_KeyMatch -func (this *RedisService_KeyMatch) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RedisService_RouteMatch -func (this *RedisService_RouteMatch) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisService_RouteMatch -func (this *RedisService_RouteMatch) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RedisService_Destination -func (this *RedisService_Destination) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisService_Destination -func (this *RedisService_Destination) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RedisService_Mirror -func (this *RedisService_Mirror) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisService_Mirror -func (this *RedisService_Mirror) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for RedisService_Route -func (this *RedisService_Route) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for RedisService_Route -func (this *RedisService_Route) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Percent -func (this *Percent) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Percent -func (this *Percent) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -// MarshalJSON is a custom marshaler for Fault -func (this *Fault) MarshalJSON() ([]byte, error) { - str, err := RedisserviceMarshaler.MarshalToString(this) - return []byte(str), err -} - -// UnmarshalJSON is a custom unmarshaler for Fault -func (this *Fault) UnmarshalJSON(b []byte) error { - return RedisserviceUnmarshaler.Unmarshal(bytes.NewReader(b), this) -} - -var ( - RedisserviceMarshaler = &github.com_gogo_protobuf_jsonpb.Marshaler{} - RedisserviceUnmarshaler = &github.com_gogo_protobuf_jsonpb.Unmarshaler{AllowUnknownFields: true} -) diff --git a/client-go/README.md b/client-go/README.md deleted file mode 100644 index 666df09c..00000000 --- a/client-go/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This package is deprecated! - -Aeraki API client-go has been moved to a standalone reposition: https://github.com/aeraki-mesh/client-go. diff --git a/client-go/pkg/apis/dubbo/v1alpha1/doc.go b/client-go/pkg/apis/dubbo/v1alpha1/doc.go deleted file mode 100644 index 52ebfbdf..00000000 --- a/client-go/pkg/apis/dubbo/v1alpha1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -// Package has auto-generated kube type wrappers for raw types. -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +groupName=dubbo.aeraki.io -package v1alpha1 diff --git a/client-go/pkg/apis/dubbo/v1alpha1/register.gen.go b/client-go/pkg/apis/dubbo/v1alpha1/register.gen.go deleted file mode 100644 index c9f149a7..00000000 --- a/client-go/pkg/apis/dubbo/v1alpha1/register.gen.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // Package-wide variables from generator "register". - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -const ( - // Package-wide consts from generator "register". - GroupName = "dubbo.aeraki.io" -) - -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &DubboAuthorizationPolicy{}, - &DubboAuthorizationPolicyList{}, - ) - v1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/client-go/pkg/apis/dubbo/v1alpha1/types.gen.go b/client-go/pkg/apis/dubbo/v1alpha1/types.gen.go deleted file mode 100644 index ee46a575..00000000 --- a/client-go/pkg/apis/dubbo/v1alpha1/types.gen.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - dubbov1alpha1 "github.com/aeraki-mesh/aeraki/api/dubbo/v1alpha1" - metav1alpha1 "istio.io/api/meta/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DubboAuthorizationPolicy enables access control on Dubbo services. -// -// -// -// -type DubboAuthorizationPolicy struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the implementation of this definition. - // +optional - Spec dubbov1alpha1.DubboAuthorizationPolicy `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - Status metav1alpha1.IstioStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DubboAuthorizationPolicyList is a collection of DubboAuthorizationPolicies. -type DubboAuthorizationPolicyList struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []DubboAuthorizationPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/client-go/pkg/apis/dubbo/v1alpha1/zz_generated.deepcopy.gen.go b/client-go/pkg/apis/dubbo/v1alpha1/zz_generated.deepcopy.gen.go deleted file mode 100644 index 150933bd..00000000 --- a/client-go/pkg/apis/dubbo/v1alpha1/zz_generated.deepcopy.gen.go +++ /dev/null @@ -1,85 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright Aeraki 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. - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DubboAuthorizationPolicy) DeepCopyInto(out *DubboAuthorizationPolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DubboAuthorizationPolicy. -func (in *DubboAuthorizationPolicy) DeepCopy() *DubboAuthorizationPolicy { - if in == nil { - return nil - } - out := new(DubboAuthorizationPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DubboAuthorizationPolicy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DubboAuthorizationPolicyList) DeepCopyInto(out *DubboAuthorizationPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DubboAuthorizationPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DubboAuthorizationPolicyList. -func (in *DubboAuthorizationPolicyList) DeepCopy() *DubboAuthorizationPolicyList { - if in == nil { - return nil - } - out := new(DubboAuthorizationPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DubboAuthorizationPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/client-go/pkg/apis/metaprotocol/v1alpha1/doc.go b/client-go/pkg/apis/metaprotocol/v1alpha1/doc.go deleted file mode 100644 index d3b05791..00000000 --- a/client-go/pkg/apis/metaprotocol/v1alpha1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -// Package has auto-generated kube type wrappers for raw types. -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +groupName=metaprotocol.aeraki.io -package v1alpha1 diff --git a/client-go/pkg/apis/metaprotocol/v1alpha1/register.gen.go b/client-go/pkg/apis/metaprotocol/v1alpha1/register.gen.go deleted file mode 100644 index 359632c4..00000000 --- a/client-go/pkg/apis/metaprotocol/v1alpha1/register.gen.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // Package-wide variables from generator "register". - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -const ( - // Package-wide consts from generator "register". - GroupName = "metaprotocol.aeraki.io" -) - -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &ApplicationProtocol{}, - &ApplicationProtocolList{}, - &MetaRouter{}, - &MetaRouterList{}, - ) - v1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/client-go/pkg/apis/metaprotocol/v1alpha1/types.gen.go b/client-go/pkg/apis/metaprotocol/v1alpha1/types.gen.go deleted file mode 100644 index 4cd5731a..00000000 --- a/client-go/pkg/apis/metaprotocol/v1alpha1/types.gen.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. -// Deprecated: client-go package is deprecated, use github.com/aeraki-mesh/client-go instead. -package v1alpha1 - -import ( - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/api/metaprotocol/v1alpha1" - metav1alpha1 "istio.io/api/meta/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// please upgrade the proto package -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ApplicationProtocol defines an application protocol built on top of MetaProtocol. -// -// -// -// -type ApplicationProtocol struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the implementation of this definition. - // +optional - Spec metaprotocolv1alpha1.ApplicationProtocol `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - Status metav1alpha1.IstioStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ApplicationProtocolList is a collection of ApplicationProtocols. -type ApplicationProtocolList struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []ApplicationProtocol `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// please upgrade the proto package -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MetaRouter defines route policies for MetaProtocol proxy. -// -// -// -// -type MetaRouter struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the implementation of this definition. - // +optional - Spec metaprotocolv1alpha1.MetaRouter `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - Status metav1alpha1.IstioStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MetaRouterList is a collection of MetaRouters. -type MetaRouterList struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []MetaRouter `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/client-go/pkg/apis/metaprotocol/v1alpha1/zz_generated.deepcopy.gen.go b/client-go/pkg/apis/metaprotocol/v1alpha1/zz_generated.deepcopy.gen.go deleted file mode 100644 index 78daaaad..00000000 --- a/client-go/pkg/apis/metaprotocol/v1alpha1/zz_generated.deepcopy.gen.go +++ /dev/null @@ -1,146 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright Aeraki 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. - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ApplicationProtocol) DeepCopyInto(out *ApplicationProtocol) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationProtocol. -func (in *ApplicationProtocol) DeepCopy() *ApplicationProtocol { - if in == nil { - return nil - } - out := new(ApplicationProtocol) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ApplicationProtocol) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ApplicationProtocolList) DeepCopyInto(out *ApplicationProtocolList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ApplicationProtocol, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationProtocolList. -func (in *ApplicationProtocolList) DeepCopy() *ApplicationProtocolList { - if in == nil { - return nil - } - out := new(ApplicationProtocolList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ApplicationProtocolList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetaRouter) DeepCopyInto(out *MetaRouter) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouter. -func (in *MetaRouter) DeepCopy() *MetaRouter { - if in == nil { - return nil - } - out := new(MetaRouter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MetaRouter) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetaRouterList) DeepCopyInto(out *MetaRouterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MetaRouter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaRouterList. -func (in *MetaRouterList) DeepCopy() *MetaRouterList { - if in == nil { - return nil - } - out := new(MetaRouterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MetaRouterList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/client-go/pkg/apis/redis/v1alpha1/doc.go b/client-go/pkg/apis/redis/v1alpha1/doc.go deleted file mode 100644 index 411cdaee..00000000 --- a/client-go/pkg/apis/redis/v1alpha1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -// Package has auto-generated kube type wrappers for raw types. -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +groupName=redis.aeraki.io -package v1alpha1 diff --git a/client-go/pkg/apis/redis/v1alpha1/register.gen.go b/client-go/pkg/apis/redis/v1alpha1/register.gen.go deleted file mode 100644 index 136a3f3f..00000000 --- a/client-go/pkg/apis/redis/v1alpha1/register.gen.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // Package-wide variables from generator "register". - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -const ( - // Package-wide consts from generator "register". - GroupName = "redis.aeraki.io" -) - -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &RedisDestination{}, - &RedisDestinationList{}, - &RedisService{}, - &RedisServiceList{}, - ) - v1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/client-go/pkg/apis/redis/v1alpha1/types.gen.go b/client-go/pkg/apis/redis/v1alpha1/types.gen.go deleted file mode 100644 index 16ecca6c..00000000 --- a/client-go/pkg/apis/redis/v1alpha1/types.gen.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright The Kubernetes 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. -*/ - -// Code generated by kubetype-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - redisv1alpha1 "github.com/aeraki-mesh/aeraki/api/redis/v1alpha1" - metav1alpha1 "istio.io/api/meta/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RedisDestination defines policies that apply to redis traffic intended for a redis service -// -// -// -// -type RedisDestination struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the implementation of this definition. - // +optional - Spec redisv1alpha1.RedisDestination `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - Status metav1alpha1.IstioStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RedisDestinationList is a collection of RedisDestinations. -type RedisDestinationList struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []RedisDestination `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RedisService provide a way to config redis service in service mesh. -// -// -// -// -type RedisService struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec defines the implementation of this definition. - // +optional - Spec redisv1alpha1.RedisService `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - Status metav1alpha1.IstioStatus `json:"status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RedisServiceList is a collection of RedisServices. -type RedisServiceList struct { - v1.TypeMeta `json:",inline"` - // +optional - v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []RedisService `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/client-go/pkg/apis/redis/v1alpha1/zz_generated.deepcopy.gen.go b/client-go/pkg/apis/redis/v1alpha1/zz_generated.deepcopy.gen.go deleted file mode 100644 index ede7dc3c..00000000 --- a/client-go/pkg/apis/redis/v1alpha1/zz_generated.deepcopy.gen.go +++ /dev/null @@ -1,146 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright Aeraki 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. - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisDestination) DeepCopyInto(out *RedisDestination) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisDestination. -func (in *RedisDestination) DeepCopy() *RedisDestination { - if in == nil { - return nil - } - out := new(RedisDestination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RedisDestination) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisDestinationList) DeepCopyInto(out *RedisDestinationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RedisDestination, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisDestinationList. -func (in *RedisDestinationList) DeepCopy() *RedisDestinationList { - if in == nil { - return nil - } - out := new(RedisDestinationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RedisDestinationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisService) DeepCopyInto(out *RedisService) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisService. -func (in *RedisService) DeepCopy() *RedisService { - if in == nil { - return nil - } - out := new(RedisService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RedisService) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisServiceList) DeepCopyInto(out *RedisServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RedisService, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisServiceList. -func (in *RedisServiceList) DeepCopy() *RedisServiceList { - if in == nil { - return nil - } - out := new(RedisServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RedisServiceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/client-go/pkg/clientset/versioned/clientset.gen.go b/client-go/pkg/clientset/versioned/clientset.gen.go deleted file mode 100644 index f6f32cbd..00000000 --- a/client-go/pkg/clientset/versioned/clientset.gen.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// Deprecated: client-go package is deprecated, use github.com/aeraki-mesh/client-go instead. -package versioned - -import ( - "fmt" - - dubbov1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1" - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1" - redisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/redis/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - DubboV1alpha1() dubbov1alpha1.DubboV1alpha1Interface - MetaprotocolV1alpha1() metaprotocolv1alpha1.MetaprotocolV1alpha1Interface - RedisV1alpha1() redisv1alpha1.RedisV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - dubboV1alpha1 *dubbov1alpha1.DubboV1alpha1Client - metaprotocolV1alpha1 *metaprotocolv1alpha1.MetaprotocolV1alpha1Client - redisV1alpha1 *redisv1alpha1.RedisV1alpha1Client -} - -// DubboV1alpha1 retrieves the DubboV1alpha1Client -func (c *Clientset) DubboV1alpha1() dubbov1alpha1.DubboV1alpha1Interface { - return c.dubboV1alpha1 -} - -// MetaprotocolV1alpha1 retrieves the MetaprotocolV1alpha1Client -func (c *Clientset) MetaprotocolV1alpha1() metaprotocolv1alpha1.MetaprotocolV1alpha1Interface { - return c.metaprotocolV1alpha1 -} - -// RedisV1alpha1 retrieves the RedisV1alpha1Client -func (c *Clientset) RedisV1alpha1() redisv1alpha1.RedisV1alpha1Interface { - return c.redisV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.dubboV1alpha1, err = dubbov1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.metaprotocolV1alpha1, err = metaprotocolv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - cs.redisV1alpha1, err = redisv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.dubboV1alpha1 = dubbov1alpha1.NewForConfigOrDie(c) - cs.metaprotocolV1alpha1 = metaprotocolv1alpha1.NewForConfigOrDie(c) - cs.redisV1alpha1 = redisv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.dubboV1alpha1 = dubbov1alpha1.New(c) - cs.metaprotocolV1alpha1 = metaprotocolv1alpha1.New(c) - cs.redisV1alpha1 = redisv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/client-go/pkg/clientset/versioned/doc.go b/client-go/pkg/clientset/versioned/doc.go deleted file mode 100644 index 034f16a7..00000000 --- a/client-go/pkg/clientset/versioned/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/client-go/pkg/clientset/versioned/fake/clientset_generated.gen.go b/client-go/pkg/clientset/versioned/fake/clientset_generated.gen.go deleted file mode 100644 index a8edf9ea..00000000 --- a/client-go/pkg/clientset/versioned/fake/clientset_generated.gen.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - dubbov1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1" - fakedubbov1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake" - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1" - fakemetaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake" - redisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/redis/v1alpha1" - fakeredisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// DubboV1alpha1 retrieves the DubboV1alpha1Client -func (c *Clientset) DubboV1alpha1() dubbov1alpha1.DubboV1alpha1Interface { - return &fakedubbov1alpha1.FakeDubboV1alpha1{Fake: &c.Fake} -} - -// MetaprotocolV1alpha1 retrieves the MetaprotocolV1alpha1Client -func (c *Clientset) MetaprotocolV1alpha1() metaprotocolv1alpha1.MetaprotocolV1alpha1Interface { - return &fakemetaprotocolv1alpha1.FakeMetaprotocolV1alpha1{Fake: &c.Fake} -} - -// RedisV1alpha1 retrieves the RedisV1alpha1Client -func (c *Clientset) RedisV1alpha1() redisv1alpha1.RedisV1alpha1Interface { - return &fakeredisv1alpha1.FakeRedisV1alpha1{Fake: &c.Fake} -} diff --git a/client-go/pkg/clientset/versioned/fake/doc.go b/client-go/pkg/clientset/versioned/fake/doc.go deleted file mode 100644 index 250b6395..00000000 --- a/client-go/pkg/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/client-go/pkg/clientset/versioned/fake/register.gen.go b/client-go/pkg/clientset/versioned/fake/register.gen.go deleted file mode 100644 index a724d08e..00000000 --- a/client-go/pkg/clientset/versioned/fake/register.gen.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - dubbov1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - redisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - dubbov1alpha1.AddToScheme, - metaprotocolv1alpha1.AddToScheme, - redisv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/client-go/pkg/clientset/versioned/scheme/doc.go b/client-go/pkg/clientset/versioned/scheme/doc.go deleted file mode 100644 index 8a59cc29..00000000 --- a/client-go/pkg/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/client-go/pkg/clientset/versioned/scheme/register.gen.go b/client-go/pkg/clientset/versioned/scheme/register.gen.go deleted file mode 100644 index 73a07147..00000000 --- a/client-go/pkg/clientset/versioned/scheme/register.gen.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - dubbov1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - redisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - dubbov1alpha1.AddToScheme, - metaprotocolv1alpha1.AddToScheme, - redisv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/doc.go b/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/doc.go deleted file mode 100644 index 8582cce8..00000000 --- a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubbo_client.gen.go b/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubbo_client.gen.go deleted file mode 100644 index d3f63b91..00000000 --- a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubbo_client.gen.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type DubboV1alpha1Interface interface { - RESTClient() rest.Interface - DubboAuthorizationPoliciesGetter -} - -// DubboV1alpha1Client is used to interact with features provided by the dubbo.aeraki.io group. -type DubboV1alpha1Client struct { - restClient rest.Interface -} - -func (c *DubboV1alpha1Client) DubboAuthorizationPolicies(namespace string) DubboAuthorizationPolicyInterface { - return newDubboAuthorizationPolicies(c, namespace) -} - -// NewForConfig creates a new DubboV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*DubboV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &DubboV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new DubboV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *DubboV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new DubboV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *DubboV1alpha1Client { - return &DubboV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *DubboV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go b/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go deleted file mode 100644 index a07deb2b..00000000 --- a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - scheme "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// DubboAuthorizationPoliciesGetter has a method to return a DubboAuthorizationPolicyInterface. -// A group's client should implement this interface. -type DubboAuthorizationPoliciesGetter interface { - DubboAuthorizationPolicies(namespace string) DubboAuthorizationPolicyInterface -} - -// DubboAuthorizationPolicyInterface has methods to work with DubboAuthorizationPolicy resources. -type DubboAuthorizationPolicyInterface interface { - Create(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.CreateOptions) (*v1alpha1.DubboAuthorizationPolicy, error) - Update(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.UpdateOptions) (*v1alpha1.DubboAuthorizationPolicy, error) - UpdateStatus(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.UpdateOptions) (*v1alpha1.DubboAuthorizationPolicy, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.DubboAuthorizationPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.DubboAuthorizationPolicyList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DubboAuthorizationPolicy, err error) - DubboAuthorizationPolicyExpansion -} - -// dubboAuthorizationPolicies implements DubboAuthorizationPolicyInterface -type dubboAuthorizationPolicies struct { - client rest.Interface - ns string -} - -// newDubboAuthorizationPolicies returns a DubboAuthorizationPolicies -func newDubboAuthorizationPolicies(c *DubboV1alpha1Client, namespace string) *dubboAuthorizationPolicies { - return &dubboAuthorizationPolicies{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the dubboAuthorizationPolicy, and returns the corresponding dubboAuthorizationPolicy object, and an error if there is any. -func (c *dubboAuthorizationPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - result = &v1alpha1.DubboAuthorizationPolicy{} - err = c.client.Get(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of DubboAuthorizationPolicies that match those selectors. -func (c *dubboAuthorizationPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DubboAuthorizationPolicyList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.DubboAuthorizationPolicyList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested dubboAuthorizationPolicies. -func (c *dubboAuthorizationPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a dubboAuthorizationPolicy and creates it. Returns the server's representation of the dubboAuthorizationPolicy, and an error, if there is any. -func (c *dubboAuthorizationPolicies) Create(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.CreateOptions) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - result = &v1alpha1.DubboAuthorizationPolicy{} - err = c.client.Post(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(dubboAuthorizationPolicy). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a dubboAuthorizationPolicy and updates it. Returns the server's representation of the dubboAuthorizationPolicy, and an error, if there is any. -func (c *dubboAuthorizationPolicies) Update(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.UpdateOptions) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - result = &v1alpha1.DubboAuthorizationPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - Name(dubboAuthorizationPolicy.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(dubboAuthorizationPolicy). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *dubboAuthorizationPolicies) UpdateStatus(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.UpdateOptions) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - result = &v1alpha1.DubboAuthorizationPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - Name(dubboAuthorizationPolicy.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(dubboAuthorizationPolicy). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the dubboAuthorizationPolicy and deletes it. Returns an error if one occurs. -func (c *dubboAuthorizationPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *dubboAuthorizationPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched dubboAuthorizationPolicy. -func (c *dubboAuthorizationPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - result = &v1alpha1.DubboAuthorizationPolicy{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("dubboauthorizationpolicies"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/doc.go b/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/doc.go deleted file mode 100644 index 267204aa..00000000 --- a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubbo_client.gen.go b/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubbo_client.gen.go deleted file mode 100644 index 4d1b286b..00000000 --- a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubbo_client.gen.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeDubboV1alpha1 struct { - *testing.Fake -} - -func (c *FakeDubboV1alpha1) DubboAuthorizationPolicies(namespace string) v1alpha1.DubboAuthorizationPolicyInterface { - return &FakeDubboAuthorizationPolicies{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeDubboV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubboauthorizationpolicy.gen.go b/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubboauthorizationpolicy.gen.go deleted file mode 100644 index 61b34ada..00000000 --- a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/fake/fake_dubboauthorizationpolicy.gen.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeDubboAuthorizationPolicies implements DubboAuthorizationPolicyInterface -type FakeDubboAuthorizationPolicies struct { - Fake *FakeDubboV1alpha1 - ns string -} - -var dubboauthorizationpoliciesResource = schema.GroupVersionResource{Group: "dubbo.aeraki.io", Version: "v1alpha1", Resource: "dubboauthorizationpolicies"} - -var dubboauthorizationpoliciesKind = schema.GroupVersionKind{Group: "dubbo.aeraki.io", Version: "v1alpha1", Kind: "DubboAuthorizationPolicy"} - -// Get takes name of the dubboAuthorizationPolicy, and returns the corresponding dubboAuthorizationPolicy object, and an error if there is any. -func (c *FakeDubboAuthorizationPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(dubboauthorizationpoliciesResource, c.ns, name), &v1alpha1.DubboAuthorizationPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.DubboAuthorizationPolicy), err -} - -// List takes label and field selectors, and returns the list of DubboAuthorizationPolicies that match those selectors. -func (c *FakeDubboAuthorizationPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DubboAuthorizationPolicyList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(dubboauthorizationpoliciesResource, dubboauthorizationpoliciesKind, c.ns, opts), &v1alpha1.DubboAuthorizationPolicyList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.DubboAuthorizationPolicyList{ListMeta: obj.(*v1alpha1.DubboAuthorizationPolicyList).ListMeta} - for _, item := range obj.(*v1alpha1.DubboAuthorizationPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested dubboAuthorizationPolicies. -func (c *FakeDubboAuthorizationPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(dubboauthorizationpoliciesResource, c.ns, opts)) - -} - -// Create takes the representation of a dubboAuthorizationPolicy and creates it. Returns the server's representation of the dubboAuthorizationPolicy, and an error, if there is any. -func (c *FakeDubboAuthorizationPolicies) Create(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.CreateOptions) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(dubboauthorizationpoliciesResource, c.ns, dubboAuthorizationPolicy), &v1alpha1.DubboAuthorizationPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.DubboAuthorizationPolicy), err -} - -// Update takes the representation of a dubboAuthorizationPolicy and updates it. Returns the server's representation of the dubboAuthorizationPolicy, and an error, if there is any. -func (c *FakeDubboAuthorizationPolicies) Update(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.UpdateOptions) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(dubboauthorizationpoliciesResource, c.ns, dubboAuthorizationPolicy), &v1alpha1.DubboAuthorizationPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.DubboAuthorizationPolicy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDubboAuthorizationPolicies) UpdateStatus(ctx context.Context, dubboAuthorizationPolicy *v1alpha1.DubboAuthorizationPolicy, opts v1.UpdateOptions) (*v1alpha1.DubboAuthorizationPolicy, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(dubboauthorizationpoliciesResource, "status", c.ns, dubboAuthorizationPolicy), &v1alpha1.DubboAuthorizationPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.DubboAuthorizationPolicy), err -} - -// Delete takes name of the dubboAuthorizationPolicy and deletes it. Returns an error if one occurs. -func (c *FakeDubboAuthorizationPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(dubboauthorizationpoliciesResource, c.ns, name), &v1alpha1.DubboAuthorizationPolicy{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDubboAuthorizationPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(dubboauthorizationpoliciesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.DubboAuthorizationPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched dubboAuthorizationPolicy. -func (c *FakeDubboAuthorizationPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DubboAuthorizationPolicy, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(dubboauthorizationpoliciesResource, c.ns, name, pt, data, subresources...), &v1alpha1.DubboAuthorizationPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.DubboAuthorizationPolicy), err -} diff --git a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/generated_expansion.gen.go b/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/generated_expansion.gen.go deleted file mode 100644 index d67d83de..00000000 --- a/client-go/pkg/clientset/versioned/typed/dubbo/v1alpha1/generated_expansion.gen.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type DubboAuthorizationPolicyExpansion interface{} diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/applicationprotocol.gen.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/applicationprotocol.gen.go deleted file mode 100644 index 00654869..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/applicationprotocol.gen.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - scheme "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// ApplicationProtocolsGetter has a method to return a ApplicationProtocolInterface. -// A group's client should implement this interface. -type ApplicationProtocolsGetter interface { - ApplicationProtocols(namespace string) ApplicationProtocolInterface -} - -// ApplicationProtocolInterface has methods to work with ApplicationProtocol resources. -type ApplicationProtocolInterface interface { - Create(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.CreateOptions) (*v1alpha1.ApplicationProtocol, error) - Update(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.UpdateOptions) (*v1alpha1.ApplicationProtocol, error) - UpdateStatus(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.UpdateOptions) (*v1alpha1.ApplicationProtocol, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ApplicationProtocol, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ApplicationProtocolList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ApplicationProtocol, err error) - ApplicationProtocolExpansion -} - -// applicationProtocols implements ApplicationProtocolInterface -type applicationProtocols struct { - client rest.Interface - ns string -} - -// newApplicationProtocols returns a ApplicationProtocols -func newApplicationProtocols(c *MetaprotocolV1alpha1Client, namespace string) *applicationProtocols { - return &applicationProtocols{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the applicationProtocol, and returns the corresponding applicationProtocol object, and an error if there is any. -func (c *applicationProtocols) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ApplicationProtocol, err error) { - result = &v1alpha1.ApplicationProtocol{} - err = c.client.Get(). - Namespace(c.ns). - Resource("applicationprotocols"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of ApplicationProtocols that match those selectors. -func (c *applicationProtocols) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ApplicationProtocolList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.ApplicationProtocolList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("applicationprotocols"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested applicationProtocols. -func (c *applicationProtocols) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("applicationprotocols"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a applicationProtocol and creates it. Returns the server's representation of the applicationProtocol, and an error, if there is any. -func (c *applicationProtocols) Create(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.CreateOptions) (result *v1alpha1.ApplicationProtocol, err error) { - result = &v1alpha1.ApplicationProtocol{} - err = c.client.Post(). - Namespace(c.ns). - Resource("applicationprotocols"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(applicationProtocol). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a applicationProtocol and updates it. Returns the server's representation of the applicationProtocol, and an error, if there is any. -func (c *applicationProtocols) Update(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.UpdateOptions) (result *v1alpha1.ApplicationProtocol, err error) { - result = &v1alpha1.ApplicationProtocol{} - err = c.client.Put(). - Namespace(c.ns). - Resource("applicationprotocols"). - Name(applicationProtocol.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(applicationProtocol). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *applicationProtocols) UpdateStatus(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.UpdateOptions) (result *v1alpha1.ApplicationProtocol, err error) { - result = &v1alpha1.ApplicationProtocol{} - err = c.client.Put(). - Namespace(c.ns). - Resource("applicationprotocols"). - Name(applicationProtocol.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(applicationProtocol). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the applicationProtocol and deletes it. Returns an error if one occurs. -func (c *applicationProtocols) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("applicationprotocols"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *applicationProtocols) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("applicationprotocols"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched applicationProtocol. -func (c *applicationProtocols) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ApplicationProtocol, err error) { - result = &v1alpha1.ApplicationProtocol{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("applicationprotocols"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/doc.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/doc.go deleted file mode 100644 index 8582cce8..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/doc.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/doc.go deleted file mode 100644 index 267204aa..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_applicationprotocol.gen.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_applicationprotocol.gen.go deleted file mode 100644 index 14f68601..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_applicationprotocol.gen.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeApplicationProtocols implements ApplicationProtocolInterface -type FakeApplicationProtocols struct { - Fake *FakeMetaprotocolV1alpha1 - ns string -} - -var applicationprotocolsResource = schema.GroupVersionResource{Group: "metaprotocol.aeraki.io", Version: "v1alpha1", Resource: "applicationprotocols"} - -var applicationprotocolsKind = schema.GroupVersionKind{Group: "metaprotocol.aeraki.io", Version: "v1alpha1", Kind: "ApplicationProtocol"} - -// Get takes name of the applicationProtocol, and returns the corresponding applicationProtocol object, and an error if there is any. -func (c *FakeApplicationProtocols) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ApplicationProtocol, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(applicationprotocolsResource, c.ns, name), &v1alpha1.ApplicationProtocol{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ApplicationProtocol), err -} - -// List takes label and field selectors, and returns the list of ApplicationProtocols that match those selectors. -func (c *FakeApplicationProtocols) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ApplicationProtocolList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(applicationprotocolsResource, applicationprotocolsKind, c.ns, opts), &v1alpha1.ApplicationProtocolList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ApplicationProtocolList{ListMeta: obj.(*v1alpha1.ApplicationProtocolList).ListMeta} - for _, item := range obj.(*v1alpha1.ApplicationProtocolList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested applicationProtocols. -func (c *FakeApplicationProtocols) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(applicationprotocolsResource, c.ns, opts)) - -} - -// Create takes the representation of a applicationProtocol and creates it. Returns the server's representation of the applicationProtocol, and an error, if there is any. -func (c *FakeApplicationProtocols) Create(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.CreateOptions) (result *v1alpha1.ApplicationProtocol, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(applicationprotocolsResource, c.ns, applicationProtocol), &v1alpha1.ApplicationProtocol{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ApplicationProtocol), err -} - -// Update takes the representation of a applicationProtocol and updates it. Returns the server's representation of the applicationProtocol, and an error, if there is any. -func (c *FakeApplicationProtocols) Update(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.UpdateOptions) (result *v1alpha1.ApplicationProtocol, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(applicationprotocolsResource, c.ns, applicationProtocol), &v1alpha1.ApplicationProtocol{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ApplicationProtocol), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeApplicationProtocols) UpdateStatus(ctx context.Context, applicationProtocol *v1alpha1.ApplicationProtocol, opts v1.UpdateOptions) (*v1alpha1.ApplicationProtocol, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(applicationprotocolsResource, "status", c.ns, applicationProtocol), &v1alpha1.ApplicationProtocol{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ApplicationProtocol), err -} - -// Delete takes name of the applicationProtocol and deletes it. Returns an error if one occurs. -func (c *FakeApplicationProtocols) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(applicationprotocolsResource, c.ns, name), &v1alpha1.ApplicationProtocol{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeApplicationProtocols) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(applicationprotocolsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.ApplicationProtocolList{}) - return err -} - -// Patch applies the patch and returns the patched applicationProtocol. -func (c *FakeApplicationProtocols) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ApplicationProtocol, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(applicationprotocolsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ApplicationProtocol{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.ApplicationProtocol), err -} diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metaprotocol_client.gen.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metaprotocol_client.gen.go deleted file mode 100644 index d4e3d9c2..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metaprotocol_client.gen.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeMetaprotocolV1alpha1 struct { - *testing.Fake -} - -func (c *FakeMetaprotocolV1alpha1) ApplicationProtocols(namespace string) v1alpha1.ApplicationProtocolInterface { - return &FakeApplicationProtocols{c, namespace} -} - -func (c *FakeMetaprotocolV1alpha1) MetaRouters(namespace string) v1alpha1.MetaRouterInterface { - return &FakeMetaRouters{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeMetaprotocolV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metarouter.gen.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metarouter.gen.go deleted file mode 100644 index 1cbcd5c6..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/fake/fake_metarouter.gen.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeMetaRouters implements MetaRouterInterface -type FakeMetaRouters struct { - Fake *FakeMetaprotocolV1alpha1 - ns string -} - -var metaroutersResource = schema.GroupVersionResource{Group: "metaprotocol.aeraki.io", Version: "v1alpha1", Resource: "metarouters"} - -var metaroutersKind = schema.GroupVersionKind{Group: "metaprotocol.aeraki.io", Version: "v1alpha1", Kind: "MetaRouter"} - -// Get takes name of the metaRouter, and returns the corresponding metaRouter object, and an error if there is any. -func (c *FakeMetaRouters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MetaRouter, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(metaroutersResource, c.ns, name), &v1alpha1.MetaRouter{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MetaRouter), err -} - -// List takes label and field selectors, and returns the list of MetaRouters that match those selectors. -func (c *FakeMetaRouters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MetaRouterList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(metaroutersResource, metaroutersKind, c.ns, opts), &v1alpha1.MetaRouterList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.MetaRouterList{ListMeta: obj.(*v1alpha1.MetaRouterList).ListMeta} - for _, item := range obj.(*v1alpha1.MetaRouterList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested metaRouters. -func (c *FakeMetaRouters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(metaroutersResource, c.ns, opts)) - -} - -// Create takes the representation of a metaRouter and creates it. Returns the server's representation of the metaRouter, and an error, if there is any. -func (c *FakeMetaRouters) Create(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.CreateOptions) (result *v1alpha1.MetaRouter, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(metaroutersResource, c.ns, metaRouter), &v1alpha1.MetaRouter{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MetaRouter), err -} - -// Update takes the representation of a metaRouter and updates it. Returns the server's representation of the metaRouter, and an error, if there is any. -func (c *FakeMetaRouters) Update(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.UpdateOptions) (result *v1alpha1.MetaRouter, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(metaroutersResource, c.ns, metaRouter), &v1alpha1.MetaRouter{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MetaRouter), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMetaRouters) UpdateStatus(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.UpdateOptions) (*v1alpha1.MetaRouter, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(metaroutersResource, "status", c.ns, metaRouter), &v1alpha1.MetaRouter{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MetaRouter), err -} - -// Delete takes name of the metaRouter and deletes it. Returns an error if one occurs. -func (c *FakeMetaRouters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(metaroutersResource, c.ns, name), &v1alpha1.MetaRouter{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMetaRouters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(metaroutersResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.MetaRouterList{}) - return err -} - -// Patch applies the patch and returns the patched metaRouter. -func (c *FakeMetaRouters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MetaRouter, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(metaroutersResource, c.ns, name, pt, data, subresources...), &v1alpha1.MetaRouter{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.MetaRouter), err -} diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/generated_expansion.gen.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/generated_expansion.gen.go deleted file mode 100644 index 32ca8c03..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/generated_expansion.gen.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type ApplicationProtocolExpansion interface{} - -type MetaRouterExpansion interface{} diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metaprotocol_client.gen.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metaprotocol_client.gen.go deleted file mode 100644 index 57624b5f..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metaprotocol_client.gen.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type MetaprotocolV1alpha1Interface interface { - RESTClient() rest.Interface - ApplicationProtocolsGetter - MetaRoutersGetter -} - -// MetaprotocolV1alpha1Client is used to interact with features provided by the metaprotocol.aeraki.io group. -type MetaprotocolV1alpha1Client struct { - restClient rest.Interface -} - -func (c *MetaprotocolV1alpha1Client) ApplicationProtocols(namespace string) ApplicationProtocolInterface { - return newApplicationProtocols(c, namespace) -} - -func (c *MetaprotocolV1alpha1Client) MetaRouters(namespace string) MetaRouterInterface { - return newMetaRouters(c, namespace) -} - -// NewForConfig creates a new MetaprotocolV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*MetaprotocolV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &MetaprotocolV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new MetaprotocolV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *MetaprotocolV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new MetaprotocolV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *MetaprotocolV1alpha1Client { - return &MetaprotocolV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *MetaprotocolV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metarouter.gen.go b/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metarouter.gen.go deleted file mode 100644 index 638fb147..00000000 --- a/client-go/pkg/clientset/versioned/typed/metaprotocol/v1alpha1/metarouter.gen.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - scheme "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// MetaRoutersGetter has a method to return a MetaRouterInterface. -// A group's client should implement this interface. -type MetaRoutersGetter interface { - MetaRouters(namespace string) MetaRouterInterface -} - -// MetaRouterInterface has methods to work with MetaRouter resources. -type MetaRouterInterface interface { - Create(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.CreateOptions) (*v1alpha1.MetaRouter, error) - Update(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.UpdateOptions) (*v1alpha1.MetaRouter, error) - UpdateStatus(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.UpdateOptions) (*v1alpha1.MetaRouter, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MetaRouter, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MetaRouterList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MetaRouter, err error) - MetaRouterExpansion -} - -// metaRouters implements MetaRouterInterface -type metaRouters struct { - client rest.Interface - ns string -} - -// newMetaRouters returns a MetaRouters -func newMetaRouters(c *MetaprotocolV1alpha1Client, namespace string) *metaRouters { - return &metaRouters{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the metaRouter, and returns the corresponding metaRouter object, and an error if there is any. -func (c *metaRouters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MetaRouter, err error) { - result = &v1alpha1.MetaRouter{} - err = c.client.Get(). - Namespace(c.ns). - Resource("metarouters"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of MetaRouters that match those selectors. -func (c *metaRouters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MetaRouterList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.MetaRouterList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("metarouters"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested metaRouters. -func (c *metaRouters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("metarouters"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a metaRouter and creates it. Returns the server's representation of the metaRouter, and an error, if there is any. -func (c *metaRouters) Create(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.CreateOptions) (result *v1alpha1.MetaRouter, err error) { - result = &v1alpha1.MetaRouter{} - err = c.client.Post(). - Namespace(c.ns). - Resource("metarouters"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(metaRouter). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a metaRouter and updates it. Returns the server's representation of the metaRouter, and an error, if there is any. -func (c *metaRouters) Update(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.UpdateOptions) (result *v1alpha1.MetaRouter, err error) { - result = &v1alpha1.MetaRouter{} - err = c.client.Put(). - Namespace(c.ns). - Resource("metarouters"). - Name(metaRouter.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(metaRouter). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *metaRouters) UpdateStatus(ctx context.Context, metaRouter *v1alpha1.MetaRouter, opts v1.UpdateOptions) (result *v1alpha1.MetaRouter, err error) { - result = &v1alpha1.MetaRouter{} - err = c.client.Put(). - Namespace(c.ns). - Resource("metarouters"). - Name(metaRouter.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(metaRouter). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the metaRouter and deletes it. Returns an error if one occurs. -func (c *metaRouters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("metarouters"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *metaRouters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("metarouters"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched metaRouter. -func (c *metaRouters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MetaRouter, err error) { - result = &v1alpha1.MetaRouter{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("metarouters"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/doc.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/doc.go deleted file mode 100644 index 8582cce8..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/doc.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/doc.go deleted file mode 100644 index 267204aa..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redis_client.gen.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redis_client.gen.go deleted file mode 100644 index f31332b3..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redis_client.gen.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/typed/redis/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeRedisV1alpha1 struct { - *testing.Fake -} - -func (c *FakeRedisV1alpha1) RedisDestinations(namespace string) v1alpha1.RedisDestinationInterface { - return &FakeRedisDestinations{c, namespace} -} - -func (c *FakeRedisV1alpha1) RedisServices(namespace string) v1alpha1.RedisServiceInterface { - return &FakeRedisServices{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeRedisV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisdestination.gen.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisdestination.gen.go deleted file mode 100644 index 1e7f977c..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisdestination.gen.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeRedisDestinations implements RedisDestinationInterface -type FakeRedisDestinations struct { - Fake *FakeRedisV1alpha1 - ns string -} - -var redisdestinationsResource = schema.GroupVersionResource{Group: "redis.aeraki.io", Version: "v1alpha1", Resource: "redisdestinations"} - -var redisdestinationsKind = schema.GroupVersionKind{Group: "redis.aeraki.io", Version: "v1alpha1", Kind: "RedisDestination"} - -// Get takes name of the redisDestination, and returns the corresponding redisDestination object, and an error if there is any. -func (c *FakeRedisDestinations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RedisDestination, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(redisdestinationsResource, c.ns, name), &v1alpha1.RedisDestination{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisDestination), err -} - -// List takes label and field selectors, and returns the list of RedisDestinations that match those selectors. -func (c *FakeRedisDestinations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RedisDestinationList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(redisdestinationsResource, redisdestinationsKind, c.ns, opts), &v1alpha1.RedisDestinationList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.RedisDestinationList{ListMeta: obj.(*v1alpha1.RedisDestinationList).ListMeta} - for _, item := range obj.(*v1alpha1.RedisDestinationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested redisDestinations. -func (c *FakeRedisDestinations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(redisdestinationsResource, c.ns, opts)) - -} - -// Create takes the representation of a redisDestination and creates it. Returns the server's representation of the redisDestination, and an error, if there is any. -func (c *FakeRedisDestinations) Create(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.CreateOptions) (result *v1alpha1.RedisDestination, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(redisdestinationsResource, c.ns, redisDestination), &v1alpha1.RedisDestination{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisDestination), err -} - -// Update takes the representation of a redisDestination and updates it. Returns the server's representation of the redisDestination, and an error, if there is any. -func (c *FakeRedisDestinations) Update(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.UpdateOptions) (result *v1alpha1.RedisDestination, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(redisdestinationsResource, c.ns, redisDestination), &v1alpha1.RedisDestination{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisDestination), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeRedisDestinations) UpdateStatus(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.UpdateOptions) (*v1alpha1.RedisDestination, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(redisdestinationsResource, "status", c.ns, redisDestination), &v1alpha1.RedisDestination{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisDestination), err -} - -// Delete takes name of the redisDestination and deletes it. Returns an error if one occurs. -func (c *FakeRedisDestinations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(redisdestinationsResource, c.ns, name), &v1alpha1.RedisDestination{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRedisDestinations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(redisdestinationsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.RedisDestinationList{}) - return err -} - -// Patch applies the patch and returns the patched redisDestination. -func (c *FakeRedisDestinations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RedisDestination, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(redisdestinationsResource, c.ns, name, pt, data, subresources...), &v1alpha1.RedisDestination{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisDestination), err -} diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisservice.gen.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisservice.gen.go deleted file mode 100644 index c3a2bbc6..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/fake/fake_redisservice.gen.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeRedisServices implements RedisServiceInterface -type FakeRedisServices struct { - Fake *FakeRedisV1alpha1 - ns string -} - -var redisservicesResource = schema.GroupVersionResource{Group: "redis.aeraki.io", Version: "v1alpha1", Resource: "redisservices"} - -var redisservicesKind = schema.GroupVersionKind{Group: "redis.aeraki.io", Version: "v1alpha1", Kind: "RedisService"} - -// Get takes name of the redisService, and returns the corresponding redisService object, and an error if there is any. -func (c *FakeRedisServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RedisService, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(redisservicesResource, c.ns, name), &v1alpha1.RedisService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisService), err -} - -// List takes label and field selectors, and returns the list of RedisServices that match those selectors. -func (c *FakeRedisServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RedisServiceList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(redisservicesResource, redisservicesKind, c.ns, opts), &v1alpha1.RedisServiceList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.RedisServiceList{ListMeta: obj.(*v1alpha1.RedisServiceList).ListMeta} - for _, item := range obj.(*v1alpha1.RedisServiceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested redisServices. -func (c *FakeRedisServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(redisservicesResource, c.ns, opts)) - -} - -// Create takes the representation of a redisService and creates it. Returns the server's representation of the redisService, and an error, if there is any. -func (c *FakeRedisServices) Create(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.CreateOptions) (result *v1alpha1.RedisService, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(redisservicesResource, c.ns, redisService), &v1alpha1.RedisService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisService), err -} - -// Update takes the representation of a redisService and updates it. Returns the server's representation of the redisService, and an error, if there is any. -func (c *FakeRedisServices) Update(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.UpdateOptions) (result *v1alpha1.RedisService, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(redisservicesResource, c.ns, redisService), &v1alpha1.RedisService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisService), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeRedisServices) UpdateStatus(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.UpdateOptions) (*v1alpha1.RedisService, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(redisservicesResource, "status", c.ns, redisService), &v1alpha1.RedisService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisService), err -} - -// Delete takes name of the redisService and deletes it. Returns an error if one occurs. -func (c *FakeRedisServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(redisservicesResource, c.ns, name), &v1alpha1.RedisService{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRedisServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(redisservicesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.RedisServiceList{}) - return err -} - -// Patch applies the patch and returns the patched redisService. -func (c *FakeRedisServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RedisService, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(redisservicesResource, c.ns, name, pt, data, subresources...), &v1alpha1.RedisService{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.RedisService), err -} diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/generated_expansion.gen.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/generated_expansion.gen.go deleted file mode 100644 index 71f0f8e9..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/generated_expansion.gen.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type RedisDestinationExpansion interface{} - -type RedisServiceExpansion interface{} diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redis_client.gen.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redis_client.gen.go deleted file mode 100644 index a9048da6..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redis_client.gen.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type RedisV1alpha1Interface interface { - RESTClient() rest.Interface - RedisDestinationsGetter - RedisServicesGetter -} - -// RedisV1alpha1Client is used to interact with features provided by the redis.aeraki.io group. -type RedisV1alpha1Client struct { - restClient rest.Interface -} - -func (c *RedisV1alpha1Client) RedisDestinations(namespace string) RedisDestinationInterface { - return newRedisDestinations(c, namespace) -} - -func (c *RedisV1alpha1Client) RedisServices(namespace string) RedisServiceInterface { - return newRedisServices(c, namespace) -} - -// NewForConfig creates a new RedisV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*RedisV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &RedisV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new RedisV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *RedisV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new RedisV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *RedisV1alpha1Client { - return &RedisV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *RedisV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisdestination.gen.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisdestination.gen.go deleted file mode 100644 index 99a9ae57..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisdestination.gen.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - scheme "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// RedisDestinationsGetter has a method to return a RedisDestinationInterface. -// A group's client should implement this interface. -type RedisDestinationsGetter interface { - RedisDestinations(namespace string) RedisDestinationInterface -} - -// RedisDestinationInterface has methods to work with RedisDestination resources. -type RedisDestinationInterface interface { - Create(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.CreateOptions) (*v1alpha1.RedisDestination, error) - Update(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.UpdateOptions) (*v1alpha1.RedisDestination, error) - UpdateStatus(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.UpdateOptions) (*v1alpha1.RedisDestination, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.RedisDestination, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RedisDestinationList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RedisDestination, err error) - RedisDestinationExpansion -} - -// redisDestinations implements RedisDestinationInterface -type redisDestinations struct { - client rest.Interface - ns string -} - -// newRedisDestinations returns a RedisDestinations -func newRedisDestinations(c *RedisV1alpha1Client, namespace string) *redisDestinations { - return &redisDestinations{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the redisDestination, and returns the corresponding redisDestination object, and an error if there is any. -func (c *redisDestinations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RedisDestination, err error) { - result = &v1alpha1.RedisDestination{} - err = c.client.Get(). - Namespace(c.ns). - Resource("redisdestinations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of RedisDestinations that match those selectors. -func (c *redisDestinations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RedisDestinationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.RedisDestinationList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("redisdestinations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested redisDestinations. -func (c *redisDestinations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("redisdestinations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a redisDestination and creates it. Returns the server's representation of the redisDestination, and an error, if there is any. -func (c *redisDestinations) Create(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.CreateOptions) (result *v1alpha1.RedisDestination, err error) { - result = &v1alpha1.RedisDestination{} - err = c.client.Post(). - Namespace(c.ns). - Resource("redisdestinations"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(redisDestination). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a redisDestination and updates it. Returns the server's representation of the redisDestination, and an error, if there is any. -func (c *redisDestinations) Update(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.UpdateOptions) (result *v1alpha1.RedisDestination, err error) { - result = &v1alpha1.RedisDestination{} - err = c.client.Put(). - Namespace(c.ns). - Resource("redisdestinations"). - Name(redisDestination.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(redisDestination). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *redisDestinations) UpdateStatus(ctx context.Context, redisDestination *v1alpha1.RedisDestination, opts v1.UpdateOptions) (result *v1alpha1.RedisDestination, err error) { - result = &v1alpha1.RedisDestination{} - err = c.client.Put(). - Namespace(c.ns). - Resource("redisdestinations"). - Name(redisDestination.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(redisDestination). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the redisDestination and deletes it. Returns an error if one occurs. -func (c *redisDestinations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("redisdestinations"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *redisDestinations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("redisdestinations"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched redisDestination. -func (c *redisDestinations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RedisDestination, err error) { - result = &v1alpha1.RedisDestination{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("redisdestinations"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisservice.gen.go b/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisservice.gen.go deleted file mode 100644 index ca98def9..00000000 --- a/client-go/pkg/clientset/versioned/typed/redis/v1alpha1/redisservice.gen.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - scheme "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// RedisServicesGetter has a method to return a RedisServiceInterface. -// A group's client should implement this interface. -type RedisServicesGetter interface { - RedisServices(namespace string) RedisServiceInterface -} - -// RedisServiceInterface has methods to work with RedisService resources. -type RedisServiceInterface interface { - Create(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.CreateOptions) (*v1alpha1.RedisService, error) - Update(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.UpdateOptions) (*v1alpha1.RedisService, error) - UpdateStatus(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.UpdateOptions) (*v1alpha1.RedisService, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.RedisService, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RedisServiceList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RedisService, err error) - RedisServiceExpansion -} - -// redisServices implements RedisServiceInterface -type redisServices struct { - client rest.Interface - ns string -} - -// newRedisServices returns a RedisServices -func newRedisServices(c *RedisV1alpha1Client, namespace string) *redisServices { - return &redisServices{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the redisService, and returns the corresponding redisService object, and an error if there is any. -func (c *redisServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RedisService, err error) { - result = &v1alpha1.RedisService{} - err = c.client.Get(). - Namespace(c.ns). - Resource("redisservices"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of RedisServices that match those selectors. -func (c *redisServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RedisServiceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.RedisServiceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("redisservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested redisServices. -func (c *redisServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("redisservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a redisService and creates it. Returns the server's representation of the redisService, and an error, if there is any. -func (c *redisServices) Create(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.CreateOptions) (result *v1alpha1.RedisService, err error) { - result = &v1alpha1.RedisService{} - err = c.client.Post(). - Namespace(c.ns). - Resource("redisservices"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(redisService). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a redisService and updates it. Returns the server's representation of the redisService, and an error, if there is any. -func (c *redisServices) Update(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.UpdateOptions) (result *v1alpha1.RedisService, err error) { - result = &v1alpha1.RedisService{} - err = c.client.Put(). - Namespace(c.ns). - Resource("redisservices"). - Name(redisService.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(redisService). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *redisServices) UpdateStatus(ctx context.Context, redisService *v1alpha1.RedisService, opts v1.UpdateOptions) (result *v1alpha1.RedisService, err error) { - result = &v1alpha1.RedisService{} - err = c.client.Put(). - Namespace(c.ns). - Resource("redisservices"). - Name(redisService.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(redisService). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the redisService and deletes it. Returns an error if one occurs. -func (c *redisServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("redisservices"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *redisServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("redisservices"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched redisService. -func (c *redisServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RedisService, err error) { - result = &v1alpha1.RedisService{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("redisservices"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/client-go/pkg/informers/externalversions/dubbo/interface.gen.go b/client-go/pkg/informers/externalversions/dubbo/interface.gen.go deleted file mode 100644 index ae83420c..00000000 --- a/client-go/pkg/informers/externalversions/dubbo/interface.gen.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package dubbo - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/dubbo/v1alpha1" - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/client-go/pkg/informers/externalversions/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go b/client-go/pkg/informers/externalversions/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go deleted file mode 100644 index abd733fc..00000000 --- a/client-go/pkg/informers/externalversions/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - dubbov1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - versioned "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/listers/dubbo/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// DubboAuthorizationPolicyInformer provides access to a shared informer and lister for -// DubboAuthorizationPolicies. -type DubboAuthorizationPolicyInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.DubboAuthorizationPolicyLister -} - -type dubboAuthorizationPolicyInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewDubboAuthorizationPolicyInformer constructs a new informer for DubboAuthorizationPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewDubboAuthorizationPolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredDubboAuthorizationPolicyInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredDubboAuthorizationPolicyInformer constructs a new informer for DubboAuthorizationPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredDubboAuthorizationPolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.DubboV1alpha1().DubboAuthorizationPolicies(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.DubboV1alpha1().DubboAuthorizationPolicies(namespace).Watch(context.TODO(), options) - }, - }, - &dubbov1alpha1.DubboAuthorizationPolicy{}, - resyncPeriod, - indexers, - ) -} - -func (f *dubboAuthorizationPolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredDubboAuthorizationPolicyInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *dubboAuthorizationPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&dubbov1alpha1.DubboAuthorizationPolicy{}, f.defaultInformer) -} - -func (f *dubboAuthorizationPolicyInformer) Lister() v1alpha1.DubboAuthorizationPolicyLister { - return v1alpha1.NewDubboAuthorizationPolicyLister(f.Informer().GetIndexer()) -} diff --git a/client-go/pkg/informers/externalversions/dubbo/v1alpha1/interface.gen.go b/client-go/pkg/informers/externalversions/dubbo/v1alpha1/interface.gen.go deleted file mode 100644 index a18cbb37..00000000 --- a/client-go/pkg/informers/externalversions/dubbo/v1alpha1/interface.gen.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // DubboAuthorizationPolicies returns a DubboAuthorizationPolicyInformer. - DubboAuthorizationPolicies() DubboAuthorizationPolicyInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// DubboAuthorizationPolicies returns a DubboAuthorizationPolicyInformer. -func (v *version) DubboAuthorizationPolicies() DubboAuthorizationPolicyInformer { - return &dubboAuthorizationPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/client-go/pkg/informers/externalversions/factory.gen.go b/client-go/pkg/informers/externalversions/factory.gen.go deleted file mode 100644 index 123e4e72..00000000 --- a/client-go/pkg/informers/externalversions/factory.gen.go +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package externalversions - -import ( - reflect "reflect" - sync "sync" - time "time" - - versioned "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - dubbo "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/dubbo" - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - metaprotocol "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/metaprotocol" - redis "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/redis" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" -) - -// SharedInformerOption defines the functional option type for SharedInformerFactory. -type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory - -type sharedInformerFactory struct { - client versioned.Interface - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc - lock sync.Mutex - defaultResync time.Duration - customResync map[reflect.Type]time.Duration - - informers map[reflect.Type]cache.SharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool -} - -// WithCustomResyncConfig sets a custom resync period for the specified informer types. -func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - for k, v := range resyncConfig { - factory.customResync[reflect.TypeOf(k)] = v - } - return factory - } -} - -// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. -func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.tweakListOptions = tweakListOptions - return factory - } -} - -// WithNamespace limits the SharedInformerFactory to the specified namespace. -func WithNamespace(namespace string) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.namespace = namespace - return factory - } -} - -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. -func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync) -} - -// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. -// Listers obtained via this SharedInformerFactory will be subject to the same filters -// as specified here. -// Deprecated: Please use NewSharedInformerFactoryWithOptions instead -func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) -} - -// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. -func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { - factory := &sharedInformerFactory{ - client: client, - namespace: v1.NamespaceAll, - defaultResync: defaultResync, - informers: make(map[reflect.Type]cache.SharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - customResync: make(map[reflect.Type]time.Duration), - } - - // Apply all options - for _, opt := range options { - factory = opt(factory) - } - - return factory -} - -// Start initializes all requested informers. -func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { - f.lock.Lock() - defer f.lock.Unlock() - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - go informer.Run(stopCh) - f.startedInformers[informerType] = true - } - } -} - -// WaitForCacheSync waits for all started informers' cache were synced. -func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - informers := func() map[reflect.Type]cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]cache.SharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - res := map[reflect.Type]bool{} - for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) - } - return res -} - -// InternalInformerFor returns the SharedIndexInformer for obj using an internal -// client. -func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - - resyncPeriod, exists := f.customResync[informerType] - if !exists { - resyncPeriod = f.defaultResync - } - - informer = newFunc(f.client, resyncPeriod) - f.informers[informerType] = informer - - return informer -} - -// SharedInformerFactory provides shared informers for resources in all known -// API group versions. -type SharedInformerFactory interface { - internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - Dubbo() dubbo.Interface - Metaprotocol() metaprotocol.Interface - Redis() redis.Interface -} - -func (f *sharedInformerFactory) Dubbo() dubbo.Interface { - return dubbo.New(f, f.namespace, f.tweakListOptions) -} - -func (f *sharedInformerFactory) Metaprotocol() metaprotocol.Interface { - return metaprotocol.New(f, f.namespace, f.tweakListOptions) -} - -func (f *sharedInformerFactory) Redis() redis.Interface { - return redis.New(f, f.namespace, f.tweakListOptions) -} diff --git a/client-go/pkg/informers/externalversions/generic.gen.go b/client-go/pkg/informers/externalversions/generic.gen.go deleted file mode 100644 index 58e34dfc..00000000 --- a/client-go/pkg/informers/externalversions/generic.gen.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package externalversions - -import ( - "fmt" - - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - redisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" -) - -// GenericInformer is type of SharedIndexInformer which will locate and delegate to other -// sharedInformers based on type -type GenericInformer interface { - Informer() cache.SharedIndexInformer - Lister() cache.GenericLister -} - -type genericInformer struct { - informer cache.SharedIndexInformer - resource schema.GroupResource -} - -// Informer returns the SharedIndexInformer. -func (f *genericInformer) Informer() cache.SharedIndexInformer { - return f.informer -} - -// Lister returns the GenericLister. -func (f *genericInformer) Lister() cache.GenericLister { - return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - switch resource { - // Group=dubbo.aeraki.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("dubboauthorizationpolicies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Dubbo().V1alpha1().DubboAuthorizationPolicies().Informer()}, nil - - // Group=metaprotocol.aeraki.io, Version=v1alpha1 - case metaprotocolv1alpha1.SchemeGroupVersion.WithResource("applicationprotocols"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Metaprotocol().V1alpha1().ApplicationProtocols().Informer()}, nil - case metaprotocolv1alpha1.SchemeGroupVersion.WithResource("metarouters"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Metaprotocol().V1alpha1().MetaRouters().Informer()}, nil - - // Group=redis.aeraki.io, Version=v1alpha1 - case redisv1alpha1.SchemeGroupVersion.WithResource("redisdestinations"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Redis().V1alpha1().RedisDestinations().Informer()}, nil - case redisv1alpha1.SchemeGroupVersion.WithResource("redisservices"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Redis().V1alpha1().RedisServices().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/client-go/pkg/informers/externalversions/internalinterfaces/factory_interfaces.gen.go b/client-go/pkg/informers/externalversions/internalinterfaces/factory_interfaces.gen.go deleted file mode 100644 index 2de7462d..00000000 --- a/client-go/pkg/informers/externalversions/internalinterfaces/factory_interfaces.gen.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package internalinterfaces - -import ( - time "time" - - versioned "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" -) - -// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. -type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer - -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer -} - -// TweakListOptionsFunc is a function that transforms a v1.ListOptions. -type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/client-go/pkg/informers/externalversions/metaprotocol/interface.gen.go b/client-go/pkg/informers/externalversions/metaprotocol/interface.gen.go deleted file mode 100644 index 595af198..00000000 --- a/client-go/pkg/informers/externalversions/metaprotocol/interface.gen.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. -// Deprecated: client-go package is deprecated, use github.com/aeraki-mesh/client-go instead. -package metaprotocol - -import ( - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/applicationprotocol.gen.go b/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/applicationprotocol.gen.go deleted file mode 100644 index fc6d82af..00000000 --- a/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/applicationprotocol.gen.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. -// Deprecated: client-go package is deprecated, use github.com/aeraki-mesh/client-go instead. -package v1alpha1 - -import ( - "context" - time "time" - - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - versioned "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/listers/metaprotocol/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ApplicationProtocolInformer provides access to a shared informer and lister for -// ApplicationProtocols. -type ApplicationProtocolInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.ApplicationProtocolLister -} - -type applicationProtocolInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewApplicationProtocolInformer constructs a new informer for ApplicationProtocol type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewApplicationProtocolInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredApplicationProtocolInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredApplicationProtocolInformer constructs a new informer for ApplicationProtocol type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredApplicationProtocolInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MetaprotocolV1alpha1().ApplicationProtocols(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MetaprotocolV1alpha1().ApplicationProtocols(namespace).Watch(context.TODO(), options) - }, - }, - &metaprotocolv1alpha1.ApplicationProtocol{}, - resyncPeriod, - indexers, - ) -} - -func (f *applicationProtocolInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredApplicationProtocolInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *applicationProtocolInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&metaprotocolv1alpha1.ApplicationProtocol{}, f.defaultInformer) -} - -func (f *applicationProtocolInformer) Lister() v1alpha1.ApplicationProtocolLister { - return v1alpha1.NewApplicationProtocolLister(f.Informer().GetIndexer()) -} diff --git a/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/interface.gen.go b/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/interface.gen.go deleted file mode 100644 index 621d4144..00000000 --- a/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/interface.gen.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // ApplicationProtocols returns a ApplicationProtocolInformer. - ApplicationProtocols() ApplicationProtocolInformer - // MetaRouters returns a MetaRouterInformer. - MetaRouters() MetaRouterInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// ApplicationProtocols returns a ApplicationProtocolInformer. -func (v *version) ApplicationProtocols() ApplicationProtocolInformer { - return &applicationProtocolInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// MetaRouters returns a MetaRouterInformer. -func (v *version) MetaRouters() MetaRouterInformer { - return &metaRouterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/metarouter.gen.go b/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/metarouter.gen.go deleted file mode 100644 index 55b6b3aa..00000000 --- a/client-go/pkg/informers/externalversions/metaprotocol/v1alpha1/metarouter.gen.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. -// Deprecated: client-go package is deprecated, use github.com/aeraki-mesh/client-go instead. -package v1alpha1 - -import ( - "context" - time "time" - - metaprotocolv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - versioned "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/listers/metaprotocol/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// MetaRouterInformer provides access to a shared informer and lister for -// MetaRouters. -type MetaRouterInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.MetaRouterLister -} - -type metaRouterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewMetaRouterInformer constructs a new informer for MetaRouter type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewMetaRouterInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredMetaRouterInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredMetaRouterInformer constructs a new informer for MetaRouter type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredMetaRouterInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MetaprotocolV1alpha1().MetaRouters(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.MetaprotocolV1alpha1().MetaRouters(namespace).Watch(context.TODO(), options) - }, - }, - &metaprotocolv1alpha1.MetaRouter{}, - resyncPeriod, - indexers, - ) -} - -func (f *metaRouterInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredMetaRouterInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *metaRouterInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&metaprotocolv1alpha1.MetaRouter{}, f.defaultInformer) -} - -func (f *metaRouterInformer) Lister() v1alpha1.MetaRouterLister { - return v1alpha1.NewMetaRouterLister(f.Informer().GetIndexer()) -} diff --git a/client-go/pkg/informers/externalversions/redis/interface.gen.go b/client-go/pkg/informers/externalversions/redis/interface.gen.go deleted file mode 100644 index ad8aed42..00000000 --- a/client-go/pkg/informers/externalversions/redis/interface.gen.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package redis - -import ( - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/redis/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/client-go/pkg/informers/externalversions/redis/v1alpha1/interface.gen.go b/client-go/pkg/informers/externalversions/redis/v1alpha1/interface.gen.go deleted file mode 100644 index 229d46ec..00000000 --- a/client-go/pkg/informers/externalversions/redis/v1alpha1/interface.gen.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // RedisDestinations returns a RedisDestinationInformer. - RedisDestinations() RedisDestinationInformer - // RedisServices returns a RedisServiceInformer. - RedisServices() RedisServiceInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// RedisDestinations returns a RedisDestinationInformer. -func (v *version) RedisDestinations() RedisDestinationInformer { - return &redisDestinationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// RedisServices returns a RedisServiceInformer. -func (v *version) RedisServices() RedisServiceInformer { - return &redisServiceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/client-go/pkg/informers/externalversions/redis/v1alpha1/redisdestination.gen.go b/client-go/pkg/informers/externalversions/redis/v1alpha1/redisdestination.gen.go deleted file mode 100644 index 1370aafc..00000000 --- a/client-go/pkg/informers/externalversions/redis/v1alpha1/redisdestination.gen.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - redisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - versioned "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/listers/redis/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// RedisDestinationInformer provides access to a shared informer and lister for -// RedisDestinations. -type RedisDestinationInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.RedisDestinationLister -} - -type redisDestinationInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewRedisDestinationInformer constructs a new informer for RedisDestination type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewRedisDestinationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredRedisDestinationInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredRedisDestinationInformer constructs a new informer for RedisDestination type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredRedisDestinationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.RedisV1alpha1().RedisDestinations(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.RedisV1alpha1().RedisDestinations(namespace).Watch(context.TODO(), options) - }, - }, - &redisv1alpha1.RedisDestination{}, - resyncPeriod, - indexers, - ) -} - -func (f *redisDestinationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredRedisDestinationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *redisDestinationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&redisv1alpha1.RedisDestination{}, f.defaultInformer) -} - -func (f *redisDestinationInformer) Lister() v1alpha1.RedisDestinationLister { - return v1alpha1.NewRedisDestinationLister(f.Informer().GetIndexer()) -} diff --git a/client-go/pkg/informers/externalversions/redis/v1alpha1/redisservice.gen.go b/client-go/pkg/informers/externalversions/redis/v1alpha1/redisservice.gen.go deleted file mode 100644 index 82c3c030..00000000 --- a/client-go/pkg/informers/externalversions/redis/v1alpha1/redisservice.gen.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - redisv1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - versioned "github.com/aeraki-mesh/aeraki/client-go/pkg/clientset/versioned" - internalinterfaces "github.com/aeraki-mesh/aeraki/client-go/pkg/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/listers/redis/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// RedisServiceInformer provides access to a shared informer and lister for -// RedisServices. -type RedisServiceInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.RedisServiceLister -} - -type redisServiceInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewRedisServiceInformer constructs a new informer for RedisService type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewRedisServiceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredRedisServiceInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredRedisServiceInformer constructs a new informer for RedisService type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredRedisServiceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.RedisV1alpha1().RedisServices(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.RedisV1alpha1().RedisServices(namespace).Watch(context.TODO(), options) - }, - }, - &redisv1alpha1.RedisService{}, - resyncPeriod, - indexers, - ) -} - -func (f *redisServiceInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredRedisServiceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *redisServiceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&redisv1alpha1.RedisService{}, f.defaultInformer) -} - -func (f *redisServiceInformer) Lister() v1alpha1.RedisServiceLister { - return v1alpha1.NewRedisServiceLister(f.Informer().GetIndexer()) -} diff --git a/client-go/pkg/listers/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go b/client-go/pkg/listers/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go deleted file mode 100644 index ae2b54bc..00000000 --- a/client-go/pkg/listers/dubbo/v1alpha1/dubboauthorizationpolicy.gen.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/dubbo/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// DubboAuthorizationPolicyLister helps list DubboAuthorizationPolicies. -// All objects returned here must be treated as read-only. -type DubboAuthorizationPolicyLister interface { - // List lists all DubboAuthorizationPolicies in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.DubboAuthorizationPolicy, err error) - // DubboAuthorizationPolicies returns an object that can list and get DubboAuthorizationPolicies. - DubboAuthorizationPolicies(namespace string) DubboAuthorizationPolicyNamespaceLister - DubboAuthorizationPolicyListerExpansion -} - -// dubboAuthorizationPolicyLister implements the DubboAuthorizationPolicyLister interface. -type dubboAuthorizationPolicyLister struct { - indexer cache.Indexer -} - -// NewDubboAuthorizationPolicyLister returns a new DubboAuthorizationPolicyLister. -func NewDubboAuthorizationPolicyLister(indexer cache.Indexer) DubboAuthorizationPolicyLister { - return &dubboAuthorizationPolicyLister{indexer: indexer} -} - -// List lists all DubboAuthorizationPolicies in the indexer. -func (s *dubboAuthorizationPolicyLister) List(selector labels.Selector) (ret []*v1alpha1.DubboAuthorizationPolicy, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.DubboAuthorizationPolicy)) - }) - return ret, err -} - -// DubboAuthorizationPolicies returns an object that can list and get DubboAuthorizationPolicies. -func (s *dubboAuthorizationPolicyLister) DubboAuthorizationPolicies(namespace string) DubboAuthorizationPolicyNamespaceLister { - return dubboAuthorizationPolicyNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// DubboAuthorizationPolicyNamespaceLister helps list and get DubboAuthorizationPolicies. -// All objects returned here must be treated as read-only. -type DubboAuthorizationPolicyNamespaceLister interface { - // List lists all DubboAuthorizationPolicies in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.DubboAuthorizationPolicy, err error) - // Get retrieves the DubboAuthorizationPolicy from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.DubboAuthorizationPolicy, error) - DubboAuthorizationPolicyNamespaceListerExpansion -} - -// dubboAuthorizationPolicyNamespaceLister implements the DubboAuthorizationPolicyNamespaceLister -// interface. -type dubboAuthorizationPolicyNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all DubboAuthorizationPolicies in the indexer for a given namespace. -func (s dubboAuthorizationPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.DubboAuthorizationPolicy, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.DubboAuthorizationPolicy)) - }) - return ret, err -} - -// Get retrieves the DubboAuthorizationPolicy from the indexer for a given namespace and name. -func (s dubboAuthorizationPolicyNamespaceLister) Get(name string) (*v1alpha1.DubboAuthorizationPolicy, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("dubboauthorizationpolicy"), name) - } - return obj.(*v1alpha1.DubboAuthorizationPolicy), nil -} diff --git a/client-go/pkg/listers/dubbo/v1alpha1/expansion_generated.gen.go b/client-go/pkg/listers/dubbo/v1alpha1/expansion_generated.gen.go deleted file mode 100644 index aa56aa6a..00000000 --- a/client-go/pkg/listers/dubbo/v1alpha1/expansion_generated.gen.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// DubboAuthorizationPolicyListerExpansion allows custom methods to be added to -// DubboAuthorizationPolicyLister. -type DubboAuthorizationPolicyListerExpansion interface{} - -// DubboAuthorizationPolicyNamespaceListerExpansion allows custom methods to be added to -// DubboAuthorizationPolicyNamespaceLister. -type DubboAuthorizationPolicyNamespaceListerExpansion interface{} diff --git a/client-go/pkg/listers/metaprotocol/v1alpha1/applicationprotocol.gen.go b/client-go/pkg/listers/metaprotocol/v1alpha1/applicationprotocol.gen.go deleted file mode 100644 index 4a54a0e3..00000000 --- a/client-go/pkg/listers/metaprotocol/v1alpha1/applicationprotocol.gen.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// ApplicationProtocolLister helps list ApplicationProtocols. -// All objects returned here must be treated as read-only. -type ApplicationProtocolLister interface { - // List lists all ApplicationProtocols in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ApplicationProtocol, err error) - // ApplicationProtocols returns an object that can list and get ApplicationProtocols. - ApplicationProtocols(namespace string) ApplicationProtocolNamespaceLister - ApplicationProtocolListerExpansion -} - -// applicationProtocolLister implements the ApplicationProtocolLister interface. -type applicationProtocolLister struct { - indexer cache.Indexer -} - -// NewApplicationProtocolLister returns a new ApplicationProtocolLister. -func NewApplicationProtocolLister(indexer cache.Indexer) ApplicationProtocolLister { - return &applicationProtocolLister{indexer: indexer} -} - -// List lists all ApplicationProtocols in the indexer. -func (s *applicationProtocolLister) List(selector labels.Selector) (ret []*v1alpha1.ApplicationProtocol, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.ApplicationProtocol)) - }) - return ret, err -} - -// ApplicationProtocols returns an object that can list and get ApplicationProtocols. -func (s *applicationProtocolLister) ApplicationProtocols(namespace string) ApplicationProtocolNamespaceLister { - return applicationProtocolNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// ApplicationProtocolNamespaceLister helps list and get ApplicationProtocols. -// All objects returned here must be treated as read-only. -type ApplicationProtocolNamespaceLister interface { - // List lists all ApplicationProtocols in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ApplicationProtocol, err error) - // Get retrieves the ApplicationProtocol from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.ApplicationProtocol, error) - ApplicationProtocolNamespaceListerExpansion -} - -// applicationProtocolNamespaceLister implements the ApplicationProtocolNamespaceLister -// interface. -type applicationProtocolNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ApplicationProtocols in the indexer for a given namespace. -func (s applicationProtocolNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ApplicationProtocol, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.ApplicationProtocol)) - }) - return ret, err -} - -// Get retrieves the ApplicationProtocol from the indexer for a given namespace and name. -func (s applicationProtocolNamespaceLister) Get(name string) (*v1alpha1.ApplicationProtocol, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("applicationprotocol"), name) - } - return obj.(*v1alpha1.ApplicationProtocol), nil -} diff --git a/client-go/pkg/listers/metaprotocol/v1alpha1/expansion_generated.gen.go b/client-go/pkg/listers/metaprotocol/v1alpha1/expansion_generated.gen.go deleted file mode 100644 index 08cde03c..00000000 --- a/client-go/pkg/listers/metaprotocol/v1alpha1/expansion_generated.gen.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// ApplicationProtocolListerExpansion allows custom methods to be added to -// ApplicationProtocolLister. -type ApplicationProtocolListerExpansion interface{} - -// ApplicationProtocolNamespaceListerExpansion allows custom methods to be added to -// ApplicationProtocolNamespaceLister. -type ApplicationProtocolNamespaceListerExpansion interface{} - -// MetaRouterListerExpansion allows custom methods to be added to -// MetaRouterLister. -type MetaRouterListerExpansion interface{} - -// MetaRouterNamespaceListerExpansion allows custom methods to be added to -// MetaRouterNamespaceLister. -type MetaRouterNamespaceListerExpansion interface{} diff --git a/client-go/pkg/listers/metaprotocol/v1alpha1/metarouter.gen.go b/client-go/pkg/listers/metaprotocol/v1alpha1/metarouter.gen.go deleted file mode 100644 index 72dd3ed6..00000000 --- a/client-go/pkg/listers/metaprotocol/v1alpha1/metarouter.gen.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -// Deprecated: client-go package is deprecated, use github.com/aeraki-mesh/client-go instead. -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/metaprotocol/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// MetaRouterLister helps list MetaRouters. -// All objects returned here must be treated as read-only. -type MetaRouterLister interface { - // List lists all MetaRouters in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.MetaRouter, err error) - // MetaRouters returns an object that can list and get MetaRouters. - MetaRouters(namespace string) MetaRouterNamespaceLister - MetaRouterListerExpansion -} - -// metaRouterLister implements the MetaRouterLister interface. -type metaRouterLister struct { - indexer cache.Indexer -} - -// NewMetaRouterLister returns a new MetaRouterLister. -func NewMetaRouterLister(indexer cache.Indexer) MetaRouterLister { - return &metaRouterLister{indexer: indexer} -} - -// List lists all MetaRouters in the indexer. -func (s *metaRouterLister) List(selector labels.Selector) (ret []*v1alpha1.MetaRouter, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.MetaRouter)) - }) - return ret, err -} - -// MetaRouters returns an object that can list and get MetaRouters. -func (s *metaRouterLister) MetaRouters(namespace string) MetaRouterNamespaceLister { - return metaRouterNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// MetaRouterNamespaceLister helps list and get MetaRouters. -// All objects returned here must be treated as read-only. -type MetaRouterNamespaceLister interface { - // List lists all MetaRouters in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.MetaRouter, err error) - // Get retrieves the MetaRouter from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.MetaRouter, error) - MetaRouterNamespaceListerExpansion -} - -// metaRouterNamespaceLister implements the MetaRouterNamespaceLister -// interface. -type metaRouterNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all MetaRouters in the indexer for a given namespace. -func (s metaRouterNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.MetaRouter, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.MetaRouter)) - }) - return ret, err -} - -// Get retrieves the MetaRouter from the indexer for a given namespace and name. -func (s metaRouterNamespaceLister) Get(name string) (*v1alpha1.MetaRouter, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("metarouter"), name) - } - return obj.(*v1alpha1.MetaRouter), nil -} diff --git a/client-go/pkg/listers/redis/v1alpha1/expansion_generated.gen.go b/client-go/pkg/listers/redis/v1alpha1/expansion_generated.gen.go deleted file mode 100644 index e2ebd704..00000000 --- a/client-go/pkg/listers/redis/v1alpha1/expansion_generated.gen.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// RedisDestinationListerExpansion allows custom methods to be added to -// RedisDestinationLister. -type RedisDestinationListerExpansion interface{} - -// RedisDestinationNamespaceListerExpansion allows custom methods to be added to -// RedisDestinationNamespaceLister. -type RedisDestinationNamespaceListerExpansion interface{} - -// RedisServiceListerExpansion allows custom methods to be added to -// RedisServiceLister. -type RedisServiceListerExpansion interface{} - -// RedisServiceNamespaceListerExpansion allows custom methods to be added to -// RedisServiceNamespaceLister. -type RedisServiceNamespaceListerExpansion interface{} diff --git a/client-go/pkg/listers/redis/v1alpha1/redisdestination.gen.go b/client-go/pkg/listers/redis/v1alpha1/redisdestination.gen.go deleted file mode 100644 index 6f6a07ab..00000000 --- a/client-go/pkg/listers/redis/v1alpha1/redisdestination.gen.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// RedisDestinationLister helps list RedisDestinations. -// All objects returned here must be treated as read-only. -type RedisDestinationLister interface { - // List lists all RedisDestinations in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.RedisDestination, err error) - // RedisDestinations returns an object that can list and get RedisDestinations. - RedisDestinations(namespace string) RedisDestinationNamespaceLister - RedisDestinationListerExpansion -} - -// redisDestinationLister implements the RedisDestinationLister interface. -type redisDestinationLister struct { - indexer cache.Indexer -} - -// NewRedisDestinationLister returns a new RedisDestinationLister. -func NewRedisDestinationLister(indexer cache.Indexer) RedisDestinationLister { - return &redisDestinationLister{indexer: indexer} -} - -// List lists all RedisDestinations in the indexer. -func (s *redisDestinationLister) List(selector labels.Selector) (ret []*v1alpha1.RedisDestination, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.RedisDestination)) - }) - return ret, err -} - -// RedisDestinations returns an object that can list and get RedisDestinations. -func (s *redisDestinationLister) RedisDestinations(namespace string) RedisDestinationNamespaceLister { - return redisDestinationNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// RedisDestinationNamespaceLister helps list and get RedisDestinations. -// All objects returned here must be treated as read-only. -type RedisDestinationNamespaceLister interface { - // List lists all RedisDestinations in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.RedisDestination, err error) - // Get retrieves the RedisDestination from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.RedisDestination, error) - RedisDestinationNamespaceListerExpansion -} - -// redisDestinationNamespaceLister implements the RedisDestinationNamespaceLister -// interface. -type redisDestinationNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all RedisDestinations in the indexer for a given namespace. -func (s redisDestinationNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.RedisDestination, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.RedisDestination)) - }) - return ret, err -} - -// Get retrieves the RedisDestination from the indexer for a given namespace and name. -func (s redisDestinationNamespaceLister) Get(name string) (*v1alpha1.RedisDestination, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("redisdestination"), name) - } - return obj.(*v1alpha1.RedisDestination), nil -} diff --git a/client-go/pkg/listers/redis/v1alpha1/redisservice.gen.go b/client-go/pkg/listers/redis/v1alpha1/redisservice.gen.go deleted file mode 100644 index 1090672b..00000000 --- a/client-go/pkg/listers/redis/v1alpha1/redisservice.gen.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright Aeraki 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. - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/aeraki-mesh/aeraki/client-go/pkg/apis/redis/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// RedisServiceLister helps list RedisServices. -// All objects returned here must be treated as read-only. -type RedisServiceLister interface { - // List lists all RedisServices in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.RedisService, err error) - // RedisServices returns an object that can list and get RedisServices. - RedisServices(namespace string) RedisServiceNamespaceLister - RedisServiceListerExpansion -} - -// redisServiceLister implements the RedisServiceLister interface. -type redisServiceLister struct { - indexer cache.Indexer -} - -// NewRedisServiceLister returns a new RedisServiceLister. -func NewRedisServiceLister(indexer cache.Indexer) RedisServiceLister { - return &redisServiceLister{indexer: indexer} -} - -// List lists all RedisServices in the indexer. -func (s *redisServiceLister) List(selector labels.Selector) (ret []*v1alpha1.RedisService, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.RedisService)) - }) - return ret, err -} - -// RedisServices returns an object that can list and get RedisServices. -func (s *redisServiceLister) RedisServices(namespace string) RedisServiceNamespaceLister { - return redisServiceNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// RedisServiceNamespaceLister helps list and get RedisServices. -// All objects returned here must be treated as read-only. -type RedisServiceNamespaceLister interface { - // List lists all RedisServices in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.RedisService, err error) - // Get retrieves the RedisService from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.RedisService, error) - RedisServiceNamespaceListerExpansion -} - -// redisServiceNamespaceLister implements the RedisServiceNamespaceLister -// interface. -type redisServiceNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all RedisServices in the indexer for a given namespace. -func (s redisServiceNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.RedisService, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.RedisService)) - }) - return ret, err -} - -// Get retrieves the RedisService from the indexer for a given namespace and name. -func (s redisServiceNamespaceLister) Get(name string) (*v1alpha1.RedisService, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("redisservice"), name) - } - return obj.(*v1alpha1.RedisService), nil -} diff --git a/go.mod b/go.mod index 03546a0b..fb8377ed 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/aeraki-mesh/aeraki -go 1.20 +go 1.24 // https://github.com/containerd/containerd/issues/5781 exclude k8s.io/kubernetes v1.13.0 @@ -30,7 +30,6 @@ require ( github.com/apache/thrift v0.18.1 github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 github.com/envoyproxy/go-control-plane v0.11.2-0.20230811160418-a0dbac19f027 - github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.3 github.com/google/go-cmp v0.5.9 github.com/google/go-github v17.0.0+incompatible @@ -46,7 +45,6 @@ require ( google.golang.org/protobuf v1.31.0 istio.io/api v1.19.0-alpha.1.0.20230810203008-3cdd517bf131 istio.io/client-go v1.19.0-alpha.1.0.20230810203904-45e85278e0fc - istio.io/gogo-genproto v0.0.0-20230705213215-8f59b5a7ddde istio.io/istio v0.0.0-20230817160302-031c6b290e0b istio.io/pkg v0.0.0-20230524020242-1015535057be k8s.io/api v0.28.0 @@ -104,6 +102,7 @@ require ( github.com/go-openapi/swag v0.22.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/btree v1.1.2 // indirect github.com/google/cel-go v0.16.0 // indirect diff --git a/go.sum b/go.sum index af3b2040..139396e4 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,7 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7 cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= @@ -51,6 +52,7 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+ cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/security v1.15.1 h1:jR3itwycg/TgGA0uIgTItcVhA55hKWiNJxaNNpQJaZE= +cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -60,6 +62,7 @@ contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxa contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod h1:VzwV+t+dZ9j/H867F1M2ziD+yLHtB46oM35FxxMJ4d0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -120,6 +123,7 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -158,6 +162,7 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht 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/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= @@ -454,6 +459,7 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= +github.com/google/pprof v0.0.0-20230602150820-91b7bce49751/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -479,6 +485,7 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= @@ -628,6 +635,7 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -704,6 +712,7 @@ github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAv github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs= +github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -752,9 +761,13 @@ github.com/prometheus/statsd_exporter v0.23.0 h1:GEkriUCmARYh1gSA0gzpvmTg/oHMc5M github.com/prometheus/statsd_exporter v0.23.0/go.mod h1:1itCY9XMa2p5pjO5HseGjs5cnaIA5qxLCYmn3OUna58= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= +github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/qtls-go1-19 v0.2.1 h1:aJcKNMkH5ASEJB9FXNeZCyTEIHU1J7MmHyz1Q1TSG1A= +github.com/quic-go/qtls-go1-19 v0.2.1/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= github.com/quic-go/qtls-go1-20 v0.1.1 h1:KbChDlg82d3IHqaj2bn6GfKRj84Per2VGf5XV3wSwQk= +github.com/quic-go/qtls-go1-20 v0.1.1/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM= github.com/quic-go/quic-go v0.33.0 h1:ItNoTDN/Fm/zBlq769lLJc8ECe9gYaW40veHCCco7y0= +github.com/quic-go/quic-go v0.33.0/go.mod h1:YMuhaAV9/jIu0XclDXwZPAsP/2Kgr5yMYhe9oxhhOFA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -762,6 +775,7 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -772,6 +786,7 @@ github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIH github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -1524,6 +1539,7 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= helm.sh/helm/v3 v3.11.2 h1:P3cLaFxfoxaGLGJVnoPrhf1j86LC5EDINSpYSpMUkkA= helm.sh/helm/v3 v3.11.2/go.mod h1:Hw+09mfpDiRRKAgAIZlFkPSeOkvv7Acl5McBvQyNPVw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1537,8 +1553,6 @@ istio.io/api v0.0.0-20230713061407-06047cce866f h1:Z+KCZ5Eo48Ea3ZrbqyCLvoyT30ZUz istio.io/api v0.0.0-20230713061407-06047cce866f/go.mod h1:dDMe1TsOtrRoUlBzdxqNolWXpXPQjLfbcXvqPMtQ6eo= istio.io/client-go v1.18.1-0.20230713061908-17d95fabac25 h1:fV6T5GcNXe688Le36srf35Ikuwvwy7pgmH9OnZjBlfc= istio.io/client-go v1.18.1-0.20230713061908-17d95fabac25/go.mod h1:ha62DtaYYStYdisMZw9OG5iG92irhr2sWK7C38qCdqI= -istio.io/gogo-genproto v0.0.0-20230705213215-8f59b5a7ddde h1:h/EeQmV8x9xZMd7VP+sja+UmUW5sAWnqjDlFkYK1T7A= -istio.io/gogo-genproto v0.0.0-20230705213215-8f59b5a7ddde/go.mod h1:CX4lrhfV/KnShn+slx+0MDsSKL+PeUsqniKmiBS7f54= istio.io/istio v0.0.0-20230713183549-b39cf4080772 h1:xFyLrLSXICF4PD0bO7DLv0TBTZjl9oNAYMkJb9ZA0O4= istio.io/istio v0.0.0-20230713183549-b39cf4080772/go.mod h1:MD6vtUgg32SZtPWnBEJyv7aDhN9KcArqrCZVWn2Docs= istio.io/pkg v0.0.0-20230524020242-1015535057be h1:H+ww/6ysv++W5na8wIVNfoE01shRez0rXZXzLGoMIvg= diff --git a/internal/bootstrap/server.go b/internal/bootstrap/server.go index 280fe98e..009c667b 100644 --- a/internal/bootstrap/server.go +++ b/internal/bootstrap/server.go @@ -119,7 +119,7 @@ func NewServer(args *AerakiArgs) (*Server, error) { // envoyFilterController watches changes on config and create/update corresponding EnvoyFilters envoyFilterController := envoyfilter.NewController(client, configController.Store, args.Protocols, args.EnableEnvoyFilterNSScope, args.RootNamespace) - configController.RegisterEventHandler(func(_, curr *istioconfig.Config, event model.Event) { + configController.RegisterEventHandler(func(_, _ *istioconfig.Config, event model.Event) { envoyFilterController.ConfigUpdated(event) }) // routeCacheMgr watches service entry and generate the routes for meta protocol services @@ -344,7 +344,7 @@ func (s *Server) Start(stop <-chan struct{}) { leaderelection. NewLeaderElection(s.args.RootNamespace, s.args.ServerID, leaderelection.EnvoyFilterController, s.kubeClient.Kube()). - AddRunFunction(func(leaderStop <-chan struct{}) { + AddRunFunction(func(_ <-chan struct{}) { aerakiLog.Infof("starting EnvoyFilter creation controller") s.envoyFilterController.Run(stop) }).Run(stop) diff --git a/internal/controller/kube/dubbo.go b/internal/controller/kube/dubbo.go index 134ed6e4..1bd17ec0 100644 --- a/internal/controller/kube/dubbo.go +++ b/internal/controller/kube/dubbo.go @@ -68,10 +68,10 @@ func AddDubboAuthorizationPolicyController(mgr manager.Manager, triggerPush func // nolint: dupl var ( dubboPredicates = predicate.Funcs{ - CreateFunc: func(e event.CreateEvent) bool { + CreateFunc: func(_ event.CreateEvent) bool { return true }, - DeleteFunc: func(e event.DeleteEvent) bool { + DeleteFunc: func(_ event.DeleteEvent) bool { return true }, UpdateFunc: func(e event.UpdateEvent) bool { diff --git a/internal/controller/kube/metaprotocol.go b/internal/controller/kube/metaprotocol.go index 041fa079..00a7646a 100644 --- a/internal/controller/kube/metaprotocol.go +++ b/internal/controller/kube/metaprotocol.go @@ -36,10 +36,10 @@ var metaProtocolLog = log.RegisterScope("meta-protocol-controller", "meta-protoc // nolint: dupl var ( metaProtocolPredicates = predicate.Funcs{ - CreateFunc: func(e event.CreateEvent) bool { + CreateFunc: func(_ event.CreateEvent) bool { return true }, - DeleteFunc: func(e event.DeleteEvent) bool { + DeleteFunc: func(_ event.DeleteEvent) bool { return true }, UpdateFunc: func(e event.UpdateEvent) bool { diff --git a/internal/controller/kube/metarouter.go b/internal/controller/kube/metarouter.go index 12acd06b..8c8fa318 100644 --- a/internal/controller/kube/metarouter.go +++ b/internal/controller/kube/metarouter.go @@ -34,10 +34,10 @@ var metaRouterLog = log.RegisterScope("meta-router-controller", "meta-routerl-co // nolint: dupl var ( metaRouterlPredicates = predicate.Funcs{ - CreateFunc: func(e event.CreateEvent) bool { + CreateFunc: func(_ event.CreateEvent) bool { return true }, - DeleteFunc: func(e event.DeleteEvent) bool { + DeleteFunc: func(_ event.DeleteEvent) bool { return true }, UpdateFunc: func(e event.UpdateEvent) bool { diff --git a/internal/controller/kube/namesapce.go b/internal/controller/kube/namesapce.go index b4912b1b..b66af067 100644 --- a/internal/controller/kube/namesapce.go +++ b/internal/controller/kube/namesapce.go @@ -37,10 +37,10 @@ var namespaceLog = log.RegisterScope("namespace-controller", "namespace-controll var ( namespacePredicates = predicate.Funcs{ - CreateFunc: func(e event.CreateEvent) bool { + CreateFunc: func(_ event.CreateEvent) bool { return true }, - UpdateFunc: func(e event.UpdateEvent) bool { + UpdateFunc: func(_ event.UpdateEvent) bool { return true }, } @@ -103,7 +103,7 @@ func (c *namespaceController) createBootstrapConfigMap(ns string) { cm.Data = map[string]string{ "custom_bootstrap.json": GetBootstrapConfig(c.AerakiAddr, c.AerakiPort), } - if err := c.Client.Create(context.TODO(), cm, &controllerclient.CreateOptions{ + if err := c.Create(context.TODO(), cm, &controllerclient.CreateOptions{ FieldManager: constants.AerakiFieldManager, }); err != nil { if !errors.IsAlreadyExists(err) { diff --git a/internal/controller/kube/redis.go b/internal/controller/kube/redis.go index 8c0116c8..74c7fd21 100644 --- a/internal/controller/kube/redis.go +++ b/internal/controller/kube/redis.go @@ -83,10 +83,10 @@ func AddRedisDestinationController(mgr manager.Manager, triggerPush func() error var ( redisPredicates = predicate.Funcs{ - CreateFunc: func(e event.CreateEvent) bool { + CreateFunc: func(_ event.CreateEvent) bool { return true }, - DeleteFunc: func(e event.DeleteEvent) bool { + DeleteFunc: func(_ event.DeleteEvent) bool { return true }, UpdateFunc: func(e event.UpdateEvent) bool { diff --git a/internal/controller/kube/serviceentry.go b/internal/controller/kube/serviceentry.go index 3a369a0a..6bb8fd0b 100644 --- a/internal/controller/kube/serviceentry.go +++ b/internal/controller/kube/serviceentry.go @@ -42,10 +42,10 @@ var serviceEntryLog = log.RegisterScope("service-entry-controller", "service-ent // nolint: dupl var ( serviceEntryPredicates = predicate.Funcs{ - CreateFunc: func(e event.CreateEvent) bool { + CreateFunc: func(_ event.CreateEvent) bool { return true }, - DeleteFunc: func(e event.DeleteEvent) bool { + DeleteFunc: func(_ event.DeleteEvent) bool { return true }, UpdateFunc: func(e event.UpdateEvent) bool { @@ -157,7 +157,7 @@ func (c *serviceEntryController) autoAllocateIP(key controllerclient.ObjectKey, } func (c *serviceEntryController) updateServiceEntry(s *networking.ServiceEntry, key controllerclient.ObjectKey) { - err := c.Client.Update(context.TODO(), s, + err := c.Update(context.TODO(), s, &controllerclient.UpdateOptions{ FieldManager: constants.AerakiFieldManager, }) diff --git a/internal/envoyfilter/controller.go b/internal/envoyfilter/controller.go index b92d1ff9..d30ea602 100644 --- a/internal/envoyfilter/controller.go +++ b/internal/envoyfilter/controller.go @@ -260,7 +260,7 @@ func (c *Controller) generateGatewayEnvoyFilters(envoyFilters map[string]*model. if !ok { // should never happen log.Errorf("failed in getting a gateway: %s", gateways[i].Labels) } - if gw.Servers == nil || len(gw.Servers) == 0 { + if len(gw.Servers) == 0 { continue } for _, server := range gw.Servers { @@ -320,11 +320,13 @@ func (c *Controller) createEnvoyFiltersOnExportNSs(ctx *model.EnvoyFilterContext } else { // create an envoyfilter in each exported NS for _, exportNS := range exportNSs { - if exportNS == "." { + switch exportNS { + case ".": exportNS = ctx.MetaRouter.Namespace - } else if exportNS == "*" { + case "*": exportNS = c.namespace } + wrapperClone := &model.EnvoyFilterWrapper{ Name: wrapper.Name, Namespace: exportNS, diff --git a/internal/plugin/dubbo/authz/matcher/cidr.go b/internal/plugin/dubbo/authz/matcher/cidr.go index 03791488..dd6ab8cb 100644 --- a/internal/plugin/dubbo/authz/matcher/cidr.go +++ b/internal/plugin/dubbo/authz/matcher/cidr.go @@ -55,6 +55,6 @@ func CidrRange(v string) (*corepb.CidrRange, error) { return &corepb.CidrRange{ AddressPrefix: address, - PrefixLen: &wrappers.UInt32Value{Value: uint32(prefixLen)}, + PrefixLen: &wrappers.UInt32Value{Value: uint32(prefixLen)}, //nolint:gosec }, nil } diff --git a/internal/plugin/dubbo/authz/model/generator.go b/internal/plugin/dubbo/authz/model/generator.go index 8bfcb0ea..83db2d25 100644 --- a/internal/plugin/dubbo/authz/model/generator.go +++ b/internal/plugin/dubbo/authz/model/generator.go @@ -61,7 +61,7 @@ func (srcNamespaceGenerator) permission(_, _ string) (*rbacpb.Permission, error) } func (srcNamespaceGenerator) principal(_, value string) (*rbacpb.Principal, error) { - v := strings.Replace(value, "*", ".*", -1) + v := strings.ReplaceAll(value, "*", ".*") m := matcher.StringMatcherRegex(fmt.Sprintf(".*/ns/%s/.*", v)) return principalAuthenticated(m), nil } diff --git a/internal/plugin/dubbo/route.go b/internal/plugin/dubbo/route.go index de5e76de..fe387323 100644 --- a/internal/plugin/dubbo/route.go +++ b/internal/plugin/dubbo/route.go @@ -220,10 +220,10 @@ func buildWeightedCluster(http *networking.HTTPRoute, service *networking.Servic service.Hosts[0], int(service.Ports[0].Number)) clusterWeight := &routepb.WeightedCluster_ClusterWeight{ Name: clusterName, - Weight: &wrappers.UInt32Value{Value: uint32(route.Weight)}, + Weight: &wrappers.UInt32Value{Value: uint32(route.Weight)}, //nolint:gosec } clusterWeights = append(clusterWeights, clusterWeight) - totalWeight += uint32(route.Weight) + totalWeight += uint32(route.Weight) //nolint:gosec } return &dubbo.RouteAction{ diff --git a/internal/plugin/metaprotocol/accesslog.go b/internal/plugin/metaprotocol/accesslog.go index 84f6dfc7..e6a965fb 100644 --- a/internal/plugin/metaprotocol/accesslog.go +++ b/internal/plugin/metaprotocol/accesslog.go @@ -88,7 +88,7 @@ func buildFileAccessLogHelper(path string, mesh *meshconfig.MeshConfig) *accessl } case meshconfig.MeshConfig_JSON: jsonLogStruct := envoyJSONLogFormatIstio - if len(mesh.AccessLogFormat) > 0 { + if mesh.AccessLogFormat != "" { parsedJSONLogStruct := structpb.Struct{} if err := protomarshal.UnmarshalAllowUnknown([]byte(mesh.AccessLogFormat), &parsedJSONLogStruct); err != nil { log.Errorf("error parsing provided json log format, default log format will be used: %v", err) diff --git a/internal/plugin/redis/outboundcluster.go b/internal/plugin/redis/outboundcluster.go index 0147620e..ab120016 100644 --- a/internal/plugin/redis/outboundcluster.go +++ b/internal/plugin/redis/outboundcluster.go @@ -114,7 +114,7 @@ L: } else { hp.Host = host p, _ := strconv.Atoi(port) - hp.Port = uint32(p) + hp.Port = uint32(p) //nolint:gosec } hostports = append(hostports, hp) } @@ -155,7 +155,7 @@ L: cl.ConnectTimeout = timeout } if connPool.Tcp.MaxConnections > 0 { - threshold.MaxConnections = &wrappers.UInt32Value{Value: uint32(connPool.Tcp.MaxConnections)} + threshold.MaxConnections = &wrappers.UInt32Value{Value: uint32(connPool.Tcp.MaxConnections)} //nolint:gosec cl.CircuitBreakers = &cluster.CircuitBreakers{ Thresholds: []*cluster.CircuitBreakers_Thresholds{threshold}, } diff --git a/internal/plugin/redis/util.go b/internal/plugin/redis/util.go index c656fa19..bc209a18 100644 --- a/internal/plugin/redis/util.go +++ b/internal/plugin/redis/util.go @@ -162,12 +162,12 @@ func setKeepAliveSettings(cluster *cluster.Cluster, if keepalive.Time != nil { cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveTime = - &wrappers.UInt32Value{Value: uint32(keepalive.Time.Seconds)} + &wrappers.UInt32Value{Value: uint32(keepalive.Time.Seconds)} //nolint:gosec } if keepalive.Interval != nil { cluster.UpstreamConnectionOptions.TcpKeepalive.KeepaliveInterval = - &wrappers.UInt32Value{Value: uint32(keepalive.Interval.Seconds)} + &wrappers.UInt32Value{Value: uint32(keepalive.Interval.Seconds)} //nolint:gosec } } diff --git a/internal/plugin/thrift/route.go b/internal/plugin/thrift/route.go index a908a875..415afc85 100644 --- a/internal/plugin/thrift/route.go +++ b/internal/plugin/thrift/route.go @@ -112,10 +112,10 @@ func buildWeightedCluster(http *networking.HTTPRoute, service *networking.Servic service.Hosts[0], int(service.Ports[0].Number)) clusterWeight := &thrift.WeightedCluster_ClusterWeight{ Name: clusterName, - Weight: &wrappers.UInt32Value{Value: uint32(route.Weight)}, + Weight: &wrappers.UInt32Value{Value: uint32(route.Weight)}, //nolint:gosec } clusterWeights = append(clusterWeights, clusterWeight) - totalWeight += uint32(route.Weight) + totalWeight += uint32(route.Weight) //nolint:gosec } return &thrift.RouteAction{ diff --git a/internal/webhook/validation/server/server.go b/internal/webhook/validation/server/server.go index 1ec9d292..58ce6bda 100644 --- a/internal/webhook/validation/server/server.go +++ b/internal/webhook/validation/server/server.go @@ -285,7 +285,7 @@ func validatePort(port int) error { // Validate tests if the Options has valid params. func (o Options) Validate() error { var errs *multierror.Error - if err := validatePort(int(o.Port)); err != nil { + if err := validatePort(int(o.Port)); err != nil { //nolint:gosec errs = multierror.Append(errs, err) } return errs.ErrorOrNil() diff --git a/internal/xds/utils.go b/internal/xds/utils.go index 42f72a8d..ed92925a 100644 --- a/internal/xds/utils.go +++ b/internal/xds/utils.go @@ -107,7 +107,7 @@ func httpRouteAction(route *metaroute.Route) *httproute.RouteAction { RuntimeFraction: mirrorPolicy.RuntimeFraction, } } - if route.Route.HashPolicy != nil && len(route.Route.HashPolicy) > 0 { + if len(route.Route.HashPolicy) > 0 { for _, hashPolicy := range route.Route.HashPolicy { routeAction.HashPolicy = append(routeAction.HashPolicy, &httproute.RouteAction_HashPolicy{ PolicySpecifier: &httproute.RouteAction_HashPolicy_Header_{ diff --git a/test/e2e/metaprotocol/metaprotocol_test.go b/test/e2e/metaprotocol/metaprotocol_test.go index f77c78a5..a3825c34 100644 --- a/test/e2e/metaprotocol/metaprotocol_test.go +++ b/test/e2e/metaprotocol/metaprotocol_test.go @@ -243,7 +243,7 @@ func TestExportToNS(t *testing.T) { checkNS("default", 1, t) checkNS("metaprotocol", 1, t) checkNS("istio-system", 0, t) - t.Logf(output) + t.Log(output) } func checkNS(ns string, num int, t *testing.T) { From cf3518e93cc1e1716db6d53f7203158f4299ca57 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 29 Mar 2025 13:09:18 +0800 Subject: [PATCH 22/28] ci(mergify): upgrade configuration to current format (#425) Co-authored-by: Mergify <37929162+mergify[bot]@users.noreply.github.com> --- .github/mergify.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 49aac8c5..ff4ba6a0 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,23 +1,23 @@ ---- queue_rules: - name: default - conditions: + queue_conditions: + - approved-reviews-by=zhaohuabing + merge_conditions: # Conditions to get out of the queue (= merged) - approved-reviews-by=zhaohuabing + merge_method: squash + pull_request_rules: - - name: Automatic merge on CI success and review - conditions: - - approved-reviews-by=zhaohuabing - actions: - queue: - method: squash - name: default - name: ask the maintainer team to review PR conditions: - and: - - label!=invalid - - -draft + - label!=invalid + - -draft actions: request_reviews: users: - zhaohuabing + - name: Automatic merge on CI success and review + conditions: [] + actions: + queue: From 7b5d6510fe926aba02868c45ae5aa1694aca982a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Mar 2025 13:31:44 +0800 Subject: [PATCH 23/28] Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.4 (#431) Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.1 to 3.0.4. - [Release notes](https://github.com/go-jose/go-jose/releases) - [Changelog](https://github.com/go-jose/go-jose/blob/main/CHANGELOG.md) - [Commits](https://github.com/go-jose/go-jose/compare/v3.0.1...v3.0.4) --- updated-dependencies: - dependency-name: github.com/go-jose/go-jose/v3 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index fb8377ed..d9d811ff 100644 --- a/go.mod +++ b/go.mod @@ -93,7 +93,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fvbommel/sortorder v1.0.2 // indirect github.com/go-errors/errors v1.4.2 // indirect - github.com/go-jose/go-jose/v3 v3.0.1 // indirect + github.com/go-jose/go-jose/v3 v3.0.4 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.2.4 // indirect @@ -182,12 +182,12 @@ require ( go.starlark.net v0.0.0-20211013185944-b0039bd2cfe3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.11.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect diff --git a/go.sum b/go.sum index 139396e4..451b8d62 100644 --- a/go.sum +++ b/go.sum @@ -276,8 +276,8 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= -github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.4 h1:Wp5HA7bLQcKnf6YYao/4kpRpVMp/yf6+pJKV8WFSaNY= +github.com/go-jose/go-jose/v3 v3.0.4/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -958,7 +958,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -968,8 +967,9 @@ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1214,8 +1214,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1227,8 +1228,9 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From fed3f437bb5cf71f2d7000dd949b7cd9ee1f0060 Mon Sep 17 00:00:00 2001 From: "Huabing (Robin) Zhao" Date: Sat, 29 Mar 2025 14:11:31 +0800 Subject: [PATCH 24/28] fix flaky global rate limit test (#433) * fix flaky global rate limit test Signed-off-by: Huabing (Robin) Zhao * fix yaml lint Signed-off-by: Huabing (Robin) Zhao --------- Signed-off-by: Huabing (Robin) Zhao --- .github/mergify.yml | 1 + test/e2e/metaprotocol/metaprotocol_test.go | 17 +++++++++++++++-- .../testdata/rate-limit-server/config.yaml | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index ff4ba6a0..b8202fad 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,3 +1,4 @@ +--- queue_rules: - name: default queue_conditions: diff --git a/test/e2e/metaprotocol/metaprotocol_test.go b/test/e2e/metaprotocol/metaprotocol_test.go index a3825c34..9a5b109d 100644 --- a/test/e2e/metaprotocol/metaprotocol_test.go +++ b/test/e2e/metaprotocol/metaprotocol_test.go @@ -211,7 +211,20 @@ func TestGlobalRateLimit(t *testing.T) { log.Info("Waiting for rules to propagate ...") time.Sleep(1 * time.Minute) consumerPod, _ := util.GetPodName("metaprotocol", "app=dubbo-sample-consumer", "") + success := 0 + for { + dubboResponse, _ := util.PodExec("metaprotocol", consumerPod, "dubbo-sample-consumer", + "curl -s 127.0.0.1:9009/hello", false, "") + response := "response from dubbo-sample-provider" + log.Info(dubboResponse) + if strings.Contains(dubboResponse, response) { + success++ + break + } + time.Sleep(1 * time.Second) + } + for i := 0; i < 10; i++ { dubboResponse, _ := util.PodExec("metaprotocol", consumerPod, "dubbo-sample-consumer", "curl -s 127.0.0.1:9009/hello", false, "") @@ -222,8 +235,8 @@ func TestGlobalRateLimit(t *testing.T) { } } - if success != 2 { - t.Errorf("global rate limit failed, want: %v got:%v ", 2, success) + if success != 5 { + t.Errorf("global rate limit failed, want: %v got:%v ", 5, success) } else { t.Logf("%v requests have been sent to server", success) } diff --git a/test/e2e/metaprotocol/testdata/rate-limit-server/config.yaml b/test/e2e/metaprotocol/testdata/rate-limit-server/config.yaml index 563fdcca..2eb1ccb2 100644 --- a/test/e2e/metaprotocol/testdata/rate-limit-server/config.yaml +++ b/test/e2e/metaprotocol/testdata/rate-limit-server/config.yaml @@ -24,5 +24,5 @@ data: - key: method value: "sayHello" rate_limit: - unit: minute - requests_per_unit: 2 + unit: hour + requests_per_unit: 5 From f8b2be26ea92693527b6f933d0f1b5ad59ebd094 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Mar 2025 15:09:13 +0800 Subject: [PATCH 25/28] Bump golang.org/x/crypto from 0.17.0 to 0.31.0 (#430) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.17.0 to 0.31.0. - [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 18 +++++++++--------- go.sum | 31 ++++++++++++++++++------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index d9d811ff..e6a67b36 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 github.com/envoyproxy/go-control-plane v0.11.2-0.20230811160418-a0dbac19f027 github.com/golang/protobuf v1.5.3 - github.com/google/go-cmp v0.5.9 + github.com/google/go-cmp v0.6.0 github.com/google/go-github v17.0.0+incompatible github.com/google/uuid v1.3.0 github.com/hashicorp/go-multierror v1.1.1 @@ -39,8 +39,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/zhaohuabing/debounce v1.0.0 go.uber.org/atomic v1.11.0 - golang.org/x/net v0.17.0 - golang.org/x/sync v0.3.0 + golang.org/x/net v0.25.0 + golang.org/x/sync v0.10.0 google.golang.org/grpc v1.57.1 google.golang.org/protobuf v1.31.0 istio.io/api v1.19.0-alpha.1.0.20230810203008-3cdd517bf131 @@ -182,15 +182,15 @@ require ( go.starlark.net v0.0.0-20211013185944-b0039bd2cfe3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.19.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/mod v0.11.0 // indirect + golang.org/x/mod v0.17.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/term v0.17.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect gomodules.xyz/jsonpatch/v3 v3.0.1 // indirect gomodules.xyz/orderedmap v0.1.0 // indirect diff --git a/go.sum b/go.sum index 451b8d62..a84babf5 100644 --- a/go.sum +++ b/go.sum @@ -427,8 +427,9 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= @@ -968,8 +969,9 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1014,8 +1016,8 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1084,8 +1086,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1121,8 +1123,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1215,8 +1217,9 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1229,8 +1232,9 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1248,8 +1252,9 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1330,8 +1335,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 9d64a866fc2cfbbb7c7025fb26d96e0d16db946d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Mar 2025 16:23:10 +0800 Subject: [PATCH 26/28] Bump golang.org/x/net from 0.17.0 to 0.36.0 (#429) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.36.0. - [Commits](https://github.com/golang/net/compare/v0.17.0...v0.36.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index e6a67b36..bb0579cd 100644 --- a/go.mod +++ b/go.mod @@ -39,8 +39,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/zhaohuabing/debounce v1.0.0 go.uber.org/atomic v1.11.0 - golang.org/x/net v0.25.0 - golang.org/x/sync v0.10.0 + golang.org/x/net v0.36.0 + golang.org/x/sync v0.11.0 google.golang.org/grpc v1.57.1 google.golang.org/protobuf v1.31.0 istio.io/api v1.19.0-alpha.1.0.20230810203008-3cdd517bf131 @@ -182,13 +182,13 @@ require ( go.starlark.net v0.0.0-20211013185944-b0039bd2cfe3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.31.0 // indirect + golang.org/x/crypto v0.35.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.28.0 // indirect - golang.org/x/term v0.27.0 // indirect - golang.org/x/text v0.21.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/term v0.29.0 // indirect + golang.org/x/text v0.22.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect diff --git a/go.sum b/go.sum index a84babf5..51970ab3 100644 --- a/go.sum +++ b/go.sum @@ -970,8 +970,8 @@ golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4 golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1086,8 +1086,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA= +golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1123,8 +1123,8 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1218,8 +1218,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1233,8 +1233,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1253,8 +1253,8 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 8741c850bd206eb77993eafde2090de0de3b4049 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Mar 2025 16:38:39 +0800 Subject: [PATCH 27/28] Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#414) Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bb0579cd..75b4f0b8 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( golang.org/x/net v0.36.0 golang.org/x/sync v0.11.0 google.golang.org/grpc v1.57.1 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.33.0 istio.io/api v1.19.0-alpha.1.0.20230810203008-3cdd517bf131 istio.io/client-go v1.19.0-alpha.1.0.20230810203904-45e85278e0fc istio.io/istio v0.0.0-20230817160302-031c6b290e0b diff --git a/go.sum b/go.sum index 51970ab3..ca87aca5 100644 --- a/go.sum +++ b/go.sum @@ -1505,8 +1505,8 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 56e4de0f28d7bb0feab9d899eec08a28a62ad27a Mon Sep 17 00:00:00 2001 From: Jinfeng Song <36468758+SJFCS@users.noreply.github.com> Date: Mon, 12 May 2025 14:19:54 +0800 Subject: [PATCH 28/28] Update README.md (#437) Signed-off-by: Jinfeng Song 36468758+SJFCS@users.noreply.github.com Signed-off-by: Jinfeng Song 36468758+SJFCS@users.noreply.github.com Signed-off-by: Jinfeng Song --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e04fb7d1..4519e524 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ As this diagram shows, Aeraki Mesh consists of the following components: , [bRPC](https://github.com/aeraki-mesh/meta-protocol-proxy/tree/master/src/application_protocols/brpc) and [a number of other protocols](https://github.com/aeraki-mesh/aeraki/issues/105) have been implemented based on MetaProtocol. More protocols are on the way. If you're using a close-source, proprietary protocol, you can also manage it in your service mesh simply by -[writing a MetaProtocol codec](https://www.aeraki.net/docs/v1.1/tutorials/implement-a-custom-protocol/) for it. +[writing a MetaProtocol codec](https://www.aeraki.net/docs/v1.x/tutorials/implement-a-custom-protocol/) for it. Most request/response style, stateless protocols can be built on top of the MetaProtocol Proxy. However, some protocols' routing policies are too "special" to be normalized in MetaProtocol. For example, the Redis proxy uses a slot number to map a client query to a specific Redis server node, and the slot number is computed by the key in the request. Aeraki can still manage those protocols as long as there's an available Envoy Filter in the Envoy proxy side. Currently, for protocols in this category, [Redis](https://github.com/aeraki-mesh/aeraki/blob/master/docs/zh/redis.md) and Kafka are supported in Aeraki.