mirror of https://github.com/kubernetes/kops.git
Update dependencies
This commit is contained in:
parent
1038071e8b
commit
6c546e1a95
32
go.mod
32
go.mod
|
@ -14,10 +14,10 @@ require (
|
|||
github.com/Masterminds/sprig/v3 v3.2.3
|
||||
github.com/apparentlymart/go-cidr v1.1.0
|
||||
github.com/aws/amazon-ec2-instance-selector/v2 v2.4.1
|
||||
github.com/aws/aws-sdk-go v1.45.25
|
||||
github.com/aws/aws-sdk-go v1.46.0
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
github.com/cert-manager/cert-manager v1.13.1
|
||||
github.com/digitalocean/godo v1.104.1
|
||||
github.com/digitalocean/godo v1.105.0
|
||||
github.com/go-ini/ini v1.67.0
|
||||
github.com/go-logr/logr v1.2.4
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
|
@ -48,27 +48,27 @@ require (
|
|||
golang.org/x/oauth2 v0.13.0
|
||||
golang.org/x/sync v0.4.0
|
||||
golang.org/x/sys v0.13.0
|
||||
google.golang.org/api v0.147.0
|
||||
google.golang.org/grpc v1.58.3
|
||||
google.golang.org/api v0.148.0
|
||||
google.golang.org/grpc v1.59.0
|
||||
google.golang.org/protobuf v1.31.0
|
||||
gopkg.in/gcfg.v1 v1.2.3
|
||||
gopkg.in/inf.v0 v0.9.1
|
||||
gopkg.in/square/go-jose.v2 v2.6.0
|
||||
helm.sh/helm/v3 v3.13.1
|
||||
k8s.io/api v0.28.2
|
||||
k8s.io/apimachinery v0.28.2
|
||||
k8s.io/cli-runtime v0.28.2
|
||||
k8s.io/client-go v0.28.2
|
||||
k8s.io/api v0.28.3
|
||||
k8s.io/apimachinery v0.28.3
|
||||
k8s.io/cli-runtime v0.28.3
|
||||
k8s.io/client-go v0.28.3
|
||||
k8s.io/cloud-provider-aws v1.28.1
|
||||
k8s.io/cloud-provider-gcp/providers v0.27.1
|
||||
k8s.io/component-base v0.28.2
|
||||
k8s.io/component-base v0.28.3
|
||||
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01
|
||||
k8s.io/klog/v2 v2.100.1
|
||||
k8s.io/kubectl v0.28.2
|
||||
k8s.io/kubelet v0.28.2
|
||||
k8s.io/mount-utils v0.28.2
|
||||
k8s.io/kubectl v0.28.3
|
||||
k8s.io/kubelet v0.28.3
|
||||
k8s.io/mount-utils v0.28.3
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
sigs.k8s.io/controller-runtime v0.16.2
|
||||
sigs.k8s.io/controller-runtime v0.16.3
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.3.0
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
@ -219,14 +219,14 @@ require (
|
|||
golang.org/x/tools v0.14.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.28.2 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.28.3 // indirect
|
||||
k8s.io/cloud-provider v0.28.0 // indirect
|
||||
k8s.io/component-helpers v0.28.2 // indirect
|
||||
k8s.io/component-helpers v0.28.3 // indirect
|
||||
k8s.io/csi-translation-lib v0.28.0 // indirect
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect
|
||||
|
|
64
go.sum
64
go.sum
|
@ -128,8 +128,8 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z
|
|||
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
|
||||
github.com/aws/amazon-ec2-instance-selector/v2 v2.4.1 h1:DmxtwV+pkakkVRhxKcAgnLbxCxvT7k8DBG271dfKPZ8=
|
||||
github.com/aws/amazon-ec2-instance-selector/v2 v2.4.1/go.mod h1:AEJrtkLkCkfIBIazidrVrgZqaXl+9dxI/wRgjdw+7G0=
|
||||
github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4=
|
||||
github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/aws/aws-sdk-go v1.46.0 h1:Igh7W8P+sA6mXJ9yhreOSweefLapcqekhxQlY1llxcM=
|
||||
github.com/aws/aws-sdk-go v1.46.0/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
|
@ -190,8 +190,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA=
|
||||
github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg=
|
||||
github.com/digitalocean/godo v1.105.0 h1:bUfWVsyQCYZ7OQLK+p2EBFYWD5BoOgpyq/PMSQHEeMg=
|
||||
github.com/digitalocean/godo v1.105.0/go.mod h1:R6EmmWI8CT1+fCtjWY9UCB+L5uufuZH13wk3YhxycCs=
|
||||
github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U=
|
||||
github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
|
||||
github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc=
|
||||
|
@ -1081,8 +1081,8 @@ google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv
|
|||
google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
|
||||
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
|
||||
google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4=
|
||||
google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc=
|
||||
google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs=
|
||||
google.golang.org/api v0.148.0 h1:HBq4TZlN4/1pNcu0geJZ/Q50vIwIXT532UIMYoo0vOs=
|
||||
google.golang.org/api v0.148.0/go.mod h1:8/TBgwaKjfqTdacOJrOv2+2Q6fBDU1uHKK06oGSkxzU=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
|
@ -1154,8 +1154,8 @@ google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA
|
|||
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
|
@ -1181,8 +1181,8 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
|
|||
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
|
||||
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
|
||||
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
|
||||
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
||||
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=
|
||||
|
@ -1239,26 +1239,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw=
|
||||
k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg=
|
||||
k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU=
|
||||
k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg=
|
||||
k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ=
|
||||
k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU=
|
||||
k8s.io/cli-runtime v0.28.2 h1:64meB2fDj10/ThIMEJLO29a1oujSm0GQmKzh1RtA/uk=
|
||||
k8s.io/cli-runtime v0.28.2/go.mod h1:bTpGOvpdsPtDKoyfG4EG041WIyFZLV9qq4rPlkyYfDA=
|
||||
k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY=
|
||||
k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY=
|
||||
k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM=
|
||||
k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc=
|
||||
k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08=
|
||||
k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc=
|
||||
k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A=
|
||||
k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8=
|
||||
k8s.io/cli-runtime v0.28.3 h1:lvuJYVkwCqHEvpS6KuTZsUVwPePFjBfSGvuaLl2SxzA=
|
||||
k8s.io/cli-runtime v0.28.3/go.mod h1:jeX37ZPjIcENVuXDDTskG3+FnVuZms5D9omDXS/2Jjc=
|
||||
k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4=
|
||||
k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo=
|
||||
k8s.io/cloud-provider v0.28.0 h1:BTIW7b757T+VXB5yqJeajPXsNOmeooopUgfzQueiWvk=
|
||||
k8s.io/cloud-provider v0.28.0/go.mod h1:u0MGqdlutkTmCJyNrCzIMJ+OhrwQE9x5X8mBTN0R7us=
|
||||
k8s.io/cloud-provider-aws v1.28.1 h1:eOuPRE/3BDrCkGNVtH9SocHXAifCH9rcaVO1GabsYvo=
|
||||
k8s.io/cloud-provider-aws v1.28.1/go.mod h1:t/rdeU79YtYD+5zZbHVRmmpcmFxxJtVen8g1znL/AP4=
|
||||
k8s.io/cloud-provider-gcp/providers v0.27.1 h1:dHBfDCVqu+AhC8JRt1tGJdm7MGwxUwPNwauO6Jx3DSo=
|
||||
k8s.io/cloud-provider-gcp/providers v0.27.1/go.mod h1:nJpF5c121eZ73gPrKaLmj4D1HC0Yr6hdyprCKLMH7Ug=
|
||||
k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E=
|
||||
k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc=
|
||||
k8s.io/component-helpers v0.28.2 h1:r/XJ265PMirW9EcGXr/F+2yWrLPo2I69KdvcY/h9HAo=
|
||||
k8s.io/component-helpers v0.28.2/go.mod h1:pF1R5YWQ+sgf0i6EbVm+MQCzkYuqutDUibdrkvAa6aI=
|
||||
k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI=
|
||||
k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8=
|
||||
k8s.io/component-helpers v0.28.3 h1:te9ieTGzcztVktUs92X53P6BamAoP73MK0qQP0WmDqc=
|
||||
k8s.io/component-helpers v0.28.3/go.mod h1:oJR7I9ist5UAQ3y/CTdbw6CXxdMZ1Lw2Ua/EZEwnVLs=
|
||||
k8s.io/csi-translation-lib v0.28.0 h1:X3Kr5aHvH4xutNg4pgdc6RP0h3FOlJGDeui5CLfBeO4=
|
||||
k8s.io/csi-translation-lib v0.28.0/go.mod h1:HvnmmGZoTobqMU4MD3yQFJ4U4Dq3PxnCfVbJUjky3K0=
|
||||
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks=
|
||||
|
@ -1272,12 +1272,12 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
|||
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk=
|
||||
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
|
||||
k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM=
|
||||
k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64=
|
||||
k8s.io/kubelet v0.28.2 h1:wqe5zKtVhNWwtdABU0mpcWVe8hc6VdVvs2kqQridZRw=
|
||||
k8s.io/kubelet v0.28.2/go.mod h1:rvd0e7T5TjPcfZvy62P90XhFzp0IhPIOy+Pqy3Rtipo=
|
||||
k8s.io/mount-utils v0.28.2 h1:sIdMH7fRhcU48V1oYJ9cLmLm/TG+2jLhhe8eS3I+FWg=
|
||||
k8s.io/mount-utils v0.28.2/go.mod h1:AyP8LmZSLgpGdFQr+vzHTerlPiGvXUdP99n98Er47jw=
|
||||
k8s.io/kubectl v0.28.3 h1:H1Peu1O3EbN9zHkJCcvhiJ4NUj6lb88sGPO5wrWIM6k=
|
||||
k8s.io/kubectl v0.28.3/go.mod h1:RDAudrth/2wQ3Sg46fbKKl4/g+XImzvbsSRZdP2RiyE=
|
||||
k8s.io/kubelet v0.28.3 h1:bp/uIf1R5F61BlFvFtzc4PDEiK7TtFcw3wFJlc0V0LM=
|
||||
k8s.io/kubelet v0.28.3/go.mod h1:E3NHYbp/v45Ao6AD0EOZnqO3L0R6Haks6Nm0+bnFwtU=
|
||||
k8s.io/mount-utils v0.28.3 h1:1p6Dk2QhoK0IYOee2MOec/90a7fC0yUqlWPfQy/4JFE=
|
||||
k8s.io/mount-utils v0.28.3/go.mod h1:ceMAZ+Nzlk8zOwN205YXXGJRGmf1o0/XIwsKnG44p0I=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
oras.land/oras-go v1.2.4 h1:djpBY2/2Cs1PV87GSJlxv4voajVOMZxqqtq9AB8YNvY=
|
||||
|
@ -1285,8 +1285,8 @@ oras.land/oras-go v1.2.4/go.mod h1:DYcGfb3YF1nKjcezfX2SNlDAeQFKSXmf+qrFmrh4324=
|
|||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU=
|
||||
sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU=
|
||||
sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4=
|
||||
sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
|
||||
sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg=
|
||||
sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
|
||||
|
|
|
@ -12,8 +12,8 @@ require (
|
|||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
||||
github.com/octago/sflags v0.2.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
k8s.io/api v0.28.2
|
||||
k8s.io/apimachinery v0.28.2
|
||||
k8s.io/api v0.28.3
|
||||
k8s.io/apimachinery v0.28.3
|
||||
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
|
||||
k8s.io/klog/v2 v2.100.1
|
||||
k8s.io/kops v1.24.1
|
||||
|
@ -36,7 +36,7 @@ require (
|
|||
github.com/StackExchange/wmi v1.2.1 // indirect
|
||||
github.com/acomagu/bufpipe v1.0.3 // indirect
|
||||
github.com/apparentlymart/go-cidr v1.1.0 // indirect
|
||||
github.com/aws/aws-sdk-go v1.45.25 // indirect
|
||||
github.com/aws/aws-sdk-go v1.46.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/blang/semver v3.5.1+incompatible // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
|
@ -126,12 +126,12 @@ require (
|
|||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.14.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
google.golang.org/api v0.147.0 // indirect
|
||||
google.golang.org/api v0.148.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect
|
||||
google.golang.org/grpc v1.58.3 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect
|
||||
google.golang.org/grpc v1.59.0 // indirect
|
||||
google.golang.org/protobuf v1.31.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
|
|
|
@ -307,8 +307,8 @@ github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU
|
|||
github.com/aws/aws-sdk-go v1.31.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
|
||||
github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=
|
||||
github.com/aws/aws-sdk-go v1.37.22/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
|
||||
github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4=
|
||||
github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/aws/aws-sdk-go v1.46.0 h1:Igh7W8P+sA6mXJ9yhreOSweefLapcqekhxQlY1llxcM=
|
||||
github.com/aws/aws-sdk-go v1.46.0/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
|
||||
github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
|
||||
github.com/bazelbuild/buildtools v0.0.0-20200922170545-10384511ce98/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
|
||||
|
@ -2610,8 +2610,8 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR
|
|||
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
|
||||
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
|
||||
google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
|
||||
google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc=
|
||||
google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs=
|
||||
google.golang.org/api v0.148.0 h1:HBq4TZlN4/1pNcu0geJZ/Q50vIwIXT532UIMYoo0vOs=
|
||||
google.golang.org/api v0.148.0/go.mod h1:8/TBgwaKjfqTdacOJrOv2+2Q6fBDU1uHKK06oGSkxzU=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
|
@ -2704,8 +2704,8 @@ google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA
|
|||
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a h1:a2MQQVoTo96JC9PMGtGBymLp7+/RzpFc2yX/9WfFg1c=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0=
|
||||
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||
|
@ -2744,8 +2744,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K
|
|||
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
|
||||
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
|
||||
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
|
||||
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
||||
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=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
@ -2858,8 +2858,8 @@ k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
|
|||
k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s=
|
||||
k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs=
|
||||
k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg=
|
||||
k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw=
|
||||
k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg=
|
||||
k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM=
|
||||
k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc=
|
||||
k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604/go.mod h1:7H8sjDlWQu89yWB3FhZfsLyRCRLuoXoCoY5qtwW1q6I=
|
||||
k8s.io/apiextensions-apiserver v0.16.4/go.mod h1:HYQwjujEkXmQNhap2C9YDdIVOSskGZ3et0Mvjcyjbto=
|
||||
k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs=
|
||||
|
@ -2888,8 +2888,8 @@ k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswP
|
|||
k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
|
||||
k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U=
|
||||
k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
|
||||
k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ=
|
||||
k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU=
|
||||
k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A=
|
||||
k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8=
|
||||
k8s.io/apiserver v0.0.0-20190918200908-1e17798da8c1/go.mod h1:4FuDU+iKPjdsdQSN3GsEKZLB/feQsj1y9dhhBDVV2Ns=
|
||||
k8s.io/apiserver v0.16.4/go.mod h1:kbLJOak655g6W7C+muqu1F76u9wnEycfKMqbVaXIdAc=
|
||||
k8s.io/apiserver v0.17.0/go.mod h1:ABM+9x/prjINN6iiffRVNCBR2Wk7uY4z+EtEGZD48cg=
|
||||
|
|
|
@ -12321,12 +12321,27 @@ var awsPartition = partition{
|
|||
},
|
||||
"finspace": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
|
@ -13428,16 +13443,6 @@ var awsPartition = partition{
|
|||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"gamesparks": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoint{},
|
||||
},
|
||||
},
|
||||
"geo": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
|
@ -38047,21 +38052,45 @@ var awsusgovPartition = partition{
|
|||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{
|
||||
Hostname: "lakeformation.us-gov-east-1.api.aws",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "lakeformation-fips.us-gov-east-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
Variant: fipsVariant | dualStackVariant,
|
||||
}: endpoint{
|
||||
Hostname: "lakeformation-fips.us-gov-east-1.api.aws",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
Variant: dualStackVariant,
|
||||
}: endpoint{
|
||||
Hostname: "lakeformation.us-gov-west-1.api.aws",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
Variant: fipsVariant | dualStackVariant,
|
||||
}: endpoint{
|
||||
Hostname: "lakeformation-fips.us-gov-west-1.api.aws",
|
||||
},
|
||||
},
|
||||
},
|
||||
"lambda": service{
|
||||
|
@ -39033,6 +39062,46 @@ var awsusgovPartition = partition{
|
|||
},
|
||||
},
|
||||
},
|
||||
"resiliencehub": service{
|
||||
Endpoints: serviceEndpoints{
|
||||
endpointKey{
|
||||
Region: "fips-us-gov-east-1",
|
||||
}: endpoint{
|
||||
Hostname: "resiliencehub-fips.us-gov-east-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-east-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "fips-us-gov-west-1",
|
||||
}: endpoint{
|
||||
Hostname: "resiliencehub-fips.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: credentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
Deprecated: boxedTrue,
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "resiliencehub-fips.us-gov-east-1.amazonaws.com",
|
||||
},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
}: endpoint{},
|
||||
endpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
Variant: fipsVariant,
|
||||
}: endpoint{
|
||||
Hostname: "resiliencehub-fips.us-gov-west-1.amazonaws.com",
|
||||
},
|
||||
},
|
||||
},
|
||||
"resource-explorer-2": service{
|
||||
Defaults: endpointDefaults{
|
||||
defaultKey{}: endpoint{
|
||||
|
|
|
@ -5,4 +5,4 @@ package aws
|
|||
const SDKName = "aws-sdk-go"
|
||||
|
||||
// SDKVersion is the version of this SDK
|
||||
const SDKVersion = "1.45.25"
|
||||
const SDKVersion = "1.46.0"
|
||||
|
|
|
@ -188693,6 +188693,72 @@ const (
|
|||
|
||||
// InstanceTypeR7iz32xlarge is a InstanceType enum value
|
||||
InstanceTypeR7iz32xlarge = "r7iz.32xlarge"
|
||||
|
||||
// InstanceTypeC7aMedium is a InstanceType enum value
|
||||
InstanceTypeC7aMedium = "c7a.medium"
|
||||
|
||||
// InstanceTypeC7aLarge is a InstanceType enum value
|
||||
InstanceTypeC7aLarge = "c7a.large"
|
||||
|
||||
// InstanceTypeC7aXlarge is a InstanceType enum value
|
||||
InstanceTypeC7aXlarge = "c7a.xlarge"
|
||||
|
||||
// InstanceTypeC7a2xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a2xlarge = "c7a.2xlarge"
|
||||
|
||||
// InstanceTypeC7a4xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a4xlarge = "c7a.4xlarge"
|
||||
|
||||
// InstanceTypeC7a8xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a8xlarge = "c7a.8xlarge"
|
||||
|
||||
// InstanceTypeC7a12xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a12xlarge = "c7a.12xlarge"
|
||||
|
||||
// InstanceTypeC7a16xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a16xlarge = "c7a.16xlarge"
|
||||
|
||||
// InstanceTypeC7a24xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a24xlarge = "c7a.24xlarge"
|
||||
|
||||
// InstanceTypeC7a32xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a32xlarge = "c7a.32xlarge"
|
||||
|
||||
// InstanceTypeC7a48xlarge is a InstanceType enum value
|
||||
InstanceTypeC7a48xlarge = "c7a.48xlarge"
|
||||
|
||||
// InstanceTypeC7aMetal48xl is a InstanceType enum value
|
||||
InstanceTypeC7aMetal48xl = "c7a.metal-48xl"
|
||||
|
||||
// InstanceTypeR7aMetal48xl is a InstanceType enum value
|
||||
InstanceTypeR7aMetal48xl = "r7a.metal-48xl"
|
||||
|
||||
// InstanceTypeR7iLarge is a InstanceType enum value
|
||||
InstanceTypeR7iLarge = "r7i.large"
|
||||
|
||||
// InstanceTypeR7iXlarge is a InstanceType enum value
|
||||
InstanceTypeR7iXlarge = "r7i.xlarge"
|
||||
|
||||
// InstanceTypeR7i2xlarge is a InstanceType enum value
|
||||
InstanceTypeR7i2xlarge = "r7i.2xlarge"
|
||||
|
||||
// InstanceTypeR7i4xlarge is a InstanceType enum value
|
||||
InstanceTypeR7i4xlarge = "r7i.4xlarge"
|
||||
|
||||
// InstanceTypeR7i8xlarge is a InstanceType enum value
|
||||
InstanceTypeR7i8xlarge = "r7i.8xlarge"
|
||||
|
||||
// InstanceTypeR7i12xlarge is a InstanceType enum value
|
||||
InstanceTypeR7i12xlarge = "r7i.12xlarge"
|
||||
|
||||
// InstanceTypeR7i16xlarge is a InstanceType enum value
|
||||
InstanceTypeR7i16xlarge = "r7i.16xlarge"
|
||||
|
||||
// InstanceTypeR7i24xlarge is a InstanceType enum value
|
||||
InstanceTypeR7i24xlarge = "r7i.24xlarge"
|
||||
|
||||
// InstanceTypeR7i48xlarge is a InstanceType enum value
|
||||
InstanceTypeR7i48xlarge = "r7i.48xlarge"
|
||||
)
|
||||
|
||||
// InstanceType_Values returns all elements of the InstanceType enum
|
||||
|
@ -189447,6 +189513,28 @@ func InstanceType_Values() []string {
|
|||
InstanceTypeR7iz12xlarge,
|
||||
InstanceTypeR7iz16xlarge,
|
||||
InstanceTypeR7iz32xlarge,
|
||||
InstanceTypeC7aMedium,
|
||||
InstanceTypeC7aLarge,
|
||||
InstanceTypeC7aXlarge,
|
||||
InstanceTypeC7a2xlarge,
|
||||
InstanceTypeC7a4xlarge,
|
||||
InstanceTypeC7a8xlarge,
|
||||
InstanceTypeC7a12xlarge,
|
||||
InstanceTypeC7a16xlarge,
|
||||
InstanceTypeC7a24xlarge,
|
||||
InstanceTypeC7a32xlarge,
|
||||
InstanceTypeC7a48xlarge,
|
||||
InstanceTypeC7aMetal48xl,
|
||||
InstanceTypeR7aMetal48xl,
|
||||
InstanceTypeR7iLarge,
|
||||
InstanceTypeR7iXlarge,
|
||||
InstanceTypeR7i2xlarge,
|
||||
InstanceTypeR7i4xlarge,
|
||||
InstanceTypeR7i8xlarge,
|
||||
InstanceTypeR7i12xlarge,
|
||||
InstanceTypeR7i16xlarge,
|
||||
InstanceTypeR7i24xlarge,
|
||||
InstanceTypeR7i48xlarge,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
# Change Log
|
||||
|
||||
## [v1.105.0] - 2023-10-16
|
||||
|
||||
- #643 - @dweinshenker - Add support for scalable storage on database clusters
|
||||
- #641 - @dweinshenker - Fix Kafka Partition Count
|
||||
- #645 - @gregmankes - APPS-7325 - update app godo spec
|
||||
- #642 - @dependabot[bot] - Bump golang.org/x/net from 0.7.0 to 0.17.0
|
||||
|
||||
## [v1.104.1] - 2023-10-10
|
||||
|
||||
* #640 - @andrewsomething - Drop required Go version to 1.20 and document policy.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// Code generated automatically. DO NOT EDIT.
|
||||
// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT.
|
||||
// $ bundle -pkg godo -prefix ./dev/dist/godo
|
||||
|
||||
package godo
|
||||
|
||||
|
@ -68,7 +69,7 @@ const (
|
|||
|
||||
// AppAlertSlackWebhook Configuration of a Slack alerting destination.
|
||||
type AppAlertSlackWebhook struct {
|
||||
// URL for the Slack webhook. The value will be encrypted on the app spec after it is submitted.
|
||||
// URL for the Slack webhook.
|
||||
URL string `json:"url,omitempty"`
|
||||
// Name of the Slack channel.
|
||||
Channel string `json:"channel,omitempty"`
|
||||
|
@ -120,7 +121,7 @@ const (
|
|||
AppAlertSpecOperator_LessThan AppAlertSpecOperator = "LESS_THAN"
|
||||
)
|
||||
|
||||
// AppAlertSpecRule - CPU_UTILIZATION: Represents CPU for a given container instance. Only applicable at the component level. - MEM_UTILIZATION: Represents RAM for a given container instance. Only applicable at the component level. - RESTART_COUNT: Represents restart count for a given container instance. Only applicable at the component level. - DEPLOYMENT_FAILED: Represents whether a deployment has failed. Only applicable at the app level. - DEPLOYMENT_LIVE: Represents whether a deployment has succeeded. Only applicable at the app level. - DOMAIN_FAILED: Represents whether a domain configuration has failed. Only applicable at the app level. - DOMAIN_LIVE: Represents whether a domain configuration has succeeded. Only applicable at the app level. - FUNCTIONS_ACTIVATION_COUNT: Represents an activation count for a given functions instance. Only applicable to functions components. - FUNCTIONS_AVERAGE_DURATION_MS: Represents the average duration for function runtimes. Only applicable to functions components. - FUNCTIONS_ERROR_RATE_PER_MINUTE: Represents an error rate per minute for a given functions instance. Only applicable to functions components. - FUNCTIONS_AVERAGE_WAIT_TIME_MS: Represents the average wait time for functions. Only applicable to functions components. - FUNCTIONS_ERROR_COUNT: Represents an error count for a given functions instance. Only applicable to functions components. - FUNCTIONS_GB_RATE_PER_SECOND: Represents the rate of memory consumption (GB x seconds) for functions. Only applicable to functions components.
|
||||
// AppAlertSpecRule - CPU_UTILIZATION: Represents CPU for a given container instance. Only applicable at the component level. - MEM_UTILIZATION: Represents RAM for a given container instance. Only applicable at the component level. - RESTART_COUNT: Represents restart count for a given container instance. Only applicable at the component level. - DEPLOYMENT_FAILED: Represents whether a deployment has failed. Only applicable at the app level. - DEPLOYMENT_LIVE: Represents whether a deployment has succeeded. Only applicable at the app level. - DEPLOYMENT_STARTED: Represents whether a deployment has started. Only applicable at the app level. - DEPLOYMENT_CANCELED: Represents whether a deployment has been canceled. Only applicable at the app level. - DOMAIN_FAILED: Represents whether a domain configuration has failed. Only applicable at the app level. - DOMAIN_LIVE: Represents whether a domain configuration has succeeded. Only applicable at the app level. - FUNCTIONS_ACTIVATION_COUNT: Represents an activation count for a given functions instance. Only applicable to functions components. - FUNCTIONS_AVERAGE_DURATION_MS: Represents the average duration for function runtimes. Only applicable to functions components. - FUNCTIONS_ERROR_RATE_PER_MINUTE: Represents an error rate per minute for a given functions instance. Only applicable to functions components. - FUNCTIONS_AVERAGE_WAIT_TIME_MS: Represents the average wait time for functions. Only applicable to functions components. - FUNCTIONS_ERROR_COUNT: Represents an error count for a given functions instance. Only applicable to functions components. - FUNCTIONS_GB_RATE_PER_SECOND: Represents the rate of memory consumption (GB x seconds) for functions. Only applicable to functions components.
|
||||
type AppAlertSpecRule string
|
||||
|
||||
// List of AppAlertSpecRule
|
||||
|
@ -131,6 +132,8 @@ const (
|
|||
AppAlertSpecRule_RestartCount AppAlertSpecRule = "RESTART_COUNT"
|
||||
AppAlertSpecRule_DeploymentFailed AppAlertSpecRule = "DEPLOYMENT_FAILED"
|
||||
AppAlertSpecRule_DeploymentLive AppAlertSpecRule = "DEPLOYMENT_LIVE"
|
||||
AppAlertSpecRule_DeploymentStarted AppAlertSpecRule = "DEPLOYMENT_STARTED"
|
||||
AppAlertSpecRule_DeploymentCanceled AppAlertSpecRule = "DEPLOYMENT_CANCELED"
|
||||
AppAlertSpecRule_DomainFailed AppAlertSpecRule = "DOMAIN_FAILED"
|
||||
AppAlertSpecRule_DomainLive AppAlertSpecRule = "DOMAIN_LIVE"
|
||||
AppAlertSpecRule_FunctionsActivationCount AppAlertSpecRule = "FUNCTIONS_ACTIVATION_COUNT"
|
||||
|
@ -153,6 +156,26 @@ const (
|
|||
AppAlertSpecWindow_OneHour AppAlertSpecWindow = "ONE_HOUR"
|
||||
)
|
||||
|
||||
// AppAutoscalingSpec struct for AppAutoscalingSpec
|
||||
type AppAutoscalingSpec struct {
|
||||
// The minimum amount of instances for this component.
|
||||
MinInstanceCount int64 `json:"min_instance_count,omitempty"`
|
||||
// The maximum amount of instances for this component.
|
||||
MaxInstanceCount int64 `json:"max_instance_count,omitempty"`
|
||||
Metrics *AppAutoscalingSpecMetrics `json:"metrics,omitempty"`
|
||||
}
|
||||
|
||||
// AppAutoscalingSpecMetricCPU struct for AppAutoscalingSpecMetricCPU
|
||||
type AppAutoscalingSpecMetricCPU struct {
|
||||
// The average target CPU utilization for the component.
|
||||
Percent int64 `json:"percent,omitempty"`
|
||||
}
|
||||
|
||||
// AppAutoscalingSpecMetrics struct for AppAutoscalingSpecMetrics
|
||||
type AppAutoscalingSpecMetrics struct {
|
||||
CPU *AppAutoscalingSpecMetricCPU `json:"cpu,omitempty"`
|
||||
}
|
||||
|
||||
// AppBuildConfig struct for AppBuildConfig
|
||||
type AppBuildConfig struct {
|
||||
CNBVersioning *AppBuildConfigCNBVersioning `json:"cnb_versioning,omitempty"`
|
||||
|
@ -232,7 +255,7 @@ type AppFunctionsSpec struct {
|
|||
SourceDir string `json:"source_dir,omitempty"`
|
||||
// A list of environment variables made available to the component.
|
||||
Envs []*AppVariableDefinition `json:"envs,omitempty"`
|
||||
// A list of HTTP routes that should be routed to this component.
|
||||
// (Deprecated) A list of HTTP routes that should be routed to this component.
|
||||
Routes []*AppRouteSpec `json:"routes,omitempty"`
|
||||
// A list of configured alerts the user has enabled.
|
||||
Alerts []*AppAlertSpec `json:"alerts,omitempty"`
|
||||
|
@ -291,7 +314,7 @@ type AppIngressSpecRuleRoutingRedirect struct {
|
|||
Port int64 `json:"port,omitempty"`
|
||||
// The scheme to redirect to. Supported values are `http` or `https`. Default: `https`.
|
||||
Scheme string `json:"scheme,omitempty"`
|
||||
// The redirect code to use. Defaults to `302`. Supported values are 300, 301, 302, 303, 304, 305, 307, 308.
|
||||
// The redirect code to use. Defaults to `302`. Supported values are 300, 301, 302, 303, 304, 307, 308.
|
||||
RedirectCode int64 `json:"redirect_code,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -384,9 +407,9 @@ type AppLogDestinationSpecPapertrail struct {
|
|||
|
||||
// AppRouteSpec struct for AppRouteSpec
|
||||
type AppRouteSpec struct {
|
||||
// An HTTP path prefix. Paths must start with / and must be unique across all components within an app.
|
||||
// (Deprecated) An HTTP path prefix. Paths must start with / and must be unique across all components within an app.
|
||||
Path string `json:"path,omitempty"`
|
||||
// An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. Note: this is not applicable for Functions Components.
|
||||
// (Deprecated) An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. Note: this is not applicable for Functions Components.
|
||||
PreservePathPrefix bool `json:"preserve_path_prefix,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -411,10 +434,12 @@ type AppServiceSpec struct {
|
|||
// A list of environment variables made available to the component.
|
||||
Envs []*AppVariableDefinition `json:"envs,omitempty"`
|
||||
InstanceSizeSlug string `json:"instance_size_slug,omitempty"`
|
||||
InstanceCount int64 `json:"instance_count,omitempty"`
|
||||
// The amount of instances that this component should be scaled to.
|
||||
InstanceCount int64 `json:"instance_count,omitempty"`
|
||||
Autoscaling *AppAutoscalingSpec `json:"autoscaling,omitempty"`
|
||||
// The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field.
|
||||
HTTPPort int64 `json:"http_port,omitempty"`
|
||||
// A list of HTTP routes that should be routed to this component.
|
||||
// (Deprecated) A list of HTTP routes that should be routed to this component.
|
||||
Routes []*AppRouteSpec `json:"routes,omitempty"`
|
||||
HealthCheck *AppServiceSpecHealthCheck `json:"health_check,omitempty"`
|
||||
CORS *AppCORSPolicy `json:"cors,omitempty"`
|
||||
|
@ -495,7 +520,7 @@ type AppStaticSiteSpec struct {
|
|||
ErrorDocument string `json:"error_document,omitempty"`
|
||||
// A list of environment variables made available to the component.
|
||||
Envs []*AppVariableDefinition `json:"envs,omitempty"`
|
||||
// A list of HTTP routes that should be routed to this component.
|
||||
// (Deprecated) A list of HTTP routes that should be routed to this component.
|
||||
Routes []*AppRouteSpec `json:"routes,omitempty"`
|
||||
CORS *AppCORSPolicy `json:"cors,omitempty"`
|
||||
// The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set.
|
||||
|
@ -533,8 +558,9 @@ type AppWorkerSpec struct {
|
|||
// A list of environment variables made available to the component.
|
||||
Envs []*AppVariableDefinition `json:"envs,omitempty"`
|
||||
// The instance size to use for this component.
|
||||
InstanceSizeSlug string `json:"instance_size_slug,omitempty"`
|
||||
InstanceCount int64 `json:"instance_count,omitempty"`
|
||||
InstanceSizeSlug string `json:"instance_size_slug,omitempty"`
|
||||
InstanceCount int64 `json:"instance_count,omitempty"`
|
||||
Autoscaling *AppAutoscalingSpec `json:"autoscaling,omitempty"`
|
||||
// A list of configured alerts which apply to the component.
|
||||
Alerts []*AppAlertSpec `json:"alerts,omitempty"`
|
||||
// A list of configured log forwarding destinations.
|
||||
|
@ -559,6 +585,12 @@ type Buildpack struct {
|
|||
DocsLink string `json:"docs_link,omitempty"`
|
||||
}
|
||||
|
||||
// DeploymentCauseDetailsAutoscalerAction struct for DeploymentCauseDetailsAutoscalerAction
|
||||
type DeploymentCauseDetailsAutoscalerAction struct {
|
||||
// Marker for the deployment being autoscaled. Necessary because the generation tooling can't handle empty messages.
|
||||
Autoscaled bool `json:"autoscaled,omitempty"`
|
||||
}
|
||||
|
||||
// DeploymentCauseDetailsDigitalOceanUser struct for DeploymentCauseDetailsDigitalOceanUser
|
||||
type DeploymentCauseDetailsDigitalOceanUser struct {
|
||||
UUID string `json:"uuid,omitempty"`
|
||||
|
@ -651,10 +683,11 @@ type DeploymentCauseDetails struct {
|
|||
GitPush *DeploymentCauseDetailsGitPush `json:"git_push,omitempty"`
|
||||
DOCRPush *DeploymentCauseDetailsDOCRPush `json:"docr_push,omitempty"`
|
||||
Internal bool `json:"internal,omitempty"`
|
||||
Autoscaler *DeploymentCauseDetailsAutoscalerAction `json:"autoscaler,omitempty"`
|
||||
Type DeploymentCauseDetailsType `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// DeploymentCauseDetailsType - MANUAL: A deployment that was manually created - DEPLOY_ON_PUSH: A deployment that was automatically created by a Deploy on Push hook - MAINTENANCE: A deployment created for App Platform maintenance - MANUAL_ROLLBACK: A rollback deployment that was manually created - AUTO_ROLLBACK: An automatic rollback deployment created as a result of a previous deployment failing - UPDATE_DATABASE_TRUSTED_SOURCES: A deployment that was created due to an update in database trusted sources.
|
||||
// DeploymentCauseDetailsType - MANUAL: A deployment that was manually created - DEPLOY_ON_PUSH: A deployment that was automatically created by a Deploy on Push hook - MAINTENANCE: A deployment created for App Platform maintenance - MANUAL_ROLLBACK: A rollback deployment that was manually created - AUTO_ROLLBACK: An automatic rollback deployment created as a result of a previous deployment failing - UPDATE_DATABASE_TRUSTED_SOURCES: A deployment that was created due to an update in database trusted sources. - AUTOSCALED: A deployment that was created due to an autoscaler update.
|
||||
type DeploymentCauseDetailsType string
|
||||
|
||||
// List of DeploymentCauseDetailsType
|
||||
|
@ -666,6 +699,7 @@ const (
|
|||
DeploymentCauseDetailsType_ManualRollback DeploymentCauseDetailsType = "MANUAL_ROLLBACK"
|
||||
DeploymentCauseDetailsType_AutoRollback DeploymentCauseDetailsType = "AUTO_ROLLBACK"
|
||||
DeploymentCauseDetailsType_UpdateDatabaseTrustedSources DeploymentCauseDetailsType = "UPDATE_DATABASE_TRUSTED_SOURCES"
|
||||
DeploymentCauseDetailsType_Autoscaled DeploymentCauseDetailsType = "AUTOSCALED"
|
||||
)
|
||||
|
||||
// DeploymentFunctions struct for DeploymentFunctions
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
// Code generated automatically. DO NOT EDIT.
|
||||
// Copyright 2017 The go-github AUTHORS. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Code generated by gen-accessors; DO NOT EDIT.
|
||||
// Instead, please run "go generate ./..." as described here:
|
||||
// https://github.com/google/go-github/blob/master/CONTRIBUTING.md#submitting-a-patch
|
||||
|
||||
package godo
|
||||
|
||||
|
@ -350,6 +357,46 @@ func (a *AppAlertSpec) GetWindow() AppAlertSpecWindow {
|
|||
return a.Window
|
||||
}
|
||||
|
||||
// GetMaxInstanceCount returns the MaxInstanceCount field.
|
||||
func (a *AppAutoscalingSpec) GetMaxInstanceCount() int64 {
|
||||
if a == nil {
|
||||
return 0
|
||||
}
|
||||
return a.MaxInstanceCount
|
||||
}
|
||||
|
||||
// GetMetrics returns the Metrics field.
|
||||
func (a *AppAutoscalingSpec) GetMetrics() *AppAutoscalingSpecMetrics {
|
||||
if a == nil {
|
||||
return nil
|
||||
}
|
||||
return a.Metrics
|
||||
}
|
||||
|
||||
// GetMinInstanceCount returns the MinInstanceCount field.
|
||||
func (a *AppAutoscalingSpec) GetMinInstanceCount() int64 {
|
||||
if a == nil {
|
||||
return 0
|
||||
}
|
||||
return a.MinInstanceCount
|
||||
}
|
||||
|
||||
// GetPercent returns the Percent field.
|
||||
func (a *AppAutoscalingSpecMetricCPU) GetPercent() int64 {
|
||||
if a == nil {
|
||||
return 0
|
||||
}
|
||||
return a.Percent
|
||||
}
|
||||
|
||||
// GetCPU returns the CPU field.
|
||||
func (a *AppAutoscalingSpecMetrics) GetCPU() *AppAutoscalingSpecMetricCPU {
|
||||
if a == nil {
|
||||
return nil
|
||||
}
|
||||
return a.CPU
|
||||
}
|
||||
|
||||
// GetCNBVersioning returns the CNBVersioning field.
|
||||
func (a *AppBuildConfig) GetCNBVersioning() *AppBuildConfigCNBVersioning {
|
||||
if a == nil {
|
||||
|
@ -1438,6 +1485,14 @@ func (a *AppServiceSpec) GetAlerts() []*AppAlertSpec {
|
|||
return a.Alerts
|
||||
}
|
||||
|
||||
// GetAutoscaling returns the Autoscaling field.
|
||||
func (a *AppServiceSpec) GetAutoscaling() *AppAutoscalingSpec {
|
||||
if a == nil {
|
||||
return nil
|
||||
}
|
||||
return a.Autoscaling
|
||||
}
|
||||
|
||||
// GetBuildCommand returns the BuildCommand field.
|
||||
func (a *AppServiceSpec) GetBuildCommand() string {
|
||||
if a == nil {
|
||||
|
@ -1974,6 +2029,14 @@ func (a *AppWorkerSpec) GetAlerts() []*AppAlertSpec {
|
|||
return a.Alerts
|
||||
}
|
||||
|
||||
// GetAutoscaling returns the Autoscaling field.
|
||||
func (a *AppWorkerSpec) GetAutoscaling() *AppAutoscalingSpec {
|
||||
if a == nil {
|
||||
return nil
|
||||
}
|
||||
return a.Autoscaling
|
||||
}
|
||||
|
||||
// GetBuildCommand returns the BuildCommand field.
|
||||
func (a *AppWorkerSpec) GetBuildCommand() string {
|
||||
if a == nil {
|
||||
|
@ -2294,6 +2357,14 @@ func (d *Deployment) GetWorkers() []*DeploymentWorker {
|
|||
return d.Workers
|
||||
}
|
||||
|
||||
// GetAutoscaler returns the Autoscaler field.
|
||||
func (d *DeploymentCauseDetails) GetAutoscaler() *DeploymentCauseDetailsAutoscalerAction {
|
||||
if d == nil {
|
||||
return nil
|
||||
}
|
||||
return d.Autoscaler
|
||||
}
|
||||
|
||||
// GetDigitalOceanUserAction returns the DigitalOceanUserAction field.
|
||||
func (d *DeploymentCauseDetails) GetDigitalOceanUserAction() *DeploymentCauseDetailsDigitalOceanUserAction {
|
||||
if d == nil {
|
||||
|
@ -2334,6 +2405,14 @@ func (d *DeploymentCauseDetails) GetType() DeploymentCauseDetailsType {
|
|||
return d.Type
|
||||
}
|
||||
|
||||
// GetAutoscaled returns the Autoscaled field.
|
||||
func (d *DeploymentCauseDetailsAutoscalerAction) GetAutoscaled() bool {
|
||||
if d == nil {
|
||||
return false
|
||||
}
|
||||
return d.Autoscaled
|
||||
}
|
||||
|
||||
// GetEmail returns the Email field.
|
||||
func (d *DeploymentCauseDetailsDigitalOceanUser) GetEmail() string {
|
||||
if d == nil {
|
||||
|
|
|
@ -186,6 +186,7 @@ type Database struct {
|
|||
PrivateNetworkUUID string `json:"private_network_uuid,omitempty"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
ProjectID string `json:"project_id,omitempty"`
|
||||
StorageSizeMib uint64 `json:"storage_size_mib,omitempty"`
|
||||
}
|
||||
|
||||
// DatabaseCA represents a database ca.
|
||||
|
@ -267,12 +268,14 @@ type DatabaseCreateRequest struct {
|
|||
Tags []string `json:"tags,omitempty"`
|
||||
BackupRestore *DatabaseBackupRestore `json:"backup_restore,omitempty"`
|
||||
ProjectID string `json:"project_id"`
|
||||
StorageSizeMib uint64 `json:"storage_size_mib,omitempty"`
|
||||
}
|
||||
|
||||
// DatabaseResizeRequest can be used to initiate a database resize operation.
|
||||
type DatabaseResizeRequest struct {
|
||||
SizeSlug string `json:"size,omitempty"`
|
||||
NumNodes int `json:"num_nodes,omitempty"`
|
||||
SizeSlug string `json:"size,omitempty"`
|
||||
NumNodes int `json:"num_nodes,omitempty"`
|
||||
StorageSizeMib uint64 `json:"storage_size_mib,omitempty"`
|
||||
}
|
||||
|
||||
// DatabaseMigrateRequest can be used to initiate a database migrate operation.
|
||||
|
@ -297,11 +300,26 @@ type DatabaseDB struct {
|
|||
|
||||
// DatabaseTopic represents a Kafka topic
|
||||
type DatabaseTopic struct {
|
||||
Name string `json:"name"`
|
||||
PartitionCount *uint32 `json:"partition_count,omitempty"`
|
||||
ReplicationFactor *uint32 `json:"replication_factor,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Config *TopicConfig `json:"config,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Partitions []*TopicPartition `json:"partitions,omitempty"`
|
||||
ReplicationFactor *uint32 `json:"replication_factor,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Config *TopicConfig `json:"config,omitempty"`
|
||||
}
|
||||
|
||||
// TopicPartition represents the state of a Kafka topic partition
|
||||
type TopicPartition struct {
|
||||
EarliestOffset uint64 `json:"earliest_offset,omitempty"`
|
||||
InSyncReplicas uint32 `json:"in_sync_replicas,omitempty"`
|
||||
Id uint32 `json:"id,omitempty"`
|
||||
Size uint64 `json:"size,omitempty"`
|
||||
ConsumerGroups []*TopicConsumerGroup `json:"consumer_groups,omitempty"`
|
||||
}
|
||||
|
||||
// TopicConsumerGroup represents a consumer group for a particular Kafka topic
|
||||
type TopicConsumerGroup struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Offset uint64 `json:"offset,omitempty"`
|
||||
}
|
||||
|
||||
// TopicConfig represents all configurable options for a Kafka topic
|
||||
|
@ -342,7 +360,9 @@ type DatabaseCreateTopicRequest struct {
|
|||
|
||||
// DatabaseUpdateTopicRequest ...
|
||||
type DatabaseUpdateTopicRequest struct {
|
||||
Topic *DatabaseTopic `json:"topic"` // note: `name` field in Topic unused on update
|
||||
PartitionCount *uint32 `json:"partition_count,omitempty"`
|
||||
ReplicationFactor *uint32 `json:"replication_factor,omitempty"`
|
||||
Config *TopicConfig `json:"config,omitempty"`
|
||||
}
|
||||
|
||||
// DatabaseReplica represents a read-only replica of a particular database
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
libraryVersion = "1.104.1"
|
||||
libraryVersion = "1.105.0"
|
||||
defaultBaseURL = "https://api.digitalocean.com/"
|
||||
userAgent = "godo/" + libraryVersion
|
||||
mediaType = "application/json"
|
||||
|
|
|
@ -14608,7 +14608,7 @@
|
|||
]
|
||||
},
|
||||
"getDiagnostics": {
|
||||
"description": "Returns the interconnectDiagnostics for the specified Interconnect.",
|
||||
"description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.",
|
||||
"flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics",
|
||||
"httpMethod": "GET",
|
||||
"id": "compute.interconnects.getDiagnostics",
|
||||
|
@ -40049,7 +40049,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"revision": "20230923",
|
||||
"revision": "20231011",
|
||||
"rootUrl": "https://compute.googleapis.com/",
|
||||
"schemas": {
|
||||
"AWSV4Signature": {
|
||||
|
@ -45529,6 +45529,20 @@
|
|||
"description": "A set of Confidential Instance options.",
|
||||
"id": "ConfidentialInstanceConfig",
|
||||
"properties": {
|
||||
"confidentialInstanceType": {
|
||||
"description": "Defines the type of technology used by the confidential instance.",
|
||||
"enum": [
|
||||
"CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED",
|
||||
"SEV",
|
||||
"SEV_SNP"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"No type specified. Do not use this value.",
|
||||
"AMD Secure Encrypted Virtualization.",
|
||||
"AMD Secure Encrypted Virtualization - Secure Nested Paging."
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"enableConfidentialCompute": {
|
||||
"description": "Defines whether the instance should have confidential compute enabled.",
|
||||
"type": "boolean"
|
||||
|
@ -54295,6 +54309,11 @@
|
|||
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
|
||||
"type": "string"
|
||||
},
|
||||
"resizeBy": {
|
||||
"description": "The number of instances to be created by this resize request. The group's target size will be increased by this number.",
|
||||
"format": "int32",
|
||||
"type": "integer"
|
||||
},
|
||||
"selfLink": {
|
||||
"description": "[Output Only] The URL for this resize request. The server defines this URL.",
|
||||
"type": "string"
|
||||
|
@ -61400,7 +61419,7 @@
|
|||
"description": "[Output Only] Information about the last attempt to create or delete the instance."
|
||||
},
|
||||
"name": {
|
||||
"description": "[Output Only] The name of the instance. The name will always exist even if the instance has not yet been created.",
|
||||
"description": "[Output Only] The name of the instance. The name always exists even if the instance has not yet been created.",
|
||||
"type": "string"
|
||||
},
|
||||
"preservedStateFromConfig": {
|
||||
|
@ -62069,6 +62088,10 @@
|
|||
"description": "The IPv4 address assigned to the producer instance network interface. This value will be a range in case of Serverless.",
|
||||
"type": "string"
|
||||
},
|
||||
"ipv6Address": {
|
||||
"description": "The IPv6 address assigned to the producer instance network interface. This is only assigned when the stack types of both the instance network interface and the consumer subnet are IPv4_IPv6.",
|
||||
"type": "string"
|
||||
},
|
||||
"projectIdOrNum": {
|
||||
"description": "The project id or number of the interface to which the IP was assigned.",
|
||||
"type": "string"
|
||||
|
@ -62103,6 +62126,10 @@
|
|||
"subnetwork": {
|
||||
"description": "The subnetwork used to assign the IP to the producer instance network interface.",
|
||||
"type": "string"
|
||||
},
|
||||
"subnetworkCidrRange": {
|
||||
"description": "[Output Only] The CIDR range of the subnet from which the IPv4 internal IP was allocated from.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
|
|
|
@ -9311,12 +9311,23 @@ func (s *Condition) MarshalJSON() ([]byte, error) {
|
|||
|
||||
// ConfidentialInstanceConfig: A set of Confidential Instance options.
|
||||
type ConfidentialInstanceConfig struct {
|
||||
// ConfidentialInstanceType: Defines the type of technology used by the
|
||||
// confidential instance.
|
||||
//
|
||||
// Possible values:
|
||||
// "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" - No type specified. Do
|
||||
// not use this value.
|
||||
// "SEV" - AMD Secure Encrypted Virtualization.
|
||||
// "SEV_SNP" - AMD Secure Encrypted Virtualization - Secure Nested
|
||||
// Paging.
|
||||
ConfidentialInstanceType string `json:"confidentialInstanceType,omitempty"`
|
||||
|
||||
// EnableConfidentialCompute: Defines whether the instance should have
|
||||
// confidential compute enabled.
|
||||
EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g.
|
||||
// "EnableConfidentialCompute") to unconditionally include in API
|
||||
// "ConfidentialInstanceType") to unconditionally include in API
|
||||
// requests. By default, fields with empty or default values are omitted
|
||||
// from API requests. However, any non-pointer, non-interface field
|
||||
// appearing in ForceSendFields will be sent to the server regardless of
|
||||
|
@ -9324,13 +9335,13 @@ type ConfidentialInstanceConfig struct {
|
|||
// fields in Patch requests.
|
||||
ForceSendFields []string `json:"-"`
|
||||
|
||||
// NullFields is a list of field names (e.g.
|
||||
// "EnableConfidentialCompute") to include in API requests with the JSON
|
||||
// null value. By default, fields with empty values are omitted from API
|
||||
// requests. However, any field with an empty value appearing in
|
||||
// NullFields will be sent to the server as null. It is an error if a
|
||||
// field in this list has a non-empty value. This may be used to include
|
||||
// null fields in Patch requests.
|
||||
// NullFields is a list of field names (e.g. "ConfidentialInstanceType")
|
||||
// to include in API requests with the JSON null value. By default,
|
||||
// fields with empty values are omitted from API requests. However, any
|
||||
// field with an empty value appearing in NullFields will be sent to the
|
||||
// server as null. It is an error if a field in this list has a
|
||||
// non-empty value. This may be used to include null fields in Patch
|
||||
// requests.
|
||||
NullFields []string `json:"-"`
|
||||
}
|
||||
|
||||
|
@ -21989,6 +22000,10 @@ type InstanceGroupManagerResizeRequest struct {
|
|||
// characters long, and comply with RFC1035.
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// ResizeBy: The number of instances to be created by this resize
|
||||
// request. The group's target size will be increased by this number.
|
||||
ResizeBy int64 `json:"resizeBy,omitempty"`
|
||||
|
||||
// SelfLink: [Output Only] The URL for this resize request. The server
|
||||
// defines this URL.
|
||||
SelfLink string `json:"selfLink,omitempty"`
|
||||
|
@ -32236,8 +32251,8 @@ type ManagedInstance struct {
|
|||
// create or delete the instance.
|
||||
LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"`
|
||||
|
||||
// Name: [Output Only] The name of the instance. The name will always
|
||||
// exist even if the instance has not yet been created.
|
||||
// Name: [Output Only] The name of the instance. The name always exists
|
||||
// even if the instance has not yet been created.
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// PreservedStateFromConfig: [Output Only] Preserved state applied from
|
||||
|
@ -33290,6 +33305,11 @@ type NetworkAttachmentConnectedEndpoint struct {
|
|||
// interface. This value will be a range in case of Serverless.
|
||||
IpAddress string `json:"ipAddress,omitempty"`
|
||||
|
||||
// Ipv6Address: The IPv6 address assigned to the producer instance
|
||||
// network interface. This is only assigned when the stack types of both
|
||||
// the instance network interface and the consumer subnet are IPv4_IPv6.
|
||||
Ipv6Address string `json:"ipv6Address,omitempty"`
|
||||
|
||||
// ProjectIdOrNum: The project id or number of the interface to which
|
||||
// the IP was assigned.
|
||||
ProjectIdOrNum string `json:"projectIdOrNum,omitempty"`
|
||||
|
@ -33317,6 +33337,10 @@ type NetworkAttachmentConnectedEndpoint struct {
|
|||
// instance network interface.
|
||||
Subnetwork string `json:"subnetwork,omitempty"`
|
||||
|
||||
// SubnetworkCidrRange: [Output Only] The CIDR range of the subnet from
|
||||
// which the IPv4 internal IP was allocated from.
|
||||
SubnetworkCidrRange string `json:"subnetworkCidrRange,omitempty"`
|
||||
|
||||
// ForceSendFields is a list of field names (e.g. "IpAddress") to
|
||||
// unconditionally include in API requests. By default, fields with
|
||||
// empty or default values are omitted from API requests. However, any
|
||||
|
@ -128834,7 +128858,11 @@ type InterconnectsGetDiagnosticsCall struct {
|
|||
}
|
||||
|
||||
// GetDiagnostics: Returns the interconnectDiagnostics for the specified
|
||||
// Interconnect.
|
||||
// Interconnect. In the event of a global outage, do not use this API to
|
||||
// make decisions about where to redirect your network traffic. Unlike a
|
||||
// VLAN attachment, which is regional, a Cloud Interconnect connection
|
||||
// is a global resource. A global outage can prevent this API from
|
||||
// functioning properly.
|
||||
//
|
||||
// - interconnect: Name of the interconnect resource to query.
|
||||
// - project: Project ID for this request.
|
||||
|
@ -128946,7 +128974,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int
|
|||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns the interconnectDiagnostics for the specified Interconnect.",
|
||||
// "description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.",
|
||||
// "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "compute.interconnects.getDiagnostics",
|
||||
|
|
|
@ -1184,6 +1184,47 @@
|
|||
"https://www.googleapis.com/auth/compute.readonly"
|
||||
]
|
||||
},
|
||||
"getIamPolicy": {
|
||||
"description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
|
||||
"flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy",
|
||||
"httpMethod": "GET",
|
||||
"id": "compute.backendBuckets.getIamPolicy",
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"resource"
|
||||
],
|
||||
"parameters": {
|
||||
"optionsRequestedPolicyVersion": {
|
||||
"description": "Requested IAM Policy version.",
|
||||
"format": "int32",
|
||||
"location": "query",
|
||||
"type": "integer"
|
||||
},
|
||||
"project": {
|
||||
"description": "Project ID for this request.",
|
||||
"location": "path",
|
||||
"pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Name or id of the resource for this request.",
|
||||
"location": "path",
|
||||
"pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy",
|
||||
"response": {
|
||||
"$ref": "Policy"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/compute",
|
||||
"https://www.googleapis.com/auth/compute.readonly"
|
||||
]
|
||||
},
|
||||
"insert": {
|
||||
"description": "Creates a BackendBucket resource in the specified project using the data included in the request.",
|
||||
"flatPath": "projects/{project}/global/backendBuckets",
|
||||
|
@ -1356,6 +1397,81 @@
|
|||
"https://www.googleapis.com/auth/compute"
|
||||
]
|
||||
},
|
||||
"setIamPolicy": {
|
||||
"description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
|
||||
"flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy",
|
||||
"httpMethod": "POST",
|
||||
"id": "compute.backendBuckets.setIamPolicy",
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"resource"
|
||||
],
|
||||
"parameters": {
|
||||
"project": {
|
||||
"description": "Project ID for this request.",
|
||||
"location": "path",
|
||||
"pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Name or id of the resource for this request.",
|
||||
"location": "path",
|
||||
"pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy",
|
||||
"request": {
|
||||
"$ref": "GlobalSetPolicyRequest"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "Policy"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/compute"
|
||||
]
|
||||
},
|
||||
"testIamPermissions": {
|
||||
"description": "Returns permissions that a caller has on the specified resource.",
|
||||
"flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions",
|
||||
"httpMethod": "POST",
|
||||
"id": "compute.backendBuckets.testIamPermissions",
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"resource"
|
||||
],
|
||||
"parameters": {
|
||||
"project": {
|
||||
"description": "Project ID for this request.",
|
||||
"location": "path",
|
||||
"pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Name or id of the resource for this request.",
|
||||
"location": "path",
|
||||
"pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions",
|
||||
"request": {
|
||||
"$ref": "TestPermissionsRequest"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "TestPermissionsResponse"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/compute",
|
||||
"https://www.googleapis.com/auth/compute.readonly"
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"description": "Updates the specified BackendBucket resource with the data included in the request.",
|
||||
"flatPath": "projects/{project}/global/backendBuckets/{backendBucket}",
|
||||
|
@ -2010,6 +2126,44 @@
|
|||
"https://www.googleapis.com/auth/compute"
|
||||
]
|
||||
},
|
||||
"testIamPermissions": {
|
||||
"description": "Returns permissions that a caller has on the specified resource.",
|
||||
"flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions",
|
||||
"httpMethod": "POST",
|
||||
"id": "compute.backendServices.testIamPermissions",
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"resource"
|
||||
],
|
||||
"parameters": {
|
||||
"project": {
|
||||
"description": "Project ID for this request.",
|
||||
"location": "path",
|
||||
"pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Name or id of the resource for this request.",
|
||||
"location": "path",
|
||||
"pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "projects/{project}/global/backendServices/{resource}/testIamPermissions",
|
||||
"request": {
|
||||
"$ref": "TestPermissionsRequest"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "TestPermissionsResponse"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/compute",
|
||||
"https://www.googleapis.com/auth/compute.readonly"
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"description": "Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.",
|
||||
"flatPath": "projects/{project}/global/backendServices/{backendService}",
|
||||
|
@ -12292,7 +12446,7 @@
|
|||
]
|
||||
},
|
||||
"getDiagnostics": {
|
||||
"description": "Returns the interconnectDiagnostics for the specified Interconnect.",
|
||||
"description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.",
|
||||
"flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics",
|
||||
"httpMethod": "GET",
|
||||
"id": "compute.interconnects.getDiagnostics",
|
||||
|
@ -19192,6 +19346,52 @@
|
|||
"https://www.googleapis.com/auth/compute"
|
||||
]
|
||||
},
|
||||
"testIamPermissions": {
|
||||
"description": "Returns permissions that a caller has on the specified resource.",
|
||||
"flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions",
|
||||
"httpMethod": "POST",
|
||||
"id": "compute.regionBackendServices.testIamPermissions",
|
||||
"parameterOrder": [
|
||||
"project",
|
||||
"region",
|
||||
"resource"
|
||||
],
|
||||
"parameters": {
|
||||
"project": {
|
||||
"description": "Project ID for this request.",
|
||||
"location": "path",
|
||||
"pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"region": {
|
||||
"description": "The name of the region for this request.",
|
||||
"location": "path",
|
||||
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"resource": {
|
||||
"description": "Name or id of the resource for this request.",
|
||||
"location": "path",
|
||||
"pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions",
|
||||
"request": {
|
||||
"$ref": "TestPermissionsRequest"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "TestPermissionsResponse"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/compute",
|
||||
"https://www.googleapis.com/auth/compute.readonly"
|
||||
]
|
||||
},
|
||||
"update": {
|
||||
"description": "Updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview .",
|
||||
"flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}",
|
||||
|
@ -34830,7 +35030,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"revision": "20231003",
|
||||
"revision": "20231011",
|
||||
"rootUrl": "https://compute.googleapis.com/",
|
||||
"schemas": {
|
||||
"AWSV4Signature": {
|
||||
|
|
|
@ -66925,6 +66925,180 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket
|
|||
|
||||
}
|
||||
|
||||
// method id "compute.backendBuckets.getIamPolicy":
|
||||
|
||||
type BackendBucketsGetIamPolicyCall struct {
|
||||
s *Service
|
||||
project string
|
||||
resource string
|
||||
urlParams_ gensupport.URLParams
|
||||
ifNoneMatch_ string
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// GetIamPolicy: Gets the access control policy for a resource. May be
|
||||
// empty if no such policy or resource exists.
|
||||
//
|
||||
// - project: Project ID for this request.
|
||||
// - resource: Name or id of the resource for this request.
|
||||
func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall {
|
||||
c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.project = project
|
||||
c.resource = resource
|
||||
return c
|
||||
}
|
||||
|
||||
// OptionsRequestedPolicyVersion sets the optional parameter
|
||||
// "optionsRequestedPolicyVersion": Requested IAM Policy version.
|
||||
func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall {
|
||||
c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// IfNoneMatch sets the optional parameter which makes the operation
|
||||
// fail if the object's ETag matches the given value. This is useful for
|
||||
// getting updates only after the object has changed since the last
|
||||
// request. Use googleapi.IsNotModified to check whether the response
|
||||
// error from Do is the result of In-None-Match.
|
||||
func (c *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall {
|
||||
c.ifNoneMatch_ = entityTag
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *BackendBucketsGetIamPolicyCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
if c.ifNoneMatch_ != "" {
|
||||
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
|
||||
}
|
||||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, err := http.NewRequest("GET", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"resource": c.resource,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "compute.backendBuckets.getIamPolicy" call.
|
||||
// Exactly one of *Policy or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
// *Policy.ServerResponse.Header or (if a response was returned at all)
|
||||
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
|
||||
// check whether the returned error was because http.StatusNotModified
|
||||
// was returned.
|
||||
func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, gensupport.WrapError(&googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, gensupport.WrapError(err)
|
||||
}
|
||||
ret := &Policy{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := gensupport.DecodeResponse(target, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
|
||||
// "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "compute.backendBuckets.getIamPolicy",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "resource"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "optionsRequestedPolicyVersion": {
|
||||
// "description": "Requested IAM Policy version.",
|
||||
// "format": "int32",
|
||||
// "location": "query",
|
||||
// "type": "integer"
|
||||
// },
|
||||
// "project": {
|
||||
// "description": "Project ID for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "resource": {
|
||||
// "description": "Name or id of the resource for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy",
|
||||
// "response": {
|
||||
// "$ref": "Policy"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/compute",
|
||||
// "https://www.googleapis.com/auth/compute.readonly"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "compute.backendBuckets.insert":
|
||||
|
||||
type BackendBucketsInsertCall struct {
|
||||
|
@ -67725,6 +67899,319 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio
|
|||
|
||||
}
|
||||
|
||||
// method id "compute.backendBuckets.setIamPolicy":
|
||||
|
||||
type BackendBucketsSetIamPolicyCall struct {
|
||||
s *Service
|
||||
project string
|
||||
resource string
|
||||
globalsetpolicyrequest *GlobalSetPolicyRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// SetIamPolicy: Sets the access control policy on the specified
|
||||
// resource. Replaces any existing policy.
|
||||
//
|
||||
// - project: Project ID for this request.
|
||||
// - resource: Name or id of the resource for this request.
|
||||
func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall {
|
||||
c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.project = project
|
||||
c.resource = resource
|
||||
c.globalsetpolicyrequest = globalsetpolicyrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *BackendBucketsSetIamPolicyCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/setIamPolicy")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, err := http.NewRequest("POST", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"resource": c.resource,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "compute.backendBuckets.setIamPolicy" call.
|
||||
// Exactly one of *Policy or error will be non-nil. Any non-2xx status
|
||||
// code is an error. Response headers are in either
|
||||
// *Policy.ServerResponse.Header or (if a response was returned at all)
|
||||
// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
|
||||
// check whether the returned error was because http.StatusNotModified
|
||||
// was returned.
|
||||
func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, gensupport.WrapError(&googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, gensupport.WrapError(err)
|
||||
}
|
||||
ret := &Policy{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := gensupport.DecodeResponse(target, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
|
||||
// "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "compute.backendBuckets.setIamPolicy",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "resource"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "project": {
|
||||
// "description": "Project ID for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "resource": {
|
||||
// "description": "Name or id of the resource for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy",
|
||||
// "request": {
|
||||
// "$ref": "GlobalSetPolicyRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "Policy"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/compute"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "compute.backendBuckets.testIamPermissions":
|
||||
|
||||
type BackendBucketsTestIamPermissionsCall struct {
|
||||
s *Service
|
||||
project string
|
||||
resource string
|
||||
testpermissionsrequest *TestPermissionsRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// TestIamPermissions: Returns permissions that a caller has on the
|
||||
// specified resource.
|
||||
//
|
||||
// - project: Project ID for this request.
|
||||
// - resource: Name or id of the resource for this request.
|
||||
func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall {
|
||||
c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.project = project
|
||||
c.resource = resource
|
||||
c.testpermissionsrequest = testpermissionsrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/testIamPermissions")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, err := http.NewRequest("POST", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"resource": c.resource,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "compute.backendBuckets.testIamPermissions" call.
|
||||
// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
|
||||
// non-2xx status code is an error. Response headers are in either
|
||||
// *TestPermissionsResponse.ServerResponse.Header or (if a response was
|
||||
// returned at all) in error.(*googleapi.Error).Header. Use
|
||||
// googleapi.IsNotModified to check whether the returned error was
|
||||
// because http.StatusNotModified was returned.
|
||||
func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, gensupport.WrapError(&googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, gensupport.WrapError(err)
|
||||
}
|
||||
ret := &TestPermissionsResponse{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := gensupport.DecodeResponse(target, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns permissions that a caller has on the specified resource.",
|
||||
// "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "compute.backendBuckets.testIamPermissions",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "resource"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "project": {
|
||||
// "description": "Project ID for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "resource": {
|
||||
// "description": "Name or id of the resource for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions",
|
||||
// "request": {
|
||||
// "$ref": "TestPermissionsRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "TestPermissionsResponse"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/compute",
|
||||
// "https://www.googleapis.com/auth/compute.readonly"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "compute.backendBuckets.update":
|
||||
|
||||
type BackendBucketsUpdateCall struct {
|
||||
|
@ -70640,6 +71127,163 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption)
|
|||
|
||||
}
|
||||
|
||||
// method id "compute.backendServices.testIamPermissions":
|
||||
|
||||
type BackendServicesTestIamPermissionsCall struct {
|
||||
s *Service
|
||||
project string
|
||||
resource string
|
||||
testpermissionsrequest *TestPermissionsRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// TestIamPermissions: Returns permissions that a caller has on the
|
||||
// specified resource.
|
||||
//
|
||||
// - project: Project ID for this request.
|
||||
// - resource: Name or id of the resource for this request.
|
||||
func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall {
|
||||
c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.project = project
|
||||
c.resource = resource
|
||||
c.testpermissionsrequest = testpermissionsrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *BackendServicesTestIamPermissionsCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/testIamPermissions")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, err := http.NewRequest("POST", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"resource": c.resource,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "compute.backendServices.testIamPermissions" call.
|
||||
// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
|
||||
// non-2xx status code is an error. Response headers are in either
|
||||
// *TestPermissionsResponse.ServerResponse.Header or (if a response was
|
||||
// returned at all) in error.(*googleapi.Error).Header. Use
|
||||
// googleapi.IsNotModified to check whether the returned error was
|
||||
// because http.StatusNotModified was returned.
|
||||
func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, gensupport.WrapError(&googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, gensupport.WrapError(err)
|
||||
}
|
||||
ret := &TestPermissionsResponse{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := gensupport.DecodeResponse(target, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns permissions that a caller has on the specified resource.",
|
||||
// "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "compute.backendServices.testIamPermissions",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "resource"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "project": {
|
||||
// "description": "Project ID for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "resource": {
|
||||
// "description": "Name or id of the resource for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions",
|
||||
// "request": {
|
||||
// "$ref": "TestPermissionsRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "TestPermissionsResponse"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/compute",
|
||||
// "https://www.googleapis.com/auth/compute.readonly"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "compute.backendServices.update":
|
||||
|
||||
type BackendServicesUpdateCall struct {
|
||||
|
@ -114111,7 +114755,11 @@ type InterconnectsGetDiagnosticsCall struct {
|
|||
}
|
||||
|
||||
// GetDiagnostics: Returns the interconnectDiagnostics for the specified
|
||||
// Interconnect.
|
||||
// Interconnect. In the event of a global outage, do not use this API to
|
||||
// make decisions about where to redirect your network traffic. Unlike a
|
||||
// VLAN attachment, which is regional, a Cloud Interconnect connection
|
||||
// is a global resource. A global outage can prevent this API from
|
||||
// functioning properly.
|
||||
//
|
||||
// - interconnect: Name of the interconnect resource to query.
|
||||
// - project: Project ID for this request.
|
||||
|
@ -114223,7 +114871,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int
|
|||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns the interconnectDiagnostics for the specified Interconnect.",
|
||||
// "description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.",
|
||||
// "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics",
|
||||
// "httpMethod": "GET",
|
||||
// "id": "compute.interconnects.getDiagnostics",
|
||||
|
@ -143439,6 +144087,175 @@ func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOp
|
|||
|
||||
}
|
||||
|
||||
// method id "compute.regionBackendServices.testIamPermissions":
|
||||
|
||||
type RegionBackendServicesTestIamPermissionsCall struct {
|
||||
s *Service
|
||||
project string
|
||||
region string
|
||||
resource string
|
||||
testpermissionsrequest *TestPermissionsRequest
|
||||
urlParams_ gensupport.URLParams
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// TestIamPermissions: Returns permissions that a caller has on the
|
||||
// specified resource.
|
||||
//
|
||||
// - project: Project ID for this request.
|
||||
// - region: The name of the region for this request.
|
||||
// - resource: Name or id of the resource for this request.
|
||||
func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall {
|
||||
c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
|
||||
c.project = project
|
||||
c.region = region
|
||||
c.resource = resource
|
||||
c.testpermissionsrequest = testpermissionsrequest
|
||||
return c
|
||||
}
|
||||
|
||||
// Fields allows partial responses to be retrieved. See
|
||||
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
|
||||
// for more information.
|
||||
func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall {
|
||||
c.urlParams_.Set("fields", googleapi.CombineFields(s))
|
||||
return c
|
||||
}
|
||||
|
||||
// Context sets the context to be used in this call's Do method. Any
|
||||
// pending HTTP request will be aborted if the provided context is
|
||||
// canceled.
|
||||
func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall {
|
||||
c.ctx_ = ctx
|
||||
return c
|
||||
}
|
||||
|
||||
// Header returns an http.Header that can be modified by the caller to
|
||||
// add HTTP headers to the request.
|
||||
func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header {
|
||||
if c.header_ == nil {
|
||||
c.header_ = make(http.Header)
|
||||
}
|
||||
return c.header_
|
||||
}
|
||||
|
||||
func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
|
||||
reqHeaders := make(http.Header)
|
||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
|
||||
for k, v := range c.header_ {
|
||||
reqHeaders[k] = v
|
||||
}
|
||||
reqHeaders.Set("User-Agent", c.s.userAgent())
|
||||
var body io.Reader = nil
|
||||
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqHeaders.Set("Content-Type", "application/json")
|
||||
c.urlParams_.Set("alt", alt)
|
||||
c.urlParams_.Set("prettyPrint", "false")
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions")
|
||||
urls += "?" + c.urlParams_.Encode()
|
||||
req, err := http.NewRequest("POST", urls, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = reqHeaders
|
||||
googleapi.Expand(req.URL, map[string]string{
|
||||
"project": c.project,
|
||||
"region": c.region,
|
||||
"resource": c.resource,
|
||||
})
|
||||
return gensupport.SendRequest(c.ctx_, c.s.client, req)
|
||||
}
|
||||
|
||||
// Do executes the "compute.regionBackendServices.testIamPermissions" call.
|
||||
// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
|
||||
// non-2xx status code is an error. Response headers are in either
|
||||
// *TestPermissionsResponse.ServerResponse.Header or (if a response was
|
||||
// returned at all) in error.(*googleapi.Error).Header. Use
|
||||
// googleapi.IsNotModified to check whether the returned error was
|
||||
// because http.StatusNotModified was returned.
|
||||
func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
|
||||
gensupport.SetOptions(c.urlParams_, opts...)
|
||||
res, err := c.doRequest("json")
|
||||
if res != nil && res.StatusCode == http.StatusNotModified {
|
||||
if res.Body != nil {
|
||||
res.Body.Close()
|
||||
}
|
||||
return nil, gensupport.WrapError(&googleapi.Error{
|
||||
Code: res.StatusCode,
|
||||
Header: res.Header,
|
||||
})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer googleapi.CloseBody(res)
|
||||
if err := googleapi.CheckResponse(res); err != nil {
|
||||
return nil, gensupport.WrapError(err)
|
||||
}
|
||||
ret := &TestPermissionsResponse{
|
||||
ServerResponse: googleapi.ServerResponse{
|
||||
Header: res.Header,
|
||||
HTTPStatusCode: res.StatusCode,
|
||||
},
|
||||
}
|
||||
target := &ret
|
||||
if err := gensupport.DecodeResponse(target, res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ret, nil
|
||||
// {
|
||||
// "description": "Returns permissions that a caller has on the specified resource.",
|
||||
// "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions",
|
||||
// "httpMethod": "POST",
|
||||
// "id": "compute.regionBackendServices.testIamPermissions",
|
||||
// "parameterOrder": [
|
||||
// "project",
|
||||
// "region",
|
||||
// "resource"
|
||||
// ],
|
||||
// "parameters": {
|
||||
// "project": {
|
||||
// "description": "Project ID for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "region": {
|
||||
// "description": "The name of the region for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// },
|
||||
// "resource": {
|
||||
// "description": "Name or id of the resource for this request.",
|
||||
// "location": "path",
|
||||
// "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
|
||||
// "required": true,
|
||||
// "type": "string"
|
||||
// }
|
||||
// },
|
||||
// "path": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions",
|
||||
// "request": {
|
||||
// "$ref": "TestPermissionsRequest"
|
||||
// },
|
||||
// "response": {
|
||||
// "$ref": "TestPermissionsResponse"
|
||||
// },
|
||||
// "scopes": [
|
||||
// "https://www.googleapis.com/auth/cloud-platform",
|
||||
// "https://www.googleapis.com/auth/compute",
|
||||
// "https://www.googleapis.com/auth/compute.readonly"
|
||||
// ]
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// method id "compute.regionBackendServices.update":
|
||||
|
||||
type RegionBackendServicesUpdateCall struct {
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
package internal
|
||||
|
||||
// Version is the current tagged release of the library.
|
||||
const Version = "0.147.0"
|
||||
const Version = "0.148.0"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"description": "Stores and retrieves potentially large, immutable data objects.",
|
||||
"discoveryVersion": "v1",
|
||||
"documentationLink": "https://developers.google.com/storage/docs/json_api/",
|
||||
"etag": "\"32313532343139313031303538363232393732\"",
|
||||
"etag": "\"3133333835393639383131353638313238353437\"",
|
||||
"icons": {
|
||||
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
|
||||
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
|
||||
|
@ -1144,6 +1144,301 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"managedFolders": {
|
||||
"methods": {
|
||||
"delete": {
|
||||
"description": "Permanently deletes a managed folder.",
|
||||
"httpMethod": "DELETE",
|
||||
"id": "storage.managedFolders.delete",
|
||||
"parameterOrder": [
|
||||
"bucket",
|
||||
"managedFolder"
|
||||
],
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"description": "Name of the bucket containing the managed folder.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"ifMetagenerationMatch": {
|
||||
"description": "If set, only deletes the managed folder if its metageneration matches this value.",
|
||||
"format": "int64",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"ifMetagenerationNotMatch": {
|
||||
"description": "If set, only deletes the managed folder if its metageneration does not match this value.",
|
||||
"format": "int64",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"managedFolder": {
|
||||
"description": "The managed folder name/path.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "b/{bucket}/managedFolders/{managedFolder}",
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control",
|
||||
"https://www.googleapis.com/auth/devstorage.read_write"
|
||||
]
|
||||
},
|
||||
"get": {
|
||||
"description": "Returns metadata of the specified managed folder.",
|
||||
"httpMethod": "GET",
|
||||
"id": "storage.managedFolders.get",
|
||||
"parameterOrder": [
|
||||
"bucket",
|
||||
"managedFolder"
|
||||
],
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"description": "Name of the bucket containing the managed folder.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"ifMetagenerationMatch": {
|
||||
"description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value.",
|
||||
"format": "int64",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"ifMetagenerationNotMatch": {
|
||||
"description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value.",
|
||||
"format": "int64",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"managedFolder": {
|
||||
"description": "The managed folder name/path.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "b/{bucket}/managedFolders/{managedFolder}",
|
||||
"response": {
|
||||
"$ref": "ManagedFolder"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/cloud-platform.read-only",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control",
|
||||
"https://www.googleapis.com/auth/devstorage.read_only",
|
||||
"https://www.googleapis.com/auth/devstorage.read_write"
|
||||
]
|
||||
},
|
||||
"getIamPolicy": {
|
||||
"description": "Returns an IAM policy for the specified managed folder.",
|
||||
"httpMethod": "GET",
|
||||
"id": "storage.managedFolders.getIamPolicy",
|
||||
"parameterOrder": [
|
||||
"bucket",
|
||||
"managedFolder"
|
||||
],
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"description": "Name of the bucket containing the managed folder.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"managedFolder": {
|
||||
"description": "The managed folder name/path.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"optionsRequestedPolicyVersion": {
|
||||
"description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.",
|
||||
"format": "int32",
|
||||
"location": "query",
|
||||
"minimum": "1",
|
||||
"type": "integer"
|
||||
},
|
||||
"userProject": {
|
||||
"description": "The project to be billed for this request. Required for Requester Pays buckets.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "b/{bucket}/managedFolders/{managedFolder}/iam",
|
||||
"response": {
|
||||
"$ref": "Policy"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/cloud-platform.read-only",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control",
|
||||
"https://www.googleapis.com/auth/devstorage.read_only",
|
||||
"https://www.googleapis.com/auth/devstorage.read_write"
|
||||
]
|
||||
},
|
||||
"insert": {
|
||||
"description": "Creates a new managed folder.",
|
||||
"httpMethod": "POST",
|
||||
"id": "storage.managedFolders.insert",
|
||||
"parameterOrder": [
|
||||
"bucket"
|
||||
],
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"description": "Name of the bucket containing the managed folder.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "b/{bucket}/managedFolders",
|
||||
"request": {
|
||||
"$ref": "ManagedFolder"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "ManagedFolder"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control",
|
||||
"https://www.googleapis.com/auth/devstorage.read_write"
|
||||
]
|
||||
},
|
||||
"list": {
|
||||
"description": "Lists managed folders in the given bucket.",
|
||||
"httpMethod": "GET",
|
||||
"id": "storage.managedFolders.list",
|
||||
"parameterOrder": [
|
||||
"bucket"
|
||||
],
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"description": "Name of the bucket containing the managed folder.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"pageSize": {
|
||||
"description": "Maximum number of items return in a single page of responses.",
|
||||
"format": "int32",
|
||||
"location": "query",
|
||||
"minimum": "0",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageToken": {
|
||||
"description": "A previously-returned page token representing part of the larger set of results to view.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "The managed folder name/path prefix to filter the output list of results.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "b/{bucket}/managedFolders",
|
||||
"response": {
|
||||
"$ref": "ManagedFolders"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/cloud-platform.read-only",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control",
|
||||
"https://www.googleapis.com/auth/devstorage.read_only",
|
||||
"https://www.googleapis.com/auth/devstorage.read_write"
|
||||
]
|
||||
},
|
||||
"setIamPolicy": {
|
||||
"description": "Updates an IAM policy for the specified managed folder.",
|
||||
"httpMethod": "PUT",
|
||||
"id": "storage.managedFolders.setIamPolicy",
|
||||
"parameterOrder": [
|
||||
"bucket",
|
||||
"managedFolder"
|
||||
],
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"description": "Name of the bucket containing the managed folder.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"managedFolder": {
|
||||
"description": "The managed folder name/path.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"userProject": {
|
||||
"description": "The project to be billed for this request. Required for Requester Pays buckets.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "b/{bucket}/managedFolders/{managedFolder}/iam",
|
||||
"request": {
|
||||
"$ref": "Policy"
|
||||
},
|
||||
"response": {
|
||||
"$ref": "Policy"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control"
|
||||
]
|
||||
},
|
||||
"testIamPermissions": {
|
||||
"description": "Tests a set of permissions on the given managed folder to see which, if any, are held by the caller.",
|
||||
"httpMethod": "GET",
|
||||
"id": "storage.managedFolders.testIamPermissions",
|
||||
"parameterOrder": [
|
||||
"bucket",
|
||||
"managedFolder",
|
||||
"permissions"
|
||||
],
|
||||
"parameters": {
|
||||
"bucket": {
|
||||
"description": "Name of the bucket containing the managed folder.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"managedFolder": {
|
||||
"description": "The managed folder name/path.",
|
||||
"location": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"permissions": {
|
||||
"description": "Permissions to test.",
|
||||
"location": "query",
|
||||
"repeated": true,
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
"userProject": {
|
||||
"description": "The project to be billed for this request. Required for Requester Pays buckets.",
|
||||
"location": "query",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"path": "b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions",
|
||||
"response": {
|
||||
"$ref": "TestIamPermissionsResponse"
|
||||
},
|
||||
"scopes": [
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
"https://www.googleapis.com/auth/cloud-platform.read-only",
|
||||
"https://www.googleapis.com/auth/devstorage.full_control",
|
||||
"https://www.googleapis.com/auth/devstorage.read_only",
|
||||
"https://www.googleapis.com/auth/devstorage.read_write"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"methods": {
|
||||
"delete": {
|
||||
|
@ -2175,6 +2470,11 @@
|
|||
"location": "query",
|
||||
"type": "string"
|
||||
},
|
||||
"includeFoldersAsPrefixes": {
|
||||
"description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.",
|
||||
"location": "query",
|
||||
"type": "boolean"
|
||||
},
|
||||
"includeTrailingDelimiter": {
|
||||
"description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.",
|
||||
"location": "query",
|
||||
|
@ -3263,7 +3563,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"revision": "20230926",
|
||||
"revision": "20231012",
|
||||
"rootUrl": "https://storage.googleapis.com/",
|
||||
"schemas": {
|
||||
"Bucket": {
|
||||
|
@ -4149,6 +4449,72 @@
|
|||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ManagedFolder": {
|
||||
"description": "A managed folder.",
|
||||
"id": "ManagedFolder",
|
||||
"properties": {
|
||||
"bucket": {
|
||||
"description": "The name of the bucket containing this managed folder.",
|
||||
"type": "string"
|
||||
},
|
||||
"createTime": {
|
||||
"description": "The creation time of the managed folder in RFC 3339 format.",
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "The ID of the managed folder, including the bucket name and managed folder name.",
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"default": "storage#managedFolder",
|
||||
"description": "The kind of item this is. For managed folders, this is always storage#managedFolder.",
|
||||
"type": "string"
|
||||
},
|
||||
"metageneration": {
|
||||
"description": "The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata.",
|
||||
"format": "int64",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the managed folder. Required if not specified by URL parameter.",
|
||||
"type": "string"
|
||||
},
|
||||
"selfLink": {
|
||||
"description": "The link to this managed folder.",
|
||||
"type": "string"
|
||||
},
|
||||
"updateTime": {
|
||||
"description": "The last update time of the managed folder metadata in RFC 3339 format.",
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ManagedFolders": {
|
||||
"description": "A list of managed folders.",
|
||||
"id": "ManagedFolders",
|
||||
"properties": {
|
||||
"items": {
|
||||
"description": "The list of items.",
|
||||
"items": {
|
||||
"$ref": "ManagedFolder"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"kind": {
|
||||
"default": "storage#managedFolders",
|
||||
"description": "The kind of item this is. For lists of managed folders, this is always storage#managedFolders.",
|
||||
"type": "string"
|
||||
},
|
||||
"nextPageToken": {
|
||||
"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Notification": {
|
||||
"description": "A subscription to receive Google PubSub notifications.",
|
||||
"id": "Notification",
|
||||
|
@ -4565,14 +4931,15 @@
|
|||
"type": "object"
|
||||
},
|
||||
"Policy": {
|
||||
"description": "A bucket/object IAM policy.",
|
||||
"description": "A bucket/object/managedFolder IAM policy.",
|
||||
"id": "Policy",
|
||||
"properties": {
|
||||
"bindings": {
|
||||
"annotations": {
|
||||
"required": [
|
||||
"storage.buckets.setIamPolicy",
|
||||
"storage.objects.setIamPolicy"
|
||||
"storage.objects.setIamPolicy",
|
||||
"storage.managedFolders.setIamPolicy"
|
||||
]
|
||||
},
|
||||
"description": "An association between a role, which comes with a set of permissions, and members who may assume that role.",
|
||||
|
@ -4586,7 +4953,8 @@
|
|||
"annotations": {
|
||||
"required": [
|
||||
"storage.buckets.setIamPolicy",
|
||||
"storage.objects.setIamPolicy"
|
||||
"storage.objects.setIamPolicy",
|
||||
"storage.managedFolders.setIamPolicy"
|
||||
]
|
||||
},
|
||||
"description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers — A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid — An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project",
|
||||
|
@ -4599,7 +4967,8 @@
|
|||
"annotations": {
|
||||
"required": [
|
||||
"storage.buckets.setIamPolicy",
|
||||
"storage.objects.setIamPolicy"
|
||||
"storage.objects.setIamPolicy",
|
||||
"storage.managedFolders.setIamPolicy"
|
||||
]
|
||||
},
|
||||
"description": "The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.\nThe new IAM roles are: \n- roles/storage.admin — Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator — Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.",
|
||||
|
@ -4621,7 +4990,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"resourceId": {
|
||||
"description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.",
|
||||
"description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, projects/_/buckets/bucket/objects/object for objects, and projects/_/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.",
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
|
@ -4683,7 +5052,7 @@
|
|||
"type": "object"
|
||||
},
|
||||
"TestIamPermissionsResponse": {
|
||||
"description": "A storage.(buckets|objects).testIamPermissions response.",
|
||||
"description": "A storage.(buckets|objects|managedFolders).testIamPermissions response.",
|
||||
"id": "TestIamPermissionsResponse",
|
||||
"properties": {
|
||||
"kind": {
|
||||
|
@ -4692,7 +5061,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"permissions": {
|
||||
"description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows: \n- storage.buckets.delete — Delete bucket. \n- storage.buckets.get — Read bucket metadata. \n- storage.buckets.getIamPolicy — Read bucket IAM policy. \n- storage.buckets.create — Create bucket. \n- storage.buckets.list — List buckets. \n- storage.buckets.setIamPolicy — Update bucket IAM policy. \n- storage.buckets.update — Update bucket metadata. \n- storage.objects.delete — Delete object. \n- storage.objects.get — Read object data and metadata. \n- storage.objects.getIamPolicy — Read object IAM policy. \n- storage.objects.create — Create object. \n- storage.objects.list — List objects. \n- storage.objects.setIamPolicy — Update object IAM policy. \n- storage.objects.update — Update object metadata.",
|
||||
"description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: \n- storage.buckets.delete — Delete bucket. \n- storage.buckets.get — Read bucket metadata. \n- storage.buckets.getIamPolicy — Read bucket IAM policy. \n- storage.buckets.create — Create bucket. \n- storage.buckets.list — List buckets. \n- storage.buckets.setIamPolicy — Update bucket IAM policy. \n- storage.buckets.update — Update bucket metadata. \n- storage.objects.delete — Delete object. \n- storage.objects.get — Read object data and metadata. \n- storage.objects.getIamPolicy — Read object IAM policy. \n- storage.objects.create — Create object. \n- storage.objects.list — List objects. \n- storage.objects.setIamPolicy — Update object IAM policy. \n- storage.objects.update — Update object metadata. \n- storage.managedFolders.delete — Delete managed folder. \n- storage.managedFolders.get — Read managed folder metadata. \n- storage.managedFolders.getIamPolicy — Read managed folder IAM policy. \n- storage.managedFolders.create — Create managed folder. \n- storage.managedFolders.list — List managed folders. \n- storage.managedFolders.setIamPolicy — Update managed folder IAM policy.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
|||
# gRPC-Go
|
||||
|
||||
[](https://travis-ci.org/grpc/grpc-go)
|
||||
[][API]
|
||||
[](https://goreportcard.com/report/github.com/grpc/grpc-go)
|
||||
[](https://codecov.io/gh/grpc/grpc-go)
|
||||
|
||||
The [Go][] implementation of [gRPC][]: A high performance, open source, general
|
||||
RPC framework that puts mobile and HTTP/2 first. For more information see the
|
||||
|
|
|
@ -121,9 +121,9 @@ func (a *Attributes) String() string {
|
|||
return sb.String()
|
||||
}
|
||||
|
||||
func str(x any) string {
|
||||
func str(x any) (s string) {
|
||||
if v, ok := x.(fmt.Stringer); ok {
|
||||
return v.String()
|
||||
return fmt.Sprint(v)
|
||||
} else if v, ok := x.(string); ok {
|
||||
return v
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import (
|
|||
"google.golang.org/grpc/channelz"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/internal"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/resolver"
|
||||
|
@ -39,6 +40,8 @@ import (
|
|||
var (
|
||||
// m is a map from name to balancer builder.
|
||||
m = make(map[string]Builder)
|
||||
|
||||
logger = grpclog.Component("balancer")
|
||||
)
|
||||
|
||||
// Register registers the balancer builder to the balancer map. b.Name
|
||||
|
@ -51,6 +54,12 @@ var (
|
|||
// an init() function), and is not thread-safe. If multiple Balancers are
|
||||
// registered with the same name, the one registered last will take effect.
|
||||
func Register(b Builder) {
|
||||
if strings.ToLower(b.Name()) != b.Name() {
|
||||
// TODO: Skip the use of strings.ToLower() to index the map after v1.59
|
||||
// is released to switch to case sensitive balancer registry. Also,
|
||||
// remove this warning and update the docstrings for Register and Get.
|
||||
logger.Warningf("Balancer registered with name %q. grpc-go will be switching to case sensitive balancer registries soon", b.Name())
|
||||
}
|
||||
m[strings.ToLower(b.Name())] = b
|
||||
}
|
||||
|
||||
|
@ -70,6 +79,12 @@ func init() {
|
|||
// Note that the compare is done in a case-insensitive fashion.
|
||||
// If no builder is register with the name, nil will be returned.
|
||||
func Get(name string) Builder {
|
||||
if strings.ToLower(name) != name {
|
||||
// TODO: Skip the use of strings.ToLower() to index the map after v1.59
|
||||
// is released to switch to case sensitive balancer registry. Also,
|
||||
// remove this warning and update the docstrings for Register and Get.
|
||||
logger.Warningf("Balancer retrieved for name %q. grpc-go will be switching to case sensitive balancer registries soon", name)
|
||||
}
|
||||
if b, ok := m[strings.ToLower(name)]; ok {
|
||||
return b
|
||||
}
|
||||
|
|
|
@ -337,8 +337,8 @@ func (cc *ClientConn) exitIdleMode() error {
|
|||
return errConnClosing
|
||||
}
|
||||
if cc.idlenessState != ccIdlenessStateIdle {
|
||||
cc.mu.Unlock()
|
||||
channelz.Infof(logger, cc.channelzID, "ClientConn asked to exit idle mode, current mode is %v", cc.idlenessState)
|
||||
cc.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -404,13 +404,13 @@ func (cc *ClientConn) exitIdleMode() error {
|
|||
// name resolver, load balancer and any subchannels.
|
||||
func (cc *ClientConn) enterIdleMode() error {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
|
||||
if cc.conns == nil {
|
||||
cc.mu.Unlock()
|
||||
return ErrClientConnClosing
|
||||
}
|
||||
if cc.idlenessState != ccIdlenessStateActive {
|
||||
channelz.Errorf(logger, cc.channelzID, "ClientConn asked to enter idle mode, current mode is %v", cc.idlenessState)
|
||||
cc.mu.Unlock()
|
||||
channelz.Warningf(logger, cc.channelzID, "ClientConn asked to enter idle mode, current mode is %v", cc.idlenessState)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -431,14 +431,14 @@ func (cc *ClientConn) enterIdleMode() error {
|
|||
cc.balancerWrapper.enterIdleMode()
|
||||
cc.csMgr.updateState(connectivity.Idle)
|
||||
cc.idlenessState = ccIdlenessStateIdle
|
||||
cc.mu.Unlock()
|
||||
cc.addTraceEvent("entering idle mode")
|
||||
|
||||
go func() {
|
||||
cc.addTraceEvent("entering idle mode")
|
||||
for ac := range conns {
|
||||
ac.tearDown(errConnIdling)
|
||||
}
|
||||
}()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -804,6 +804,12 @@ func init() {
|
|||
internal.SubscribeToConnectivityStateChanges = func(cc *ClientConn, s grpcsync.Subscriber) func() {
|
||||
return cc.csMgr.pubSub.Subscribe(s)
|
||||
}
|
||||
internal.EnterIdleModeForTesting = func(cc *ClientConn) error {
|
||||
return cc.enterIdleMode()
|
||||
}
|
||||
internal.ExitIdleModeForTesting = func(cc *ClientConn) error {
|
||||
return cc.exitIdleMode()
|
||||
}
|
||||
}
|
||||
|
||||
func (cc *ClientConn) maybeApplyDefaultServiceConfig(addrs []resolver.Address) {
|
||||
|
|
|
@ -644,6 +644,7 @@ func defaultDialOptions() dialOptions {
|
|||
UseProxy: true,
|
||||
},
|
||||
recvBufferPool: nopBufferPool{},
|
||||
idleTimeout: 30 * time.Minute,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -680,8 +681,8 @@ func WithResolvers(rs ...resolver.Builder) DialOption {
|
|||
// channel will exit idle mode when the Connect() method is called or when an
|
||||
// RPC is initiated.
|
||||
//
|
||||
// By default this feature is disabled, which can also be explicitly configured
|
||||
// by passing zero to this function.
|
||||
// A default timeout of 30 minutes will be used if this dial option is not set
|
||||
// at dial time and idleness can be disabled by passing a timeout of zero.
|
||||
//
|
||||
// # Experimental
|
||||
//
|
||||
|
|
|
@ -38,6 +38,10 @@ const Identity = "identity"
|
|||
|
||||
// Compressor is used for compressing and decompressing when sending or
|
||||
// receiving messages.
|
||||
//
|
||||
// If a Compressor implements `DecompressedSize(compressedBytes []byte) int`,
|
||||
// gRPC will invoke it to determine the size of the buffer allocated for the
|
||||
// result of decompression. A return value of -1 indicates unknown size.
|
||||
type Compressor interface {
|
||||
// Compress writes the data written to wc to w after compressing it. If an
|
||||
// error occurs while initializing the compressor, that error is returned
|
||||
|
@ -51,15 +55,6 @@ type Compressor interface {
|
|||
// coding header. The result must be static; the result cannot change
|
||||
// between calls.
|
||||
Name() string
|
||||
// If a Compressor implements
|
||||
// DecompressedSize(compressedBytes []byte) int, gRPC will call it
|
||||
// to determine the size of the buffer allocated for the result of decompression.
|
||||
// Return -1 to indicate unknown size.
|
||||
//
|
||||
// Experimental
|
||||
//
|
||||
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
|
||||
// later release.
|
||||
}
|
||||
|
||||
var registeredCompressor = make(map[string]Compressor)
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
package backoff
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
grpcbackoff "google.golang.org/grpc/backoff"
|
||||
|
@ -71,3 +73,37 @@ func (bc Exponential) Backoff(retries int) time.Duration {
|
|||
}
|
||||
return time.Duration(backoff)
|
||||
}
|
||||
|
||||
// ErrResetBackoff is the error to be returned by the function executed by RunF,
|
||||
// to instruct the latter to reset its backoff state.
|
||||
var ErrResetBackoff = errors.New("reset backoff state")
|
||||
|
||||
// RunF provides a convenient way to run a function f repeatedly until the
|
||||
// context expires or f returns a non-nil error that is not ErrResetBackoff.
|
||||
// When f returns ErrResetBackoff, RunF continues to run f, but resets its
|
||||
// backoff state before doing so. backoff accepts an integer representing the
|
||||
// number of retries, and returns the amount of time to backoff.
|
||||
func RunF(ctx context.Context, f func() error, backoff func(int) time.Duration) {
|
||||
attempt := 0
|
||||
timer := time.NewTimer(0)
|
||||
for ctx.Err() == nil {
|
||||
select {
|
||||
case <-timer.C:
|
||||
case <-ctx.Done():
|
||||
timer.Stop()
|
||||
return
|
||||
}
|
||||
|
||||
err := f()
|
||||
if errors.Is(err, ErrResetBackoff) {
|
||||
timer.Reset(0)
|
||||
attempt = 0
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
timer.Reset(backoff(attempt))
|
||||
attempt++
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,6 +175,12 @@ var (
|
|||
// GRPCResolverSchemeExtraMetadata determines when gRPC will add extra
|
||||
// metadata to RPCs.
|
||||
GRPCResolverSchemeExtraMetadata string = "xds"
|
||||
|
||||
// EnterIdleModeForTesting gets the ClientConn to enter IDLE mode.
|
||||
EnterIdleModeForTesting any // func(*grpc.ClientConn) error
|
||||
|
||||
// ExitIdleModeForTesting gets the ClientConn to exit IDLE mode.
|
||||
ExitIdleModeForTesting any // func(*grpc.ClientConn) error
|
||||
)
|
||||
|
||||
// HealthChecker defines the signature of the client-side LB channel health checking function.
|
||||
|
|
|
@ -43,6 +43,34 @@ type Status struct {
|
|||
s *spb.Status
|
||||
}
|
||||
|
||||
// NewWithProto returns a new status including details from statusProto. This
|
||||
// is meant to be used by the gRPC library only.
|
||||
func NewWithProto(code codes.Code, message string, statusProto []string) *Status {
|
||||
if len(statusProto) != 1 {
|
||||
// No grpc-status-details bin header, or multiple; just ignore.
|
||||
return &Status{s: &spb.Status{Code: int32(code), Message: message}}
|
||||
}
|
||||
st := &spb.Status{}
|
||||
if err := proto.Unmarshal([]byte(statusProto[0]), st); err != nil {
|
||||
// Probably not a google.rpc.Status proto; do not provide details.
|
||||
return &Status{s: &spb.Status{Code: int32(code), Message: message}}
|
||||
}
|
||||
if st.Code == int32(code) {
|
||||
// The codes match between the grpc-status header and the
|
||||
// grpc-status-details-bin header; use the full details proto.
|
||||
return &Status{s: st}
|
||||
}
|
||||
return &Status{
|
||||
s: &spb.Status{
|
||||
Code: int32(codes.Internal),
|
||||
Message: fmt.Sprintf(
|
||||
"grpc-status-details-bin mismatch: grpc-status=%v, grpc-message=%q, grpc-status-details-bin=%+v",
|
||||
code, message, st,
|
||||
),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// New returns a Status representing c and msg.
|
||||
func New(c codes.Code, msg string) *Status {
|
||||
return &Status{s: &spb.Status{Code: int32(c), Message: msg}}
|
||||
|
|
|
@ -220,18 +220,20 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro
|
|||
h.Set("Grpc-Message", encodeGrpcMessage(m))
|
||||
}
|
||||
|
||||
s.hdrMu.Lock()
|
||||
if p := st.Proto(); p != nil && len(p.Details) > 0 {
|
||||
delete(s.trailer, grpcStatusDetailsBinHeader)
|
||||
stBytes, err := proto.Marshal(p)
|
||||
if err != nil {
|
||||
// TODO: return error instead, when callers are able to handle it.
|
||||
panic(err)
|
||||
}
|
||||
|
||||
h.Set("Grpc-Status-Details-Bin", encodeBinHeader(stBytes))
|
||||
h.Set(grpcStatusDetailsBinHeader, encodeBinHeader(stBytes))
|
||||
}
|
||||
|
||||
if md := s.Trailer(); len(md) > 0 {
|
||||
for k, vv := range md {
|
||||
if len(s.trailer) > 0 {
|
||||
for k, vv := range s.trailer {
|
||||
// Clients don't tolerate reading restricted headers after some non restricted ones were sent.
|
||||
if isReservedHeader(k) {
|
||||
continue
|
||||
|
@ -243,6 +245,7 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro
|
|||
}
|
||||
}
|
||||
}
|
||||
s.hdrMu.Unlock()
|
||||
})
|
||||
|
||||
if err == nil { // transport has not been closed
|
||||
|
@ -287,7 +290,7 @@ func (ht *serverHandlerTransport) writeCommonHeaders(s *Stream) {
|
|||
}
|
||||
|
||||
// writeCustomHeaders sets custom headers set on the stream via SetHeader
|
||||
// on the first write call (Write, WriteHeader, or WriteStatus).
|
||||
// on the first write call (Write, WriteHeader, or WriteStatus)
|
||||
func (ht *serverHandlerTransport) writeCustomHeaders(s *Stream) {
|
||||
h := ht.rw.Header()
|
||||
|
||||
|
@ -344,7 +347,7 @@ func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), traceCtx func(context.Context, string) context.Context) {
|
||||
func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream)) {
|
||||
// With this transport type there will be exactly 1 stream: this HTTP request.
|
||||
|
||||
ctx := ht.req.Context()
|
||||
|
|
|
@ -1399,7 +1399,6 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
|
|||
mdata = make(map[string][]string)
|
||||
contentTypeErr = "malformed header: missing HTTP content-type"
|
||||
grpcMessage string
|
||||
statusGen *status.Status
|
||||
recvCompress string
|
||||
httpStatusCode *int
|
||||
httpStatusErr string
|
||||
|
@ -1434,12 +1433,6 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
|
|||
rawStatusCode = codes.Code(uint32(code))
|
||||
case "grpc-message":
|
||||
grpcMessage = decodeGrpcMessage(hf.Value)
|
||||
case "grpc-status-details-bin":
|
||||
var err error
|
||||
statusGen, err = decodeGRPCStatusDetails(hf.Value)
|
||||
if err != nil {
|
||||
headerError = fmt.Sprintf("transport: malformed grpc-status-details-bin: %v", err)
|
||||
}
|
||||
case ":status":
|
||||
if hf.Value == "200" {
|
||||
httpStatusErr = ""
|
||||
|
@ -1548,14 +1541,12 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
|
|||
return
|
||||
}
|
||||
|
||||
if statusGen == nil {
|
||||
statusGen = status.New(rawStatusCode, grpcMessage)
|
||||
}
|
||||
status := istatus.NewWithProto(rawStatusCode, grpcMessage, mdata[grpcStatusDetailsBinHeader])
|
||||
|
||||
// If client received END_STREAM from server while stream was still active,
|
||||
// send RST_STREAM.
|
||||
rstStream := s.getState() == streamActive
|
||||
t.closeStream(s, io.EOF, rstStream, http2.ErrCodeNo, statusGen, mdata, true)
|
||||
t.closeStream(s, io.EOF, rstStream, http2.ErrCodeNo, status, mdata, true)
|
||||
}
|
||||
|
||||
// readServerPreface reads and handles the initial settings frame from the
|
||||
|
|
|
@ -342,7 +342,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
|
|||
|
||||
// operateHeaders takes action on the decoded headers. Returns an error if fatal
|
||||
// error encountered and transport needs to close, otherwise returns nil.
|
||||
func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) error {
|
||||
func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream)) error {
|
||||
// Acquire max stream ID lock for entire duration
|
||||
t.maxStreamMu.Lock()
|
||||
defer t.maxStreamMu.Unlock()
|
||||
|
@ -561,7 +561,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
|
|||
}
|
||||
if t.inTapHandle != nil {
|
||||
var err error
|
||||
if s.ctx, err = t.inTapHandle(s.ctx, &tap.Info{FullMethodName: s.method}); err != nil {
|
||||
if s.ctx, err = t.inTapHandle(s.ctx, &tap.Info{FullMethodName: s.method, Header: mdata}); err != nil {
|
||||
t.mu.Unlock()
|
||||
if t.logger.V(logLevel) {
|
||||
t.logger.Infof("Aborting the stream early due to InTapHandle failure: %v", err)
|
||||
|
@ -592,7 +592,6 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
|
|||
s.requestRead = func(n int) {
|
||||
t.adjustWindow(s, uint32(n))
|
||||
}
|
||||
s.ctx = traceCtx(s.ctx, s.method)
|
||||
for _, sh := range t.stats {
|
||||
s.ctx = sh.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method})
|
||||
inHeader := &stats.InHeader{
|
||||
|
@ -630,7 +629,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
|
|||
// HandleStreams receives incoming streams using the given handler. This is
|
||||
// typically run in a separate goroutine.
|
||||
// traceCtx attaches trace to ctx and returns the new context.
|
||||
func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context.Context, string) context.Context) {
|
||||
func (t *http2Server) HandleStreams(handle func(*Stream)) {
|
||||
defer close(t.readerDone)
|
||||
for {
|
||||
t.controlBuf.throttle()
|
||||
|
@ -665,7 +664,7 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context.
|
|||
}
|
||||
switch frame := frame.(type) {
|
||||
case *http2.MetaHeadersFrame:
|
||||
if err := t.operateHeaders(frame, handle, traceCtx); err != nil {
|
||||
if err := t.operateHeaders(frame, handle); err != nil {
|
||||
t.Close(err)
|
||||
break
|
||||
}
|
||||
|
@ -1053,12 +1052,15 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
|
|||
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-message", Value: encodeGrpcMessage(st.Message())})
|
||||
|
||||
if p := st.Proto(); p != nil && len(p.Details) > 0 {
|
||||
// Do not use the user's grpc-status-details-bin (if present) if we are
|
||||
// even attempting to set our own.
|
||||
delete(s.trailer, grpcStatusDetailsBinHeader)
|
||||
stBytes, err := proto.Marshal(p)
|
||||
if err != nil {
|
||||
// TODO: return error instead, when callers are able to handle it.
|
||||
t.logger.Errorf("Failed to marshal rpc status: %s, error: %v", pretty.ToJSON(p), err)
|
||||
} else {
|
||||
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-status-details-bin", Value: encodeBinHeader(stBytes)})
|
||||
headerFields = append(headerFields, hpack.HeaderField{Name: grpcStatusDetailsBinHeader, Value: encodeBinHeader(stBytes)})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,12 +34,9 @@ import (
|
|||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"golang.org/x/net/http2"
|
||||
"golang.org/x/net/http2/hpack"
|
||||
spb "google.golang.org/genproto/googleapis/rpc/status"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -88,6 +85,8 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
var grpcStatusDetailsBinHeader = "grpc-status-details-bin"
|
||||
|
||||
// isReservedHeader checks whether hdr belongs to HTTP2 headers
|
||||
// reserved by gRPC protocol. Any other headers are classified as the
|
||||
// user-specified metadata.
|
||||
|
@ -103,7 +102,6 @@ func isReservedHeader(hdr string) bool {
|
|||
"grpc-message",
|
||||
"grpc-status",
|
||||
"grpc-timeout",
|
||||
"grpc-status-details-bin",
|
||||
// Intentionally exclude grpc-previous-rpc-attempts and
|
||||
// grpc-retry-pushback-ms, which are "reserved", but their API
|
||||
// intentionally works via metadata.
|
||||
|
@ -154,18 +152,6 @@ func decodeMetadataHeader(k, v string) (string, error) {
|
|||
return v, nil
|
||||
}
|
||||
|
||||
func decodeGRPCStatusDetails(rawDetails string) (*status.Status, error) {
|
||||
v, err := decodeBinHeader(rawDetails)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
st := &spb.Status{}
|
||||
if err = proto.Unmarshal(v, st); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return status.FromProto(st), nil
|
||||
}
|
||||
|
||||
type timeoutUnit uint8
|
||||
|
||||
const (
|
||||
|
|
|
@ -698,7 +698,7 @@ type ClientTransport interface {
|
|||
// Write methods for a given Stream will be called serially.
|
||||
type ServerTransport interface {
|
||||
// HandleStreams receives incoming streams using the given handler.
|
||||
HandleStreams(func(*Stream), func(context.Context, string) context.Context)
|
||||
HandleStreams(func(*Stream))
|
||||
|
||||
// WriteHeader sends the header metadata for the given stream.
|
||||
// WriteHeader may not be called on all streams.
|
||||
|
|
|
@ -983,7 +983,7 @@ func (s *Server) serveStreams(st transport.ServerTransport) {
|
|||
f := func() {
|
||||
defer streamQuota.release()
|
||||
defer wg.Done()
|
||||
s.handleStream(st, stream, s.traceInfo(st, stream))
|
||||
s.handleStream(st, stream)
|
||||
}
|
||||
|
||||
if s.opts.numServerWorkers > 0 {
|
||||
|
@ -995,12 +995,6 @@ func (s *Server) serveStreams(st transport.ServerTransport) {
|
|||
}
|
||||
}
|
||||
go f()
|
||||
}, func(ctx context.Context, method string) context.Context {
|
||||
if !EnableTracing {
|
||||
return ctx
|
||||
}
|
||||
tr := trace.New("grpc.Recv."+methodFamily(method), method)
|
||||
return trace.NewContext(ctx, tr)
|
||||
})
|
||||
wg.Wait()
|
||||
}
|
||||
|
@ -1049,30 +1043,6 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
s.serveStreams(st)
|
||||
}
|
||||
|
||||
// traceInfo returns a traceInfo and associates it with stream, if tracing is enabled.
|
||||
// If tracing is not enabled, it returns nil.
|
||||
func (s *Server) traceInfo(st transport.ServerTransport, stream *transport.Stream) (trInfo *traceInfo) {
|
||||
if !EnableTracing {
|
||||
return nil
|
||||
}
|
||||
tr, ok := trace.FromContext(stream.Context())
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
trInfo = &traceInfo{
|
||||
tr: tr,
|
||||
firstLine: firstLine{
|
||||
client: false,
|
||||
remoteAddr: st.RemoteAddr(),
|
||||
},
|
||||
}
|
||||
if dl, ok := stream.Context().Deadline(); ok {
|
||||
trInfo.firstLine.deadline = time.Until(dl)
|
||||
}
|
||||
return trInfo
|
||||
}
|
||||
|
||||
func (s *Server) addConn(addr string, st transport.ServerTransport) bool {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
|
@ -1133,7 +1103,7 @@ func (s *Server) incrCallsFailed() {
|
|||
atomic.AddInt64(&s.czData.callsFailed, 1)
|
||||
}
|
||||
|
||||
func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Stream, msg any, cp Compressor, opts *transport.Options, comp encoding.Compressor) error {
|
||||
func (s *Server) sendResponse(ctx context.Context, t transport.ServerTransport, stream *transport.Stream, msg any, cp Compressor, opts *transport.Options, comp encoding.Compressor) error {
|
||||
data, err := encode(s.getCodec(stream.ContentSubtype()), msg)
|
||||
if err != nil {
|
||||
channelz.Error(logger, s.channelzID, "grpc: server failed to encode response: ", err)
|
||||
|
@ -1152,7 +1122,7 @@ func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Str
|
|||
err = t.Write(stream, hdr, payload, opts)
|
||||
if err == nil {
|
||||
for _, sh := range s.opts.statsHandlers {
|
||||
sh.HandleRPC(stream.Context(), outPayload(false, msg, data, payload, time.Now()))
|
||||
sh.HandleRPC(ctx, outPayload(false, msg, data, payload, time.Now()))
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
@ -1194,7 +1164,7 @@ func getChainUnaryHandler(interceptors []UnaryServerInterceptor, curr int, info
|
|||
}
|
||||
}
|
||||
|
||||
func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.Stream, info *serviceInfo, md *MethodDesc, trInfo *traceInfo) (err error) {
|
||||
func (s *Server) processUnaryRPC(ctx context.Context, t transport.ServerTransport, stream *transport.Stream, info *serviceInfo, md *MethodDesc, trInfo *traceInfo) (err error) {
|
||||
shs := s.opts.statsHandlers
|
||||
if len(shs) != 0 || trInfo != nil || channelz.IsOn() {
|
||||
if channelz.IsOn() {
|
||||
|
@ -1208,7 +1178,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
IsClientStream: false,
|
||||
IsServerStream: false,
|
||||
}
|
||||
sh.HandleRPC(stream.Context(), statsBegin)
|
||||
sh.HandleRPC(ctx, statsBegin)
|
||||
}
|
||||
if trInfo != nil {
|
||||
trInfo.tr.LazyLog(&trInfo.firstLine, false)
|
||||
|
@ -1240,7 +1210,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
if err != nil && err != io.EOF {
|
||||
end.Error = toRPCErr(err)
|
||||
}
|
||||
sh.HandleRPC(stream.Context(), end)
|
||||
sh.HandleRPC(ctx, end)
|
||||
}
|
||||
|
||||
if channelz.IsOn() {
|
||||
|
@ -1262,7 +1232,6 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
}
|
||||
}
|
||||
if len(binlogs) != 0 {
|
||||
ctx := stream.Context()
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
logEntry := &binarylog.ClientHeader{
|
||||
Header: md,
|
||||
|
@ -1348,7 +1317,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
return status.Errorf(codes.Internal, "grpc: error unmarshalling request: %v", err)
|
||||
}
|
||||
for _, sh := range shs {
|
||||
sh.HandleRPC(stream.Context(), &stats.InPayload{
|
||||
sh.HandleRPC(ctx, &stats.InPayload{
|
||||
RecvTime: time.Now(),
|
||||
Payload: v,
|
||||
Length: len(d),
|
||||
|
@ -1362,7 +1331,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
Message: d,
|
||||
}
|
||||
for _, binlog := range binlogs {
|
||||
binlog.Log(stream.Context(), cm)
|
||||
binlog.Log(ctx, cm)
|
||||
}
|
||||
}
|
||||
if trInfo != nil {
|
||||
|
@ -1370,7 +1339,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
}
|
||||
return nil
|
||||
}
|
||||
ctx := NewContextWithServerTransportStream(stream.Context(), stream)
|
||||
ctx = NewContextWithServerTransportStream(ctx, stream)
|
||||
reply, appErr := md.Handler(info.serviceImpl, ctx, df, s.opts.unaryInt)
|
||||
if appErr != nil {
|
||||
appStatus, ok := status.FromError(appErr)
|
||||
|
@ -1395,7 +1364,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
Header: h,
|
||||
}
|
||||
for _, binlog := range binlogs {
|
||||
binlog.Log(stream.Context(), sh)
|
||||
binlog.Log(ctx, sh)
|
||||
}
|
||||
}
|
||||
st := &binarylog.ServerTrailer{
|
||||
|
@ -1403,7 +1372,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
Err: appErr,
|
||||
}
|
||||
for _, binlog := range binlogs {
|
||||
binlog.Log(stream.Context(), st)
|
||||
binlog.Log(ctx, st)
|
||||
}
|
||||
}
|
||||
return appErr
|
||||
|
@ -1418,7 +1387,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
if stream.SendCompress() != sendCompressorName {
|
||||
comp = encoding.GetCompressor(stream.SendCompress())
|
||||
}
|
||||
if err := s.sendResponse(t, stream, reply, cp, opts, comp); err != nil {
|
||||
if err := s.sendResponse(ctx, t, stream, reply, cp, opts, comp); err != nil {
|
||||
if err == io.EOF {
|
||||
// The entire stream is done (for unary RPC only).
|
||||
return err
|
||||
|
@ -1445,8 +1414,8 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
Err: appErr,
|
||||
}
|
||||
for _, binlog := range binlogs {
|
||||
binlog.Log(stream.Context(), sh)
|
||||
binlog.Log(stream.Context(), st)
|
||||
binlog.Log(ctx, sh)
|
||||
binlog.Log(ctx, st)
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
@ -1460,8 +1429,8 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
Message: reply,
|
||||
}
|
||||
for _, binlog := range binlogs {
|
||||
binlog.Log(stream.Context(), sh)
|
||||
binlog.Log(stream.Context(), sm)
|
||||
binlog.Log(ctx, sh)
|
||||
binlog.Log(ctx, sm)
|
||||
}
|
||||
}
|
||||
if channelz.IsOn() {
|
||||
|
@ -1479,7 +1448,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
|
|||
Err: appErr,
|
||||
}
|
||||
for _, binlog := range binlogs {
|
||||
binlog.Log(stream.Context(), st)
|
||||
binlog.Log(ctx, st)
|
||||
}
|
||||
}
|
||||
return t.WriteStatus(stream, statusOK)
|
||||
|
@ -1521,7 +1490,7 @@ func getChainStreamHandler(interceptors []StreamServerInterceptor, curr int, inf
|
|||
}
|
||||
}
|
||||
|
||||
func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transport.Stream, info *serviceInfo, sd *StreamDesc, trInfo *traceInfo) (err error) {
|
||||
func (s *Server) processStreamingRPC(ctx context.Context, t transport.ServerTransport, stream *transport.Stream, info *serviceInfo, sd *StreamDesc, trInfo *traceInfo) (err error) {
|
||||
if channelz.IsOn() {
|
||||
s.incrCallsStarted()
|
||||
}
|
||||
|
@ -1535,10 +1504,10 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
|
|||
IsServerStream: sd.ServerStreams,
|
||||
}
|
||||
for _, sh := range shs {
|
||||
sh.HandleRPC(stream.Context(), statsBegin)
|
||||
sh.HandleRPC(ctx, statsBegin)
|
||||
}
|
||||
}
|
||||
ctx := NewContextWithServerTransportStream(stream.Context(), stream)
|
||||
ctx = NewContextWithServerTransportStream(ctx, stream)
|
||||
ss := &serverStream{
|
||||
ctx: ctx,
|
||||
t: t,
|
||||
|
@ -1574,7 +1543,7 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
|
|||
end.Error = toRPCErr(err)
|
||||
}
|
||||
for _, sh := range shs {
|
||||
sh.HandleRPC(stream.Context(), end)
|
||||
sh.HandleRPC(ctx, end)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1616,7 +1585,7 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
|
|||
logEntry.PeerAddr = peer.Addr
|
||||
}
|
||||
for _, binlog := range ss.binlogs {
|
||||
binlog.Log(stream.Context(), logEntry)
|
||||
binlog.Log(ctx, logEntry)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1694,7 +1663,7 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
|
|||
Err: appErr,
|
||||
}
|
||||
for _, binlog := range ss.binlogs {
|
||||
binlog.Log(stream.Context(), st)
|
||||
binlog.Log(ctx, st)
|
||||
}
|
||||
}
|
||||
t.WriteStatus(ss.s, appStatus)
|
||||
|
@ -1712,33 +1681,50 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
|
|||
Err: appErr,
|
||||
}
|
||||
for _, binlog := range ss.binlogs {
|
||||
binlog.Log(stream.Context(), st)
|
||||
binlog.Log(ctx, st)
|
||||
}
|
||||
}
|
||||
return t.WriteStatus(ss.s, statusOK)
|
||||
}
|
||||
|
||||
func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream, trInfo *traceInfo) {
|
||||
func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream) {
|
||||
ctx := stream.Context()
|
||||
var ti *traceInfo
|
||||
if EnableTracing {
|
||||
tr := trace.New("grpc.Recv."+methodFamily(stream.Method()), stream.Method())
|
||||
ctx = trace.NewContext(ctx, tr)
|
||||
ti = &traceInfo{
|
||||
tr: tr,
|
||||
firstLine: firstLine{
|
||||
client: false,
|
||||
remoteAddr: t.RemoteAddr(),
|
||||
},
|
||||
}
|
||||
if dl, ok := ctx.Deadline(); ok {
|
||||
ti.firstLine.deadline = time.Until(dl)
|
||||
}
|
||||
}
|
||||
|
||||
sm := stream.Method()
|
||||
if sm != "" && sm[0] == '/' {
|
||||
sm = sm[1:]
|
||||
}
|
||||
pos := strings.LastIndex(sm, "/")
|
||||
if pos == -1 {
|
||||
if trInfo != nil {
|
||||
trInfo.tr.LazyLog(&fmtStringer{"Malformed method name %q", []any{sm}}, true)
|
||||
trInfo.tr.SetError()
|
||||
if ti != nil {
|
||||
ti.tr.LazyLog(&fmtStringer{"Malformed method name %q", []any{sm}}, true)
|
||||
ti.tr.SetError()
|
||||
}
|
||||
errDesc := fmt.Sprintf("malformed method name: %q", stream.Method())
|
||||
if err := t.WriteStatus(stream, status.New(codes.Unimplemented, errDesc)); err != nil {
|
||||
if trInfo != nil {
|
||||
trInfo.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true)
|
||||
trInfo.tr.SetError()
|
||||
if ti != nil {
|
||||
ti.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true)
|
||||
ti.tr.SetError()
|
||||
}
|
||||
channelz.Warningf(logger, s.channelzID, "grpc: Server.handleStream failed to write status: %v", err)
|
||||
}
|
||||
if trInfo != nil {
|
||||
trInfo.tr.Finish()
|
||||
if ti != nil {
|
||||
ti.tr.Finish()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -1748,17 +1734,17 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str
|
|||
srv, knownService := s.services[service]
|
||||
if knownService {
|
||||
if md, ok := srv.methods[method]; ok {
|
||||
s.processUnaryRPC(t, stream, srv, md, trInfo)
|
||||
s.processUnaryRPC(ctx, t, stream, srv, md, ti)
|
||||
return
|
||||
}
|
||||
if sd, ok := srv.streams[method]; ok {
|
||||
s.processStreamingRPC(t, stream, srv, sd, trInfo)
|
||||
s.processStreamingRPC(ctx, t, stream, srv, sd, ti)
|
||||
return
|
||||
}
|
||||
}
|
||||
// Unknown service, or known server unknown method.
|
||||
if unknownDesc := s.opts.unknownStreamDesc; unknownDesc != nil {
|
||||
s.processStreamingRPC(t, stream, nil, unknownDesc, trInfo)
|
||||
s.processStreamingRPC(ctx, t, stream, nil, unknownDesc, ti)
|
||||
return
|
||||
}
|
||||
var errDesc string
|
||||
|
@ -1767,19 +1753,19 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str
|
|||
} else {
|
||||
errDesc = fmt.Sprintf("unknown method %v for service %v", method, service)
|
||||
}
|
||||
if trInfo != nil {
|
||||
trInfo.tr.LazyPrintf("%s", errDesc)
|
||||
trInfo.tr.SetError()
|
||||
if ti != nil {
|
||||
ti.tr.LazyPrintf("%s", errDesc)
|
||||
ti.tr.SetError()
|
||||
}
|
||||
if err := t.WriteStatus(stream, status.New(codes.Unimplemented, errDesc)); err != nil {
|
||||
if trInfo != nil {
|
||||
trInfo.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true)
|
||||
trInfo.tr.SetError()
|
||||
if ti != nil {
|
||||
ti.tr.LazyLog(&fmtStringer{"%v", []any{err}}, true)
|
||||
ti.tr.SetError()
|
||||
}
|
||||
channelz.Warningf(logger, s.channelzID, "grpc: Server.handleStream failed to write status: %v", err)
|
||||
}
|
||||
if trInfo != nil {
|
||||
trInfo.tr.Finish()
|
||||
if ti != nil {
|
||||
ti.tr.Finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ package tap
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
// Info defines the relevant information needed by the handles.
|
||||
|
@ -34,6 +36,10 @@ type Info struct {
|
|||
// FullMethodName is the string of grpc method (in the format of
|
||||
// /package.service/method).
|
||||
FullMethodName string
|
||||
|
||||
// Header contains the header metadata received.
|
||||
Header metadata.MD
|
||||
|
||||
// TODO: More to be added.
|
||||
}
|
||||
|
||||
|
|
|
@ -19,4 +19,4 @@
|
|||
package grpc
|
||||
|
||||
// Version is the current grpc version.
|
||||
const Version = "1.58.3"
|
||||
const Version = "1.59.0"
|
||||
|
|
|
@ -93,6 +93,9 @@ git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpc
|
|||
# - Ensure all ptypes proto packages are renamed when importing.
|
||||
not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go"
|
||||
|
||||
# - Ensure all usages of grpc_testing package are renamed when importing.
|
||||
not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go"
|
||||
|
||||
# - Ensure all xds proto imports are renamed to *pb or *grpc.
|
||||
git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "'
|
||||
|
||||
|
|
|
@ -126,14 +126,17 @@ type rudimentaryErrorBackoff struct {
|
|||
// OnError will block if it is called more often than the embedded period time.
|
||||
// This will prevent overly tight hot error loops.
|
||||
func (r *rudimentaryErrorBackoff) OnError(error) {
|
||||
now := time.Now() // start the timer before acquiring the lock
|
||||
r.lastErrorTimeLock.Lock()
|
||||
defer r.lastErrorTimeLock.Unlock()
|
||||
d := time.Since(r.lastErrorTime)
|
||||
if d < r.minPeriod {
|
||||
// If the time moves backwards for any reason, do nothing
|
||||
time.Sleep(r.minPeriod - d)
|
||||
}
|
||||
d := now.Sub(r.lastErrorTime)
|
||||
r.lastErrorTime = time.Now()
|
||||
r.lastErrorTimeLock.Unlock()
|
||||
|
||||
// Do not sleep with the lock held because that causes all callers of HandleError to block.
|
||||
// We only want the current goroutine to block.
|
||||
// A negative or zero duration causes time.Sleep to return immediately.
|
||||
// If the time moves backwards for any reason, do nothing.
|
||||
time.Sleep(r.minPeriod - d)
|
||||
}
|
||||
|
||||
// GetCaller returns the caller of the function that calls it.
|
||||
|
|
|
@ -97,7 +97,7 @@ github.com/aws/amazon-ec2-instance-selector/v2/pkg/instancetypes
|
|||
github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector
|
||||
github.com/aws/amazon-ec2-instance-selector/v2/pkg/selector/outputs
|
||||
github.com/aws/amazon-ec2-instance-selector/v2/pkg/sorter
|
||||
# github.com/aws/aws-sdk-go v1.45.25
|
||||
# github.com/aws/aws-sdk-go v1.46.0
|
||||
## explicit; go 1.11
|
||||
github.com/aws/aws-sdk-go/aws
|
||||
github.com/aws/aws-sdk-go/aws/arn
|
||||
|
@ -251,7 +251,7 @@ github.com/cpuguy83/go-md2man/v2/md2man
|
|||
# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
|
||||
## explicit
|
||||
github.com/davecgh/go-spew/spew
|
||||
# github.com/digitalocean/godo v1.104.1
|
||||
# github.com/digitalocean/godo v1.105.0
|
||||
## explicit; go 1.20
|
||||
github.com/digitalocean/godo
|
||||
github.com/digitalocean/godo/metrics
|
||||
|
@ -1056,7 +1056,7 @@ golang.org/x/tools/internal/typesinternal
|
|||
# gomodules.xyz/jsonpatch/v2 v2.4.0
|
||||
## explicit; go 1.20
|
||||
gomodules.xyz/jsonpatch/v2
|
||||
# google.golang.org/api v0.147.0
|
||||
# google.golang.org/api v0.148.0
|
||||
## explicit; go 1.19
|
||||
google.golang.org/api/cloudresourcemanager/v1
|
||||
google.golang.org/api/compute/v0.alpha
|
||||
|
@ -1091,12 +1091,12 @@ google.golang.org/appengine/internal/modules
|
|||
google.golang.org/appengine/internal/remote_api
|
||||
google.golang.org/appengine/internal/urlfetch
|
||||
google.golang.org/appengine/urlfetch
|
||||
# google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c
|
||||
# google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a
|
||||
## explicit; go 1.19
|
||||
google.golang.org/genproto/googleapis/rpc/code
|
||||
google.golang.org/genproto/googleapis/rpc/errdetails
|
||||
google.golang.org/genproto/googleapis/rpc/status
|
||||
# google.golang.org/grpc v1.58.3
|
||||
# google.golang.org/grpc v1.59.0
|
||||
## explicit; go 1.19
|
||||
google.golang.org/grpc
|
||||
google.golang.org/grpc/attributes
|
||||
|
@ -1225,7 +1225,7 @@ helm.sh/helm/v3/pkg/plugin
|
|||
helm.sh/helm/v3/pkg/registry
|
||||
helm.sh/helm/v3/pkg/strvals
|
||||
helm.sh/helm/v3/pkg/time
|
||||
# k8s.io/api v0.28.2
|
||||
# k8s.io/api v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/api/admission/v1
|
||||
k8s.io/api/admission/v1beta1
|
||||
|
@ -1282,11 +1282,11 @@ k8s.io/api/scheduling/v1beta1
|
|||
k8s.io/api/storage/v1
|
||||
k8s.io/api/storage/v1alpha1
|
||||
k8s.io/api/storage/v1beta1
|
||||
# k8s.io/apiextensions-apiserver v0.28.2
|
||||
# k8s.io/apiextensions-apiserver v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
|
||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
|
||||
# k8s.io/apimachinery v0.28.2
|
||||
# k8s.io/apimachinery v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/apimachinery/pkg/api/equality
|
||||
k8s.io/apimachinery/pkg/api/errors
|
||||
|
@ -1345,13 +1345,13 @@ k8s.io/apimachinery/pkg/watch
|
|||
k8s.io/apimachinery/third_party/forked/golang/json
|
||||
k8s.io/apimachinery/third_party/forked/golang/netutil
|
||||
k8s.io/apimachinery/third_party/forked/golang/reflect
|
||||
# k8s.io/cli-runtime v0.28.2
|
||||
# k8s.io/cli-runtime v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/cli-runtime/pkg/genericclioptions
|
||||
k8s.io/cli-runtime/pkg/genericiooptions
|
||||
k8s.io/cli-runtime/pkg/printers
|
||||
k8s.io/cli-runtime/pkg/resource
|
||||
# k8s.io/client-go v0.28.2
|
||||
# k8s.io/client-go v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1
|
||||
|
@ -1692,7 +1692,7 @@ k8s.io/cloud-provider-aws/pkg/providers/v1
|
|||
# k8s.io/cloud-provider-gcp/providers v0.27.1
|
||||
## explicit; go 1.19
|
||||
k8s.io/cloud-provider-gcp/providers/gce
|
||||
# k8s.io/component-base v0.28.2
|
||||
# k8s.io/component-base v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/component-base/cli/flag
|
||||
k8s.io/component-base/config
|
||||
|
@ -1708,7 +1708,7 @@ k8s.io/component-base/metrics/prometheus/restclient
|
|||
k8s.io/component-base/metrics/prometheusextension
|
||||
k8s.io/component-base/tracing/api/v1
|
||||
k8s.io/component-base/version
|
||||
# k8s.io/component-helpers v0.28.2
|
||||
# k8s.io/component-helpers v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/component-helpers/node/util
|
||||
# k8s.io/csi-translation-lib v0.28.0
|
||||
|
@ -1748,7 +1748,7 @@ k8s.io/kube-openapi/pkg/spec3
|
|||
k8s.io/kube-openapi/pkg/util/proto
|
||||
k8s.io/kube-openapi/pkg/util/proto/validation
|
||||
k8s.io/kube-openapi/pkg/validation/spec
|
||||
# k8s.io/kubectl v0.28.2
|
||||
# k8s.io/kubectl v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/kubectl/pkg/cmd/util
|
||||
k8s.io/kubectl/pkg/cmd/util/editor
|
||||
|
@ -1763,10 +1763,10 @@ k8s.io/kubectl/pkg/util/slice
|
|||
k8s.io/kubectl/pkg/util/templates
|
||||
k8s.io/kubectl/pkg/util/term
|
||||
k8s.io/kubectl/pkg/validation
|
||||
# k8s.io/kubelet v0.28.2
|
||||
# k8s.io/kubelet v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/kubelet/config/v1beta1
|
||||
# k8s.io/mount-utils v0.28.2
|
||||
# k8s.io/mount-utils v0.28.3
|
||||
## explicit; go 1.20
|
||||
k8s.io/mount-utils
|
||||
# k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
|
@ -1800,7 +1800,7 @@ oras.land/oras-go/pkg/registry/remote/auth
|
|||
oras.land/oras-go/pkg/registry/remote/internal/errutil
|
||||
oras.land/oras-go/pkg/registry/remote/internal/syncutil
|
||||
oras.land/oras-go/pkg/target
|
||||
# sigs.k8s.io/controller-runtime v0.16.2
|
||||
# sigs.k8s.io/controller-runtime v0.16.3
|
||||
## explicit; go 1.20
|
||||
sigs.k8s.io/controller-runtime
|
||||
sigs.k8s.io/controller-runtime/pkg/builder
|
||||
|
|
|
@ -22,8 +22,10 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"golang.org/x/exp/maps"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
@ -121,6 +123,10 @@ type Informer interface {
|
|||
HasSynced() bool
|
||||
}
|
||||
|
||||
// AllNamespaces should be used as the map key to deliminate namespace settings
|
||||
// that apply to all namespaces that themselves do not have explicit settings.
|
||||
const AllNamespaces = metav1.NamespaceAll
|
||||
|
||||
// Options are the optional arguments for creating a new Cache object.
|
||||
type Options struct {
|
||||
// HTTPClient is the http client to use for the REST client
|
||||
|
@ -172,6 +178,11 @@ type Options struct {
|
|||
// the namespaces in here will be watched and it will by used to default
|
||||
// ByObject.Namespaces for all objects if that is nil.
|
||||
//
|
||||
// It is possible to have specific Config for just some namespaces
|
||||
// but cache all namespaces by using the AllNamespaces const as the map key.
|
||||
// This will then include all namespaces that do not have a more specific
|
||||
// setting.
|
||||
//
|
||||
// The options in the Config that are nil will be defaulted from
|
||||
// the respective Default* settings.
|
||||
DefaultNamespaces map[string]Config
|
||||
|
@ -214,6 +225,11 @@ type ByObject struct {
|
|||
// Settings in the map value that are unset will be defaulted.
|
||||
// Use an empty value for the specific setting to prevent that.
|
||||
//
|
||||
// It is possible to have specific Config for just some namespaces
|
||||
// but cache all namespaces by using the AllNamespaces const as the map key.
|
||||
// This will then include all namespaces that do not have a more specific
|
||||
// setting.
|
||||
//
|
||||
// A nil map allows to default this to the cache's DefaultNamespaces setting.
|
||||
// An empty map prevents this and means that all namespaces will be cached.
|
||||
//
|
||||
|
@ -392,6 +408,9 @@ func defaultOpts(config *rest.Config, opts Options) (Options, error) {
|
|||
|
||||
for namespace, cfg := range opts.DefaultNamespaces {
|
||||
cfg = defaultConfig(cfg, optionDefaultsToConfig(&opts))
|
||||
if namespace == metav1.NamespaceAll {
|
||||
cfg.FieldSelector = fields.AndSelectors(appendIfNotNil(namespaceAllSelector(maps.Keys(opts.DefaultNamespaces)), cfg.FieldSelector)...)
|
||||
}
|
||||
opts.DefaultNamespaces[namespace] = cfg
|
||||
}
|
||||
|
||||
|
@ -418,6 +437,15 @@ func defaultOpts(config *rest.Config, opts Options) (Options, error) {
|
|||
// 3. Default from the global defaults
|
||||
config = defaultConfig(config, optionDefaultsToConfig(&opts))
|
||||
|
||||
if namespace == metav1.NamespaceAll {
|
||||
config.FieldSelector = fields.AndSelectors(
|
||||
appendIfNotNil(
|
||||
namespaceAllSelector(maps.Keys(byObject.Namespaces)),
|
||||
config.FieldSelector,
|
||||
)...,
|
||||
)
|
||||
}
|
||||
|
||||
byObject.Namespaces[namespace] = config
|
||||
}
|
||||
|
||||
|
@ -457,3 +485,21 @@ func defaultConfig(toDefault, defaultFrom Config) Config {
|
|||
|
||||
return toDefault
|
||||
}
|
||||
|
||||
func namespaceAllSelector(namespaces []string) fields.Selector {
|
||||
selectors := make([]fields.Selector, 0, len(namespaces)-1)
|
||||
for _, namespace := range namespaces {
|
||||
if namespace != metav1.NamespaceAll {
|
||||
selectors = append(selectors, fields.OneTermNotEqualSelector("metadata.namespace", namespace))
|
||||
}
|
||||
}
|
||||
|
||||
return fields.AndSelectors(selectors...)
|
||||
}
|
||||
|
||||
func appendIfNotNil[T comparable](a, b T) []T {
|
||||
if b != *new(T) {
|
||||
return []T{a, b}
|
||||
}
|
||||
return []T{a}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import (
|
|||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
toolscache "k8s.io/client-go/tools/cache"
|
||||
|
@ -210,6 +211,9 @@ func (c *multiNamespaceCache) Get(ctx context.Context, key client.ObjectKey, obj
|
|||
|
||||
cache, ok := c.namespaceToCache[key.Namespace]
|
||||
if !ok {
|
||||
if global, hasGlobal := c.namespaceToCache[metav1.NamespaceAll]; hasGlobal {
|
||||
return global.Get(ctx, key, obj, opts...)
|
||||
}
|
||||
return fmt.Errorf("unable to get: %v because of unknown namespace for the cache", key)
|
||||
}
|
||||
return cache.Get(ctx, key, obj, opts...)
|
||||
|
|
Loading…
Reference in New Issue