mirror of https://github.com/knative/pkg.git
Add BucketSet type which implements consistent bucketing (#1477)
* Add BucketSet type which implements consistent bucketing BucketSet permits mapping keys to buckets in a consistent manner, permitting us to use this type in the HA applications. BucketSet implements the Bucket interface so it can be used in reconciler/leaderelection pieces and has an additional method which returns the owner for the key. This is necessary in autoscaler where requests need to be forwarded to an appropriate autoscaler. * git mod stuff * fixes * nit * two types for two thigns * more tests
This commit is contained in:
parent
22502028e3
commit
b09a159e12
7
go.mod
7
go.mod
|
@ -27,6 +27,7 @@ require (
|
||||||
github.com/googleapis/gnostic v0.4.0 // indirect
|
github.com/googleapis/gnostic v0.4.0 // indirect
|
||||||
github.com/gorilla/websocket v1.4.2
|
github.com/gorilla/websocket v1.4.2
|
||||||
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
|
github.com/grpc-ecosystem/grpc-gateway v1.12.1 // indirect
|
||||||
|
github.com/hashicorp/golang-lru v0.5.4
|
||||||
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9 // indirect
|
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9 // indirect
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||||
github.com/kelseyhightower/envconfig v1.4.0
|
github.com/kelseyhightower/envconfig v1.4.0
|
||||||
|
@ -41,11 +42,11 @@ require (
|
||||||
go.opencensus.io v0.22.4
|
go.opencensus.io v0.22.4
|
||||||
go.uber.org/multierr v1.5.0
|
go.uber.org/multierr v1.5.0
|
||||||
go.uber.org/zap v1.14.1
|
go.uber.org/zap v1.14.1
|
||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
||||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
|
||||||
gomodules.xyz/jsonpatch/v2 v2.1.0
|
gomodules.xyz/jsonpatch/v2 v2.1.0
|
||||||
google.golang.org/api v0.28.0
|
google.golang.org/api v0.29.0
|
||||||
google.golang.org/grpc v1.30.0
|
google.golang.org/grpc v1.30.0
|
||||||
gopkg.in/yaml.v2 v2.3.0
|
gopkg.in/yaml.v2 v2.3.0
|
||||||
gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22
|
gopkg.in/yaml.v3 v3.0.0-20190709130402-674ba3eaed22
|
||||||
|
@ -57,7 +58,7 @@ require (
|
||||||
k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12
|
k8s.io/gengo v0.0.0-20200205140755-e0e292d8aa12
|
||||||
k8s.io/klog v1.0.0
|
k8s.io/klog v1.0.0
|
||||||
k8s.io/utils v0.0.0-20200124190032-861946025e34 // indirect
|
k8s.io/utils v0.0.0-20200124190032-861946025e34 // indirect
|
||||||
knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7
|
knative.dev/test-infra v0.0.0-20200710160019-5b9732bc24f7
|
||||||
sigs.k8s.io/boskos v0.0.0-20200617235605-f289ba6555ba
|
sigs.k8s.io/boskos v0.0.0-20200617235605-f289ba6555ba
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
30
go.sum
30
go.sum
|
@ -38,7 +38,7 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+
|
||||||
cloud.google.com/go/pubsub v1.2.0 h1:Lpy6hKgdcl7a3WGSfJIFmxmcdjSpP6OmBEfcOv1Y680=
|
cloud.google.com/go/pubsub v1.2.0 h1:Lpy6hKgdcl7a3WGSfJIFmxmcdjSpP6OmBEfcOv1Y680=
|
||||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||||
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
|
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
|
||||||
cloud.google.com/go/pubsub v1.4.0/go.mod h1:LFrqilwgdw4X2cJS9ALgzYmMu+ULyrUN6IHV3CPK4TM=
|
cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w=
|
||||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||||
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
||||||
cloud.google.com/go/storage v1.6.0 h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8=
|
cloud.google.com/go/storage v1.6.0 h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8=
|
||||||
|
@ -520,7 +520,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
|
||||||
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
|
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
|
||||||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M=
|
github.com/google/licenseclassifier v0.0.0-20190926221455-842c0d70d702/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M=
|
||||||
github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M=
|
github.com/google/licenseclassifier v0.0.0-20200708223521-3d09a0ea2f39/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M=
|
||||||
github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3 h1:/o5e44nTD/QEEiWPGSFT3bSqcq3Qg7q27N9bv4gKh5M=
|
github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3 h1:/o5e44nTD/QEEiWPGSFT3bSqcq3Qg7q27N9bv4gKh5M=
|
||||||
github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g=
|
github.com/google/mako v0.0.0-20190821191249-122f8dcef9e3/go.mod h1:YzLcVlL+NqWnmUEPuhS1LxDDwGO9WNbVlEXaF4IH35g=
|
||||||
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
|
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
|
||||||
|
@ -1037,6 +1037,7 @@ github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSf
|
||||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
|
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
|
||||||
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
|
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
|
||||||
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
|
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
|
||||||
|
@ -1108,6 +1109,8 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh
|
||||||
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
|
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg=
|
||||||
|
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
|
@ -1196,6 +1199,8 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/
|
||||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
|
||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
|
||||||
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
|
@ -1375,8 +1380,9 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY
|
||||||
golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||||
golang.org/x/tools v0.0.0-20200701000337-a32c0cb1d5b2 h1:xs+dSrelqXhHGIwIftyT5DHxJKH8hbDQnHc5KZ6i/u8=
|
golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.0.0-20200701000337-a32c0cb1d5b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1 h1:rD1FcWVsRaMY+l8biE9jbWP5MS/CJJ/90a9TMkMgNrM=
|
||||||
|
golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||||
|
@ -1416,6 +1422,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
|
||||||
google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||||
google.golang.org/api v0.28.0 h1:jMF5hhVfMkTZwHW1SDpKq5CkgWLXOb31Foaca9Zr3oM=
|
google.golang.org/api v0.28.0 h1:jMF5hhVfMkTZwHW1SDpKq5CkgWLXOb31Foaca9Zr3oM=
|
||||||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||||
|
google.golang.org/api v0.29.0 h1:BaiDisFir8O4IJxvAabCGGkQ6yCJegNQqSVoYUNAnbk=
|
||||||
|
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||||
|
@ -1461,11 +1469,11 @@ google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfG
|
||||||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||||
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||||
google.golang.org/genproto v0.0.0-20200528110217-3d3490e7e671/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
|
||||||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||||
google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/genproto v0.0.0-20200701001935-0939c5918c31 h1:Of4QP8bfRqzDROen6+s2j/p0jCPgzvQRd9nHiactfn4=
|
google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/genproto v0.0.0-20200701001935-0939c5918c31/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
google.golang.org/genproto v0.0.0-20200710124503-20a17af7bd0e h1:k+p/u26/lVeNEpdxSeUrm7rTvoFckBKaf7gTzgmHyDA=
|
||||||
|
google.golang.org/genproto v0.0.0-20200710124503-20a17af7bd0e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||||
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
|
||||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||||
|
@ -1609,16 +1617,16 @@ k8s.io/metrics v0.17.2/go.mod h1:3TkNHET4ROd+NfzNxkjoVfQ0Ob4iZnaHmSEA4vYpwLw=
|
||||||
k8s.io/test-infra v0.0.0-20200514184223-ba32c8aae783 h1:dLB5TiQVoLcFkj1TPQSahZiJFP8NL+63tawMlX5aV8w=
|
k8s.io/test-infra v0.0.0-20200514184223-ba32c8aae783 h1:dLB5TiQVoLcFkj1TPQSahZiJFP8NL+63tawMlX5aV8w=
|
||||||
k8s.io/test-infra v0.0.0-20200514184223-ba32c8aae783/go.mod h1:bW6thaPZfL2hW7ecjx2WYwlP9KQLM47/xIJyttkVk5s=
|
k8s.io/test-infra v0.0.0-20200514184223-ba32c8aae783/go.mod h1:bW6thaPZfL2hW7ecjx2WYwlP9KQLM47/xIJyttkVk5s=
|
||||||
k8s.io/test-infra v0.0.0-20200617221206-ea73eaeab7ff/go.mod h1:L3+cRvwftUq8IW1TrHji5m3msnc4uck/7LsE/GR/aZk=
|
k8s.io/test-infra v0.0.0-20200617221206-ea73eaeab7ff/go.mod h1:L3+cRvwftUq8IW1TrHji5m3msnc4uck/7LsE/GR/aZk=
|
||||||
k8s.io/test-infra v0.0.0-20200630233406-1dca6122872e h1:enVJTRVMMEZ5DOL4Px9/KjVmTIloibFtyqDFBilx/dA=
|
k8s.io/test-infra v0.0.0-20200710134549-5891a1a4cc17 h1:+4Qrm+T87jAOYtKijaMeTjGV0IOeke7tIiZNNPK7S9I=
|
||||||
k8s.io/test-infra v0.0.0-20200630233406-1dca6122872e/go.mod h1:L3+cRvwftUq8IW1TrHji5m3msnc4uck/7LsE/GR/aZk=
|
k8s.io/test-infra v0.0.0-20200710134549-5891a1a4cc17/go.mod h1:L3+cRvwftUq8IW1TrHji5m3msnc4uck/7LsE/GR/aZk=
|
||||||
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||||
k8s.io/utils v0.0.0-20200124190032-861946025e34 h1:HjlUD6M0K3P8nRXmr2B9o4F9dUy9TCj/aEpReeyi6+k=
|
k8s.io/utils v0.0.0-20200124190032-861946025e34 h1:HjlUD6M0K3P8nRXmr2B9o4F9dUy9TCj/aEpReeyi6+k=
|
||||||
k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||||
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
|
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
|
||||||
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
|
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
|
||||||
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
|
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
|
||||||
knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7 h1:wNlGK4f5Ykqh3KLC5RlyR9kvzvRgo/LwJQNsZWGVHnU=
|
knative.dev/test-infra v0.0.0-20200710160019-5b9732bc24f7 h1:fAl3pG2I323tie8kuuNlB88B7RB8WJtCrsXIKuNh1U8=
|
||||||
knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs=
|
knative.dev/test-infra v0.0.0-20200710160019-5b9732bc24f7/go.mod h1:vtT6dLs/iNj8pKcfag8CSVqHKNMgyCFtU/g1pV7Bovs=
|
||||||
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
|
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
|
||||||
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
|
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
|
||||||
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
|
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 The Knative Authors
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file contains the utilities to make bucketing decisions.
|
||||||
|
|
||||||
|
package hash
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sync"
|
||||||
|
|
||||||
|
lru "github.com/hashicorp/golang-lru"
|
||||||
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
|
"knative.dev/pkg/reconciler"
|
||||||
|
)
|
||||||
|
|
||||||
|
var _ reconciler.Bucket = (*Bucket)(nil)
|
||||||
|
|
||||||
|
// BucketSet answers to what bucket does key X belong in a
|
||||||
|
// consistent manner (consistent as in consistent hashing).
|
||||||
|
type BucketSet struct {
|
||||||
|
// Stores the cached lookups. cache is internally thread safe.
|
||||||
|
cache *lru.Cache
|
||||||
|
|
||||||
|
// mu guards buckets.
|
||||||
|
mu sync.RWMutex
|
||||||
|
// All the bucket names. Needed for building hash universe.
|
||||||
|
// `name` must be in this set.
|
||||||
|
buckets sets.String
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bucket implements reconciler.Bucket and wraps around BuketSet
|
||||||
|
// for bucketing functions.
|
||||||
|
type Bucket struct {
|
||||||
|
name string
|
||||||
|
buckets *BucketSet
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scientifically inferred preferred cache size.
|
||||||
|
const cacheSize = 4096
|
||||||
|
|
||||||
|
func newCache() *lru.Cache {
|
||||||
|
c, _ := lru.New(cacheSize)
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewBucketSet creates a new bucket set with the given universe
|
||||||
|
// of bucket names.
|
||||||
|
func NewBucketSet(bucketList sets.String) *BucketSet {
|
||||||
|
return &BucketSet{
|
||||||
|
cache: newCache(),
|
||||||
|
buckets: bucketList,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewBucket creates a new bucket.
|
||||||
|
func NewBucket(name string, bl *BucketSet) *Bucket {
|
||||||
|
return &Bucket{
|
||||||
|
name: name,
|
||||||
|
buckets: bl,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Name implements Bucket.
|
||||||
|
func (b *Bucket) Name() string {
|
||||||
|
return b.name
|
||||||
|
}
|
||||||
|
|
||||||
|
// Has returns true if this bucket owns the key and
|
||||||
|
// implements reconciler.Bucket interface.
|
||||||
|
func (b *Bucket) Has(nn types.NamespacedName) bool {
|
||||||
|
return b.buckets.Owner(nn.String()) == b.name
|
||||||
|
}
|
||||||
|
|
||||||
|
// Owner returns the owner of the key.
|
||||||
|
// Owner will cache the results for faster lookup.
|
||||||
|
func (b *BucketSet) Owner(key string) string {
|
||||||
|
if v, ok := b.cache.Get(key); ok {
|
||||||
|
return v.(string)
|
||||||
|
}
|
||||||
|
b.mu.RLock()
|
||||||
|
defer b.mu.RUnlock()
|
||||||
|
l := ChooseSubset(b.buckets, 1 /*single query wanted*/, key)
|
||||||
|
ret := l.UnsortedList()[0]
|
||||||
|
b.cache.Add(key, ret)
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update updates the universe of buckets.
|
||||||
|
func (b *BucketSet) Update(newB sets.String) {
|
||||||
|
b.mu.Lock()
|
||||||
|
defer b.mu.Unlock()
|
||||||
|
// In theory we can iterate over the map and
|
||||||
|
// purge only the keys that moved to a new shard.
|
||||||
|
// But this might be more expensive than re-build
|
||||||
|
// the cache as reconciliations happen.
|
||||||
|
b.cache.Purge()
|
||||||
|
b.buckets = newB
|
||||||
|
}
|
|
@ -0,0 +1,111 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 The Knative Authors
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package hash
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
thisBucket = "monsoon"
|
||||||
|
knownKey = "hagel"
|
||||||
|
otherBucket = "chubasco"
|
||||||
|
unknownKey = "snow" // snow maps to "chubasco", originally.
|
||||||
|
)
|
||||||
|
|
||||||
|
var buckets = sets.NewString(thisBucket, otherBucket, "aguacero", "chaparrón")
|
||||||
|
|
||||||
|
func TestBucketOwner(t *testing.T) {
|
||||||
|
b := NewBucketSet(buckets)
|
||||||
|
if got := b.Owner(knownKey); got != thisBucket {
|
||||||
|
t.Errorf("Owner = %q, want: %q", got, thisBucket)
|
||||||
|
}
|
||||||
|
if l := b.cache.Len(); l != 1 {
|
||||||
|
t.Errorf("|Cache| = %d, want: 1", l)
|
||||||
|
}
|
||||||
|
if n, ok := b.cache.Get(knownKey); !ok || n.(string) != thisBucket {
|
||||||
|
t.Errorf("Cache[%s] = %q, want: %q", knownKey, n, thisBucket)
|
||||||
|
}
|
||||||
|
// Verify nothing is added to the cache.
|
||||||
|
if got := b.Owner(knownKey); got != thisBucket {
|
||||||
|
t.Errorf("Owner = %q, want: %q", got, thisBucket)
|
||||||
|
}
|
||||||
|
if l := b.cache.Len(); l != 1 {
|
||||||
|
t.Errorf("|Cache| = %d, want: 1", l)
|
||||||
|
}
|
||||||
|
|
||||||
|
if got := b.Owner(unknownKey); got != otherBucket {
|
||||||
|
t.Errorf("Owner = %q, want: %q", got, otherBucket)
|
||||||
|
}
|
||||||
|
if l := b.cache.Len(); l != 2 {
|
||||||
|
t.Errorf("|Cache| = %d, want: 2", l)
|
||||||
|
}
|
||||||
|
if n, ok := b.cache.Get(unknownKey); !ok || n.(string) != otherBucket {
|
||||||
|
t.Errorf("Cache[%s] = %q, want: %q", unknownKey, n, otherBucket)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBucketUpdate(t *testing.T) {
|
||||||
|
b := NewBucketSet(buckets)
|
||||||
|
b.Owner(knownKey)
|
||||||
|
|
||||||
|
// Need a clone.
|
||||||
|
newNames := buckets.Difference(sets.NewString(otherBucket))
|
||||||
|
b.Update(newNames)
|
||||||
|
if b.cache.Len() != 0 {
|
||||||
|
t.Error("cache was not emptied")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verify the mapping is stable.
|
||||||
|
if got := b.Owner(knownKey); got != thisBucket {
|
||||||
|
t.Errorf("Owner = %q, want: %q", got, thisBucket)
|
||||||
|
}
|
||||||
|
if l := b.cache.Len(); l != 1 {
|
||||||
|
t.Errorf("|Cache| = %d, want: 1", l)
|
||||||
|
}
|
||||||
|
if n, ok := b.cache.Get(knownKey); !ok || n.(string) != thisBucket {
|
||||||
|
t.Errorf("Cache[%s] = %q, want: %q", knownKey, n, thisBucket)
|
||||||
|
}
|
||||||
|
// unknownKey should've migrated.
|
||||||
|
if got := b.Owner(unknownKey); got == otherBucket {
|
||||||
|
t.Errorf("Owner = %q, don't want: %q", got, otherBucket)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBucketHas(t *testing.T) {
|
||||||
|
bs := NewBucketSet(buckets)
|
||||||
|
b := NewBucket(thisBucket, bs)
|
||||||
|
thisNN := types.NamespacedName{Namespace: "snow", Name: "hail"}
|
||||||
|
if !b.Has(thisNN) {
|
||||||
|
t.Errorf("Has(%v) = false", thisNN)
|
||||||
|
}
|
||||||
|
b = NewBucket(otherBucket, bs)
|
||||||
|
if b.Has(thisNN) {
|
||||||
|
t.Errorf("Other bucket Has(%v) = true", thisNN)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBucketName(t *testing.T) {
|
||||||
|
bs := NewBucketSet(buckets)
|
||||||
|
b := NewBucket(thisBucket, bs)
|
||||||
|
if got, want := b.Name(), thisBucket; got != want {
|
||||||
|
t.Errorf("Name = %q, want: %q", got, want)
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,6 +17,11 @@ limitations under the License.
|
||||||
// Package hash contains various Knative specific hashing utilities.
|
// Package hash contains various Knative specific hashing utilities.
|
||||||
//
|
//
|
||||||
// - ChooseSubset is a consistent hashing/mapping function providing
|
// - ChooseSubset is a consistent hashing/mapping function providing
|
||||||
// a consistent selection of N keys from M (N<=M) keys for a given
|
// a consistent selection of N keys from M (N<=M) keys for a given
|
||||||
// target.
|
// target.
|
||||||
|
// - BucketSet is a bucketer library which uses ChooseSubset under the
|
||||||
|
// the hood in order to implement consistent mapping between keys and
|
||||||
|
// set of buckets, indentified by unique names. Compared to basic bucket
|
||||||
|
// implementtion which just does hash%num_buckets, when the number of
|
||||||
|
// buckets change only a small subset of keys are supposed to migrate.
|
||||||
package hash
|
package hash
|
||||||
|
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"golang.org/x/tools/internal/gocommand"
|
||||||
"golang.org/x/tools/internal/imports"
|
"golang.org/x/tools/internal/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -42,14 +43,16 @@ var (
|
||||||
TabIndent: true,
|
TabIndent: true,
|
||||||
Comments: true,
|
Comments: true,
|
||||||
Fragment: true,
|
Fragment: true,
|
||||||
Env: &imports.ProcessEnv{},
|
Env: &imports.ProcessEnv{
|
||||||
|
GocmdRunner: &gocommand.Runner{},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
exitCode = 0
|
exitCode = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
flag.BoolVar(&options.AllErrors, "e", false, "report all errors (not just the first 10 on different lines)")
|
flag.BoolVar(&options.AllErrors, "e", false, "report all errors (not just the first 10 on different lines)")
|
||||||
flag.StringVar(&options.Env.LocalPrefix, "local", "", "put imports beginning with this string after 3rd-party packages; comma-separated list")
|
flag.StringVar(&options.LocalPrefix, "local", "", "put imports beginning with this string after 3rd-party packages; comma-separated list")
|
||||||
flag.BoolVar(&options.FormatOnly, "format-only", false, "if true, don't fix imports and only format. In this mode, goimports is effectively gofmt, with the addition that imports are grouped into sections.")
|
flag.BoolVar(&options.FormatOnly, "format-only", false, "if true, don't fix imports and only format. In this mode, goimports is effectively gofmt, with the addition that imports are grouped into sections.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
package imports // import "golang.org/x/tools/imports"
|
package imports // import "golang.org/x/tools/imports"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"golang.org/x/tools/internal/gocommand"
|
||||||
intimp "golang.org/x/tools/internal/imports"
|
intimp "golang.org/x/tools/internal/imports"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -29,25 +31,34 @@ var Debug = false
|
||||||
var LocalPrefix string
|
var LocalPrefix string
|
||||||
|
|
||||||
// Process formats and adjusts imports for the provided file.
|
// Process formats and adjusts imports for the provided file.
|
||||||
// If opt is nil the defaults are used.
|
// If opt is nil the defaults are used, and if src is nil the source
|
||||||
|
// is read from the filesystem.
|
||||||
//
|
//
|
||||||
// Note that filename's directory influences which imports can be chosen,
|
// Note that filename's directory influences which imports can be chosen,
|
||||||
// so it is important that filename be accurate.
|
// so it is important that filename be accurate.
|
||||||
// To process data ``as if'' it were in filename, pass the data as a non-nil src.
|
// To process data ``as if'' it were in filename, pass the data as a non-nil src.
|
||||||
func Process(filename string, src []byte, opt *Options) ([]byte, error) {
|
func Process(filename string, src []byte, opt *Options) ([]byte, error) {
|
||||||
|
var err error
|
||||||
|
if src == nil {
|
||||||
|
src, err = ioutil.ReadFile(filename)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
if opt == nil {
|
if opt == nil {
|
||||||
opt = &Options{Comments: true, TabIndent: true, TabWidth: 8}
|
opt = &Options{Comments: true, TabIndent: true, TabWidth: 8}
|
||||||
}
|
}
|
||||||
intopt := &intimp.Options{
|
intopt := &intimp.Options{
|
||||||
Env: &intimp.ProcessEnv{
|
Env: &intimp.ProcessEnv{
|
||||||
LocalPrefix: LocalPrefix,
|
GocmdRunner: &gocommand.Runner{},
|
||||||
},
|
},
|
||||||
AllErrors: opt.AllErrors,
|
LocalPrefix: LocalPrefix,
|
||||||
Comments: opt.Comments,
|
AllErrors: opt.AllErrors,
|
||||||
FormatOnly: opt.FormatOnly,
|
Comments: opt.Comments,
|
||||||
Fragment: opt.Fragment,
|
FormatOnly: opt.FormatOnly,
|
||||||
TabIndent: opt.TabIndent,
|
Fragment: opt.Fragment,
|
||||||
TabWidth: opt.TabWidth,
|
TabIndent: opt.TabIndent,
|
||||||
|
TabWidth: opt.TabWidth,
|
||||||
}
|
}
|
||||||
if Debug {
|
if Debug {
|
||||||
intopt.Env.Logf = log.Printf
|
intopt.Env.Logf = log.Printf
|
||||||
|
|
|
@ -32,25 +32,25 @@ import (
|
||||||
|
|
||||||
// importToGroup is a list of functions which map from an import path to
|
// importToGroup is a list of functions which map from an import path to
|
||||||
// a group number.
|
// a group number.
|
||||||
var importToGroup = []func(env *ProcessEnv, importPath string) (num int, ok bool){
|
var importToGroup = []func(localPrefix, importPath string) (num int, ok bool){
|
||||||
func(env *ProcessEnv, importPath string) (num int, ok bool) {
|
func(localPrefix, importPath string) (num int, ok bool) {
|
||||||
if env.LocalPrefix == "" {
|
if localPrefix == "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, p := range strings.Split(env.LocalPrefix, ",") {
|
for _, p := range strings.Split(localPrefix, ",") {
|
||||||
if strings.HasPrefix(importPath, p) || strings.TrimSuffix(p, "/") == importPath {
|
if strings.HasPrefix(importPath, p) || strings.TrimSuffix(p, "/") == importPath {
|
||||||
return 3, true
|
return 3, true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
},
|
},
|
||||||
func(_ *ProcessEnv, importPath string) (num int, ok bool) {
|
func(_, importPath string) (num int, ok bool) {
|
||||||
if strings.HasPrefix(importPath, "appengine") {
|
if strings.HasPrefix(importPath, "appengine") {
|
||||||
return 2, true
|
return 2, true
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
},
|
},
|
||||||
func(_ *ProcessEnv, importPath string) (num int, ok bool) {
|
func(_, importPath string) (num int, ok bool) {
|
||||||
firstComponent := strings.Split(importPath, "/")[0]
|
firstComponent := strings.Split(importPath, "/")[0]
|
||||||
if strings.Contains(firstComponent, ".") {
|
if strings.Contains(firstComponent, ".") {
|
||||||
return 1, true
|
return 1, true
|
||||||
|
@ -59,9 +59,9 @@ var importToGroup = []func(env *ProcessEnv, importPath string) (num int, ok bool
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func importGroup(env *ProcessEnv, importPath string) int {
|
func importGroup(localPrefix, importPath string) int {
|
||||||
for _, fn := range importToGroup {
|
for _, fn := range importToGroup {
|
||||||
if n, ok := fn(env, importPath); ok {
|
if n, ok := fn(localPrefix, importPath); ok {
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,12 @@ func (p *pass) loadPackageNames(imports []*ImportInfo) error {
|
||||||
unknown = append(unknown, imp.ImportPath)
|
unknown = append(unknown, imp.ImportPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
names, err := p.env.GetResolver().loadPackageNames(unknown, p.srcDir)
|
resolver, err := p.env.GetResolver()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
names, err := resolver.loadPackageNames(unknown, p.srcDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -640,15 +645,23 @@ func getCandidatePkgs(ctx context.Context, wrappedCallback *scanCallback, filena
|
||||||
wrappedCallback.exportsLoaded(pkg, exports)
|
wrappedCallback.exportsLoaded(pkg, exports)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return env.GetResolver().scan(ctx, scanFilter)
|
resolver, err := env.GetResolver()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return resolver.scan(ctx, scanFilter)
|
||||||
}
|
}
|
||||||
|
|
||||||
func ScoreImportPaths(ctx context.Context, env *ProcessEnv, paths []string) map[string]int {
|
func ScoreImportPaths(ctx context.Context, env *ProcessEnv, paths []string) (map[string]int, error) {
|
||||||
result := make(map[string]int)
|
result := make(map[string]int)
|
||||||
for _, path := range paths {
|
resolver, err := env.GetResolver()
|
||||||
result[path] = env.GetResolver().scoreImportPath(ctx, path)
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
return result
|
for _, path := range paths {
|
||||||
|
result[path] = resolver.scoreImportPath(ctx, path)
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func PrimeCache(ctx context.Context, env *ProcessEnv) error {
|
func PrimeCache(ctx context.Context, env *ProcessEnv) error {
|
||||||
|
@ -674,8 +687,9 @@ func candidateImportName(pkg *pkg) string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// getAllCandidates gets all of the candidates to be imported, regardless of if they are needed.
|
// GetAllCandidates gets all of the packages starting with prefix that can be
|
||||||
func getAllCandidates(ctx context.Context, wrapped func(ImportFix), searchPrefix, filename, filePkg string, env *ProcessEnv) error {
|
// imported by filename, sorted by import path.
|
||||||
|
func GetAllCandidates(ctx context.Context, wrapped func(ImportFix), searchPrefix, filename, filePkg string, env *ProcessEnv) error {
|
||||||
callback := &scanCallback{
|
callback := &scanCallback{
|
||||||
rootFound: func(gopathwalk.Root) bool {
|
rootFound: func(gopathwalk.Root) bool {
|
||||||
return true
|
return true
|
||||||
|
@ -714,7 +728,8 @@ type PackageExport struct {
|
||||||
Exports []string
|
Exports []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPackageExports(ctx context.Context, wrapped func(PackageExport), searchPkg, filename, filePkg string, env *ProcessEnv) error {
|
// GetPackageExports returns all known packages with name pkg and their exports.
|
||||||
|
func GetPackageExports(ctx context.Context, wrapped func(PackageExport), searchPkg, filename, filePkg string, env *ProcessEnv) error {
|
||||||
callback := &scanCallback{
|
callback := &scanCallback{
|
||||||
rootFound: func(gopathwalk.Root) bool {
|
rootFound: func(gopathwalk.Root) bool {
|
||||||
return true
|
return true
|
||||||
|
@ -749,8 +764,6 @@ var RequiredGoEnvVars = []string{"GO111MODULE", "GOFLAGS", "GOINSECURE", "GOMOD"
|
||||||
// ProcessEnv contains environment variables and settings that affect the use of
|
// ProcessEnv contains environment variables and settings that affect the use of
|
||||||
// the go command, the go/build package, etc.
|
// the go command, the go/build package, etc.
|
||||||
type ProcessEnv struct {
|
type ProcessEnv struct {
|
||||||
LocalPrefix string
|
|
||||||
|
|
||||||
GocmdRunner *gocommand.Runner
|
GocmdRunner *gocommand.Runner
|
||||||
|
|
||||||
BuildFlags []string
|
BuildFlags []string
|
||||||
|
@ -830,16 +843,19 @@ func (e *ProcessEnv) env() []string {
|
||||||
return env
|
return env
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ProcessEnv) GetResolver() Resolver {
|
func (e *ProcessEnv) GetResolver() (Resolver, error) {
|
||||||
if e.resolver != nil {
|
if e.resolver != nil {
|
||||||
return e.resolver
|
return e.resolver, nil
|
||||||
|
}
|
||||||
|
if err := e.init(); err != nil {
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(e.Env["GOMOD"]) == 0 {
|
if len(e.Env["GOMOD"]) == 0 {
|
||||||
e.resolver = newGopathResolver(e)
|
e.resolver = newGopathResolver(e)
|
||||||
return e.resolver
|
return e.resolver, nil
|
||||||
}
|
}
|
||||||
e.resolver = newModuleResolver(e)
|
e.resolver = newModuleResolver(e)
|
||||||
return e.resolver
|
return e.resolver, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *ProcessEnv) buildContext() *build.Context {
|
func (e *ProcessEnv) buildContext() *build.Context {
|
||||||
|
@ -964,10 +980,13 @@ func addExternalCandidates(pass *pass, refs references, filename string) error {
|
||||||
return false // We'll do our own loading after we sort.
|
return false // We'll do our own loading after we sort.
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
err := pass.env.GetResolver().scan(context.Background(), callback)
|
resolver, err := pass.env.GetResolver()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err = resolver.scan(context.Background(), callback); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Search for imports matching potential package references.
|
// Search for imports matching potential package references.
|
||||||
type result struct {
|
type result struct {
|
||||||
|
@ -1408,6 +1427,10 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa
|
||||||
pass.env.Logf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir)
|
pass.env.Logf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
resolver, err := pass.env.GetResolver()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// Collect exports for packages with matching names.
|
// Collect exports for packages with matching names.
|
||||||
rescv := make([]chan *pkg, len(candidates))
|
rescv := make([]chan *pkg, len(candidates))
|
||||||
|
@ -1446,7 +1469,7 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa
|
||||||
}
|
}
|
||||||
// If we're an x_test, load the package under test's test variant.
|
// If we're an x_test, load the package under test's test variant.
|
||||||
includeTest := strings.HasSuffix(pass.f.Name.Name, "_test") && c.pkg.dir == pass.srcDir
|
includeTest := strings.HasSuffix(pass.f.Name.Name, "_test") && c.pkg.dir == pass.srcDir
|
||||||
_, exports, err := pass.env.GetResolver().loadExports(ctx, c.pkg, includeTest)
|
_, exports, err := resolver.loadExports(ctx, c.pkg, includeTest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if pass.env.Logf != nil {
|
if pass.env.Logf != nil {
|
||||||
pass.env.Logf("loading exports in dir %s (seeking package %s): %v", c.pkg.dir, pkgName, err)
|
pass.env.Logf("loading exports in dir %s (seeking package %s): %v", c.pkg.dir, pkgName, err)
|
||||||
|
|
|
@ -11,7 +11,6 @@ package imports
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"go/ast"
|
"go/ast"
|
||||||
"go/format"
|
"go/format"
|
||||||
|
@ -19,19 +18,22 @@ import (
|
||||||
"go/printer"
|
"go/printer"
|
||||||
"go/token"
|
"go/token"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"golang.org/x/tools/go/ast/astutil"
|
"golang.org/x/tools/go/ast/astutil"
|
||||||
"golang.org/x/tools/internal/gocommand"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Options is golang.org/x/tools/imports.Options with extra internal-only options.
|
// Options is golang.org/x/tools/imports.Options with extra internal-only options.
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Env *ProcessEnv // The environment to use. Note: this contains the cached module and filesystem state.
|
Env *ProcessEnv // The environment to use. Note: this contains the cached module and filesystem state.
|
||||||
|
|
||||||
|
// LocalPrefix is a comma-separated string of import path prefixes, which, if
|
||||||
|
// set, instructs Process to sort the import paths with the given prefixes
|
||||||
|
// into another group after 3rd-party packages.
|
||||||
|
LocalPrefix string
|
||||||
|
|
||||||
Fragment bool // Accept fragment of a source file (no package statement)
|
Fragment bool // Accept fragment of a source file (no package statement)
|
||||||
AllErrors bool // Report all errors (not just the first 10 on different lines)
|
AllErrors bool // Report all errors (not just the first 10 on different lines)
|
||||||
|
|
||||||
|
@ -42,13 +44,8 @@ type Options struct {
|
||||||
FormatOnly bool // Disable the insertion and deletion of imports
|
FormatOnly bool // Disable the insertion and deletion of imports
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process implements golang.org/x/tools/imports.Process with explicit context in env.
|
// Process implements golang.org/x/tools/imports.Process with explicit context in opt.Env.
|
||||||
func Process(filename string, src []byte, opt *Options) (formatted []byte, err error) {
|
func Process(filename string, src []byte, opt *Options) (formatted []byte, err error) {
|
||||||
src, opt, err = initialize(filename, src, opt)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
fileSet := token.NewFileSet()
|
fileSet := token.NewFileSet()
|
||||||
file, adjust, err := parse(fileSet, filename, src, opt)
|
file, adjust, err := parse(fileSet, filename, src, opt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -64,16 +61,12 @@ func Process(filename string, src []byte, opt *Options) (formatted []byte, err e
|
||||||
}
|
}
|
||||||
|
|
||||||
// FixImports returns a list of fixes to the imports that, when applied,
|
// FixImports returns a list of fixes to the imports that, when applied,
|
||||||
// will leave the imports in the same state as Process.
|
// will leave the imports in the same state as Process. src and opt must
|
||||||
|
// be specified.
|
||||||
//
|
//
|
||||||
// Note that filename's directory influences which imports can be chosen,
|
// Note that filename's directory influences which imports can be chosen,
|
||||||
// so it is important that filename be accurate.
|
// so it is important that filename be accurate.
|
||||||
func FixImports(filename string, src []byte, opt *Options) (fixes []*ImportFix, err error) {
|
func FixImports(filename string, src []byte, opt *Options) (fixes []*ImportFix, err error) {
|
||||||
src, opt, err = initialize(filename, src, opt)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
fileSet := token.NewFileSet()
|
fileSet := token.NewFileSet()
|
||||||
file, _, err := parse(fileSet, filename, src, opt)
|
file, _, err := parse(fileSet, filename, src, opt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -84,13 +77,9 @@ func FixImports(filename string, src []byte, opt *Options) (fixes []*ImportFix,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApplyFixes applies all of the fixes to the file and formats it. extraMode
|
// ApplyFixes applies all of the fixes to the file and formats it. extraMode
|
||||||
// is added in when parsing the file.
|
// is added in when parsing the file. src and opts must be specified, but no
|
||||||
|
// env is needed.
|
||||||
func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, extraMode parser.Mode) (formatted []byte, err error) {
|
func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, extraMode parser.Mode) (formatted []byte, err error) {
|
||||||
src, opt, err = initialize(filename, src, opt)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't use parse() -- we don't care about fragments or statement lists
|
// Don't use parse() -- we don't care about fragments or statement lists
|
||||||
// here, and we need to work with unparseable files.
|
// here, and we need to work with unparseable files.
|
||||||
fileSet := token.NewFileSet()
|
fileSet := token.NewFileSet()
|
||||||
|
@ -114,60 +103,9 @@ func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, e
|
||||||
return formatFile(fileSet, file, src, nil, opt)
|
return formatFile(fileSet, file, src, nil, opt)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAllCandidates gets all of the packages starting with prefix that can be
|
|
||||||
// imported by filename, sorted by import path.
|
|
||||||
func GetAllCandidates(ctx context.Context, callback func(ImportFix), searchPrefix, filename, filePkg string, opt *Options) error {
|
|
||||||
_, opt, err := initialize(filename, []byte{}, opt)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return getAllCandidates(ctx, callback, searchPrefix, filename, filePkg, opt.Env)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetPackageExports returns all known packages with name pkg and their exports.
|
|
||||||
func GetPackageExports(ctx context.Context, callback func(PackageExport), searchPkg, filename, filePkg string, opt *Options) error {
|
|
||||||
_, opt, err := initialize(filename, []byte{}, opt)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return getPackageExports(ctx, callback, searchPkg, filename, filePkg, opt.Env)
|
|
||||||
}
|
|
||||||
|
|
||||||
// initialize sets the values for opt and src.
|
|
||||||
// If they are provided, they are not changed. Otherwise opt is set to the
|
|
||||||
// default values and src is read from the file system.
|
|
||||||
func initialize(filename string, src []byte, opt *Options) ([]byte, *Options, error) {
|
|
||||||
// Use defaults if opt is nil.
|
|
||||||
if opt == nil {
|
|
||||||
opt = &Options{Comments: true, TabIndent: true, TabWidth: 8}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the env if the user has not provided it.
|
|
||||||
if opt.Env == nil {
|
|
||||||
opt.Env = &ProcessEnv{}
|
|
||||||
}
|
|
||||||
// Set the gocmdRunner if the user has not provided it.
|
|
||||||
if opt.Env.GocmdRunner == nil {
|
|
||||||
opt.Env.GocmdRunner = &gocommand.Runner{}
|
|
||||||
}
|
|
||||||
if err := opt.Env.init(); err != nil {
|
|
||||||
return nil, nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if src == nil {
|
|
||||||
b, err := ioutil.ReadFile(filename)
|
|
||||||
if err != nil {
|
|
||||||
return nil, nil, err
|
|
||||||
}
|
|
||||||
src = b
|
|
||||||
}
|
|
||||||
|
|
||||||
return src, opt, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func formatFile(fileSet *token.FileSet, file *ast.File, src []byte, adjust func(orig []byte, src []byte) []byte, opt *Options) ([]byte, error) {
|
func formatFile(fileSet *token.FileSet, file *ast.File, src []byte, adjust func(orig []byte, src []byte) []byte, opt *Options) ([]byte, error) {
|
||||||
mergeImports(opt.Env, fileSet, file)
|
mergeImports(fileSet, file)
|
||||||
sortImports(opt.Env, fileSet, file)
|
sortImports(opt.LocalPrefix, fileSet, file)
|
||||||
imps := astutil.Imports(fileSet, file)
|
imps := astutil.Imports(fileSet, file)
|
||||||
var spacesBefore []string // import paths we need spaces before
|
var spacesBefore []string // import paths we need spaces before
|
||||||
for _, impSection := range imps {
|
for _, impSection := range imps {
|
||||||
|
@ -178,7 +116,7 @@ func formatFile(fileSet *token.FileSet, file *ast.File, src []byte, adjust func(
|
||||||
lastGroup := -1
|
lastGroup := -1
|
||||||
for _, importSpec := range impSection {
|
for _, importSpec := range impSection {
|
||||||
importPath, _ := strconv.Unquote(importSpec.Path.Value)
|
importPath, _ := strconv.Unquote(importSpec.Path.Value)
|
||||||
groupNum := importGroup(opt.Env, importPath)
|
groupNum := importGroup(opt.LocalPrefix, importPath)
|
||||||
if groupNum != lastGroup && lastGroup != -1 {
|
if groupNum != lastGroup && lastGroup != -1 {
|
||||||
spacesBefore = append(spacesBefore, importPath)
|
spacesBefore = append(spacesBefore, importPath)
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
|
|
||||||
// sortImports sorts runs of consecutive import lines in import blocks in f.
|
// sortImports sorts runs of consecutive import lines in import blocks in f.
|
||||||
// It also removes duplicate imports when it is possible to do so without data loss.
|
// It also removes duplicate imports when it is possible to do so without data loss.
|
||||||
func sortImports(env *ProcessEnv, fset *token.FileSet, f *ast.File) {
|
func sortImports(localPrefix string, fset *token.FileSet, f *ast.File) {
|
||||||
for i, d := range f.Decls {
|
for i, d := range f.Decls {
|
||||||
d, ok := d.(*ast.GenDecl)
|
d, ok := d.(*ast.GenDecl)
|
||||||
if !ok || d.Tok != token.IMPORT {
|
if !ok || d.Tok != token.IMPORT {
|
||||||
|
@ -40,11 +40,11 @@ func sortImports(env *ProcessEnv, fset *token.FileSet, f *ast.File) {
|
||||||
for j, s := range d.Specs {
|
for j, s := range d.Specs {
|
||||||
if j > i && fset.Position(s.Pos()).Line > 1+fset.Position(d.Specs[j-1].End()).Line {
|
if j > i && fset.Position(s.Pos()).Line > 1+fset.Position(d.Specs[j-1].End()).Line {
|
||||||
// j begins a new run. End this one.
|
// j begins a new run. End this one.
|
||||||
specs = append(specs, sortSpecs(env, fset, f, d.Specs[i:j])...)
|
specs = append(specs, sortSpecs(localPrefix, fset, f, d.Specs[i:j])...)
|
||||||
i = j
|
i = j
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
specs = append(specs, sortSpecs(env, fset, f, d.Specs[i:])...)
|
specs = append(specs, sortSpecs(localPrefix, fset, f, d.Specs[i:])...)
|
||||||
d.Specs = specs
|
d.Specs = specs
|
||||||
|
|
||||||
// Deduping can leave a blank line before the rparen; clean that up.
|
// Deduping can leave a blank line before the rparen; clean that up.
|
||||||
|
@ -60,7 +60,7 @@ func sortImports(env *ProcessEnv, fset *token.FileSet, f *ast.File) {
|
||||||
|
|
||||||
// mergeImports merges all the import declarations into the first one.
|
// mergeImports merges all the import declarations into the first one.
|
||||||
// Taken from golang.org/x/tools/ast/astutil.
|
// Taken from golang.org/x/tools/ast/astutil.
|
||||||
func mergeImports(env *ProcessEnv, fset *token.FileSet, f *ast.File) {
|
func mergeImports(fset *token.FileSet, f *ast.File) {
|
||||||
if len(f.Decls) <= 1 {
|
if len(f.Decls) <= 1 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ type posSpan struct {
|
||||||
End token.Pos
|
End token.Pos
|
||||||
}
|
}
|
||||||
|
|
||||||
func sortSpecs(env *ProcessEnv, fset *token.FileSet, f *ast.File, specs []ast.Spec) []ast.Spec {
|
func sortSpecs(localPrefix string, fset *token.FileSet, f *ast.File, specs []ast.Spec) []ast.Spec {
|
||||||
// Can't short-circuit here even if specs are already sorted,
|
// Can't short-circuit here even if specs are already sorted,
|
||||||
// since they might yet need deduplication.
|
// since they might yet need deduplication.
|
||||||
// A lone import, however, may be safely ignored.
|
// A lone import, however, may be safely ignored.
|
||||||
|
@ -191,7 +191,7 @@ func sortSpecs(env *ProcessEnv, fset *token.FileSet, f *ast.File, specs []ast.Sp
|
||||||
// Reassign the import paths to have the same position sequence.
|
// Reassign the import paths to have the same position sequence.
|
||||||
// Reassign each comment to abut the end of its spec.
|
// Reassign each comment to abut the end of its spec.
|
||||||
// Sort the comments by new position.
|
// Sort the comments by new position.
|
||||||
sort.Sort(byImportSpec{env, specs})
|
sort.Sort(byImportSpec{localPrefix, specs})
|
||||||
|
|
||||||
// Dedup. Thanks to our sorting, we can just consider
|
// Dedup. Thanks to our sorting, we can just consider
|
||||||
// adjacent pairs of imports.
|
// adjacent pairs of imports.
|
||||||
|
@ -245,8 +245,8 @@ func sortSpecs(env *ProcessEnv, fset *token.FileSet, f *ast.File, specs []ast.Sp
|
||||||
}
|
}
|
||||||
|
|
||||||
type byImportSpec struct {
|
type byImportSpec struct {
|
||||||
env *ProcessEnv
|
localPrefix string
|
||||||
specs []ast.Spec // slice of *ast.ImportSpec
|
specs []ast.Spec // slice of *ast.ImportSpec
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x byImportSpec) Len() int { return len(x.specs) }
|
func (x byImportSpec) Len() int { return len(x.specs) }
|
||||||
|
@ -255,8 +255,8 @@ func (x byImportSpec) Less(i, j int) bool {
|
||||||
ipath := importPath(x.specs[i])
|
ipath := importPath(x.specs[i])
|
||||||
jpath := importPath(x.specs[j])
|
jpath := importPath(x.specs[j])
|
||||||
|
|
||||||
igroup := importGroup(x.env, ipath)
|
igroup := importGroup(x.localPrefix, ipath)
|
||||||
jgroup := importGroup(x.env, jpath)
|
jgroup := importGroup(x.localPrefix, jpath)
|
||||||
if igroup != jgroup {
|
if igroup != jgroup {
|
||||||
return igroup < jgroup
|
return igroup < jgroup
|
||||||
}
|
}
|
||||||
|
|
|
@ -2484,7 +2484,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"revision": "20200519",
|
"revision": "20200619",
|
||||||
"rootUrl": "https://container.googleapis.com/",
|
"rootUrl": "https://container.googleapis.com/",
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"AcceleratorConfig": {
|
"AcceleratorConfig": {
|
||||||
|
@ -2586,32 +2586,32 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"management": {
|
"management": {
|
||||||
"$ref": "NodeManagement",
|
"$ref": "NodeManagement",
|
||||||
"description": "Specifies the node management options for NAP created node-pools."
|
"description": "NodeManagement configuration for this NodePool."
|
||||||
},
|
},
|
||||||
"minCpuPlatform": {
|
"minCpuPlatform": {
|
||||||
"description": "Minimum CPU platform to be used for NAP created node pools.\nThe instance may be scheduled on the specified or newer CPU platform.\nApplicable values are the friendly names of CPU platforms, such as\n\u003ccode\u003eminCpuPlatform: \u0026quot;Intel Haswell\u0026quot;\u003c/code\u003e or\n\u003ccode\u003eminCpuPlatform: \u0026quot;Intel Sandy Bridge\u0026quot;\u003c/code\u003e. For more\ninformation, read [how to specify min CPU\nplatform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)\nTo unset the min cpu platform field pass \"automatic\" as field value.",
|
"description": "Minimum CPU platform to be used by this instance. The instance may be\nscheduled on the specified or newer CPU platform. Applicable values are the\nfriendly names of CPU platforms, such as\n\u003ccode\u003eminCpuPlatform: \u0026quot;Intel Haswell\u0026quot;\u003c/code\u003e or\n\u003ccode\u003eminCpuPlatform: \u0026quot;Intel Sandy Bridge\u0026quot;\u003c/code\u003e. For more\ninformation, read [how to specify min CPU\nplatform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)\nTo unset the min cpu platform field pass \"automatic\"\nas field value.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"oauthScopes": {
|
"oauthScopes": {
|
||||||
"description": "Scopes that are used by NAP when creating node pools.",
|
"description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container\nRegistry](https://cloud.google.com/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added.",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"serviceAccount": {
|
"serviceAccount": {
|
||||||
"description": "The Google Cloud Platform Service Account to be used by the node VMs.",
|
"description": "The Google Cloud Platform Service Account to be used by the node VMs.\nSpecify the email address of the Service Account; otherwise, if no Service\nAccount is specified, the \"default\" service account is used.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"upgradeSettings": {
|
"upgradeSettings": {
|
||||||
"$ref": "UpgradeSettings",
|
"$ref": "UpgradeSettings",
|
||||||
"description": "Specifies the upgrade settings for NAP created node pools"
|
"description": "Upgrade settings control disruption and speed of the upgrade."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"AvailableVersion": {
|
"AvailableVersion": {
|
||||||
"description": "AvailableVersion is an additional Kubernetes versions offered\nto users who subscribed to the release channel.",
|
"description": "Deprecated.",
|
||||||
"id": "AvailableVersion",
|
"id": "AvailableVersion",
|
||||||
"properties": {
|
"properties": {
|
||||||
"reason": {
|
"reason": {
|
||||||
|
@ -2792,7 +2792,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"initialNodeCount": {
|
"initialNodeCount": {
|
||||||
"description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\n\nThis field is deprecated, use node_pool.initial_node_count instead.",
|
"description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine [resource quota](https://cloud.google.com/compute/quotas)\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\n\nThis field is deprecated, use node_pool.initial_node_count instead.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
@ -3205,7 +3205,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"cluster": {
|
"cluster": {
|
||||||
"$ref": "Cluster",
|
"$ref": "Cluster",
|
||||||
"description": "Required. A [cluster\nresource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.zones.clusters)"
|
"description": "Required. A [cluster\nresource](https://cloud.google.com/container-engine/reference/rest/v1beta1/projects.locations.clusters)"
|
||||||
},
|
},
|
||||||
"parent": {
|
"parent": {
|
||||||
"description": "The parent (project and location) where the cluster will be created.\nSpecified in the format `projects/*/locations/*`.",
|
"description": "The parent (project and location) where the cluster will be created.\nSpecified in the format `projects/*/locations/*`.",
|
||||||
|
@ -3615,6 +3615,20 @@
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"LinuxNodeConfig": {
|
||||||
|
"description": "Parameters that can be configured on Linux nodes.",
|
||||||
|
"id": "LinuxNodeConfig",
|
||||||
|
"properties": {
|
||||||
|
"sysctls": {
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": "The Linux kernel parameters to be applied to the nodes and all pods running\non the nodes.\n\nThe following parameters are supported.\n\nnet.core.netdev_max_backlog\nnet.core.rmem_max\nnet.core.wmem_default\nnet.core.wmem_max\nnet.core.optmem_max\nnet.core.somaxconn\nnet.ipv4.tcp_rmem\nnet.ipv4.tcp_wmem\nnet.ipv4.tcp_tw_reuse",
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"ListClustersResponse": {
|
"ListClustersResponse": {
|
||||||
"description": "ListClustersResponse is the result of ListClustersRequest.",
|
"description": "ListClustersResponse is the result of ListClustersRequest.",
|
||||||
"id": "ListClustersResponse",
|
"id": "ListClustersResponse",
|
||||||
|
@ -3949,6 +3963,10 @@
|
||||||
"description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used.",
|
"description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"kubeletConfig": {
|
||||||
|
"$ref": "NodeKubeletConfig",
|
||||||
|
"description": "Node kubelet configs."
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"additionalProperties": {
|
"additionalProperties": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
@ -3956,6 +3974,10 @@
|
||||||
"description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/",
|
"description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/",
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"linuxNodeConfig": {
|
||||||
|
"$ref": "LinuxNodeConfig",
|
||||||
|
"description": "Parameters that can be configured on Linux nodes."
|
||||||
|
},
|
||||||
"localSsdCount": {
|
"localSsdCount": {
|
||||||
"description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependent upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd\nfor more information.",
|
"description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependent upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd\nfor more information.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
|
@ -4024,6 +4046,25 @@
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"NodeKubeletConfig": {
|
||||||
|
"description": "Node kubelet configs.",
|
||||||
|
"id": "NodeKubeletConfig",
|
||||||
|
"properties": {
|
||||||
|
"cpuCfsQuota": {
|
||||||
|
"description": "Enable CPU CFS quota enforcement for containers that specify CPU limits.\n\nIf this option is enabled, kubelet uses CFS quota\n(https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt) to\nenforce container CPU limits. Otherwise, CPU limits will not be enforced at\nall.\n\nDisable this option to mitigate CPU throttling problems while still having\nyour pods to be in Guaranteed QoS class by specifying the CPU limits.\n\nThe default value is 'true' if unspecified.",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"cpuCfsQuotaPeriod": {
|
||||||
|
"description": "Set the CPU CFS quota period value 'cpu.cfs_period_us'.\n\nThe string must be a sequence of decimal numbers, each with optional\nfraction and a unit suffix, such as \"300ms\".\nValid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".\nThe value must be a positive duration.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"cpuManagerPolicy": {
|
||||||
|
"description": "Control the CPU management policy on the node.\nSee\nhttps://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/\n\nThe following values are allowed.\n - \"none\": the default, which represents the existing scheduling behavior.\n - \"static\": allows pods with certain resource characteristics to be\n granted increased CPU affinity and exclusivity on the node.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"NodeManagement": {
|
"NodeManagement": {
|
||||||
"description": "NodeManagement defines the set of node management services turned on for the\nnode pool.",
|
"description": "NodeManagement defines the set of node management services turned on for the\nnode pool.",
|
||||||
"id": "NodeManagement",
|
"id": "NodeManagement",
|
||||||
|
@ -4063,7 +4104,7 @@
|
||||||
"description": "The node configuration of the pool."
|
"description": "The node configuration of the pool."
|
||||||
},
|
},
|
||||||
"initialNodeCount": {
|
"initialNodeCount": {
|
||||||
"description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.",
|
"description": "The initial node count for the pool. You must ensure that your\nCompute Engine [resource quota](https://cloud.google.com/compute/quotas)\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
@ -4432,7 +4473,7 @@
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"ReleaseChannel": {
|
"ReleaseChannel": {
|
||||||
"description": "ReleaseChannel indicates which release channel a cluster is\nsubscribed to. Release channels are arranged in order of risk and\nfrequency of updates.\n\nWhen a cluster is subscribed to a release channel, Google maintains\nboth the master version and the node version. Node auto-upgrade\ndefaults to true and cannot be disabled. Updates to version related\nfields (e.g. current_master_version) return an error.",
|
"description": "ReleaseChannel indicates which release channel a cluster is\nsubscribed to. Release channels are arranged in order of risk.\n\nWhen a cluster is subscribed to a release channel, Google maintains\nboth the master version and the node version. Node auto-upgrade\ndefaults to true and cannot be disabled.",
|
||||||
"id": "ReleaseChannel",
|
"id": "ReleaseChannel",
|
||||||
"properties": {
|
"properties": {
|
||||||
"channel": {
|
"channel": {
|
||||||
|
@ -4445,9 +4486,9 @@
|
||||||
],
|
],
|
||||||
"enumDescriptions": [
|
"enumDescriptions": [
|
||||||
"No channel specified.",
|
"No channel specified.",
|
||||||
"RAPID channel is offered on an early access basis for customers who want\nto test new releases before they are qualified for production use or\ngeneral availability. New upgrades will occur roughly weekly.\n\nWARNING: Versions available in the RAPID Channel may be subject to\nunresolved issues with no known workaround and are not for use with\nproduction workloads or subject to any SLAs.",
|
"RAPID channel is offered on an early access basis for customers who want\nto test new releases.\n\nWARNING: Versions available in the RAPID Channel may be subject to\nunresolved issues with no known workaround and are not subject to any\nSLAs.",
|
||||||
"Clusters subscribed to REGULAR receive versions that are considered GA\nquality. REGULAR is intended for production users who want to take\nadvantage of new features. New upgrades will occur roughly every few\nweeks.",
|
"Clusters subscribed to REGULAR receive versions that are considered GA\nquality. REGULAR is intended for production users who want to take\nadvantage of new features.",
|
||||||
"Clusters subscribed to STABLE receive versions that are known to be\nstable and reliable in production. STABLE is intended for production\nusers who need stability above all else, or for whom frequent upgrades\nare too risky. New upgrades will occur roughly every few months."
|
"Clusters subscribed to STABLE receive versions that are known to be\nstable and reliable in production."
|
||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
@ -4459,7 +4500,7 @@
|
||||||
"id": "ReleaseChannelConfig",
|
"id": "ReleaseChannelConfig",
|
||||||
"properties": {
|
"properties": {
|
||||||
"availableVersions": {
|
"availableVersions": {
|
||||||
"description": "List of available versions for the release channel.",
|
"description": "Deprecated.\nThis field has been deprecated and replaced with the valid_versions\nfield.",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "AvailableVersion"
|
"$ref": "AvailableVersion"
|
||||||
},
|
},
|
||||||
|
@ -4475,15 +4516,22 @@
|
||||||
],
|
],
|
||||||
"enumDescriptions": [
|
"enumDescriptions": [
|
||||||
"No channel specified.",
|
"No channel specified.",
|
||||||
"RAPID channel is offered on an early access basis for customers who want\nto test new releases before they are qualified for production use or\ngeneral availability. New upgrades will occur roughly weekly.\n\nWARNING: Versions available in the RAPID Channel may be subject to\nunresolved issues with no known workaround and are not for use with\nproduction workloads or subject to any SLAs.",
|
"RAPID channel is offered on an early access basis for customers who want\nto test new releases.\n\nWARNING: Versions available in the RAPID Channel may be subject to\nunresolved issues with no known workaround and are not subject to any\nSLAs.",
|
||||||
"Clusters subscribed to REGULAR receive versions that are considered GA\nquality. REGULAR is intended for production users who want to take\nadvantage of new features. New upgrades will occur roughly every few\nweeks.",
|
"Clusters subscribed to REGULAR receive versions that are considered GA\nquality. REGULAR is intended for production users who want to take\nadvantage of new features.",
|
||||||
"Clusters subscribed to STABLE receive versions that are known to be\nstable and reliable in production. STABLE is intended for production\nusers who need stability above all else, or for whom frequent upgrades\nare too risky. New upgrades will occur roughly every few months."
|
"Clusters subscribed to STABLE receive versions that are known to be\nstable and reliable in production."
|
||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"defaultVersion": {
|
"defaultVersion": {
|
||||||
"description": "The default version for newly created clusters on the channel.",
|
"description": "The default version for newly created clusters on the channel.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"validVersions": {
|
||||||
|
"description": "List of valid versions for the channel.",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": "array"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
@ -4639,14 +4687,14 @@
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"validMasterVersions": {
|
"validMasterVersions": {
|
||||||
"description": "List of valid master versions.",
|
"description": "List of valid master versions, in descending order.",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"type": "array"
|
"type": "array"
|
||||||
},
|
},
|
||||||
"validNodeVersions": {
|
"validNodeVersions": {
|
||||||
"description": "List of valid node upgrade target versions.",
|
"description": "List of valid node upgrade target versions, in descending order.",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
@ -5204,6 +5252,14 @@
|
||||||
"description": "Required. The desired image type for the node pool.",
|
"description": "Required. The desired image type for the node pool.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"kubeletConfig": {
|
||||||
|
"$ref": "NodeKubeletConfig",
|
||||||
|
"description": "Node kubelet configs."
|
||||||
|
},
|
||||||
|
"linuxNodeConfig": {
|
||||||
|
"$ref": "LinuxNodeConfig",
|
||||||
|
"description": "Parameters that can be configured on Linux nodes."
|
||||||
|
},
|
||||||
"locations": {
|
"locations": {
|
||||||
"description": "The desired list of Google Compute Engine\n[zones](https://cloud.google.com/compute/docs/zones#available) in which the\nnode pool's nodes should be located. Changing the locations for a node pool\nwill result in nodes being either created or removed from the node pool,\ndepending on whether locations are being added or removed.",
|
"description": "The desired list of Google Compute Engine\n[zones](https://cloud.google.com/compute/docs/zones#available) in which the\nnode pool's nodes should be located. Changing the locations for a node pool\nwill result in nodes being either created or removed from the node pool,\ndepending on whether locations are being added or removed.",
|
||||||
"items": {
|
"items": {
|
||||||
|
|
|
@ -75,6 +75,7 @@ const apiId = "container:v1beta1"
|
||||||
const apiName = "container"
|
const apiName = "container"
|
||||||
const apiVersion = "v1beta1"
|
const apiVersion = "v1beta1"
|
||||||
const basePath = "https://container.googleapis.com/"
|
const basePath = "https://container.googleapis.com/"
|
||||||
|
const mtlsBasePath = "https://container.mtls.googleapis.com/"
|
||||||
|
|
||||||
// OAuth2 scopes used by this API.
|
// OAuth2 scopes used by this API.
|
||||||
const (
|
const (
|
||||||
|
@ -90,6 +91,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err
|
||||||
// NOTE: prepend, so we don't override user-specified scopes.
|
// NOTE: prepend, so we don't override user-specified scopes.
|
||||||
opts = append([]option.ClientOption{scopesOption}, opts...)
|
opts = append([]option.ClientOption{scopesOption}, opts...)
|
||||||
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
|
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
|
||||||
|
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
|
||||||
client, endpoint, err := htransport.NewClient(ctx, opts...)
|
client, endpoint, err := htransport.NewClient(ctx, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -481,16 +483,14 @@ func (s *AutoUpgradeOptions) MarshalJSON() ([]byte, error) {
|
||||||
// contains defaults for a node pool created
|
// contains defaults for a node pool created
|
||||||
// by NAP.
|
// by NAP.
|
||||||
type AutoprovisioningNodePoolDefaults struct {
|
type AutoprovisioningNodePoolDefaults struct {
|
||||||
// Management: Specifies the node management options for NAP created
|
// Management: NodeManagement configuration for this NodePool.
|
||||||
// node-pools.
|
|
||||||
Management *NodeManagement `json:"management,omitempty"`
|
Management *NodeManagement `json:"management,omitempty"`
|
||||||
|
|
||||||
// MinCpuPlatform: Minimum CPU platform to be used for NAP created node
|
// MinCpuPlatform: Minimum CPU platform to be used by this instance. The
|
||||||
// pools.
|
// instance may be
|
||||||
// The instance may be scheduled on the specified or newer CPU
|
// scheduled on the specified or newer CPU platform. Applicable values
|
||||||
// platform.
|
// are the
|
||||||
// Applicable values are the friendly names of CPU platforms, such
|
// friendly names of CPU platforms, such as
|
||||||
// as
|
|
||||||
// <code>minCpuPlatform: "Intel Haswell"</code>
|
// <code>minCpuPlatform: "Intel Haswell"</code>
|
||||||
// or
|
// or
|
||||||
// <code>minCpuPlatform: "Intel Sandy Bridge"</code>. For
|
// <code>minCpuPlatform: "Intel Sandy Bridge"</code>. For
|
||||||
|
@ -499,18 +499,44 @@ type AutoprovisioningNodePoolDefaults struct {
|
||||||
// CPU
|
// CPU
|
||||||
// platform](https://cloud.google.com/compute/docs/instances/specify-
|
// platform](https://cloud.google.com/compute/docs/instances/specify-
|
||||||
// min-cpu-platform)
|
// min-cpu-platform)
|
||||||
// To unset the min cpu platform field pass "automatic" as field value.
|
// To unset the min cpu platform field pass "automatic"
|
||||||
|
// as field value.
|
||||||
MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
|
MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
|
||||||
|
|
||||||
// OauthScopes: Scopes that are used by NAP when creating node pools.
|
// OauthScopes: The set of Google API scopes to be made available on all
|
||||||
|
// of the
|
||||||
|
// node VMs under the "default" service account.
|
||||||
|
//
|
||||||
|
// The following scopes are recommended, but not required, and by
|
||||||
|
// default are
|
||||||
|
// not included:
|
||||||
|
//
|
||||||
|
// * `https://www.googleapis.com/auth/compute` is required for
|
||||||
|
// mounting
|
||||||
|
// persistent storage on your nodes.
|
||||||
|
// * `https://www.googleapis.com/auth/devstorage.read_only` is required
|
||||||
|
// for
|
||||||
|
// communicating with **gcr.io**
|
||||||
|
// (the [Google
|
||||||
|
// Container
|
||||||
|
// Registry](https://cloud.google.com/container-registry/)).
|
||||||
|
//
|
||||||
|
// I
|
||||||
|
// f unspecified, no scopes are added, unless Cloud Logging or
|
||||||
|
// Cloud
|
||||||
|
// Monitoring are enabled, in which case their required scopes will be
|
||||||
|
// added.
|
||||||
OauthScopes []string `json:"oauthScopes,omitempty"`
|
OauthScopes []string `json:"oauthScopes,omitempty"`
|
||||||
|
|
||||||
// ServiceAccount: The Google Cloud Platform Service Account to be used
|
// ServiceAccount: The Google Cloud Platform Service Account to be used
|
||||||
// by the node VMs.
|
// by the node VMs.
|
||||||
|
// Specify the email address of the Service Account; otherwise, if no
|
||||||
|
// Service
|
||||||
|
// Account is specified, the "default" service account is used.
|
||||||
ServiceAccount string `json:"serviceAccount,omitempty"`
|
ServiceAccount string `json:"serviceAccount,omitempty"`
|
||||||
|
|
||||||
// UpgradeSettings: Specifies the upgrade settings for NAP created node
|
// UpgradeSettings: Upgrade settings control disruption and speed of the
|
||||||
// pools
|
// upgrade.
|
||||||
UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"`
|
UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"`
|
||||||
|
|
||||||
// ForceSendFields is a list of field names (e.g. "Management") to
|
// ForceSendFields is a list of field names (e.g. "Management") to
|
||||||
|
@ -536,9 +562,7 @@ func (s *AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) {
|
||||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AvailableVersion: AvailableVersion is an additional Kubernetes
|
// AvailableVersion: Deprecated.
|
||||||
// versions offered
|
|
||||||
// to users who subscribed to the release channel.
|
|
||||||
type AvailableVersion struct {
|
type AvailableVersion struct {
|
||||||
// Reason: Reason for availability.
|
// Reason: Reason for availability.
|
||||||
Reason string `json:"reason,omitempty"`
|
Reason string `json:"reason,omitempty"`
|
||||||
|
@ -896,8 +920,8 @@ type Cluster struct {
|
||||||
|
|
||||||
// InitialNodeCount: The number of nodes to create in this cluster. You
|
// InitialNodeCount: The number of nodes to create in this cluster. You
|
||||||
// must ensure that your
|
// must ensure that your
|
||||||
// Compute Engine <a href="/compute/docs/resource-quotas">resource
|
// Compute Engine [resource
|
||||||
// quota</a>
|
// quota](https://cloud.google.com/compute/quotas)
|
||||||
// is sufficient for this number of instances. You must also have
|
// is sufficient for this number of instances. You must also have
|
||||||
// available
|
// available
|
||||||
// firewall and routes quota.
|
// firewall and routes quota.
|
||||||
|
@ -1611,7 +1635,7 @@ type CreateClusterRequest struct {
|
||||||
// Cluster: Required. A
|
// Cluster: Required. A
|
||||||
// [cluster
|
// [cluster
|
||||||
// resource](https://cloud.google.com/container-engine/reference
|
// resource](https://cloud.google.com/container-engine/reference
|
||||||
// /rest/v1beta1/projects.zones.clusters)
|
// /rest/v1beta1/projects.locations.clusters)
|
||||||
Cluster *Cluster `json:"cluster,omitempty"`
|
Cluster *Cluster `json:"cluster,omitempty"`
|
||||||
|
|
||||||
// Parent: The parent (project and location) where the cluster will be
|
// Parent: The parent (project and location) where the cluster will be
|
||||||
|
@ -2518,6 +2542,51 @@ func (s *LegacyAbac) MarshalJSON() ([]byte, error) {
|
||||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LinuxNodeConfig: Parameters that can be configured on Linux nodes.
|
||||||
|
type LinuxNodeConfig struct {
|
||||||
|
// Sysctls: The Linux kernel parameters to be applied to the nodes and
|
||||||
|
// all pods running
|
||||||
|
// on the nodes.
|
||||||
|
//
|
||||||
|
// The following parameters are
|
||||||
|
// supported.
|
||||||
|
//
|
||||||
|
// net.core.netdev_max_backlog
|
||||||
|
// net.core.rmem_max
|
||||||
|
// net.core.wme
|
||||||
|
// m_default
|
||||||
|
// net.core.wmem_max
|
||||||
|
// net.core.optmem_max
|
||||||
|
// net.core.somaxconn
|
||||||
|
// net
|
||||||
|
// .ipv4.tcp_rmem
|
||||||
|
// net.ipv4.tcp_wmem
|
||||||
|
// net.ipv4.tcp_tw_reuse
|
||||||
|
Sysctls map[string]string `json:"sysctls,omitempty"`
|
||||||
|
|
||||||
|
// ForceSendFields is a list of field names (e.g. "Sysctls") to
|
||||||
|
// unconditionally include in API requests. By default, fields with
|
||||||
|
// empty values are omitted from API requests. However, any non-pointer,
|
||||||
|
// non-interface field appearing in ForceSendFields will be sent to the
|
||||||
|
// server regardless of whether the field is empty or not. This may be
|
||||||
|
// used to include empty fields in Patch requests.
|
||||||
|
ForceSendFields []string `json:"-"`
|
||||||
|
|
||||||
|
// NullFields is a list of field names (e.g. "Sysctls") 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:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *LinuxNodeConfig) MarshalJSON() ([]byte, error) {
|
||||||
|
type NoMethod LinuxNodeConfig
|
||||||
|
raw := NoMethod(*s)
|
||||||
|
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||||
|
}
|
||||||
|
|
||||||
// ListClustersResponse: ListClustersResponse is the result of
|
// ListClustersResponse: ListClustersResponse is the result of
|
||||||
// ListClustersRequest.
|
// ListClustersRequest.
|
||||||
type ListClustersResponse struct {
|
type ListClustersResponse struct {
|
||||||
|
@ -3208,6 +3277,9 @@ type NodeConfig struct {
|
||||||
// the latest version of it will be used.
|
// the latest version of it will be used.
|
||||||
ImageType string `json:"imageType,omitempty"`
|
ImageType string `json:"imageType,omitempty"`
|
||||||
|
|
||||||
|
// KubeletConfig: Node kubelet configs.
|
||||||
|
KubeletConfig *NodeKubeletConfig `json:"kubeletConfig,omitempty"`
|
||||||
|
|
||||||
// Labels: The map of Kubernetes labels (key/value pairs) to be applied
|
// Labels: The map of Kubernetes labels (key/value pairs) to be applied
|
||||||
// to each node.
|
// to each node.
|
||||||
// These will added in addition to any default label(s) that
|
// These will added in addition to any default label(s) that
|
||||||
|
@ -3223,6 +3295,9 @@ type NodeConfig struct {
|
||||||
// /labels/
|
// /labels/
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
Labels map[string]string `json:"labels,omitempty"`
|
||||||
|
|
||||||
|
// LinuxNodeConfig: Parameters that can be configured on Linux nodes.
|
||||||
|
LinuxNodeConfig *LinuxNodeConfig `json:"linuxNodeConfig,omitempty"`
|
||||||
|
|
||||||
// LocalSsdCount: The number of local SSD disks to be attached to the
|
// LocalSsdCount: The number of local SSD disks to be attached to the
|
||||||
// node.
|
// node.
|
||||||
//
|
//
|
||||||
|
@ -3397,6 +3472,75 @@ func (s *NodeConfig) MarshalJSON() ([]byte, error) {
|
||||||
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NodeKubeletConfig: Node kubelet configs.
|
||||||
|
type NodeKubeletConfig struct {
|
||||||
|
// CpuCfsQuota: Enable CPU CFS quota enforcement for containers that
|
||||||
|
// specify CPU limits.
|
||||||
|
//
|
||||||
|
// If this option is enabled, kubelet uses CFS
|
||||||
|
// quota
|
||||||
|
// (https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.tx
|
||||||
|
// t) to
|
||||||
|
// enforce container CPU limits. Otherwise, CPU limits will not be
|
||||||
|
// enforced at
|
||||||
|
// all.
|
||||||
|
//
|
||||||
|
// Disable this option to mitigate CPU throttling problems while still
|
||||||
|
// having
|
||||||
|
// your pods to be in Guaranteed QoS class by specifying the CPU
|
||||||
|
// limits.
|
||||||
|
//
|
||||||
|
// The default value is 'true' if unspecified.
|
||||||
|
CpuCfsQuota bool `json:"cpuCfsQuota,omitempty"`
|
||||||
|
|
||||||
|
// CpuCfsQuotaPeriod: Set the CPU CFS quota period value
|
||||||
|
// 'cpu.cfs_period_us'.
|
||||||
|
//
|
||||||
|
// The string must be a sequence of decimal numbers, each with
|
||||||
|
// optional
|
||||||
|
// fraction and a unit suffix, such as "300ms".
|
||||||
|
// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
||||||
|
// The value must be a positive duration.
|
||||||
|
CpuCfsQuotaPeriod string `json:"cpuCfsQuotaPeriod,omitempty"`
|
||||||
|
|
||||||
|
// CpuManagerPolicy: Control the CPU management policy on the
|
||||||
|
// node.
|
||||||
|
// See
|
||||||
|
// https://kubernetes.io/docs/tasks/administer-cluster/cpu-mana
|
||||||
|
// gement-policies/
|
||||||
|
//
|
||||||
|
// The following values are allowed.
|
||||||
|
// - "none": the default, which represents the existing scheduling
|
||||||
|
// behavior.
|
||||||
|
// - "static": allows pods with certain resource characteristics to
|
||||||
|
// be
|
||||||
|
// granted increased CPU affinity and exclusivity on the
|
||||||
|
// node.
|
||||||
|
CpuManagerPolicy string `json:"cpuManagerPolicy,omitempty"`
|
||||||
|
|
||||||
|
// ForceSendFields is a list of field names (e.g. "CpuCfsQuota") to
|
||||||
|
// unconditionally include in API requests. By default, fields with
|
||||||
|
// empty values are omitted from API requests. However, any non-pointer,
|
||||||
|
// non-interface field appearing in ForceSendFields will be sent to the
|
||||||
|
// server regardless of whether the field is empty or not. This may be
|
||||||
|
// used to include empty fields in Patch requests.
|
||||||
|
ForceSendFields []string `json:"-"`
|
||||||
|
|
||||||
|
// NullFields is a list of field names (e.g. "CpuCfsQuota") 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:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *NodeKubeletConfig) MarshalJSON() ([]byte, error) {
|
||||||
|
type NoMethod NodeKubeletConfig
|
||||||
|
raw := NoMethod(*s)
|
||||||
|
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
|
||||||
|
}
|
||||||
|
|
||||||
// NodeManagement: NodeManagement defines the set of node management
|
// NodeManagement: NodeManagement defines the set of node management
|
||||||
// services turned on for the
|
// services turned on for the
|
||||||
// node pool.
|
// node pool.
|
||||||
|
@ -3458,8 +3602,8 @@ type NodePool struct {
|
||||||
|
|
||||||
// InitialNodeCount: The initial node count for the pool. You must
|
// InitialNodeCount: The initial node count for the pool. You must
|
||||||
// ensure that your
|
// ensure that your
|
||||||
// Compute Engine <a href="/compute/docs/resource-quotas">resource
|
// Compute Engine [resource
|
||||||
// quota</a>
|
// quota](https://cloud.google.com/compute/quotas)
|
||||||
// is sufficient for this number of instances. You must also have
|
// is sufficient for this number of instances. You must also have
|
||||||
// available
|
// available
|
||||||
// firewall and routes quota.
|
// firewall and routes quota.
|
||||||
|
@ -4015,17 +4159,13 @@ func (s *RecurringTimeWindow) MarshalJSON() ([]byte, error) {
|
||||||
|
|
||||||
// ReleaseChannel: ReleaseChannel indicates which release channel a
|
// ReleaseChannel: ReleaseChannel indicates which release channel a
|
||||||
// cluster is
|
// cluster is
|
||||||
// subscribed to. Release channels are arranged in order of risk
|
// subscribed to. Release channels are arranged in order of risk.
|
||||||
// and
|
|
||||||
// frequency of updates.
|
|
||||||
//
|
//
|
||||||
// When a cluster is subscribed to a release channel, Google
|
// When a cluster is subscribed to a release channel, Google
|
||||||
// maintains
|
// maintains
|
||||||
// both the master version and the node version. Node
|
// both the master version and the node version. Node
|
||||||
// auto-upgrade
|
// auto-upgrade
|
||||||
// defaults to true and cannot be disabled. Updates to version
|
// defaults to true and cannot be disabled.
|
||||||
// related
|
|
||||||
// fields (e.g. current_master_version) return an error.
|
|
||||||
type ReleaseChannel struct {
|
type ReleaseChannel struct {
|
||||||
// Channel: channel specifies which release channel the cluster is
|
// Channel: channel specifies which release channel the cluster is
|
||||||
// subscribed to.
|
// subscribed to.
|
||||||
|
@ -4034,30 +4174,21 @@ type ReleaseChannel struct {
|
||||||
// "UNSPECIFIED" - No channel specified.
|
// "UNSPECIFIED" - No channel specified.
|
||||||
// "RAPID" - RAPID channel is offered on an early access basis for
|
// "RAPID" - RAPID channel is offered on an early access basis for
|
||||||
// customers who want
|
// customers who want
|
||||||
// to test new releases before they are qualified for production use
|
// to test new releases.
|
||||||
// or
|
|
||||||
// general availability. New upgrades will occur roughly
|
|
||||||
// weekly.
|
|
||||||
//
|
//
|
||||||
// WARNING: Versions available in the RAPID Channel may be subject
|
// WARNING: Versions available in the RAPID Channel may be subject
|
||||||
// to
|
// to
|
||||||
// unresolved issues with no known workaround and are not for use
|
// unresolved issues with no known workaround and are not subject to
|
||||||
// with
|
// any
|
||||||
// production workloads or subject to any SLAs.
|
// SLAs.
|
||||||
// "REGULAR" - Clusters subscribed to REGULAR receive versions that
|
// "REGULAR" - Clusters subscribed to REGULAR receive versions that
|
||||||
// are considered GA
|
// are considered GA
|
||||||
// quality. REGULAR is intended for production users who want to
|
// quality. REGULAR is intended for production users who want to
|
||||||
// take
|
// take
|
||||||
// advantage of new features. New upgrades will occur roughly every
|
// advantage of new features.
|
||||||
// few
|
|
||||||
// weeks.
|
|
||||||
// "STABLE" - Clusters subscribed to STABLE receive versions that are
|
// "STABLE" - Clusters subscribed to STABLE receive versions that are
|
||||||
// known to be
|
// known to be
|
||||||
// stable and reliable in production. STABLE is intended for
|
// stable and reliable in production.
|
||||||
// production
|
|
||||||
// users who need stability above all else, or for whom frequent
|
|
||||||
// upgrades
|
|
||||||
// are too risky. New upgrades will occur roughly every few months.
|
|
||||||
Channel string `json:"channel,omitempty"`
|
Channel string `json:"channel,omitempty"`
|
||||||
|
|
||||||
// ForceSendFields is a list of field names (e.g. "Channel") to
|
// ForceSendFields is a list of field names (e.g. "Channel") to
|
||||||
|
@ -4086,8 +4217,10 @@ func (s *ReleaseChannel) MarshalJSON() ([]byte, error) {
|
||||||
// ReleaseChannelConfig: ReleaseChannelConfig exposes configuration for
|
// ReleaseChannelConfig: ReleaseChannelConfig exposes configuration for
|
||||||
// a release channel.
|
// a release channel.
|
||||||
type ReleaseChannelConfig struct {
|
type ReleaseChannelConfig struct {
|
||||||
// AvailableVersions: List of available versions for the release
|
// AvailableVersions: Deprecated.
|
||||||
// channel.
|
// This field has been deprecated and replaced with the
|
||||||
|
// valid_versions
|
||||||
|
// field.
|
||||||
AvailableVersions []*AvailableVersion `json:"availableVersions,omitempty"`
|
AvailableVersions []*AvailableVersion `json:"availableVersions,omitempty"`
|
||||||
|
|
||||||
// Channel: The release channel this configuration applies to.
|
// Channel: The release channel this configuration applies to.
|
||||||
|
@ -4096,36 +4229,30 @@ type ReleaseChannelConfig struct {
|
||||||
// "UNSPECIFIED" - No channel specified.
|
// "UNSPECIFIED" - No channel specified.
|
||||||
// "RAPID" - RAPID channel is offered on an early access basis for
|
// "RAPID" - RAPID channel is offered on an early access basis for
|
||||||
// customers who want
|
// customers who want
|
||||||
// to test new releases before they are qualified for production use
|
// to test new releases.
|
||||||
// or
|
|
||||||
// general availability. New upgrades will occur roughly
|
|
||||||
// weekly.
|
|
||||||
//
|
//
|
||||||
// WARNING: Versions available in the RAPID Channel may be subject
|
// WARNING: Versions available in the RAPID Channel may be subject
|
||||||
// to
|
// to
|
||||||
// unresolved issues with no known workaround and are not for use
|
// unresolved issues with no known workaround and are not subject to
|
||||||
// with
|
// any
|
||||||
// production workloads or subject to any SLAs.
|
// SLAs.
|
||||||
// "REGULAR" - Clusters subscribed to REGULAR receive versions that
|
// "REGULAR" - Clusters subscribed to REGULAR receive versions that
|
||||||
// are considered GA
|
// are considered GA
|
||||||
// quality. REGULAR is intended for production users who want to
|
// quality. REGULAR is intended for production users who want to
|
||||||
// take
|
// take
|
||||||
// advantage of new features. New upgrades will occur roughly every
|
// advantage of new features.
|
||||||
// few
|
|
||||||
// weeks.
|
|
||||||
// "STABLE" - Clusters subscribed to STABLE receive versions that are
|
// "STABLE" - Clusters subscribed to STABLE receive versions that are
|
||||||
// known to be
|
// known to be
|
||||||
// stable and reliable in production. STABLE is intended for
|
// stable and reliable in production.
|
||||||
// production
|
|
||||||
// users who need stability above all else, or for whom frequent
|
|
||||||
// upgrades
|
|
||||||
// are too risky. New upgrades will occur roughly every few months.
|
|
||||||
Channel string `json:"channel,omitempty"`
|
Channel string `json:"channel,omitempty"`
|
||||||
|
|
||||||
// DefaultVersion: The default version for newly created clusters on the
|
// DefaultVersion: The default version for newly created clusters on the
|
||||||
// channel.
|
// channel.
|
||||||
DefaultVersion string `json:"defaultVersion,omitempty"`
|
DefaultVersion string `json:"defaultVersion,omitempty"`
|
||||||
|
|
||||||
|
// ValidVersions: List of valid versions for the channel.
|
||||||
|
ValidVersions []string `json:"validVersions,omitempty"`
|
||||||
|
|
||||||
// ForceSendFields is a list of field names (e.g. "AvailableVersions")
|
// ForceSendFields is a list of field names (e.g. "AvailableVersions")
|
||||||
// to unconditionally include in API requests. By default, fields with
|
// to unconditionally include in API requests. By default, fields with
|
||||||
// empty values are omitted from API requests. However, any non-pointer,
|
// empty values are omitted from API requests. However, any non-pointer,
|
||||||
|
@ -4395,10 +4522,12 @@ type ServerConfig struct {
|
||||||
// ValidImageTypes: List of valid image types.
|
// ValidImageTypes: List of valid image types.
|
||||||
ValidImageTypes []string `json:"validImageTypes,omitempty"`
|
ValidImageTypes []string `json:"validImageTypes,omitempty"`
|
||||||
|
|
||||||
// ValidMasterVersions: List of valid master versions.
|
// ValidMasterVersions: List of valid master versions, in descending
|
||||||
|
// order.
|
||||||
ValidMasterVersions []string `json:"validMasterVersions,omitempty"`
|
ValidMasterVersions []string `json:"validMasterVersions,omitempty"`
|
||||||
|
|
||||||
// ValidNodeVersions: List of valid node upgrade target versions.
|
// ValidNodeVersions: List of valid node upgrade target versions, in
|
||||||
|
// descending order.
|
||||||
ValidNodeVersions []string `json:"validNodeVersions,omitempty"`
|
ValidNodeVersions []string `json:"validNodeVersions,omitempty"`
|
||||||
|
|
||||||
// ServerResponse contains the HTTP response code and headers from the
|
// ServerResponse contains the HTTP response code and headers from the
|
||||||
|
@ -5579,6 +5708,12 @@ type UpdateNodePoolRequest struct {
|
||||||
// ImageType: Required. The desired image type for the node pool.
|
// ImageType: Required. The desired image type for the node pool.
|
||||||
ImageType string `json:"imageType,omitempty"`
|
ImageType string `json:"imageType,omitempty"`
|
||||||
|
|
||||||
|
// KubeletConfig: Node kubelet configs.
|
||||||
|
KubeletConfig *NodeKubeletConfig `json:"kubeletConfig,omitempty"`
|
||||||
|
|
||||||
|
// LinuxNodeConfig: Parameters that can be configured on Linux nodes.
|
||||||
|
LinuxNodeConfig *LinuxNodeConfig `json:"linuxNodeConfig,omitempty"`
|
||||||
|
|
||||||
// Locations: The desired list of Google Compute
|
// Locations: The desired list of Google Compute
|
||||||
// Engine
|
// Engine
|
||||||
// [zones](https://cloud.google.com/compute/docs/zones#available) in
|
// [zones](https://cloud.google.com/compute/docs/zones#available) in
|
||||||
|
@ -6076,7 +6211,7 @@ func (c *ProjectsAggregatedUsableSubnetworksListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsAggregatedUsableSubnetworksListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6282,7 +6417,7 @@ func (c *ProjectsLocationsGetServerConfigCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsGetServerConfigCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6436,7 +6571,7 @@ func (c *ProjectsLocationsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6571,7 +6706,7 @@ func (c *ProjectsLocationsClustersCompleteIpRotationCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6729,7 +6864,7 @@ func (c *ProjectsLocationsClustersCreateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6910,7 +7045,7 @@ func (c *ProjectsLocationsClustersDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7098,7 +7233,7 @@ func (c *ProjectsLocationsClustersGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7262,7 +7397,7 @@ func (c *ProjectsLocationsClustersGetJwksCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersGetJwksCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7429,7 +7564,7 @@ func (c *ProjectsLocationsClustersListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7574,7 +7709,7 @@ func (c *ProjectsLocationsClustersSetAddonsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetAddonsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7715,7 +7850,7 @@ func (c *ProjectsLocationsClustersSetLegacyAbacCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetLegacyAbacCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7861,7 +7996,7 @@ func (c *ProjectsLocationsClustersSetLocationsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetLocationsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8001,7 +8136,7 @@ func (c *ProjectsLocationsClustersSetLoggingCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetLoggingCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8141,7 +8276,7 @@ func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) Header() http.Header
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8285,7 +8420,7 @@ func (c *ProjectsLocationsClustersSetMasterAuthCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8425,7 +8560,7 @@ func (c *ProjectsLocationsClustersSetMonitoringCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetMonitoringCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8565,7 +8700,7 @@ func (c *ProjectsLocationsClustersSetNetworkPolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8705,7 +8840,7 @@ func (c *ProjectsLocationsClustersSetResourceLabelsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersSetResourceLabelsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8845,7 +8980,7 @@ func (c *ProjectsLocationsClustersStartIpRotationCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8985,7 +9120,7 @@ func (c *ProjectsLocationsClustersUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9125,7 +9260,7 @@ func (c *ProjectsLocationsClustersUpdateMasterCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersUpdateMasterCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9265,7 +9400,7 @@ func (c *ProjectsLocationsClustersNodePoolsCreateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9443,7 +9578,7 @@ func (c *ProjectsLocationsClustersNodePoolsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9644,7 +9779,7 @@ func (c *ProjectsLocationsClustersNodePoolsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9840,7 +9975,7 @@ func (c *ProjectsLocationsClustersNodePoolsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9992,7 +10127,7 @@ func (c *ProjectsLocationsClustersNodePoolsRollbackCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10133,7 +10268,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) Header() http.Hea
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsSetAutoscalingCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10273,7 +10408,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) Header() http.Head
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10413,7 +10548,7 @@ func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10554,7 +10689,7 @@ func (c *ProjectsLocationsClustersNodePoolsUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10713,7 +10848,7 @@ func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) Header()
|
||||||
|
|
||||||
func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsClustersWellKnownGetOpenidConfigurationCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10845,7 +10980,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11026,7 +11161,7 @@ func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11210,7 +11345,7 @@ func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11375,7 +11510,7 @@ func (c *ProjectsZonesGetServerconfigCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11526,7 +11661,7 @@ func (c *ProjectsZonesClustersAddonsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersAddonsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11685,7 +11820,7 @@ func (c *ProjectsZonesClustersCompleteIpRotationCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersCompleteIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11860,7 +11995,7 @@ func (c *ProjectsZonesClustersCreateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12028,7 +12163,7 @@ func (c *ProjectsZonesClustersDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12201,7 +12336,7 @@ func (c *ProjectsZonesClustersGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12361,7 +12496,7 @@ func (c *ProjectsZonesClustersLegacyAbacCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersLegacyAbacCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12538,7 +12673,7 @@ func (c *ProjectsZonesClustersListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12695,7 +12830,7 @@ func (c *ProjectsZonesClustersLocationsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersLocationsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12854,7 +12989,7 @@ func (c *ProjectsZonesClustersLoggingCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersLoggingCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13013,7 +13148,7 @@ func (c *ProjectsZonesClustersMasterCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersMasterCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13172,7 +13307,7 @@ func (c *ProjectsZonesClustersMonitoringCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersMonitoringCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13331,7 +13466,7 @@ func (c *ProjectsZonesClustersResourceLabelsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersResourceLabelsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13490,7 +13625,7 @@ func (c *ProjectsZonesClustersSetMaintenancePolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersSetMaintenancePolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13653,7 +13788,7 @@ func (c *ProjectsZonesClustersSetMasterAuthCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersSetMasterAuthCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13812,7 +13947,7 @@ func (c *ProjectsZonesClustersSetNetworkPolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersSetNetworkPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13971,7 +14106,7 @@ func (c *ProjectsZonesClustersStartIpRotationCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersStartIpRotationCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -14130,7 +14265,7 @@ func (c *ProjectsZonesClustersUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -14291,7 +14426,7 @@ func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsAutoscalingCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -14458,7 +14593,7 @@ func (c *ProjectsZonesClustersNodePoolsCreateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsCreateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -14627,7 +14762,7 @@ func (c *ProjectsZonesClustersNodePoolsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -14812,7 +14947,7 @@ func (c *ProjectsZonesClustersNodePoolsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -14996,7 +15131,7 @@ func (c *ProjectsZonesClustersNodePoolsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -15159,7 +15294,7 @@ func (c *ProjectsZonesClustersNodePoolsRollbackCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsRollbackCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -15328,7 +15463,7 @@ func (c *ProjectsZonesClustersNodePoolsSetManagementCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsSetManagementCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -15497,7 +15632,7 @@ func (c *ProjectsZonesClustersNodePoolsSetSizeCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsSetSizeCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -15667,7 +15802,7 @@ func (c *ProjectsZonesClustersNodePoolsUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesClustersNodePoolsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -15834,7 +15969,7 @@ func (c *ProjectsZonesOperationsCancelCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -16010,7 +16145,7 @@ func (c *ProjectsZonesOperationsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -16186,7 +16321,7 @@ func (c *ProjectsZonesOperationsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,25 +18,26 @@ import (
|
||||||
// DialSettings holds information needed to establish a connection with a
|
// DialSettings holds information needed to establish a connection with a
|
||||||
// Google API service.
|
// Google API service.
|
||||||
type DialSettings struct {
|
type DialSettings struct {
|
||||||
Endpoint string
|
Endpoint string
|
||||||
DefaultEndpoint string
|
DefaultEndpoint string
|
||||||
Scopes []string
|
DefaultMTLSEndpoint string
|
||||||
TokenSource oauth2.TokenSource
|
Scopes []string
|
||||||
Credentials *google.Credentials
|
TokenSource oauth2.TokenSource
|
||||||
CredentialsFile string // if set, Token Source is ignored.
|
Credentials *google.Credentials
|
||||||
CredentialsJSON []byte
|
CredentialsFile string // if set, Token Source is ignored.
|
||||||
UserAgent string
|
CredentialsJSON []byte
|
||||||
APIKey string
|
UserAgent string
|
||||||
Audiences []string
|
APIKey string
|
||||||
HTTPClient *http.Client
|
Audiences []string
|
||||||
GRPCDialOpts []grpc.DialOption
|
HTTPClient *http.Client
|
||||||
GRPCConn *grpc.ClientConn
|
GRPCDialOpts []grpc.DialOption
|
||||||
GRPCConnPool ConnPool
|
GRPCConn *grpc.ClientConn
|
||||||
GRPCConnPoolSize int
|
GRPCConnPool ConnPool
|
||||||
NoAuth bool
|
GRPCConnPoolSize int
|
||||||
TelemetryDisabled bool
|
NoAuth bool
|
||||||
ClientCertSource func(*tls.CertificateRequestInfo) (*tls.Certificate, error)
|
TelemetryDisabled bool
|
||||||
CustomClaims map[string]interface{}
|
ClientCertSource func(*tls.CertificateRequestInfo) (*tls.Certificate, error)
|
||||||
|
CustomClaims map[string]interface{}
|
||||||
|
|
||||||
// Google API system parameters. For more information please read:
|
// Google API system parameters. For more information please read:
|
||||||
// https://cloud.google.com/apis/docs/system-parameters
|
// https://cloud.google.com/apis/docs/system-parameters
|
||||||
|
|
|
@ -24,3 +24,17 @@ func (o defaultEndpointOption) Apply(settings *internal.DialSettings) {
|
||||||
func WithDefaultEndpoint(url string) option.ClientOption {
|
func WithDefaultEndpoint(url string) option.ClientOption {
|
||||||
return defaultEndpointOption(url)
|
return defaultEndpointOption(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type defaultMTLSEndpointOption string
|
||||||
|
|
||||||
|
func (o defaultMTLSEndpointOption) Apply(settings *internal.DialSettings) {
|
||||||
|
settings.DefaultMTLSEndpoint = string(o)
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDefaultMTLSEndpoint is an option that indicates the default mTLS endpoint.
|
||||||
|
//
|
||||||
|
// It should only be used internally by generated clients.
|
||||||
|
//
|
||||||
|
func WithDefaultMTLSEndpoint(url string) option.ClientOption {
|
||||||
|
return defaultMTLSEndpointOption(url)
|
||||||
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"description": "Stores and retrieves potentially large, immutable data objects.",
|
"description": "Stores and retrieves potentially large, immutable data objects.",
|
||||||
"discoveryVersion": "v1",
|
"discoveryVersion": "v1",
|
||||||
"documentationLink": "https://developers.google.com/storage/docs/json_api/",
|
"documentationLink": "https://developers.google.com/storage/docs/json_api/",
|
||||||
"etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/SMGMLKKvE-TZrla7d9TA_SDVTI0\"",
|
"etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/5Ir-e9ddNPcr5skzvRsSnJlvTYg\"",
|
||||||
"icons": {
|
"icons": {
|
||||||
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
|
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
|
||||||
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
|
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
|
||||||
|
@ -1781,7 +1781,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kmsKeyName": {
|
"kmsKeyName": {
|
||||||
"description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
|
"description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.",
|
||||||
"location": "query",
|
"location": "query",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
@ -3229,7 +3229,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"revision": "20200430",
|
"revision": "20200611",
|
||||||
"rootUrl": "https://storage.googleapis.com/",
|
"rootUrl": "https://storage.googleapis.com/",
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"Bucket": {
|
"Bucket": {
|
||||||
|
|
|
@ -2442,7 +2442,7 @@ func (c *BucketAccessControlsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -2590,7 +2590,7 @@ func (c *BucketAccessControlsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -2757,7 +2757,7 @@ func (c *BucketAccessControlsInsertCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -2930,7 +2930,7 @@ func (c *BucketAccessControlsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -3091,7 +3091,7 @@ func (c *BucketAccessControlsPatchCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -3265,7 +3265,7 @@ func (c *BucketAccessControlsUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -3451,7 +3451,7 @@ func (c *BucketsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -3630,7 +3630,7 @@ func (c *BucketsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -3836,7 +3836,7 @@ func (c *BucketsGetIamPolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -4053,7 +4053,7 @@ func (c *BucketsInsertCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -4310,7 +4310,7 @@ func (c *BucketsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -4520,7 +4520,7 @@ func (c *BucketsLockRetentionPolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsLockRetentionPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -4755,7 +4755,7 @@ func (c *BucketsPatchCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -4984,7 +4984,7 @@ func (c *BucketsSetIamPolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -5159,7 +5159,7 @@ func (c *BucketsTestIamPermissionsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -5399,7 +5399,7 @@ func (c *BucketsUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -5611,7 +5611,7 @@ func (c *ChannelsStopCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -5728,7 +5728,7 @@ func (c *DefaultObjectAccessControlsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -5876,7 +5876,7 @@ func (c *DefaultObjectAccessControlsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6044,7 +6044,7 @@ func (c *DefaultObjectAccessControlsInsertCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
|
func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6234,7 +6234,7 @@ func (c *DefaultObjectAccessControlsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6407,7 +6407,7 @@ func (c *DefaultObjectAccessControlsPatchCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
|
func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6581,7 +6581,7 @@ func (c *DefaultObjectAccessControlsUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6753,7 +6753,7 @@ func (c *NotificationsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -6901,7 +6901,7 @@ func (c *NotificationsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7071,7 +7071,7 @@ func (c *NotificationsInsertCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) {
|
func (c *NotificationsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7246,7 +7246,7 @@ func (c *NotificationsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7419,7 +7419,7 @@ func (c *ObjectAccessControlsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7591,7 +7591,7 @@ func (c *ObjectAccessControlsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7782,7 +7782,7 @@ func (c *ObjectAccessControlsInsertCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -7979,7 +7979,7 @@ func (c *ObjectAccessControlsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8164,7 +8164,7 @@ func (c *ObjectAccessControlsPatchCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8362,7 +8362,7 @@ func (c *ObjectAccessControlsUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8547,11 +8547,9 @@ func (c *ObjectsComposeCall) IfMetagenerationMatch(ifMetagenerationMatch int64)
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
// KmsKeyName sets the optional parameter "kmsKeyName": Resource name of
|
// KmsKeyName sets the optional parameter "kmsKeyName": Not currently
|
||||||
// the Cloud KMS key, of the form
|
// supported. Specifying the parameter causes the request to fail with
|
||||||
// projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key,
|
// status code 400 - Bad Request.
|
||||||
// that will be used to encrypt the object. Overrides the object
|
|
||||||
// metadata's kms_key_name value, if any.
|
|
||||||
func (c *ObjectsComposeCall) KmsKeyName(kmsKeyName string) *ObjectsComposeCall {
|
func (c *ObjectsComposeCall) KmsKeyName(kmsKeyName string) *ObjectsComposeCall {
|
||||||
c.urlParams_.Set("kmsKeyName", kmsKeyName)
|
c.urlParams_.Set("kmsKeyName", kmsKeyName)
|
||||||
return c
|
return c
|
||||||
|
@ -8599,7 +8597,7 @@ func (c *ObjectsComposeCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -8718,7 +8716,7 @@ func (c *ObjectsComposeCall) Do(opts ...googleapi.CallOption) (*Object, error) {
|
||||||
// "type": "string"
|
// "type": "string"
|
||||||
// },
|
// },
|
||||||
// "kmsKeyName": {
|
// "kmsKeyName": {
|
||||||
// "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.",
|
// "description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.",
|
||||||
// "location": "query",
|
// "location": "query",
|
||||||
// "type": "string"
|
// "type": "string"
|
||||||
// },
|
// },
|
||||||
|
@ -8942,7 +8940,7 @@ func (c *ObjectsCopyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9270,7 +9268,7 @@ func (c *ObjectsDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9503,7 +9501,7 @@ func (c *ObjectsGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -9753,7 +9751,7 @@ func (c *ObjectsGetIamPolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10070,7 +10068,7 @@ func (c *ObjectsInsertCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10443,7 +10441,7 @@ func (c *ObjectsListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -10760,7 +10758,7 @@ func (c *ObjectsPatchCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11152,7 +11150,7 @@ func (c *ObjectsRewriteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11455,7 +11453,7 @@ func (c *ObjectsSetIamPolicyCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11655,7 +11653,7 @@ func (c *ObjectsTestIamPermissionsCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -11916,7 +11914,7 @@ func (c *ObjectsUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12234,7 +12232,7 @@ func (c *ObjectsWatchAllCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12450,7 +12448,7 @@ func (c *ProjectsHmacKeysCreateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsHmacKeysCreateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12600,7 +12598,7 @@ func (c *ProjectsHmacKeysDeleteCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsHmacKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12735,7 +12733,7 @@ func (c *ProjectsHmacKeysGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsHmacKeysGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -12935,7 +12933,7 @@ func (c *ProjectsHmacKeysListCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsHmacKeysListCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13130,7 +13128,7 @@ func (c *ProjectsHmacKeysUpdateCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsHmacKeysUpdateCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
@ -13307,7 +13305,7 @@ func (c *ProjectsServiceAccountGetCall) Header() http.Header {
|
||||||
|
|
||||||
func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, error) {
|
func (c *ProjectsServiceAccountGetCall) doRequest(alt string) (*http.Response, error) {
|
||||||
reqHeaders := make(http.Header)
|
reqHeaders := make(http.Header)
|
||||||
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200617")
|
reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
|
||||||
for k, v := range c.header_ {
|
for k, v := range c.header_ {
|
||||||
reqHeaders[k] = v
|
reqHeaders[k] = v
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,12 +184,6 @@ func dial(ctx context.Context, insecure bool, o *internal.DialSettings) (*grpc.C
|
||||||
grpcOpts = append(grpcOpts, timeoutDialerOption)
|
grpcOpts = append(grpcOpts, timeoutDialerOption)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(cbro): this is used only by the nightly mtls_smoketest and should
|
|
||||||
// not otherwise be used. It will be removed or renamed at some point.
|
|
||||||
if os.Getenv("GOOGLE_API_USE_MTLS") == "always" {
|
|
||||||
o.Endpoint = generateDefaultMtlsEndpoint(o.Endpoint)
|
|
||||||
}
|
|
||||||
|
|
||||||
return grpc.DialContext(ctx, o.Endpoint, grpcOpts...)
|
return grpc.DialContext(ctx, o.Endpoint, grpcOpts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,6 +294,13 @@ func processAndValidateOpts(opts []option.ClientOption) (*internal.DialSettings,
|
||||||
if err := o.Validate(); err != nil {
|
if err := o.Validate(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE(cbro): this is used only by the nightly mtls_smoketest and should
|
||||||
|
// not otherwise be used. It will be removed or renamed at some point.
|
||||||
|
if os.Getenv("GOOGLE_API_USE_MTLS") == "always" {
|
||||||
|
o.Endpoint = generateDefaultMtlsEndpoint(o.Endpoint)
|
||||||
|
}
|
||||||
|
|
||||||
return &o, nil
|
return &o, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,7 +269,7 @@ func getEndpoint(settings *internal.DialSettings, clientCertSource cert.Source)
|
||||||
if settings.Endpoint == "" {
|
if settings.Endpoint == "" {
|
||||||
mtlsMode := getMTLSMode()
|
mtlsMode := getMTLSMode()
|
||||||
if mtlsMode == mTLSModeAlways || (clientCertSource != nil && mtlsMode == mTLSModeAuto) {
|
if mtlsMode == mTLSModeAlways || (clientCertSource != nil && mtlsMode == mTLSModeAuto) {
|
||||||
return generateDefaultMtlsEndpoint(settings.DefaultEndpoint), nil
|
return settings.DefaultMTLSEndpoint, nil
|
||||||
}
|
}
|
||||||
return settings.DefaultEndpoint, nil
|
return settings.DefaultEndpoint, nil
|
||||||
}
|
}
|
||||||
|
@ -302,26 +302,3 @@ func mergeEndpoints(base, newHost string) (string, error) {
|
||||||
u.Host = newHost
|
u.Host = newHost
|
||||||
return u.String(), nil
|
return u.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// generateDefaultMtlsEndpoint attempts to derive the mTLS version of the
|
|
||||||
// defaultEndpoint via regex, and returns defaultEndpoint if unsuccessful.
|
|
||||||
//
|
|
||||||
// We need to applying the following 2 transformations:
|
|
||||||
// 1. pubsub.googleapis.com to pubsub.mtls.googleapis.com
|
|
||||||
// 2. pubsub.sandbox.googleapis.com to pubsub.mtls.sandbox.googleapis.com
|
|
||||||
//
|
|
||||||
// TODO(andyzhao): In the future, the mTLS endpoint will be read from the Discovery Document
|
|
||||||
// and passed in as defaultMtlsEndpoint instead of generated from defaultEndpoint,
|
|
||||||
// and this function will be removed.
|
|
||||||
func generateDefaultMtlsEndpoint(defaultEndpoint string) string {
|
|
||||||
var domains = []string{
|
|
||||||
".sandbox.googleapis.com", // must come first because .googleapis.com is a substring
|
|
||||||
".googleapis.com",
|
|
||||||
}
|
|
||||||
for _, domain := range domains {
|
|
||||||
if strings.Contains(defaultEndpoint, domain) {
|
|
||||||
return strings.Replace(defaultEndpoint, domain, ".mtls"+domain, -1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return defaultEndpoint
|
|
||||||
}
|
|
||||||
|
|
466
vendor/google.golang.org/genproto/googleapis/devtools/cloudtrace/v2/trace.pb.go
generated
vendored
466
vendor/google.golang.org/genproto/googleapis/devtools/cloudtrace/v2/trace.pb.go
generated
vendored
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2019 Google LLC.
|
// Copyright 2020 Google LLC
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -44,6 +44,81 @@ const (
|
||||||
// of the legacy proto package is being used.
|
// of the legacy proto package is being used.
|
||||||
const _ = proto.ProtoPackageIsVersion4
|
const _ = proto.ProtoPackageIsVersion4
|
||||||
|
|
||||||
|
// Type of span. Can be used to specify additional relationships between spans
|
||||||
|
// in addition to a parent/child relationship.
|
||||||
|
type Span_SpanKind int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Unspecified. Do NOT use as default.
|
||||||
|
// Implementations MAY assume SpanKind.INTERNAL to be default.
|
||||||
|
Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0
|
||||||
|
// Indicates that the span is used internally. Default value.
|
||||||
|
Span_INTERNAL Span_SpanKind = 1
|
||||||
|
// Indicates that the span covers server-side handling of an RPC or other
|
||||||
|
// remote network request.
|
||||||
|
Span_SERVER Span_SpanKind = 2
|
||||||
|
// Indicates that the span covers the client-side wrapper around an RPC or
|
||||||
|
// other remote request.
|
||||||
|
Span_CLIENT Span_SpanKind = 3
|
||||||
|
// Indicates that the span describes producer sending a message to a broker.
|
||||||
|
// Unlike client and server, there is no direct critical path latency
|
||||||
|
// relationship between producer and consumer spans (e.g. publishing a
|
||||||
|
// message to a pubsub service).
|
||||||
|
Span_PRODUCER Span_SpanKind = 4
|
||||||
|
// Indicates that the span describes consumer receiving a message from a
|
||||||
|
// broker. Unlike client and server, there is no direct critical path
|
||||||
|
// latency relationship between producer and consumer spans (e.g. receiving
|
||||||
|
// a message from a pubsub service subscription).
|
||||||
|
Span_CONSUMER Span_SpanKind = 5
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for Span_SpanKind.
|
||||||
|
var (
|
||||||
|
Span_SpanKind_name = map[int32]string{
|
||||||
|
0: "SPAN_KIND_UNSPECIFIED",
|
||||||
|
1: "INTERNAL",
|
||||||
|
2: "SERVER",
|
||||||
|
3: "CLIENT",
|
||||||
|
4: "PRODUCER",
|
||||||
|
5: "CONSUMER",
|
||||||
|
}
|
||||||
|
Span_SpanKind_value = map[string]int32{
|
||||||
|
"SPAN_KIND_UNSPECIFIED": 0,
|
||||||
|
"INTERNAL": 1,
|
||||||
|
"SERVER": 2,
|
||||||
|
"CLIENT": 3,
|
||||||
|
"PRODUCER": 4,
|
||||||
|
"CONSUMER": 5,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x Span_SpanKind) Enum() *Span_SpanKind {
|
||||||
|
p := new(Span_SpanKind)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x Span_SpanKind) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Span_SpanKind) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[0].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Span_SpanKind) Type() protoreflect.EnumType {
|
||||||
|
return &file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x Span_SpanKind) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Span_SpanKind.Descriptor instead.
|
||||||
|
func (Span_SpanKind) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_google_devtools_cloudtrace_v2_trace_proto_rawDescGZIP(), []int{0, 0}
|
||||||
|
}
|
||||||
|
|
||||||
// Indicates whether the message was sent or received.
|
// Indicates whether the message was sent or received.
|
||||||
type Span_TimeEvent_MessageEvent_Type int32
|
type Span_TimeEvent_MessageEvent_Type int32
|
||||||
|
|
||||||
|
@ -81,11 +156,11 @@ func (x Span_TimeEvent_MessageEvent_Type) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Span_TimeEvent_MessageEvent_Type) Descriptor() protoreflect.EnumDescriptor {
|
func (Span_TimeEvent_MessageEvent_Type) Descriptor() protoreflect.EnumDescriptor {
|
||||||
return file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[0].Descriptor()
|
return file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[1].Descriptor()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Span_TimeEvent_MessageEvent_Type) Type() protoreflect.EnumType {
|
func (Span_TimeEvent_MessageEvent_Type) Type() protoreflect.EnumType {
|
||||||
return &file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[0]
|
return &file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x Span_TimeEvent_MessageEvent_Type) Number() protoreflect.EnumNumber {
|
func (x Span_TimeEvent_MessageEvent_Type) Number() protoreflect.EnumNumber {
|
||||||
|
@ -135,11 +210,11 @@ func (x Span_Link_Type) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Span_Link_Type) Descriptor() protoreflect.EnumDescriptor {
|
func (Span_Link_Type) Descriptor() protoreflect.EnumDescriptor {
|
||||||
return file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[1].Descriptor()
|
return file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[2].Descriptor()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Span_Link_Type) Type() protoreflect.EnumType {
|
func (Span_Link_Type) Type() protoreflect.EnumType {
|
||||||
return &file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[1]
|
return &file_google_devtools_cloudtrace_v2_trace_proto_enumTypes[2]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x Span_Link_Type) Number() protoreflect.EnumNumber {
|
func (x Span_Link_Type) Number() protoreflect.EnumNumber {
|
||||||
|
@ -162,7 +237,7 @@ type Span struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// The resource name of the span in the following format:
|
// Required. The resource name of the span in the following format:
|
||||||
//
|
//
|
||||||
// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]
|
// projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]
|
||||||
//
|
//
|
||||||
|
@ -172,12 +247,12 @@ type Span struct {
|
||||||
// [SPAN_ID] is a unique identifier for a span within a trace; it
|
// [SPAN_ID] is a unique identifier for a span within a trace; it
|
||||||
// is a 16-character hexadecimal encoding of an 8-byte array.
|
// is a 16-character hexadecimal encoding of an 8-byte array.
|
||||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
// The [SPAN_ID] portion of the span's resource name.
|
// Required. The [SPAN_ID] portion of the span's resource name.
|
||||||
SpanId string `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
|
SpanId string `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
|
||||||
// The [SPAN_ID] of this span's parent span. If this is a root span,
|
// The [SPAN_ID] of this span's parent span. If this is a root span,
|
||||||
// then this field must be empty.
|
// then this field must be empty.
|
||||||
ParentSpanId string `protobuf:"bytes,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
|
ParentSpanId string `protobuf:"bytes,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
|
||||||
// A description of the span's operation (up to 128 bytes).
|
// Required. A description of the span's operation (up to 128 bytes).
|
||||||
// Stackdriver Trace displays the description in the
|
// Stackdriver Trace displays the description in the
|
||||||
// Google Cloud Platform Console.
|
// Google Cloud Platform Console.
|
||||||
// For example, the display name can be a qualified method name or a file name
|
// For example, the display name can be a qualified method name or a file name
|
||||||
|
@ -185,11 +260,11 @@ type Span struct {
|
||||||
// the same display name within an application and at the same call point.
|
// the same display name within an application and at the same call point.
|
||||||
// This makes it easier to correlate spans in different traces.
|
// This makes it easier to correlate spans in different traces.
|
||||||
DisplayName *TruncatableString `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
|
DisplayName *TruncatableString `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
|
||||||
// The start time of the span. On the client side, this is the time kept by
|
// Required. The start time of the span. On the client side, this is the time kept by
|
||||||
// the local machine where the span execution starts. On the server side, this
|
// the local machine where the span execution starts. On the server side, this
|
||||||
// is the time when the server's application handler starts running.
|
// is the time when the server's application handler starts running.
|
||||||
StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
|
StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
|
||||||
// The end time of the span. On the client side, this is the time kept by
|
// Required. The end time of the span. On the client side, this is the time kept by
|
||||||
// the local machine where the span execution ends. On the server side, this
|
// the local machine where the span execution ends. On the server side, this
|
||||||
// is the time when the server application handler stops running.
|
// is the time when the server application handler stops running.
|
||||||
EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
|
EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
|
||||||
|
@ -213,6 +288,10 @@ type Span struct {
|
||||||
// Optional. The number of child spans that were generated while this span
|
// Optional. The number of child spans that were generated while this span
|
||||||
// was active. If set, allows implementation to detect missing child spans.
|
// was active. If set, allows implementation to detect missing child spans.
|
||||||
ChildSpanCount *wrappers.Int32Value `protobuf:"bytes,13,opt,name=child_span_count,json=childSpanCount,proto3" json:"child_span_count,omitempty"`
|
ChildSpanCount *wrappers.Int32Value `protobuf:"bytes,13,opt,name=child_span_count,json=childSpanCount,proto3" json:"child_span_count,omitempty"`
|
||||||
|
// Optional. Distinguishes between spans generated in a particular context. For example,
|
||||||
|
// two spans with the same name may be distinguished using `CLIENT` (caller)
|
||||||
|
// and `SERVER` (callee) to identify an RPC call.
|
||||||
|
SpanKind Span_SpanKind `protobuf:"varint,14,opt,name=span_kind,json=spanKind,proto3,enum=google.devtools.cloudtrace.v2.Span_SpanKind" json:"span_kind,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Span) Reset() {
|
func (x *Span) Reset() {
|
||||||
|
@ -338,6 +417,13 @@ func (x *Span) GetChildSpanCount() *wrappers.Int32Value {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Span) GetSpanKind() Span_SpanKind {
|
||||||
|
if x != nil {
|
||||||
|
return x.SpanKind
|
||||||
|
}
|
||||||
|
return Span_SPAN_KIND_UNSPECIFIED
|
||||||
|
}
|
||||||
|
|
||||||
// The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
|
// The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.
|
||||||
type AttributeValue struct {
|
type AttributeValue struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
|
@ -639,10 +725,9 @@ type Span_Attributes struct {
|
||||||
// long. The value can be a string up to 256 bytes, a signed 64-bit integer,
|
// long. The value can be a string up to 256 bytes, a signed 64-bit integer,
|
||||||
// or the Boolean values `true` and `false`. For example:
|
// or the Boolean values `true` and `false`. For example:
|
||||||
//
|
//
|
||||||
// "/instance_id": "my-instance"
|
// "/instance_id": { "string_value": { "value": "my-instance" } }
|
||||||
// "/http/user_agent": ""
|
// "/http/request_bytes": { "int_value": 300 }
|
||||||
// "/http/request_bytes": 300
|
// "abc.com/myattribute": { "bool_value": false }
|
||||||
// "abc.com/myattribute": true
|
|
||||||
AttributeMap map[string]*AttributeValue `protobuf:"bytes,1,rep,name=attribute_map,json=attributeMap,proto3" json:"attribute_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
AttributeMap map[string]*AttributeValue `protobuf:"bytes,1,rep,name=attribute_map,json=attributeMap,proto3" json:"attribute_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
// The number of attributes that were discarded. Attributes can be discarded
|
// The number of attributes that were discarded. Attributes can be discarded
|
||||||
// because their keys are too long or because there are too many attributes.
|
// because their keys are too long or because there are too many attributes.
|
||||||
|
@ -1317,19 +1402,19 @@ var file_google_devtools_cloudtrace_v2_trace_proto_rawDesc = []byte{
|
||||||
0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f,
|
0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x2f,
|
||||||
0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x67, 0x6f, 0x6f,
|
0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x67, 0x6f, 0x6f,
|
||||||
0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f,
|
0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f,
|
||||||
0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67,
|
0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67,
|
||||||
0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68,
|
||||||
0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f,
|
||||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76,
|
0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||||
0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
|
||||||
0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70,
|
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
|
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e,
|
0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
|
0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e,
|
||||||
0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7,
|
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0,
|
||||||
0x13, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
0x15, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
0x12, 0x1c, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x12, 0x1c, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x24,
|
0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x24,
|
||||||
|
@ -1381,7 +1466,12 @@ var file_google_devtools_cloudtrace_v2_trace_proto_rawDesc = []byte{
|
||||||
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
|
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
|
||||||
0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x43,
|
0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x43,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x9d, 0x02, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
|
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x09, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x6b, 0x69, 0x6e,
|
||||||
|
0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||||
|
0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74,
|
||||||
|
0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x53, 0x70, 0x61,
|
||||||
|
0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x73, 0x70, 0x61, 0x6e,
|
||||||
|
0x4b, 0x69, 0x6e, 0x64, 0x1a, 0x9d, 0x02, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
|
||||||
0x74, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
|
0x74, 0x65, 0x73, 0x12, 0x65, 0x0a, 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
|
||||||
0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f,
|
0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f,
|
||||||
0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f,
|
0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f,
|
||||||
|
@ -1483,103 +1573,109 @@ var file_google_devtools_cloudtrace_v2_trace_proto_rawDesc = []byte{
|
||||||
0x69, 0x6e, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x6c,
|
0x69, 0x6e, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x6c,
|
||||||
0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x52, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x43, 0x6f,
|
0x52, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x43, 0x6f,
|
||||||
0x75, 0x6e, 0x74, 0x3a, 0x53, 0xea, 0x41, 0x50, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74,
|
0x75, 0x6e, 0x74, 0x22, 0x67, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x12,
|
||||||
0x72, 0x61, 0x63, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
|
0x19, 0x0a, 0x15, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53,
|
||||||
0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
|
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e,
|
||||||
0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x74, 0x72, 0x61,
|
0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x56,
|
||||||
0x63, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x70, 0x61, 0x6e,
|
0x45, 0x52, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x03,
|
||||||
0x73, 0x2f, 0x7b, 0x73, 0x70, 0x61, 0x6e, 0x7d, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x41, 0x74, 0x74,
|
0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c,
|
||||||
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x73,
|
0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x53, 0x55, 0x4d, 0x45, 0x52, 0x10, 0x05, 0x3a, 0x53, 0xea, 0x41,
|
||||||
0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x50, 0x0a, 0x1e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x67, 0x6f,
|
||||||
0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f,
|
0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x70, 0x61,
|
||||||
0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
|
0x6e, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f,
|
||||||
0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72,
|
0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x74, 0x72,
|
||||||
0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c,
|
0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x70, 0x61, 0x6e,
|
||||||
0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
0x7d, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75,
|
0x61, 0x6c, 0x75, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76,
|
||||||
0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c,
|
|
||||||
0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa7, 0x06, 0x0a, 0x0a,
|
|
||||||
0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x73, 0x74,
|
|
||||||
0x61, 0x63, 0x6b, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
|
||||||
0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f,
|
|
||||||
0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32,
|
|
||||||
0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x63,
|
|
||||||
0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72,
|
|
||||||
0x61, 0x6d, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72,
|
|
||||||
0x61, 0x63, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
||||||
0x03, 0x52, 0x10, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x48, 0x61, 0x73,
|
|
||||||
0x68, 0x49, 0x64, 0x1a, 0x81, 0x04, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61,
|
|
||||||
0x6d, 0x65, 0x12, 0x55, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
|
|
||||||
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
|
||||||
0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
|
|
||||||
0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61,
|
|
||||||
0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x75, 0x6e,
|
|
||||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x6f, 0x72, 0x69,
|
|
||||||
0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
|
|
||||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
|
||||||
0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
|
|
||||||
0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61,
|
|
||||||
0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x6f, 0x72, 0x69,
|
|
||||||
0x67, 0x69, 0x6e, 0x61, 0x6c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d,
|
|
||||||
0x65, 0x12, 0x4d, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
|
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65,
|
|
||||||
0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63,
|
|
||||||
0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65,
|
|
||||||
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65,
|
|
||||||
0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
|
|
||||||
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65,
|
|
||||||
0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62,
|
|
||||||
0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
|
|
||||||
0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6d,
|
|
||||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f,
|
|
||||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c,
|
|
||||||
0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
|
|
||||||
0x6c, 0x65, 0x52, 0x0a, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x57,
|
|
||||||
0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
|
||||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
|
||||||
0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72,
|
|
||||||
0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62,
|
|
||||||
0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
|
||||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x8b, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x63,
|
|
||||||
0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x05, 0x66, 0x72, 0x61, 0x6d, 0x65,
|
|
||||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
|
||||||
0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72,
|
|
||||||
0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63,
|
|
||||||
0x65, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x05, 0x66, 0x72,
|
|
||||||
0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x66,
|
|
||||||
0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
||||||
0x05, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73,
|
|
||||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9f, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
|
||||||
0x12, 0x48, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
|
||||||
0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f,
|
|
||||||
0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32,
|
|
||||||
0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69,
|
|
||||||
0x6e, 0x67, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x62, 0x75,
|
|
||||||
0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67,
|
|
||||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63,
|
|
||||||
0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75,
|
|
||||||
0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07,
|
|
||||||
0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x5b, 0x0a, 0x11, 0x54, 0x72, 0x75, 0x6e, 0x63,
|
|
||||||
0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05,
|
|
||||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
|
|
||||||
0x75, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f,
|
|
||||||
0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
|
||||||
0x52, 0x12, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43,
|
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x42, 0xc5, 0x01, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f,
|
|
||||||
0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f,
|
0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f,
|
||||||
0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x54, 0x72, 0x61, 0x63,
|
0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63,
|
||||||
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0b,
|
||||||
0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70,
|
0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f,
|
0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00,
|
||||||
0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72,
|
0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f,
|
||||||
0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63,
|
0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
|
||||||
0x65, 0xaa, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76,
|
||||||
0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67,
|
0x61, 0x6c, 0x75, 0x65, 0x22, 0xa7, 0x06, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72,
|
||||||
0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x5c, 0x56,
|
0x61, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x72, 0x61,
|
||||||
0x32, 0xea, 0x02, 0x18, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75,
|
0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||||
0x64, 0x3a, 0x3a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72,
|
0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
|
||||||
0x6f, 0x74, 0x6f, 0x33,
|
0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54,
|
||||||
|
0x72, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73,
|
||||||
|
0x52, 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2d, 0x0a,
|
||||||
|
0x13, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x68, 0x61, 0x73,
|
||||||
|
0x68, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x74, 0x61, 0x63,
|
||||||
|
0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x48, 0x61, 0x73, 0x68, 0x49, 0x64, 0x1a, 0x81, 0x04, 0x0a,
|
||||||
|
0x0a, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x0d, 0x66,
|
||||||
|
0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74,
|
||||||
|
0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
|
||||||
|
0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74,
|
||||||
|
0x72, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61,
|
||||||
|
0x6d, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x66,
|
||||||
|
0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74,
|
||||||
|
0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
|
||||||
|
0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74,
|
||||||
|
0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x46, 0x75,
|
||||||
|
0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4d, 0x0a, 0x09, 0x66, 0x69,
|
||||||
|
0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e,
|
||||||
|
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e,
|
||||||
|
0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72,
|
||||||
|
0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52,
|
||||||
|
0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x6e,
|
||||||
|
0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
|
||||||
|
0x6c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f,
|
||||||
|
0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||||
|
0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12,
|
||||||
|
0x46, 0x0a, 0x0b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06,
|
||||||
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65,
|
||||||
|
0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63,
|
||||||
|
0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x0a, 0x6c, 0x6f, 0x61,
|
||||||
|
0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||||
|
0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
|
0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c,
|
||||||
|
0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e,
|
||||||
|
0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e,
|
||||||
|
0x67, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||||
|
0x1a, 0x8b, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73,
|
||||||
|
0x12, 0x4a, 0x0a, 0x05, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||||
|
0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c,
|
||||||
|
0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e,
|
||||||
|
0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b,
|
||||||
|
0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x05, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14,
|
||||||
|
0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x63,
|
||||||
|
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70,
|
||||||
|
0x70, 0x65, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9f,
|
||||||
|
0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x6d, 0x6f, 0x64,
|
||||||
|
0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||||
|
0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75,
|
||||||
|
0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61,
|
||||||
|
0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x6d, 0x6f, 0x64,
|
||||||
|
0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18,
|
||||||
|
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64,
|
||||||
|
0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61,
|
||||||
|
0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c,
|
||||||
|
0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64,
|
||||||
|
0x22, 0x5b, 0x0a, 0x11, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53,
|
||||||
|
0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74,
|
||||||
|
0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f,
|
||||||
|
0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x74, 0x72, 0x75, 0x6e, 0x63,
|
||||||
|
0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0xc5, 0x01,
|
||||||
|
0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x65, 0x76,
|
||||||
|
0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65,
|
||||||
|
0x2e, 0x76, 0x32, 0x42, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||||
|
0x01, 0x5a, 0x47, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67,
|
||||||
|
0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
|
||||||
|
0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c,
|
||||||
|
0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x32, 0x3b,
|
||||||
|
0x63, 0x6c, 0x6f, 0x75, 0x64, 0x74, 0x72, 0x61, 0x63, 0x65, 0xaa, 0x02, 0x15, 0x47, 0x6f, 0x6f,
|
||||||
|
0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e,
|
||||||
|
0x56, 0x32, 0xca, 0x02, 0x15, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75,
|
||||||
|
0x64, 0x5c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x5c, 0x56, 0x32, 0xea, 0x02, 0x18, 0x47, 0x6f, 0x6f,
|
||||||
|
0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x54, 0x72, 0x61, 0x63,
|
||||||
|
0x65, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -1594,69 +1690,71 @@ func file_google_devtools_cloudtrace_v2_trace_proto_rawDescGZIP() []byte {
|
||||||
return file_google_devtools_cloudtrace_v2_trace_proto_rawDescData
|
return file_google_devtools_cloudtrace_v2_trace_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_google_devtools_cloudtrace_v2_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_google_devtools_cloudtrace_v2_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||||
var file_google_devtools_cloudtrace_v2_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
var file_google_devtools_cloudtrace_v2_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
|
||||||
var file_google_devtools_cloudtrace_v2_trace_proto_goTypes = []interface{}{
|
var file_google_devtools_cloudtrace_v2_trace_proto_goTypes = []interface{}{
|
||||||
(Span_TimeEvent_MessageEvent_Type)(0), // 0: google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type
|
(Span_SpanKind)(0), // 0: google.devtools.cloudtrace.v2.Span.SpanKind
|
||||||
(Span_Link_Type)(0), // 1: google.devtools.cloudtrace.v2.Span.Link.Type
|
(Span_TimeEvent_MessageEvent_Type)(0), // 1: google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type
|
||||||
(*Span)(nil), // 2: google.devtools.cloudtrace.v2.Span
|
(Span_Link_Type)(0), // 2: google.devtools.cloudtrace.v2.Span.Link.Type
|
||||||
(*AttributeValue)(nil), // 3: google.devtools.cloudtrace.v2.AttributeValue
|
(*Span)(nil), // 3: google.devtools.cloudtrace.v2.Span
|
||||||
(*StackTrace)(nil), // 4: google.devtools.cloudtrace.v2.StackTrace
|
(*AttributeValue)(nil), // 4: google.devtools.cloudtrace.v2.AttributeValue
|
||||||
(*Module)(nil), // 5: google.devtools.cloudtrace.v2.Module
|
(*StackTrace)(nil), // 5: google.devtools.cloudtrace.v2.StackTrace
|
||||||
(*TruncatableString)(nil), // 6: google.devtools.cloudtrace.v2.TruncatableString
|
(*Module)(nil), // 6: google.devtools.cloudtrace.v2.Module
|
||||||
(*Span_Attributes)(nil), // 7: google.devtools.cloudtrace.v2.Span.Attributes
|
(*TruncatableString)(nil), // 7: google.devtools.cloudtrace.v2.TruncatableString
|
||||||
(*Span_TimeEvent)(nil), // 8: google.devtools.cloudtrace.v2.Span.TimeEvent
|
(*Span_Attributes)(nil), // 8: google.devtools.cloudtrace.v2.Span.Attributes
|
||||||
(*Span_TimeEvents)(nil), // 9: google.devtools.cloudtrace.v2.Span.TimeEvents
|
(*Span_TimeEvent)(nil), // 9: google.devtools.cloudtrace.v2.Span.TimeEvent
|
||||||
(*Span_Link)(nil), // 10: google.devtools.cloudtrace.v2.Span.Link
|
(*Span_TimeEvents)(nil), // 10: google.devtools.cloudtrace.v2.Span.TimeEvents
|
||||||
(*Span_Links)(nil), // 11: google.devtools.cloudtrace.v2.Span.Links
|
(*Span_Link)(nil), // 11: google.devtools.cloudtrace.v2.Span.Link
|
||||||
nil, // 12: google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry
|
(*Span_Links)(nil), // 12: google.devtools.cloudtrace.v2.Span.Links
|
||||||
(*Span_TimeEvent_Annotation)(nil), // 13: google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation
|
nil, // 13: google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry
|
||||||
(*Span_TimeEvent_MessageEvent)(nil), // 14: google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent
|
(*Span_TimeEvent_Annotation)(nil), // 14: google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation
|
||||||
(*StackTrace_StackFrame)(nil), // 15: google.devtools.cloudtrace.v2.StackTrace.StackFrame
|
(*Span_TimeEvent_MessageEvent)(nil), // 15: google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent
|
||||||
(*StackTrace_StackFrames)(nil), // 16: google.devtools.cloudtrace.v2.StackTrace.StackFrames
|
(*StackTrace_StackFrame)(nil), // 16: google.devtools.cloudtrace.v2.StackTrace.StackFrame
|
||||||
(*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp
|
(*StackTrace_StackFrames)(nil), // 17: google.devtools.cloudtrace.v2.StackTrace.StackFrames
|
||||||
(*status.Status)(nil), // 18: google.rpc.Status
|
(*timestamp.Timestamp)(nil), // 18: google.protobuf.Timestamp
|
||||||
(*wrappers.BoolValue)(nil), // 19: google.protobuf.BoolValue
|
(*status.Status)(nil), // 19: google.rpc.Status
|
||||||
(*wrappers.Int32Value)(nil), // 20: google.protobuf.Int32Value
|
(*wrappers.BoolValue)(nil), // 20: google.protobuf.BoolValue
|
||||||
|
(*wrappers.Int32Value)(nil), // 21: google.protobuf.Int32Value
|
||||||
}
|
}
|
||||||
var file_google_devtools_cloudtrace_v2_trace_proto_depIdxs = []int32{
|
var file_google_devtools_cloudtrace_v2_trace_proto_depIdxs = []int32{
|
||||||
6, // 0: google.devtools.cloudtrace.v2.Span.display_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
7, // 0: google.devtools.cloudtrace.v2.Span.display_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
17, // 1: google.devtools.cloudtrace.v2.Span.start_time:type_name -> google.protobuf.Timestamp
|
18, // 1: google.devtools.cloudtrace.v2.Span.start_time:type_name -> google.protobuf.Timestamp
|
||||||
17, // 2: google.devtools.cloudtrace.v2.Span.end_time:type_name -> google.protobuf.Timestamp
|
18, // 2: google.devtools.cloudtrace.v2.Span.end_time:type_name -> google.protobuf.Timestamp
|
||||||
7, // 3: google.devtools.cloudtrace.v2.Span.attributes:type_name -> google.devtools.cloudtrace.v2.Span.Attributes
|
8, // 3: google.devtools.cloudtrace.v2.Span.attributes:type_name -> google.devtools.cloudtrace.v2.Span.Attributes
|
||||||
4, // 4: google.devtools.cloudtrace.v2.Span.stack_trace:type_name -> google.devtools.cloudtrace.v2.StackTrace
|
5, // 4: google.devtools.cloudtrace.v2.Span.stack_trace:type_name -> google.devtools.cloudtrace.v2.StackTrace
|
||||||
9, // 5: google.devtools.cloudtrace.v2.Span.time_events:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvents
|
10, // 5: google.devtools.cloudtrace.v2.Span.time_events:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvents
|
||||||
11, // 6: google.devtools.cloudtrace.v2.Span.links:type_name -> google.devtools.cloudtrace.v2.Span.Links
|
12, // 6: google.devtools.cloudtrace.v2.Span.links:type_name -> google.devtools.cloudtrace.v2.Span.Links
|
||||||
18, // 7: google.devtools.cloudtrace.v2.Span.status:type_name -> google.rpc.Status
|
19, // 7: google.devtools.cloudtrace.v2.Span.status:type_name -> google.rpc.Status
|
||||||
19, // 8: google.devtools.cloudtrace.v2.Span.same_process_as_parent_span:type_name -> google.protobuf.BoolValue
|
20, // 8: google.devtools.cloudtrace.v2.Span.same_process_as_parent_span:type_name -> google.protobuf.BoolValue
|
||||||
20, // 9: google.devtools.cloudtrace.v2.Span.child_span_count:type_name -> google.protobuf.Int32Value
|
21, // 9: google.devtools.cloudtrace.v2.Span.child_span_count:type_name -> google.protobuf.Int32Value
|
||||||
6, // 10: google.devtools.cloudtrace.v2.AttributeValue.string_value:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
0, // 10: google.devtools.cloudtrace.v2.Span.span_kind:type_name -> google.devtools.cloudtrace.v2.Span.SpanKind
|
||||||
16, // 11: google.devtools.cloudtrace.v2.StackTrace.stack_frames:type_name -> google.devtools.cloudtrace.v2.StackTrace.StackFrames
|
7, // 11: google.devtools.cloudtrace.v2.AttributeValue.string_value:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
6, // 12: google.devtools.cloudtrace.v2.Module.module:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
17, // 12: google.devtools.cloudtrace.v2.StackTrace.stack_frames:type_name -> google.devtools.cloudtrace.v2.StackTrace.StackFrames
|
||||||
6, // 13: google.devtools.cloudtrace.v2.Module.build_id:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
7, // 13: google.devtools.cloudtrace.v2.Module.module:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
12, // 14: google.devtools.cloudtrace.v2.Span.Attributes.attribute_map:type_name -> google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry
|
7, // 14: google.devtools.cloudtrace.v2.Module.build_id:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
17, // 15: google.devtools.cloudtrace.v2.Span.TimeEvent.time:type_name -> google.protobuf.Timestamp
|
13, // 15: google.devtools.cloudtrace.v2.Span.Attributes.attribute_map:type_name -> google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry
|
||||||
13, // 16: google.devtools.cloudtrace.v2.Span.TimeEvent.annotation:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation
|
18, // 16: google.devtools.cloudtrace.v2.Span.TimeEvent.time:type_name -> google.protobuf.Timestamp
|
||||||
14, // 17: google.devtools.cloudtrace.v2.Span.TimeEvent.message_event:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent
|
14, // 17: google.devtools.cloudtrace.v2.Span.TimeEvent.annotation:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation
|
||||||
8, // 18: google.devtools.cloudtrace.v2.Span.TimeEvents.time_event:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent
|
15, // 18: google.devtools.cloudtrace.v2.Span.TimeEvent.message_event:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent
|
||||||
1, // 19: google.devtools.cloudtrace.v2.Span.Link.type:type_name -> google.devtools.cloudtrace.v2.Span.Link.Type
|
9, // 19: google.devtools.cloudtrace.v2.Span.TimeEvents.time_event:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent
|
||||||
7, // 20: google.devtools.cloudtrace.v2.Span.Link.attributes:type_name -> google.devtools.cloudtrace.v2.Span.Attributes
|
2, // 20: google.devtools.cloudtrace.v2.Span.Link.type:type_name -> google.devtools.cloudtrace.v2.Span.Link.Type
|
||||||
10, // 21: google.devtools.cloudtrace.v2.Span.Links.link:type_name -> google.devtools.cloudtrace.v2.Span.Link
|
8, // 21: google.devtools.cloudtrace.v2.Span.Link.attributes:type_name -> google.devtools.cloudtrace.v2.Span.Attributes
|
||||||
3, // 22: google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry.value:type_name -> google.devtools.cloudtrace.v2.AttributeValue
|
11, // 22: google.devtools.cloudtrace.v2.Span.Links.link:type_name -> google.devtools.cloudtrace.v2.Span.Link
|
||||||
6, // 23: google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.description:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
4, // 23: google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry.value:type_name -> google.devtools.cloudtrace.v2.AttributeValue
|
||||||
7, // 24: google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.attributes:type_name -> google.devtools.cloudtrace.v2.Span.Attributes
|
7, // 24: google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.description:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
0, // 25: google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.type:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type
|
8, // 25: google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation.attributes:type_name -> google.devtools.cloudtrace.v2.Span.Attributes
|
||||||
6, // 26: google.devtools.cloudtrace.v2.StackTrace.StackFrame.function_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
1, // 26: google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.type:type_name -> google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type
|
||||||
6, // 27: google.devtools.cloudtrace.v2.StackTrace.StackFrame.original_function_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
7, // 27: google.devtools.cloudtrace.v2.StackTrace.StackFrame.function_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
6, // 28: google.devtools.cloudtrace.v2.StackTrace.StackFrame.file_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
7, // 28: google.devtools.cloudtrace.v2.StackTrace.StackFrame.original_function_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
5, // 29: google.devtools.cloudtrace.v2.StackTrace.StackFrame.load_module:type_name -> google.devtools.cloudtrace.v2.Module
|
7, // 29: google.devtools.cloudtrace.v2.StackTrace.StackFrame.file_name:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
6, // 30: google.devtools.cloudtrace.v2.StackTrace.StackFrame.source_version:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
6, // 30: google.devtools.cloudtrace.v2.StackTrace.StackFrame.load_module:type_name -> google.devtools.cloudtrace.v2.Module
|
||||||
15, // 31: google.devtools.cloudtrace.v2.StackTrace.StackFrames.frame:type_name -> google.devtools.cloudtrace.v2.StackTrace.StackFrame
|
7, // 31: google.devtools.cloudtrace.v2.StackTrace.StackFrame.source_version:type_name -> google.devtools.cloudtrace.v2.TruncatableString
|
||||||
32, // [32:32] is the sub-list for method output_type
|
16, // 32: google.devtools.cloudtrace.v2.StackTrace.StackFrames.frame:type_name -> google.devtools.cloudtrace.v2.StackTrace.StackFrame
|
||||||
32, // [32:32] is the sub-list for method input_type
|
33, // [33:33] is the sub-list for method output_type
|
||||||
32, // [32:32] is the sub-list for extension type_name
|
33, // [33:33] is the sub-list for method input_type
|
||||||
32, // [32:32] is the sub-list for extension extendee
|
33, // [33:33] is the sub-list for extension type_name
|
||||||
0, // [0:32] is the sub-list for field type_name
|
33, // [33:33] is the sub-list for extension extendee
|
||||||
|
0, // [0:33] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_google_devtools_cloudtrace_v2_trace_proto_init() }
|
func init() { file_google_devtools_cloudtrace_v2_trace_proto_init() }
|
||||||
|
@ -1848,7 +1946,7 @@ func file_google_devtools_cloudtrace_v2_trace_proto_init() {
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_google_devtools_cloudtrace_v2_trace_proto_rawDesc,
|
RawDescriptor: file_google_devtools_cloudtrace_v2_trace_proto_rawDesc,
|
||||||
NumEnums: 2,
|
NumEnums: 3,
|
||||||
NumMessages: 15,
|
NumMessages: 15,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
|
|
3
vendor/google.golang.org/genproto/googleapis/devtools/cloudtrace/v2/tracing.pb.go
generated
vendored
3
vendor/google.golang.org/genproto/googleapis/devtools/cloudtrace/v2/tracing.pb.go
generated
vendored
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2019 Google LLC.
|
// Copyright 2020 Google LLC
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -11,7 +11,6 @@
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
|
||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# This is a helper script for Knative E2E test scripts.
|
# This is a helper script for Knative E2E test scripts.
|
||||||
# See README.md for instructions on how to use it.
|
# See README.md for instructions on how to use it.
|
||||||
|
|
||||||
source $(dirname ${BASH_SOURCE})/library.sh
|
source $(dirname "${BASH_SOURCE[0]}")/library.sh
|
||||||
|
|
||||||
# Build a resource name based on $E2E_BASE_NAME, a suffix and $BUILD_NUMBER.
|
# Build a resource name based on $E2E_BASE_NAME, a suffix and $BUILD_NUMBER.
|
||||||
# Restricts the name length to 40 chars (the limit for resource names in GCP).
|
# Restricts the name length to 40 chars (the limit for resource names in GCP).
|
||||||
|
@ -82,7 +82,7 @@ function go_test_e2e() {
|
||||||
local test_options=""
|
local test_options=""
|
||||||
local go_options=""
|
local go_options=""
|
||||||
[[ ! " $@" == *" -tags="* ]] && go_options="-tags=e2e"
|
[[ ! " $@" == *" -tags="* ]] && go_options="-tags=e2e"
|
||||||
report_go_test -v -race -count=1 ${go_options} $@ ${test_options}
|
report_go_test -v -race -count=1 ${go_options} $@ "${test_options}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Dump info about the test cluster. If dump_extra_cluster_info() is defined, calls it too.
|
# Dump info about the test cluster. If dump_extra_cluster_info() is defined, calls it too.
|
||||||
|
@ -93,32 +93,32 @@ function dump_cluster_state() {
|
||||||
echo "*** Start of information dump ***"
|
echo "*** Start of information dump ***"
|
||||||
echo "***************************************"
|
echo "***************************************"
|
||||||
|
|
||||||
local output="${ARTIFACTS}/k8s.dump-$(basename ${E2E_SCRIPT}).txt"
|
local output="${ARTIFACTS}/k8s.dump-$(basename "${E2E_SCRIPT}").txt"
|
||||||
echo ">>> The dump is located at ${output}"
|
echo ">>> The dump is located at ${output}"
|
||||||
|
|
||||||
for crd in $(kubectl api-resources --verbs=list -o name | sort); do
|
for crd in $(kubectl api-resources --verbs=list -o name | sort); do
|
||||||
local count="$(kubectl get $crd --all-namespaces --no-headers 2>/dev/null | wc -l)"
|
local count="$(kubectl get "$crd" --all-namespaces --no-headers 2>/dev/null | wc -l)"
|
||||||
echo ">>> ${crd} (${count} objects)"
|
echo ">>> ${crd} (${count} objects)"
|
||||||
if [[ "${count}" > "0" ]]; then
|
if [[ "${count}" > "0" ]]; then
|
||||||
echo ">>> ${crd} (${count} objects)" >> ${output}
|
echo ">>> ${crd} (${count} objects)" >> "${output}"
|
||||||
|
|
||||||
echo ">>> Listing" >> ${output}
|
echo ">>> Listing" >> "${output}"
|
||||||
kubectl get ${crd} --all-namespaces >> ${output}
|
kubectl get "${crd}" --all-namespaces >> "${output}"
|
||||||
|
|
||||||
echo ">>> Details" >> ${output}
|
echo ">>> Details" >> "${output}"
|
||||||
if [[ "${crd}" == "secrets" ]]; then
|
if [[ "${crd}" == "secrets" ]]; then
|
||||||
echo "Secrets are ignored for security reasons" >> ${output}
|
echo "Secrets are ignored for security reasons" >> ${output}
|
||||||
elif [[ "${crd}" == "events" ]]; then
|
elif [[ "${crd}" == "events" ]]; then
|
||||||
echo "events are ignored as making a lot of noise" >> ${output}
|
echo "events are ignored as making a lot of noise" >> ${output}
|
||||||
else
|
else
|
||||||
kubectl get ${crd} --all-namespaces -o yaml >> ${output}
|
kubectl get "${crd}" --all-namespaces -o yaml >> "${output}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if function_exists dump_extra_cluster_state; then
|
if function_exists dump_extra_cluster_state; then
|
||||||
echo ">>> Extra dump" >> ${output}
|
echo ">>> Extra dump" >> "${output}"
|
||||||
dump_extra_cluster_state >> ${output}
|
dump_extra_cluster_state >> "${output}"
|
||||||
fi
|
fi
|
||||||
echo "***************************************"
|
echo "***************************************"
|
||||||
echo "*** E2E TEST FAILED ***"
|
echo "*** E2E TEST FAILED ***"
|
||||||
|
@ -135,8 +135,8 @@ function save_metadata() {
|
||||||
geo_key="Zone"
|
geo_key="Zone"
|
||||||
geo_value="${E2E_CLUSTER_REGION}-${E2E_CLUSTER_ZONE}"
|
geo_value="${E2E_CLUSTER_REGION}-${E2E_CLUSTER_ZONE}"
|
||||||
fi
|
fi
|
||||||
local cluster_version="$(gcloud container clusters list --project=${E2E_PROJECT_ID} --format='value(currentMasterVersion)')"
|
local cluster_version="$(gcloud container clusters list --project="${E2E_PROJECT_ID}" --format='value(currentMasterVersion)')"
|
||||||
cat << EOF > ${ARTIFACTS}/metadata.json
|
cat << EOF > "${ARTIFACTS}"/metadata.json
|
||||||
{
|
{
|
||||||
"E2E:${geo_key}": "${geo_value}",
|
"E2E:${geo_key}": "${geo_value}",
|
||||||
"E2E:Machine": "${E2E_CLUSTER_MACHINE}",
|
"E2E:Machine": "${E2E_CLUSTER_MACHINE}",
|
||||||
|
@ -155,7 +155,7 @@ function resolve_k8s_version() {
|
||||||
if [[ "${target_version}" == "default" ]]; then
|
if [[ "${target_version}" == "default" ]]; then
|
||||||
local version="$(gcloud container get-server-config \
|
local version="$(gcloud container get-server-config \
|
||||||
--format='value(defaultClusterVersion)' \
|
--format='value(defaultClusterVersion)' \
|
||||||
--zone=$2)"
|
--zone="$2")"
|
||||||
[[ -z "${version}" ]] && return 1
|
[[ -z "${version}" ]] && return 1
|
||||||
E2E_CLUSTER_VERSION="${version}"
|
E2E_CLUSTER_VERSION="${version}"
|
||||||
echo "Using default version, ${E2E_CLUSTER_VERSION}"
|
echo "Using default version, ${E2E_CLUSTER_VERSION}"
|
||||||
|
@ -164,7 +164,7 @@ function resolve_k8s_version() {
|
||||||
# Fetch valid versions
|
# Fetch valid versions
|
||||||
local versions="$(gcloud container get-server-config \
|
local versions="$(gcloud container get-server-config \
|
||||||
--format='value(validMasterVersions)' \
|
--format='value(validMasterVersions)' \
|
||||||
--zone=$2)"
|
--zone="$2")"
|
||||||
[[ -z "${versions}" ]] && return 1
|
[[ -z "${versions}" ]] && return 1
|
||||||
local gke_versions=($(echo -n "${versions//;/ }"))
|
local gke_versions=($(echo -n "${versions//;/ }"))
|
||||||
echo "Available GKE versions in $2 are [${versions//;/, }]"
|
echo "Available GKE versions in $2 are [${versions//;/, }]"
|
||||||
|
@ -173,7 +173,7 @@ function resolve_k8s_version() {
|
||||||
E2E_CLUSTER_VERSION="${gke_versions[0]}"
|
E2E_CLUSTER_VERSION="${gke_versions[0]}"
|
||||||
echo "Using latest version, ${E2E_CLUSTER_VERSION}"
|
echo "Using latest version, ${E2E_CLUSTER_VERSION}"
|
||||||
else
|
else
|
||||||
local latest="$(echo "${gke_versions[@]}" | tr ' ' '\n' | grep -E ^${target_version} | sort -V | tail -1)"
|
local latest="$(echo "${gke_versions[@]}" | tr ' ' '\n' | grep -E "^${target_version}" | sort -V | tail -1)"
|
||||||
if [[ -z "${latest}" ]]; then
|
if [[ -z "${latest}" ]]; then
|
||||||
echo "ERROR: version ${target_version} is not available"
|
echo "ERROR: version ${target_version} is not available"
|
||||||
return 1
|
return 1
|
||||||
|
@ -215,9 +215,9 @@ function create_test_cluster() {
|
||||||
fi
|
fi
|
||||||
# SSH keys are not used, but kubetest checks for their existence.
|
# SSH keys are not used, but kubetest checks for their existence.
|
||||||
# Touch them so if they don't exist, empty files are create to satisfy the check.
|
# Touch them so if they don't exist, empty files are create to satisfy the check.
|
||||||
mkdir -p $HOME/.ssh
|
mkdir -p "$HOME"/.ssh
|
||||||
touch $HOME/.ssh/google_compute_engine.pub
|
touch "$HOME"/.ssh/google_compute_engine.pub
|
||||||
touch $HOME/.ssh/google_compute_engine
|
touch "$HOME"/.ssh/google_compute_engine
|
||||||
# Assume test failed (see details in set_test_return_code()).
|
# Assume test failed (see details in set_test_return_code()).
|
||||||
set_test_return_code 1
|
set_test_return_code 1
|
||||||
local gcloud_project="${GCP_PROJECT}"
|
local gcloud_project="${GCP_PROJECT}"
|
||||||
|
@ -246,13 +246,13 @@ function create_test_cluster() {
|
||||||
# TODO(adrcunha): Remove once https://github.com/kubernetes/test-infra/issues/13029 is fixed.
|
# TODO(adrcunha): Remove once https://github.com/kubernetes/test-infra/issues/13029 is fixed.
|
||||||
local kubedir="$(mktemp -d -t kubernetes.XXXXXXXXXX)"
|
local kubedir="$(mktemp -d -t kubernetes.XXXXXXXXXX)"
|
||||||
local test_wrapper="${kubedir}/e2e-test.sh"
|
local test_wrapper="${kubedir}/e2e-test.sh"
|
||||||
mkdir ${kubedir}/cluster
|
mkdir "${kubedir}"/cluster
|
||||||
ln -s "$(which kubectl)" ${kubedir}/cluster/kubectl.sh
|
ln -s "$(which kubectl)" "${kubedir}"/cluster/kubectl.sh
|
||||||
echo "#!/usr/bin/env bash" > ${test_wrapper}
|
echo "#!/usr/bin/env bash" > "${test_wrapper}"
|
||||||
echo "cd $(pwd) && set -x" >> ${test_wrapper}
|
echo "cd $(pwd) && set -x" >> "${test_wrapper}"
|
||||||
echo "${E2E_SCRIPT} ${test_cmd_args}" >> ${test_wrapper}
|
echo "${E2E_SCRIPT} ${test_cmd_args}" >> "${test_wrapper}"
|
||||||
chmod +x ${test_wrapper}
|
chmod +x "${test_wrapper}"
|
||||||
cd ${kubedir}
|
cd "${kubedir}"
|
||||||
|
|
||||||
# Create cluster and run the tests
|
# Create cluster and run the tests
|
||||||
create_test_cluster_with_retries "${CLUSTER_CREATION_ARGS[@]}" \
|
create_test_cluster_with_retries "${CLUSTER_CREATION_ARGS[@]}" \
|
||||||
|
@ -266,7 +266,7 @@ function create_test_cluster() {
|
||||||
local result=$(get_test_return_code)
|
local result=$(get_test_return_code)
|
||||||
echo "Artifacts were written to ${ARTIFACTS}"
|
echo "Artifacts were written to ${ARTIFACTS}"
|
||||||
echo "Test result code is ${result}"
|
echo "Test result code is ${result}"
|
||||||
exit ${result}
|
exit "${result}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Retry backup regions/zones if cluster creations failed due to stockout.
|
# Retry backup regions/zones if cluster creations failed due to stockout.
|
||||||
|
@ -296,7 +296,7 @@ function create_test_cluster_with_retries() {
|
||||||
[[ "${E2E_CLUSTER_ZONE}" == "${zone_not_provided}" ]] && E2E_CLUSTER_ZONE=""
|
[[ "${E2E_CLUSTER_ZONE}" == "${zone_not_provided}" ]] && E2E_CLUSTER_ZONE=""
|
||||||
local cluster_creation_zone="${E2E_CLUSTER_REGION}"
|
local cluster_creation_zone="${E2E_CLUSTER_REGION}"
|
||||||
[[ -n "${E2E_CLUSTER_ZONE}" ]] && cluster_creation_zone="${E2E_CLUSTER_REGION}-${E2E_CLUSTER_ZONE}"
|
[[ -n "${E2E_CLUSTER_ZONE}" ]] && cluster_creation_zone="${E2E_CLUSTER_REGION}-${E2E_CLUSTER_ZONE}"
|
||||||
resolve_k8s_version ${e2e_cluster_target_version} ${cluster_creation_zone} || return 1
|
resolve_k8s_version "${e2e_cluster_target_version}" "${cluster_creation_zone}" || return 1
|
||||||
|
|
||||||
header "Creating test cluster ${E2E_CLUSTER_VERSION} in ${cluster_creation_zone}"
|
header "Creating test cluster ${E2E_CLUSTER_VERSION} in ${cluster_creation_zone}"
|
||||||
# Don't fail test for kubetest, as it might incorrectly report test failure
|
# Don't fail test for kubetest, as it might incorrectly report test failure
|
||||||
|
@ -304,17 +304,17 @@ function create_test_cluster_with_retries() {
|
||||||
set +o errexit
|
set +o errexit
|
||||||
export CLUSTER_API_VERSION=${E2E_CLUSTER_VERSION}
|
export CLUSTER_API_VERSION=${E2E_CLUSTER_VERSION}
|
||||||
run_go_tool k8s.io/test-infra/kubetest \
|
run_go_tool k8s.io/test-infra/kubetest \
|
||||||
kubetest "$@" --gcp-region=${cluster_creation_zone} 2>&1 | tee ${cluster_creation_log}
|
kubetest "$@" --gcp-region="${cluster_creation_zone}" 2>&1 | tee "${cluster_creation_log}"
|
||||||
|
|
||||||
# Exit if test succeeded
|
# Exit if test succeeded
|
||||||
[[ "$(get_test_return_code)" == "0" ]] && return 0
|
[[ "$(get_test_return_code)" == "0" ]] && return 0
|
||||||
# Retry if cluster creation failed because of:
|
# Retry if cluster creation failed because of:
|
||||||
# - stockout (https://github.com/knative/test-infra/issues/592)
|
# - stockout (https://github.com/knative/test-infra/issues/592)
|
||||||
# - latest GKE not available in this region/zone yet (https://github.com/knative/test-infra/issues/694)
|
# - latest GKE not available in this region/zone yet (https://github.com/knative/test-infra/issues/694)
|
||||||
[[ -z "$(grep -Fo 'does not have enough resources available to fulfill' ${cluster_creation_log})" \
|
[[ -z "$(grep -Fo 'does not have enough resources available to fulfill' "${cluster_creation_log}")" \
|
||||||
&& -z "$(grep -Fo 'ResponseError: code=400, message=No valid versions with the prefix' ${cluster_creation_log})" \
|
&& -z "$(grep -Fo 'ResponseError: code=400, message=No valid versions with the prefix' "${cluster_creation_log}")" \
|
||||||
&& -z "$(grep -Po 'ResponseError: code=400, message=Master version "[0-9a-z\-\.]+" is unsupported' ${cluster_creation_log})" \
|
&& -z "$(grep -Po 'ResponseError: code=400, message=Master version "[0-9a-z\-\.]+" is unsupported' "${cluster_creation_log}")" \
|
||||||
&& -z "$(grep -Po 'only \d+ nodes out of \d+ have registered; this is likely due to Nodes failing to start correctly' ${cluster_creation_log})" ]] \
|
&& -z "$(grep -Po 'only \d+ nodes out of \d+ have registered; this is likely due to Nodes failing to start correctly' "${cluster_creation_log}")" ]] \
|
||||||
&& return 1
|
&& return 1
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -345,23 +345,23 @@ function setup_test_cluster() {
|
||||||
local k8s_user=$(gcloud config get-value core/account)
|
local k8s_user=$(gcloud config get-value core/account)
|
||||||
local k8s_cluster=$(kubectl config current-context)
|
local k8s_cluster=$(kubectl config current-context)
|
||||||
|
|
||||||
is_protected_cluster ${k8s_cluster} && \
|
is_protected_cluster "${k8s_cluster}" && \
|
||||||
abort "kubeconfig context set to ${k8s_cluster}, which is forbidden"
|
abort "kubeconfig context set to ${k8s_cluster}, which is forbidden"
|
||||||
|
|
||||||
# If cluster admin role isn't set, this is a brand new cluster
|
# If cluster admin role isn't set, this is a brand new cluster
|
||||||
# Setup the admin role and also KO_DOCKER_REPO if it is a GKE cluster
|
# Setup the admin role and also KO_DOCKER_REPO if it is a GKE cluster
|
||||||
if [[ -z "$(kubectl get clusterrolebinding cluster-admin-binding 2> /dev/null)" && "${k8s_cluster}" =~ ^gke_.* ]]; then
|
if [[ -z "$(kubectl get clusterrolebinding cluster-admin-binding 2> /dev/null)" && "${k8s_cluster}" =~ ^gke_.* ]]; then
|
||||||
acquire_cluster_admin_role ${k8s_user} ${E2E_CLUSTER_NAME} ${E2E_CLUSTER_REGION} ${E2E_CLUSTER_ZONE}
|
acquire_cluster_admin_role "${k8s_user}" "${E2E_CLUSTER_NAME}" "${E2E_CLUSTER_REGION}" "${E2E_CLUSTER_ZONE}"
|
||||||
# Incorporate an element of randomness to ensure that each run properly publishes images.
|
# Incorporate an element of randomness to ensure that each run properly publishes images.
|
||||||
export KO_DOCKER_REPO=gcr.io/${E2E_PROJECT_ID}/${E2E_BASE_NAME}-e2e-img/${RANDOM}
|
export KO_DOCKER_REPO=gcr.io/${E2E_PROJECT_ID}/${E2E_BASE_NAME}-e2e-img/${RANDOM}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Safety checks
|
# Safety checks
|
||||||
is_protected_gcr ${KO_DOCKER_REPO} && \
|
is_protected_gcr "${KO_DOCKER_REPO}" && \
|
||||||
abort "\$KO_DOCKER_REPO set to ${KO_DOCKER_REPO}, which is forbidden"
|
abort "\$KO_DOCKER_REPO set to ${KO_DOCKER_REPO}, which is forbidden"
|
||||||
|
|
||||||
# Use default namespace for all subsequent kubectl commands in this context
|
# Use default namespace for all subsequent kubectl commands in this context
|
||||||
kubectl config set-context ${k8s_cluster} --namespace=default
|
kubectl config set-context "${k8s_cluster}" --namespace=default
|
||||||
|
|
||||||
echo "- gcloud project is ${E2E_PROJECT_ID}"
|
echo "- gcloud project is ${E2E_PROJECT_ID}"
|
||||||
echo "- gcloud user is ${k8s_user}"
|
echo "- gcloud user is ${k8s_user}"
|
||||||
|
@ -390,7 +390,7 @@ function setup_test_cluster() {
|
||||||
# Gets the exit of the test script.
|
# Gets the exit of the test script.
|
||||||
# For more details, see set_test_return_code().
|
# For more details, see set_test_return_code().
|
||||||
function get_test_return_code() {
|
function get_test_return_code() {
|
||||||
echo $(cat ${TEST_RESULT_FILE})
|
echo $(cat "${TEST_RESULT_FILE}")
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the return code that the test script will return.
|
# Set the return code that the test script will return.
|
||||||
|
@ -401,7 +401,7 @@ function set_test_return_code() {
|
||||||
# We store the real test result to return it later, ignoring any teardown
|
# We store the real test result to return it later, ignoring any teardown
|
||||||
# failure in kubetest.
|
# failure in kubetest.
|
||||||
# TODO(adrcunha): Get rid of this workaround.
|
# TODO(adrcunha): Get rid of this workaround.
|
||||||
echo -n "$1"> ${TEST_RESULT_FILE}
|
echo -n "$1"> "${TEST_RESULT_FILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Signal (as return code and in the logs) that all E2E tests passed.
|
# Signal (as return code and in the logs) that all E2E tests passed.
|
||||||
|
@ -436,10 +436,10 @@ E2E_SCRIPT_CUSTOM_FLAGS=()
|
||||||
|
|
||||||
# Parse flags and initialize the test cluster.
|
# Parse flags and initialize the test cluster.
|
||||||
function initialize() {
|
function initialize() {
|
||||||
E2E_SCRIPT="$(get_canonical_path $0)"
|
E2E_SCRIPT="$(get_canonical_path "$0")"
|
||||||
E2E_CLUSTER_VERSION="${SERVING_GKE_VERSION}"
|
E2E_CLUSTER_VERSION="${SERVING_GKE_VERSION}"
|
||||||
|
|
||||||
cd ${REPO_ROOT_DIR}
|
cd "${REPO_ROOT_DIR}"
|
||||||
while [[ $# -ne 0 ]]; do
|
while [[ $# -ne 0 ]]; do
|
||||||
local parameter=$1
|
local parameter=$1
|
||||||
# Try parsing flag as a custom one.
|
# Try parsing flag as a custom one.
|
||||||
|
|
|
@ -65,7 +65,7 @@ fi
|
||||||
# Print error message and exit 1
|
# Print error message and exit 1
|
||||||
# Parameters: $1..$n - error message to be displayed
|
# Parameters: $1..$n - error message to be displayed
|
||||||
function abort() {
|
function abort() {
|
||||||
echo "error: $@"
|
echo "error: $*"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,9 +643,9 @@ function remove_broken_symlinks() {
|
||||||
local target="$(ls -l ${link})"
|
local target="$(ls -l ${link})"
|
||||||
target="${target##* -> }"
|
target="${target##* -> }"
|
||||||
[[ ${target} == /* ]] || target="./${target}"
|
[[ ${target} == /* ]] || target="./${target}"
|
||||||
target="$(cd `dirname ${link}` && cd ${target%/*} && echo $PWD/${target##*/})"
|
target="$(cd `dirname "${link}"` && cd "${target%/*}" && echo "$PWD"/"${target##*/}")"
|
||||||
if [[ ${target} != *github.com/knative/* && ${target} != *knative.dev/* ]]; then
|
if [[ ${target} != *github.com/knative/* && ${target} != *knative.dev/* ]]; then
|
||||||
unlink ${link}
|
unlink "${link}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -659,7 +659,7 @@ function get_canonical_path() {
|
||||||
local path=$1
|
local path=$1
|
||||||
local pwd=${2:-.}
|
local pwd=${2:-.}
|
||||||
[[ ${path} == /* ]] || path="${pwd}/${path}"
|
[[ ${path} == /* ]] || path="${pwd}/${path}"
|
||||||
echo "$(cd ${path%/*} && echo $PWD/${path##*/})"
|
echo "$(cd "${path%/*}" && echo "$PWD"/"${path##*/}")"
|
||||||
}
|
}
|
||||||
|
|
||||||
# List changed files in the current PR.
|
# List changed files in the current PR.
|
||||||
|
@ -670,7 +670,7 @@ function list_changed_files() {
|
||||||
# Avoid warning when there are more than 1085 files renamed:
|
# Avoid warning when there are more than 1085 files renamed:
|
||||||
# https://stackoverflow.com/questions/7830728/warning-on-diff-renamelimit-variable-when-doing-git-push
|
# https://stackoverflow.com/questions/7830728/warning-on-diff-renamelimit-variable-when-doing-git-push
|
||||||
git config diff.renames 0
|
git config diff.renames 0
|
||||||
git --no-pager diff --name-only ${PULL_BASE_SHA}..${PULL_PULL_SHA}
|
git --no-pager diff --name-only "${PULL_BASE_SHA}".."${PULL_PULL_SHA}"
|
||||||
else
|
else
|
||||||
# Do our best if not running in Prow
|
# Do our best if not running in Prow
|
||||||
git diff --name-only HEAD^
|
git diff --name-only HEAD^
|
||||||
|
@ -705,7 +705,7 @@ function get_latest_knative_yaml_source() {
|
||||||
local major_minor="${branch_name##release-}"
|
local major_minor="${branch_name##release-}"
|
||||||
# Find the latest release manifest with the same major&minor version.
|
# Find the latest release manifest with the same major&minor version.
|
||||||
local yaml_source_path="$(
|
local yaml_source_path="$(
|
||||||
gsutil ls gs://knative-releases/${repo_name}/previous/v${major_minor}.*/${yaml_name}.yaml 2> /dev/null \
|
gsutil ls "gs://knative-releases/${repo_name}/previous/v${major_minor}.*/${yaml_name}.yaml" 2> /dev/null \
|
||||||
| sort \
|
| sort \
|
||||||
| tail -n 1 \
|
| tail -n 1 \
|
||||||
| cut -b6-)"
|
| cut -b6-)"
|
||||||
|
@ -745,8 +745,8 @@ function shellcheck_new_files() {
|
||||||
# Initializations that depend on previous functions.
|
# Initializations that depend on previous functions.
|
||||||
# These MUST come last.
|
# These MUST come last.
|
||||||
|
|
||||||
readonly _TEST_INFRA_SCRIPTS_DIR="$(dirname $(get_canonical_path ${BASH_SOURCE[0]}))"
|
readonly _TEST_INFRA_SCRIPTS_DIR="$(dirname $(get_canonical_path "${BASH_SOURCE[0]}"))"
|
||||||
readonly REPO_NAME_FORMATTED="Knative $(capitalize ${REPO_NAME//-/ })"
|
readonly REPO_NAME_FORMATTED="Knative $(capitalize "${REPO_NAME//-/ }")"
|
||||||
|
|
||||||
# Public latest nightly or release yaml files.
|
# Public latest nightly or release yaml files.
|
||||||
readonly KNATIVE_SERVING_RELEASE_CRDS="$(get_latest_knative_yaml_source "serving" "serving-crds")"
|
readonly KNATIVE_SERVING_RELEASE_CRDS="$(get_latest_knative_yaml_source "serving" "serving-crds")"
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# This is a helper script for Knative performance test scripts.
|
# This is a helper script for Knative performance test scripts.
|
||||||
# See README.md for instructions on how to use it.
|
# See README.md for instructions on how to use it.
|
||||||
|
|
||||||
source $(dirname ${BASH_SOURCE})/library.sh
|
source $(dirname "${BASH_SOURCE[0]}")/library.sh
|
||||||
|
|
||||||
# Configurable parameters.
|
# Configurable parameters.
|
||||||
# If not provided, they will fall back to the default values.
|
# If not provided, they will fall back to the default values.
|
||||||
|
@ -37,9 +37,9 @@ readonly SLACK_WRITE_TOKEN="/etc/performance-test/slack-write-token"
|
||||||
function setup_user() {
|
function setup_user() {
|
||||||
echo ">> Setting up user"
|
echo ">> Setting up user"
|
||||||
echo "Using gcloud user ${SERVICE_ACCOUNT_NAME}"
|
echo "Using gcloud user ${SERVICE_ACCOUNT_NAME}"
|
||||||
gcloud config set core/account ${SERVICE_ACCOUNT_NAME}
|
gcloud config set core/account "${SERVICE_ACCOUNT_NAME}"
|
||||||
echo "Using gcloud project ${PROJECT_NAME}"
|
echo "Using gcloud project ${PROJECT_NAME}"
|
||||||
gcloud config set core/project ${PROJECT_NAME}
|
gcloud config set core/project "${PROJECT_NAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Update resources installed on the cluster.
|
# Update resources installed on the cluster.
|
||||||
|
@ -48,7 +48,7 @@ function setup_user() {
|
||||||
function update_cluster() {
|
function update_cluster() {
|
||||||
# --zone option can work with both region and zone, (e.g. us-central1 and
|
# --zone option can work with both region and zone, (e.g. us-central1 and
|
||||||
# us-central1-a), so we don't need to add extra check here.
|
# us-central1-a), so we don't need to add extra check here.
|
||||||
gcloud container clusters get-credentials $1 --zone=$2 --project=${PROJECT_NAME} || abort "failed to get cluster creds"
|
gcloud container clusters get-credentials "$1" --zone="$2" --project="${PROJECT_NAME}" || abort "failed to get cluster creds"
|
||||||
# Set up the configmap to run benchmarks in production
|
# Set up the configmap to run benchmarks in production
|
||||||
echo ">> Setting up 'prod' config-mako on cluster $1 in zone $2"
|
echo ">> Setting up 'prod' config-mako on cluster $1 in zone $2"
|
||||||
cat <<EOF | kubectl apply -f -
|
cat <<EOF | kubectl apply -f -
|
||||||
|
@ -76,9 +76,9 @@ EOF
|
||||||
update_knative || abort "failed to update knative"
|
update_knative || abort "failed to update knative"
|
||||||
fi
|
fi
|
||||||
# get benchmark name from the cluster name
|
# get benchmark name from the cluster name
|
||||||
local benchmark_name=$(get_benchmark_name $1)
|
local benchmark_name=$(get_benchmark_name "$1")
|
||||||
if function_exists update_benchmark; then
|
if function_exists update_benchmark; then
|
||||||
update_benchmark ${benchmark_name} || abort "failed to update benchmark"
|
update_benchmark "${benchmark_name}" || abort "failed to update benchmark"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,14 +86,14 @@ EOF
|
||||||
# Parameters: $1 - cluster name
|
# Parameters: $1 - cluster name
|
||||||
function get_benchmark_name() {
|
function get_benchmark_name() {
|
||||||
# get benchmark_name by removing the prefix from cluster name, e.g. get "load-test" from "serving--load-test"
|
# get benchmark_name by removing the prefix from cluster name, e.g. get "load-test" from "serving--load-test"
|
||||||
echo ${1#$REPO_NAME"--"}
|
echo "${1#$REPO_NAME"--"}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Update the clusters related to the current repo.
|
# Update the clusters related to the current repo.
|
||||||
function update_clusters() {
|
function update_clusters() {
|
||||||
header "Updating all clusters for ${REPO_NAME}"
|
header "Updating all clusters for ${REPO_NAME}"
|
||||||
local all_clusters=$(gcloud container clusters list --project="${PROJECT_NAME}" --format="csv[no-heading](name,zone)")
|
local all_clusters=$(gcloud container clusters list --project="${PROJECT_NAME}" --format="csv[no-heading](name,zone)")
|
||||||
echo ">> Project contains clusters:" ${all_clusters}
|
echo ">> Project contains clusters:" "${all_clusters}"
|
||||||
for cluster in ${all_clusters}; do
|
for cluster in ${all_clusters}; do
|
||||||
local name=$(echo "${cluster}" | cut -f1 -d",")
|
local name=$(echo "${cluster}" | cut -f1 -d",")
|
||||||
# the cluster name is prefixed with "${REPO_NAME}--", here we should only handle clusters belonged to the current repo
|
# the cluster name is prefixed with "${REPO_NAME}--", here we should only handle clusters belonged to the current repo
|
||||||
|
@ -101,7 +101,7 @@ function update_clusters() {
|
||||||
local zone=$(echo "${cluster}" | cut -f2 -d",")
|
local zone=$(echo "${cluster}" | cut -f2 -d",")
|
||||||
|
|
||||||
# Update all resources installed on the cluster
|
# Update all resources installed on the cluster
|
||||||
update_cluster ${name} ${zone}
|
update_cluster "${name}" "${zone}"
|
||||||
done
|
done
|
||||||
header "Done updating all clusters"
|
header "Done updating all clusters"
|
||||||
}
|
}
|
||||||
|
@ -109,14 +109,14 @@ function update_clusters() {
|
||||||
# Run the perf-tests tool
|
# Run the perf-tests tool
|
||||||
# Parameters: $1..$n - parameters passed to the tool
|
# Parameters: $1..$n - parameters passed to the tool
|
||||||
function run_perf_cluster_tool() {
|
function run_perf_cluster_tool() {
|
||||||
go run ${REPO_ROOT_DIR}/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests $@
|
go run "${REPO_ROOT_DIR}"/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Delete the old clusters belonged to the current repo, and recreate them with the same configuration.
|
# Delete the old clusters belonged to the current repo, and recreate them with the same configuration.
|
||||||
function recreate_clusters() {
|
function recreate_clusters() {
|
||||||
header "Recreating clusters for ${REPO_NAME}"
|
header "Recreating clusters for ${REPO_NAME}"
|
||||||
run_perf_cluster_tool --recreate \
|
run_perf_cluster_tool --recreate \
|
||||||
--gcp-project=${PROJECT_NAME} --repository=${REPO_NAME} --benchmark-root=${BENCHMARK_ROOT_PATH} \
|
--gcp-project="${PROJECT_NAME}" --repository="${REPO_NAME}" --benchmark-root="${BENCHMARK_ROOT_PATH}" \
|
||||||
|| abort "failed recreating clusters for ${REPO_NAME}"
|
|| abort "failed recreating clusters for ${REPO_NAME}"
|
||||||
header "Done recreating clusters"
|
header "Done recreating clusters"
|
||||||
# Update all clusters after they are recreated
|
# Update all clusters after they are recreated
|
||||||
|
@ -128,7 +128,7 @@ function recreate_clusters() {
|
||||||
function reconcile_benchmark_clusters() {
|
function reconcile_benchmark_clusters() {
|
||||||
header "Reconciling clusters for ${REPO_NAME}"
|
header "Reconciling clusters for ${REPO_NAME}"
|
||||||
run_perf_cluster_tool --reconcile \
|
run_perf_cluster_tool --reconcile \
|
||||||
--gcp-project=${PROJECT_NAME} --repository=${REPO_NAME} --benchmark-root=${BENCHMARK_ROOT_PATH} \
|
--gcp-project="${PROJECT_NAME}" --repository="${REPO_NAME}" --benchmark-root="${BENCHMARK_ROOT_PATH}" \
|
||||||
|| abort "failed reconciling clusters for ${REPO_NAME}"
|
|| abort "failed reconciling clusters for ${REPO_NAME}"
|
||||||
header "Done reconciling clusters"
|
header "Done reconciling clusters"
|
||||||
# For now, do nothing after reconciling the clusters, and the next update_clusters job will automatically
|
# For now, do nothing after reconciling the clusters, and the next update_clusters job will automatically
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# This is a helper script for Knative presubmit test scripts.
|
# This is a helper script for Knative presubmit test scripts.
|
||||||
# See README.md for instructions on how to use it.
|
# See README.md for instructions on how to use it.
|
||||||
|
|
||||||
source $(dirname ${BASH_SOURCE})/library.sh
|
source $(dirname "${BASH_SOURCE[0]}")/library.sh
|
||||||
|
|
||||||
# Custom configuration of presubmit tests
|
# Custom configuration of presubmit tests
|
||||||
readonly DISABLE_MD_LINTING=${DISABLE_MD_LINTING:-0}
|
readonly DISABLE_MD_LINTING=${DISABLE_MD_LINTING:-0}
|
||||||
|
@ -113,7 +113,7 @@ function report_build_test() {
|
||||||
local report_name="$1"
|
local report_name="$1"
|
||||||
shift
|
shift
|
||||||
local errors=""
|
local errors=""
|
||||||
capture_output "${report}" "$@" || errors="$(cat ${report})"
|
capture_output "${report}" "$@" || errors="$(cat "${report}")"
|
||||||
create_junit_xml _build_tests "${report_name}" "${errors}"
|
create_junit_xml _build_tests "${report_name}" "${errors}"
|
||||||
[[ -z "${errors}" ]]
|
[[ -z "${errors}" ]]
|
||||||
}
|
}
|
||||||
|
@ -130,11 +130,11 @@ function markdown_build_tests() {
|
||||||
local failed=0
|
local failed=0
|
||||||
if (( ! DISABLE_MD_LINTING )); then
|
if (( ! DISABLE_MD_LINTING )); then
|
||||||
subheader "Linting the markdown files"
|
subheader "Linting the markdown files"
|
||||||
report_build_test Markdown_Lint lint_markdown ${mdfiles} || failed=1
|
report_build_test Markdown_Lint lint_markdown "${mdfiles}" || failed=1
|
||||||
fi
|
fi
|
||||||
if (( ! DISABLE_MD_LINK_CHECK )); then
|
if (( ! DISABLE_MD_LINK_CHECK )); then
|
||||||
subheader "Checking links in the markdown files"
|
subheader "Checking links in the markdown files"
|
||||||
report_build_test Markdown_Link check_links_in_markdown ${mdfiles} || failed=1
|
report_build_test Markdown_Link check_links_in_markdown "${mdfiles}" || failed=1
|
||||||
fi
|
fi
|
||||||
return ${failed}
|
return ${failed}
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ function default_build_test_runner() {
|
||||||
| sort | uniq | tr '\n' ' ')"
|
| sort | uniq | tr '\n' ' ')"
|
||||||
for pkg in ${tagged_pkgs}; do
|
for pkg in ${tagged_pkgs}; do
|
||||||
# `go test -c` lets us compile the tests but do not run them.
|
# `go test -c` lets us compile the tests but do not run them.
|
||||||
if ! capture_output "${report}" go test -c -tags="${tags}" ${pkg} ; then
|
if ! capture_output "${report}" go test -c -tags="${tags}" "${pkg}" ; then
|
||||||
failed=1
|
failed=1
|
||||||
# Consider an error message everything that's not a successful test result.
|
# Consider an error message everything that's not a successful test result.
|
||||||
errors_go2+="$(grep -v '^\(ok\|\?\)\s\+\(github\.com\|knative\.dev\)/' "${report}")"
|
errors_go2+="$(grep -v '^\(ok\|\?\)\s\+\(github\.com\|knative\.dev\)/' "${report}")"
|
||||||
|
@ -266,6 +266,8 @@ function run_integration_tests() {
|
||||||
|
|
||||||
# Default integration test runner that runs all `test/e2e-*tests.sh`.
|
# Default integration test runner that runs all `test/e2e-*tests.sh`.
|
||||||
function default_integration_test_runner() {
|
function default_integration_test_runner() {
|
||||||
|
# options is always empty.
|
||||||
|
# TODO: remove it or indeed allow passing options.
|
||||||
local options=""
|
local options=""
|
||||||
local failed=0
|
local failed=0
|
||||||
for e2e_test in $(find test/ -name e2e-*tests.sh); do
|
for e2e_test in $(find test/ -name e2e-*tests.sh); do
|
||||||
|
@ -324,7 +326,7 @@ function main() {
|
||||||
echo ">> node name"
|
echo ">> node name"
|
||||||
echo "$(curl -H "Metadata-Flavor: Google" 'http://169.254.169.254/computeMetadata/v1/instance/name' 2> /dev/null)"
|
echo "$(curl -H "Metadata-Flavor: Google" 'http://169.254.169.254/computeMetadata/v1/instance/name' 2> /dev/null)"
|
||||||
echo ">> pod name"
|
echo ">> pod name"
|
||||||
echo ${HOSTNAME}
|
echo "${HOSTNAME}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z $1 ]] && set -- "--all-tests"
|
[[ -z $1 ]] && set -- "--all-tests"
|
||||||
|
@ -357,7 +359,7 @@ function main() {
|
||||||
readonly RUN_INTEGRATION_TESTS
|
readonly RUN_INTEGRATION_TESTS
|
||||||
readonly TESTS_TO_RUN
|
readonly TESTS_TO_RUN
|
||||||
|
|
||||||
cd ${REPO_ROOT_DIR}
|
cd "${REPO_ROOT_DIR}" || exit
|
||||||
|
|
||||||
# Tests to be performed, in the right order if --all-tests is passed.
|
# Tests to be performed, in the right order if --all-tests is passed.
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# This is a helper script for Knative release scripts.
|
# This is a helper script for Knative release scripts.
|
||||||
# See README.md for instructions on how to use it.
|
# See README.md for instructions on how to use it.
|
||||||
|
|
||||||
source $(dirname ${BASH_SOURCE})/library.sh
|
source $(dirname "${BASH_SOURCE[0]}")/library.sh
|
||||||
|
|
||||||
# Organization name in GitHub; defaults to Knative.
|
# Organization name in GitHub; defaults to Knative.
|
||||||
readonly ORG_NAME="${ORG_NAME:-knative}"
|
readonly ORG_NAME="${ORG_NAME:-knative}"
|
||||||
|
@ -50,9 +50,9 @@ function tag_images_in_yamls() {
|
||||||
for file in $@; do
|
for file in $@; do
|
||||||
[[ "${file##*.}" != "yaml" ]] && continue
|
[[ "${file##*.}" != "yaml" ]] && continue
|
||||||
echo "Inspecting ${file}"
|
echo "Inspecting ${file}"
|
||||||
for image in $(grep -o "${DOCKER_BASE}/[a-z\./-]\+@sha256:[0-9a-f]\+" ${file}); do
|
for image in $(grep -o "${DOCKER_BASE}/[a-z\./-]\+@sha256:[0-9a-f]\+" "${file}"); do
|
||||||
for region in "" ${GEO_REGIONS// /. }; do
|
for region in "" ${GEO_REGIONS// /. }; do
|
||||||
gcloud -q container images add-tag ${image} ${region}${image%%@*}:${TAG}
|
gcloud -q container images add-tag "${image}" "${region}${image%%@*}:${TAG}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -66,16 +66,16 @@ function publish_to_gcs() {
|
||||||
local DEST="gs://${RELEASE_GCS_BUCKET}/$1/"
|
local DEST="gs://${RELEASE_GCS_BUCKET}/$1/"
|
||||||
shift
|
shift
|
||||||
echo "Publishing [$@] to ${DEST}"
|
echo "Publishing [$@] to ${DEST}"
|
||||||
gsutil -m cp $@ ${DEST}
|
gsutil -m cp $@ "${DEST}"
|
||||||
}
|
}
|
||||||
# Before publishing the files, cleanup the `latest` dir if it exists.
|
# Before publishing the files, cleanup the `latest` dir if it exists.
|
||||||
local latest_dir="gs://${RELEASE_GCS_BUCKET}/latest"
|
local latest_dir="gs://${RELEASE_GCS_BUCKET}/latest"
|
||||||
if [[ -n "$(gsutil ls ${latest_dir} 2> /dev/null)" ]]; then
|
if [[ -n "$(gsutil ls "${latest_dir}" 2> /dev/null)" ]]; then
|
||||||
echo "Cleaning up '${latest_dir}' first"
|
echo "Cleaning up '${latest_dir}' first"
|
||||||
gsutil -m rm ${latest_dir}/**
|
gsutil -m rm "${latest_dir}"/**
|
||||||
fi
|
fi
|
||||||
verbose_gsutil_cp latest $@
|
verbose_gsutil_cp latest $@
|
||||||
[[ -n ${TAG} ]] && verbose_gsutil_cp previous/${TAG} $@
|
[[ -n ${TAG} ]] && verbose_gsutil_cp previous/"${TAG}" $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# These are global environment variables.
|
# These are global environment variables.
|
||||||
|
@ -113,7 +113,7 @@ function hub_tool() {
|
||||||
function git_push() {
|
function git_push() {
|
||||||
local repo_url="${REPO_UPSTREAM}"
|
local repo_url="${REPO_UPSTREAM}"
|
||||||
[[ -n "${GITHUB_TOKEN}}" ]] && repo_url="${repo_url/:\/\//:\/\/${GITHUB_TOKEN}@}"
|
[[ -n "${GITHUB_TOKEN}}" ]] && repo_url="${repo_url/:\/\//:\/\/${GITHUB_TOKEN}@}"
|
||||||
git push ${repo_url} $@
|
git push "${repo_url}" $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return the master version of a release.
|
# Return the master version of a release.
|
||||||
|
@ -148,14 +148,14 @@ function setup_upstream() {
|
||||||
echo "Remote upstream URL is '${upstream}'"
|
echo "Remote upstream URL is '${upstream}'"
|
||||||
if [[ -z "${upstream}" ]]; then
|
if [[ -z "${upstream}" ]]; then
|
||||||
echo "Setting remote upstream URL to '${REPO_UPSTREAM}'"
|
echo "Setting remote upstream URL to '${REPO_UPSTREAM}'"
|
||||||
git remote add upstream ${REPO_UPSTREAM}
|
git remote add upstream "${REPO_UPSTREAM}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fetch the release branch, so we can check it out.
|
# Fetch the release branch, so we can check it out.
|
||||||
function setup_branch() {
|
function setup_branch() {
|
||||||
[[ -z "${RELEASE_BRANCH}" ]] && return
|
[[ -z "${RELEASE_BRANCH}" ]] && return
|
||||||
git fetch ${REPO_UPSTREAM} ${RELEASE_BRANCH}:upstream/${RELEASE_BRANCH}
|
git fetch "${REPO_UPSTREAM}" "${RELEASE_BRANCH}:upstream/${RELEASE_BRANCH}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup version, branch and release notes for a auto release.
|
# Setup version, branch and release notes for a auto release.
|
||||||
|
@ -168,8 +168,8 @@ function prepare_auto_release() {
|
||||||
local tags="$(git tag | cut -d 'v' -f2 | cut -d '.' -f1-2 | sort -V | uniq)"
|
local tags="$(git tag | cut -d 'v' -f2 | cut -d '.' -f1-2 | sort -V | uniq)"
|
||||||
local branches="$( { (git branch -r | grep upstream/release-) ; (git branch | grep release-); } | cut -d '-' -f2 | sort -V | uniq)"
|
local branches="$( { (git branch -r | grep upstream/release-) ; (git branch | grep release-); } | cut -d '-' -f2 | sort -V | uniq)"
|
||||||
|
|
||||||
echo "Versions released (from tags): [" ${tags} "]"
|
echo "Versions released (from tags): [" "${tags}" "]"
|
||||||
echo "Versions released (from branches): [" ${branches} "]"
|
echo "Versions released (from branches): [" "${branches}" "]"
|
||||||
|
|
||||||
local release_number=""
|
local release_number=""
|
||||||
for i in ${branches}; do
|
for i in ${branches}; do
|
||||||
|
@ -192,7 +192,7 @@ function prepare_auto_release() {
|
||||||
# If --release-notes not used, add a placeholder
|
# If --release-notes not used, add a placeholder
|
||||||
if [[ -z "${RELEASE_NOTES}" ]]; then
|
if [[ -z "${RELEASE_NOTES}" ]]; then
|
||||||
RELEASE_NOTES="$(mktemp)"
|
RELEASE_NOTES="$(mktemp)"
|
||||||
echo "[add release notes here]" > ${RELEASE_NOTES}
|
echo "[add release notes here]" > "${RELEASE_NOTES}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ function prepare_dot_release() {
|
||||||
if [[ -z "${RELEASE_BRANCH}" ]]; then
|
if [[ -z "${RELEASE_BRANCH}" ]]; then
|
||||||
echo "Last release is ${last_version}"
|
echo "Last release is ${last_version}"
|
||||||
# Determine branch
|
# Determine branch
|
||||||
major_minor_version="$(master_version ${last_version})"
|
major_minor_version="$(master_version "${last_version}")"
|
||||||
RELEASE_BRANCH="release-${major_minor_version}"
|
RELEASE_BRANCH="release-${major_minor_version}"
|
||||||
echo "Last release branch is ${RELEASE_BRANCH}"
|
echo "Last release branch is ${RELEASE_BRANCH}"
|
||||||
else
|
else
|
||||||
|
@ -227,8 +227,8 @@ function prepare_dot_release() {
|
||||||
[[ -n "${major_minor_version}" ]] || abort "cannot get release major/minor version"
|
[[ -n "${major_minor_version}" ]] || abort "cannot get release major/minor version"
|
||||||
# Ensure there are new commits in the branch, otherwise we don't create a new release
|
# Ensure there are new commits in the branch, otherwise we don't create a new release
|
||||||
setup_branch
|
setup_branch
|
||||||
local last_release_commit="$(git rev-list -n 1 ${last_version})"
|
local last_release_commit="$(git rev-list -n 1 "${last_version}")"
|
||||||
local release_branch_commit="$(git rev-list -n 1 upstream/${RELEASE_BRANCH})"
|
local release_branch_commit="$(git rev-list -n 1 upstream/"${RELEASE_BRANCH}")"
|
||||||
[[ -n "${last_release_commit}" ]] || abort "cannot get last release commit"
|
[[ -n "${last_release_commit}" ]] || abort "cannot get last release commit"
|
||||||
[[ -n "${release_branch_commit}" ]] || abort "cannot get release branch last commit"
|
[[ -n "${release_branch_commit}" ]] || abort "cannot get release branch last commit"
|
||||||
echo "Version ${last_version} is at commit ${last_release_commit}"
|
echo "Version ${last_version} is at commit ${last_release_commit}"
|
||||||
|
@ -239,13 +239,13 @@ function prepare_dot_release() {
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# Create new release version number
|
# Create new release version number
|
||||||
local last_build="$(release_build_number ${last_version})"
|
local last_build="$(release_build_number "${last_version}")"
|
||||||
RELEASE_VERSION="${major_minor_version}.$(( last_build + 1 ))"
|
RELEASE_VERSION="${major_minor_version}.$(( last_build + 1 ))"
|
||||||
echo "Will create release ${RELEASE_VERSION} at commit ${release_branch_commit}"
|
echo "Will create release ${RELEASE_VERSION} at commit ${release_branch_commit}"
|
||||||
# If --release-notes not used, copy from the latest release
|
# If --release-notes not used, copy from the latest release
|
||||||
if [[ -z "${RELEASE_NOTES}" ]]; then
|
if [[ -z "${RELEASE_NOTES}" ]]; then
|
||||||
RELEASE_NOTES="$(mktemp)"
|
RELEASE_NOTES="$(mktemp)"
|
||||||
hub_tool release show -f "%b" ${last_version} > ${RELEASE_NOTES}
|
hub_tool release show -f "%b" "${last_version}" > "${RELEASE_NOTES}"
|
||||||
echo "Release notes from ${last_version} copied to ${RELEASE_NOTES}"
|
echo "Release notes from ${last_version} copied to ${RELEASE_NOTES}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -274,14 +274,14 @@ function build_from_nightly_release() {
|
||||||
for yaml in ${yamls_dir}/*.yaml; do
|
for yaml in ${yamls_dir}/*.yaml; do
|
||||||
sed -i -e "s#${NIGHTLY_GCR}#${RELEASE_GCR}#" "${yaml}"
|
sed -i -e "s#${NIGHTLY_GCR}#${RELEASE_GCR}#" "${yaml}"
|
||||||
done
|
done
|
||||||
ARTIFACTS_TO_PUBLISH="$(find ${yamls_dir} -name '*.yaml' -printf '%p ')"
|
ARTIFACTS_TO_PUBLISH="$(find "${yamls_dir}" -name '*.yaml' -printf '%p ')"
|
||||||
echo "Copying nightly images"
|
echo "Copying nightly images"
|
||||||
copy_nightly_images_to_release_gcr "${NIGHTLY_GCR}" "${FROM_NIGHTLY_RELEASE}"
|
copy_nightly_images_to_release_gcr "${NIGHTLY_GCR}" "${FROM_NIGHTLY_RELEASE}"
|
||||||
# Create a release branch from the nightly release tag.
|
# Create a release branch from the nightly release tag.
|
||||||
local commit="$(hash_from_tag ${FROM_NIGHTLY_RELEASE})"
|
local commit="$(hash_from_tag "${FROM_NIGHTLY_RELEASE}")"
|
||||||
echo "Creating release branch ${RELEASE_BRANCH} at commit ${commit}"
|
echo "Creating release branch ${RELEASE_BRANCH} at commit ${commit}"
|
||||||
git checkout -b ${RELEASE_BRANCH} ${commit} || abort "cannot create branch"
|
git checkout -b "${RELEASE_BRANCH}" "${commit}" || abort "cannot create branch"
|
||||||
git_push upstream ${RELEASE_BRANCH} || abort "cannot push branch"
|
git_push upstream "${RELEASE_BRANCH}" || abort "cannot push branch"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build a release from source.
|
# Build a release from source.
|
||||||
|
@ -338,7 +338,7 @@ function parse_flags() {
|
||||||
local is_dot_release=0
|
local is_dot_release=0
|
||||||
local is_auto_release=0
|
local is_auto_release=0
|
||||||
|
|
||||||
cd ${REPO_ROOT_DIR}
|
cd "${REPO_ROOT_DIR}"
|
||||||
while [[ $# -ne 0 ]]; do
|
while [[ $# -ne 0 ]]; do
|
||||||
local parameter=$1
|
local parameter=$1
|
||||||
case ${parameter} in
|
case ${parameter} in
|
||||||
|
@ -357,7 +357,7 @@ function parse_flags() {
|
||||||
--github-token)
|
--github-token)
|
||||||
[[ ! -f "$1" ]] && abort "file $1 doesn't exist"
|
[[ ! -f "$1" ]] && abort "file $1 doesn't exist"
|
||||||
# Remove any trailing newline/space from token
|
# Remove any trailing newline/space from token
|
||||||
GITHUB_TOKEN="$(echo -n $(cat $1))"
|
GITHUB_TOKEN="$(echo -n $(cat "$1"))"
|
||||||
[[ -n "${GITHUB_TOKEN}" ]] || abort "file $1 is empty"
|
[[ -n "${GITHUB_TOKEN}" ]] || abort "file $1 is empty"
|
||||||
;;
|
;;
|
||||||
--release-gcr)
|
--release-gcr)
|
||||||
|
@ -416,7 +416,7 @@ function parse_flags() {
|
||||||
# TODO(adrcunha): "dot" releases from release branches require releasing nightlies
|
# TODO(adrcunha): "dot" releases from release branches require releasing nightlies
|
||||||
# for such branches, which we don't do yet.
|
# for such branches, which we don't do yet.
|
||||||
[[ "${RELEASE_VERSION}" =~ ^[0-9]+\.[0-9]+\.0$ ]] || abort "version format must be 'X.Y.0'"
|
[[ "${RELEASE_VERSION}" =~ ^[0-9]+\.[0-9]+\.0$ ]] || abort "version format must be 'X.Y.0'"
|
||||||
RELEASE_BRANCH="release-$(master_version ${RELEASE_VERSION})"
|
RELEASE_BRANCH="release-$(master_version "${RELEASE_VERSION}")"
|
||||||
prepare_from_nightly_release
|
prepare_from_nightly_release
|
||||||
setup_upstream
|
setup_upstream
|
||||||
fi
|
fi
|
||||||
|
@ -487,12 +487,12 @@ function run_validation_tests() {
|
||||||
# Parameters: $1..$n - files to add to the release.
|
# Parameters: $1..$n - files to add to the release.
|
||||||
function publish_artifacts() {
|
function publish_artifacts() {
|
||||||
(( ! PUBLISH_RELEASE )) && return
|
(( ! PUBLISH_RELEASE )) && return
|
||||||
tag_images_in_yamls ${ARTIFACTS_TO_PUBLISH}
|
tag_images_in_yamls "${ARTIFACTS_TO_PUBLISH}"
|
||||||
if [[ -n "${RELEASE_DIR}" ]]; then
|
if [[ -n "${RELEASE_DIR}" ]]; then
|
||||||
cp ${ARTIFACTS_TO_PUBLISH} ${RELEASE_DIR} || abort "cannot copy release to '${RELEASE_DIR}'"
|
cp "${ARTIFACTS_TO_PUBLISH}" "${RELEASE_DIR}" || abort "cannot copy release to '${RELEASE_DIR}'"
|
||||||
fi
|
fi
|
||||||
[[ -n "${RELEASE_GCS_BUCKET}" ]] && publish_to_gcs ${ARTIFACTS_TO_PUBLISH}
|
[[ -n "${RELEASE_GCS_BUCKET}" ]] && publish_to_gcs "${ARTIFACTS_TO_PUBLISH}"
|
||||||
publish_to_github ${ARTIFACTS_TO_PUBLISH}
|
publish_to_github "${ARTIFACTS_TO_PUBLISH}"
|
||||||
banner "New release published successfully"
|
banner "New release published successfully"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,24 +581,24 @@ function publish_to_github() {
|
||||||
local commitish=""
|
local commitish=""
|
||||||
# Copy files to a separate dir
|
# Copy files to a separate dir
|
||||||
for artifact in $@; do
|
for artifact in $@; do
|
||||||
cp ${artifact} ${attachments_dir}/
|
cp ${artifact} "${attachments_dir}"/
|
||||||
attachments+=("--attach=${artifact}#$(basename ${artifact})")
|
attachments+=("--attach=${artifact}#$(basename ${artifact})")
|
||||||
done
|
done
|
||||||
echo -e "${title}\n" > ${description}
|
echo -e "${title}\n" > "${description}"
|
||||||
if [[ -n "${RELEASE_NOTES}" ]]; then
|
if [[ -n "${RELEASE_NOTES}" ]]; then
|
||||||
cat ${RELEASE_NOTES} >> ${description}
|
cat "${RELEASE_NOTES}" >> "${description}"
|
||||||
fi
|
fi
|
||||||
git tag -a ${TAG} -m "${title}"
|
git tag -a "${TAG}" -m "${title}"
|
||||||
git_push tag ${TAG}
|
git_push tag "${TAG}"
|
||||||
|
|
||||||
[[ -n "${RELEASE_BRANCH}" ]] && commitish="--commitish=${RELEASE_BRANCH}"
|
[[ -n "${RELEASE_BRANCH}" ]] && commitish="--commitish=${RELEASE_BRANCH}"
|
||||||
for i in {2..0}; do
|
for i in {2..0}; do
|
||||||
hub_tool release create \
|
hub_tool release create \
|
||||||
--prerelease \
|
--prerelease \
|
||||||
${attachments[@]} \
|
${attachments[@]} \
|
||||||
--file=${description} \
|
--file="${description}" \
|
||||||
${commitish} \
|
"${commitish}" \
|
||||||
${TAG} && return 0
|
"${TAG}" && return 0
|
||||||
if [[ "${i}" -gt 0 ]]; then
|
if [[ "${i}" -gt 0 ]]; then
|
||||||
echo "Error publishing the release, retrying in 15s..."
|
echo "Error publishing the release, retrying in 15s..."
|
||||||
sleep 15
|
sleep 15
|
||||||
|
|
|
@ -180,6 +180,7 @@ github.com/hashicorp/errwrap
|
||||||
# github.com/hashicorp/go-multierror v1.1.0
|
# github.com/hashicorp/go-multierror v1.1.0
|
||||||
github.com/hashicorp/go-multierror
|
github.com/hashicorp/go-multierror
|
||||||
# github.com/hashicorp/golang-lru v0.5.4
|
# github.com/hashicorp/golang-lru v0.5.4
|
||||||
|
## explicit
|
||||||
github.com/hashicorp/golang-lru
|
github.com/hashicorp/golang-lru
|
||||||
github.com/hashicorp/golang-lru/simplelru
|
github.com/hashicorp/golang-lru/simplelru
|
||||||
# github.com/imdario/mergo v0.3.9
|
# github.com/imdario/mergo v0.3.9
|
||||||
|
@ -299,7 +300,7 @@ go.uber.org/zap/internal/exit
|
||||||
go.uber.org/zap/internal/ztest
|
go.uber.org/zap/internal/ztest
|
||||||
go.uber.org/zap/zapcore
|
go.uber.org/zap/zapcore
|
||||||
go.uber.org/zap/zaptest
|
go.uber.org/zap/zaptest
|
||||||
# golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
|
# golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
|
||||||
golang.org/x/crypto/cast5
|
golang.org/x/crypto/cast5
|
||||||
golang.org/x/crypto/openpgp
|
golang.org/x/crypto/openpgp
|
||||||
golang.org/x/crypto/openpgp/armor
|
golang.org/x/crypto/openpgp/armor
|
||||||
|
@ -314,7 +315,7 @@ golang.org/x/lint/golint
|
||||||
# golang.org/x/mod v0.3.0
|
# golang.org/x/mod v0.3.0
|
||||||
golang.org/x/mod/module
|
golang.org/x/mod/module
|
||||||
golang.org/x/mod/semver
|
golang.org/x/mod/semver
|
||||||
# golang.org/x/net v0.0.0-20200625001655-4c5254603344
|
# golang.org/x/net v0.0.0-20200707034311-ab3426394381
|
||||||
## explicit
|
## explicit
|
||||||
golang.org/x/net/context
|
golang.org/x/net/context
|
||||||
golang.org/x/net/context/ctxhttp
|
golang.org/x/net/context/ctxhttp
|
||||||
|
@ -348,7 +349,7 @@ golang.org/x/text/unicode/norm
|
||||||
golang.org/x/text/width
|
golang.org/x/text/width
|
||||||
# golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
|
# golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
|
||||||
golang.org/x/time/rate
|
golang.org/x/time/rate
|
||||||
# golang.org/x/tools v0.0.0-20200701000337-a32c0cb1d5b2
|
# golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1
|
||||||
golang.org/x/tools/cmd/goimports
|
golang.org/x/tools/cmd/goimports
|
||||||
golang.org/x/tools/go/ast/astutil
|
golang.org/x/tools/go/ast/astutil
|
||||||
golang.org/x/tools/go/gcexportdata
|
golang.org/x/tools/go/gcexportdata
|
||||||
|
@ -393,7 +394,7 @@ gonum.org/v1/gonum/lapack
|
||||||
gonum.org/v1/gonum/lapack/gonum
|
gonum.org/v1/gonum/lapack/gonum
|
||||||
gonum.org/v1/gonum/lapack/lapack64
|
gonum.org/v1/gonum/lapack/lapack64
|
||||||
gonum.org/v1/gonum/mat
|
gonum.org/v1/gonum/mat
|
||||||
# google.golang.org/api v0.28.0
|
# google.golang.org/api v0.29.0
|
||||||
## explicit
|
## explicit
|
||||||
google.golang.org/api/container/v1beta1
|
google.golang.org/api/container/v1beta1
|
||||||
google.golang.org/api/googleapi
|
google.golang.org/api/googleapi
|
||||||
|
@ -423,7 +424,7 @@ google.golang.org/appengine/internal/socket
|
||||||
google.golang.org/appengine/internal/urlfetch
|
google.golang.org/appengine/internal/urlfetch
|
||||||
google.golang.org/appengine/socket
|
google.golang.org/appengine/socket
|
||||||
google.golang.org/appengine/urlfetch
|
google.golang.org/appengine/urlfetch
|
||||||
# google.golang.org/genproto v0.0.0-20200701001935-0939c5918c31
|
# google.golang.org/genproto v0.0.0-20200710124503-20a17af7bd0e
|
||||||
google.golang.org/genproto/googleapis/api
|
google.golang.org/genproto/googleapis/api
|
||||||
google.golang.org/genproto/googleapis/api/annotations
|
google.golang.org/genproto/googleapis/api/annotations
|
||||||
google.golang.org/genproto/googleapis/api/distribution
|
google.golang.org/genproto/googleapis/api/distribution
|
||||||
|
@ -927,7 +928,7 @@ k8s.io/kube-openapi/pkg/generators
|
||||||
k8s.io/kube-openapi/pkg/generators/rules
|
k8s.io/kube-openapi/pkg/generators/rules
|
||||||
k8s.io/kube-openapi/pkg/util/proto
|
k8s.io/kube-openapi/pkg/util/proto
|
||||||
k8s.io/kube-openapi/pkg/util/sets
|
k8s.io/kube-openapi/pkg/util/sets
|
||||||
# k8s.io/test-infra v0.0.0-20200630233406-1dca6122872e
|
# k8s.io/test-infra v0.0.0-20200710134549-5891a1a4cc17
|
||||||
k8s.io/test-infra/prow/config/secret
|
k8s.io/test-infra/prow/config/secret
|
||||||
k8s.io/test-infra/prow/logrusutil
|
k8s.io/test-infra/prow/logrusutil
|
||||||
k8s.io/test-infra/prow/version
|
k8s.io/test-infra/prow/version
|
||||||
|
@ -937,7 +938,7 @@ k8s.io/utils/buffer
|
||||||
k8s.io/utils/integer
|
k8s.io/utils/integer
|
||||||
k8s.io/utils/pointer
|
k8s.io/utils/pointer
|
||||||
k8s.io/utils/trace
|
k8s.io/utils/trace
|
||||||
# knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7
|
# knative.dev/test-infra v0.0.0-20200710160019-5b9732bc24f7
|
||||||
## explicit
|
## explicit
|
||||||
knative.dev/test-infra/scripts
|
knative.dev/test-infra/scripts
|
||||||
# sigs.k8s.io/boskos v0.0.0-20200617235605-f289ba6555ba
|
# sigs.k8s.io/boskos v0.0.0-20200617235605-f289ba6555ba
|
||||||
|
|
Loading…
Reference in New Issue