diff --git a/pubsub/MIGRATING.md b/pubsub/MIGRATING.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pubsub/go.mod b/pubsub/go.mod new file mode 100644 index 000000000000..f0802e921236 --- /dev/null +++ b/pubsub/go.mod @@ -0,0 +1,46 @@ +module cloud.google.com/go/pubsub + +go 1.21 + +require ( + cloud.google.com/go v0.116.0 + cloud.google.com/go/iam v1.2.2 + cloud.google.com/go/kms v1.20.1 + github.com/google/go-cmp v0.6.0 + github.com/google/uuid v1.6.0 + github.com/googleapis/gax-go/v2 v2.14.0 + go.einride.tech/aip v0.68.0 + go.opencensus.io v0.24.0 + go.opentelemetry.io/otel v1.29.0 + go.opentelemetry.io/otel/sdk v1.29.0 + go.opentelemetry.io/otel/trace v1.29.0 + golang.org/x/oauth2 v0.24.0 + golang.org/x/sync v0.10.0 + golang.org/x/time v0.8.0 + google.golang.org/api v0.211.0 + google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 + google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 + google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.35.2 +) + +require ( + cloud.google.com/go/auth v0.12.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/longrunning v0.6.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/s2a-go v0.1.8 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect + golang.org/x/crypto v0.30.0 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583 // indirect +) diff --git a/pubsub/go.sum b/pubsub/go.sum new file mode 100644 index 000000000000..ad61f4c5af8a --- /dev/null +++ b/pubsub/go.sum @@ -0,0 +1,174 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= +cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= +cloud.google.com/go/auth v0.12.1 h1:n2Bj25BUMM0nvE9D2XLTiImanwZhO3DkfWSYS/SAJP4= +cloud.google.com/go/auth v0.12.1/go.mod h1:BFMu+TNpF3DmvfBO9ClqTR/SiqVIm7LukKF9mbendF4= +cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= +cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/iam v1.2.2 h1:ozUSofHUGf/F4tCNy/mu9tHLTaxZFLOUiKzjcgWHGIA= +cloud.google.com/go/iam v1.2.2/go.mod h1:0Ys8ccaZHdI1dEUilwzqng/6ps2YB6vRsjIe00/+6JY= +cloud.google.com/go/kms v1.20.1 h1:og29Wv59uf2FVaZlesaiDAqHFzHaoUyHI3HYp9VUHVg= +cloud.google.com/go/kms v1.20.1/go.mod h1:LywpNiVCvzYNJWS9JUcGJSVTNSwPwi0vBAotzDqn2nc= +cloud.google.com/go/longrunning v0.6.2 h1:xjDfh1pQcWPEvnfjZmwjKQEcHnpz6lHjfy7Fo0MK+hc= +cloud.google.com/go/longrunning v0.6.2/go.mod h1:k/vIs83RN4bE3YCswdXC5PFfWVILjm3hpEUlSko4PiI= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= +github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= +github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod h1:YKe7cfqYXjKGpGvmSg28/fFvhNzinZQm8DGnaburhGA= +github.com/googleapis/gax-go/v2 v2.14.0 h1:f+jMrjBPl+DL9nI4IQzLUxMq7XrAqFYB7hBPqMNIe8o= +github.com/googleapis/gax-go/v2 v2.14.0/go.mod h1:lhBCnjdLrWRaPvLWhmc8IS24m9mr07qSYnHncrgo+zk= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.einride.tech/aip v0.68.0 h1:4seM66oLzTpz50u4K1zlJyOXQ3tCzcJN7I22tKkjipw= +go.einride.tech/aip v0.68.0/go.mod h1:7y9FF8VtPWqpxuAxl0KQWqaULxW4zFIesD6zF5RIHHg= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.211.0 h1:IUpLjq09jxBSV1lACO33CGY3jsRcbctfGzhj+ZSE/Bg= +google.golang.org/api v0.211.0/go.mod h1:XOloB4MXFH4UTlQSGuNUxw0UT74qdENK8d6JNsXKLi0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= +google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 h1:pgr/4QbFyktUv9CtQ/Fq4gzEE6/Xs7iCXbktaGzLHbQ= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697/go.mod h1:+D9ySVjN8nY8YCVjc5O7PZDIdZporIDY3KaGfJunh88= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583 h1:IfdSdTcLFy4lqUQrQJLkLt1PB+AsqVz6lwkWPzWEz10= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/pubsub/v2/apiv1/auxiliary.go b/pubsub/v2/apiv1/auxiliary.go index 46380a0e05da..3a4c282a2598 100755 --- a/pubsub/v2/apiv1/auxiliary.go +++ b/pubsub/v2/apiv1/auxiliary.go @@ -17,7 +17,7 @@ package pubsub import ( - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "google.golang.org/api/iterator" ) diff --git a/pubsub/v2/apiv1/auxiliary_go123.go b/pubsub/v2/apiv1/auxiliary_go123.go index c7a04ffb92e9..507cd4ffc4b8 100755 --- a/pubsub/v2/apiv1/auxiliary_go123.go +++ b/pubsub/v2/apiv1/auxiliary_go123.go @@ -21,7 +21,7 @@ package pubsub import ( "iter" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "github.com/googleapis/gax-go/v2/iterator" ) diff --git a/pubsub/v2/apiv1/info.go b/pubsub/v2/apiv1/info.go new file mode 100644 index 000000000000..7e3cf6537ec6 --- /dev/null +++ b/pubsub/v2/apiv1/info.go @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pubsub + +// SetGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Also passes any +// provided key-value pairs. Intended for use by Google-written clients. +// +// Internal use only. +func (tc *TopicAdminClient) SetGoogleClientInfo(keyval ...string) { + tc.setGoogleClientInfo(keyval...) +} + +// SetGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Also passes any +// provided key-value pairs. Intended for use by Google-written clients. +// +// Internal use only. +func (sc *SubscriptionAdminClient) SetGoogleClientInfo(keyval ...string) { + sc.setGoogleClientInfo(keyval...) +} diff --git a/pubsub/v2/apiv1/schema_client.go b/pubsub/v2/apiv1/schema_client.go index 0fd29804bb8e..b0b29331f0f6 100755 --- a/pubsub/v2/apiv1/schema_client.go +++ b/pubsub/v2/apiv1/schema_client.go @@ -27,7 +27,7 @@ import ( "time" iampb "cloud.google.com/go/iam/apiv1/iampb" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" "google.golang.org/api/option" diff --git a/pubsub/v2/apiv1/schema_client_example_go123_test.go b/pubsub/v2/apiv1/schema_client_example_go123_test.go index c11f9f0c5027..fb01ba91a114 100644 --- a/pubsub/v2/apiv1/schema_client_example_go123_test.go +++ b/pubsub/v2/apiv1/schema_client_example_go123_test.go @@ -21,8 +21,8 @@ package pubsub_test import ( "context" - pubsub "cloud.google.com/go/pubsub/apiv1" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsub "cloud.google.com/go/pubsub/v2/apiv1" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" ) func ExampleSchemaClient_ListSchemaRevisions_all() { @@ -40,7 +40,7 @@ func ExampleSchemaClient_ListSchemaRevisions_all() { req := &pubsubpb.ListSchemaRevisionsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSchemaRevisionsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSchemaRevisionsRequest. } for resp, err := range c.ListSchemaRevisions(ctx, req).All() { if err != nil { @@ -66,7 +66,7 @@ func ExampleSchemaClient_ListSchemas_all() { req := &pubsubpb.ListSchemasRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSchemasRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSchemasRequest. } for resp, err := range c.ListSchemas(ctx, req).All() { if err != nil { diff --git a/pubsub/v2/apiv1/schema_client_example_test.go b/pubsub/v2/apiv1/schema_client_example_test.go index fb946b146402..126a5bd32fe6 100644 --- a/pubsub/v2/apiv1/schema_client_example_test.go +++ b/pubsub/v2/apiv1/schema_client_example_test.go @@ -20,8 +20,8 @@ import ( "context" iampb "cloud.google.com/go/iam/apiv1/iampb" - pubsub "cloud.google.com/go/pubsub/apiv1" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsub "cloud.google.com/go/pubsub/v2/apiv1" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "google.golang.org/api/iterator" ) @@ -74,7 +74,7 @@ func ExampleSchemaClient_CommitSchema() { req := &pubsubpb.CommitSchemaRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#CommitSchemaRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#CommitSchemaRequest. } resp, err := c.CommitSchema(ctx, req) if err != nil { @@ -99,7 +99,7 @@ func ExampleSchemaClient_CreateSchema() { req := &pubsubpb.CreateSchemaRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#CreateSchemaRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#CreateSchemaRequest. } resp, err := c.CreateSchema(ctx, req) if err != nil { @@ -124,7 +124,7 @@ func ExampleSchemaClient_DeleteSchema() { req := &pubsubpb.DeleteSchemaRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#DeleteSchemaRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#DeleteSchemaRequest. } err = c.DeleteSchema(ctx, req) if err != nil { @@ -147,7 +147,7 @@ func ExampleSchemaClient_DeleteSchemaRevision() { req := &pubsubpb.DeleteSchemaRevisionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#DeleteSchemaRevisionRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#DeleteSchemaRevisionRequest. } resp, err := c.DeleteSchemaRevision(ctx, req) if err != nil { @@ -172,7 +172,7 @@ func ExampleSchemaClient_GetSchema() { req := &pubsubpb.GetSchemaRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#GetSchemaRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#GetSchemaRequest. } resp, err := c.GetSchema(ctx, req) if err != nil { @@ -197,7 +197,7 @@ func ExampleSchemaClient_ListSchemaRevisions() { req := &pubsubpb.ListSchemaRevisionsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSchemaRevisionsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSchemaRevisionsRequest. } it := c.ListSchemaRevisions(ctx, req) for { @@ -234,7 +234,7 @@ func ExampleSchemaClient_ListSchemas() { req := &pubsubpb.ListSchemasRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSchemasRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSchemasRequest. } it := c.ListSchemas(ctx, req) for { @@ -271,7 +271,7 @@ func ExampleSchemaClient_RollbackSchema() { req := &pubsubpb.RollbackSchemaRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#RollbackSchemaRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#RollbackSchemaRequest. } resp, err := c.RollbackSchema(ctx, req) if err != nil { @@ -296,7 +296,7 @@ func ExampleSchemaClient_ValidateMessage() { req := &pubsubpb.ValidateMessageRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ValidateMessageRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ValidateMessageRequest. } resp, err := c.ValidateMessage(ctx, req) if err != nil { @@ -321,7 +321,7 @@ func ExampleSchemaClient_ValidateSchema() { req := &pubsubpb.ValidateSchemaRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ValidateSchemaRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ValidateSchemaRequest. } resp, err := c.ValidateSchema(ctx, req) if err != nil { diff --git a/pubsub/v2/apiv1/subscription_admin_client.go b/pubsub/v2/apiv1/subscription_admin_client.go index 9cfe2e768c8b..7b5f1e96de0c 100755 --- a/pubsub/v2/apiv1/subscription_admin_client.go +++ b/pubsub/v2/apiv1/subscription_admin_client.go @@ -28,7 +28,7 @@ import ( "time" iampb "cloud.google.com/go/iam/apiv1/iampb" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" "google.golang.org/api/option" diff --git a/pubsub/v2/apiv1/subscription_admin_client_example_go123_test.go b/pubsub/v2/apiv1/subscription_admin_client_example_go123_test.go index c850211d2b93..4daea7d9b923 100644 --- a/pubsub/v2/apiv1/subscription_admin_client_example_go123_test.go +++ b/pubsub/v2/apiv1/subscription_admin_client_example_go123_test.go @@ -21,8 +21,8 @@ package pubsub_test import ( "context" - pubsub "cloud.google.com/go/pubsub/apiv1" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsub "cloud.google.com/go/pubsub/v2/apiv1" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" ) func ExampleSubscriptionAdminClient_ListSnapshots_all() { @@ -40,7 +40,7 @@ func ExampleSubscriptionAdminClient_ListSnapshots_all() { req := &pubsubpb.ListSnapshotsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSnapshotsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSnapshotsRequest. } for resp, err := range c.ListSnapshots(ctx, req).All() { if err != nil { @@ -66,7 +66,7 @@ func ExampleSubscriptionAdminClient_ListSubscriptions_all() { req := &pubsubpb.ListSubscriptionsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSubscriptionsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSubscriptionsRequest. } for resp, err := range c.ListSubscriptions(ctx, req).All() { if err != nil { diff --git a/pubsub/v2/apiv1/subscription_admin_client_example_test.go b/pubsub/v2/apiv1/subscription_admin_client_example_test.go index 00e5919515cc..931bac4927f6 100644 --- a/pubsub/v2/apiv1/subscription_admin_client_example_test.go +++ b/pubsub/v2/apiv1/subscription_admin_client_example_test.go @@ -21,8 +21,8 @@ import ( "io" iampb "cloud.google.com/go/iam/apiv1/iampb" - pubsub "cloud.google.com/go/pubsub/apiv1" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsub "cloud.google.com/go/pubsub/v2/apiv1" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "google.golang.org/api/iterator" ) @@ -75,7 +75,7 @@ func ExampleSubscriptionAdminClient_Acknowledge() { req := &pubsubpb.AcknowledgeRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#AcknowledgeRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#AcknowledgeRequest. } err = c.Acknowledge(ctx, req) if err != nil { @@ -98,7 +98,7 @@ func ExampleSubscriptionAdminClient_CreateSnapshot() { req := &pubsubpb.CreateSnapshotRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#CreateSnapshotRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#CreateSnapshotRequest. } resp, err := c.CreateSnapshot(ctx, req) if err != nil { @@ -123,7 +123,7 @@ func ExampleSubscriptionAdminClient_CreateSubscription() { req := &pubsubpb.Subscription{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#Subscription. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#Subscription. } resp, err := c.CreateSubscription(ctx, req) if err != nil { @@ -148,7 +148,7 @@ func ExampleSubscriptionAdminClient_DeleteSnapshot() { req := &pubsubpb.DeleteSnapshotRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#DeleteSnapshotRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#DeleteSnapshotRequest. } err = c.DeleteSnapshot(ctx, req) if err != nil { @@ -171,7 +171,7 @@ func ExampleSubscriptionAdminClient_DeleteSubscription() { req := &pubsubpb.DeleteSubscriptionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#DeleteSubscriptionRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#DeleteSubscriptionRequest. } err = c.DeleteSubscription(ctx, req) if err != nil { @@ -194,7 +194,7 @@ func ExampleSubscriptionAdminClient_GetSnapshot() { req := &pubsubpb.GetSnapshotRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#GetSnapshotRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#GetSnapshotRequest. } resp, err := c.GetSnapshot(ctx, req) if err != nil { @@ -219,7 +219,7 @@ func ExampleSubscriptionAdminClient_GetSubscription() { req := &pubsubpb.GetSubscriptionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#GetSubscriptionRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#GetSubscriptionRequest. } resp, err := c.GetSubscription(ctx, req) if err != nil { @@ -244,7 +244,7 @@ func ExampleSubscriptionAdminClient_ListSnapshots() { req := &pubsubpb.ListSnapshotsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSnapshotsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSnapshotsRequest. } it := c.ListSnapshots(ctx, req) for { @@ -281,7 +281,7 @@ func ExampleSubscriptionAdminClient_ListSubscriptions() { req := &pubsubpb.ListSubscriptionsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListSubscriptionsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListSubscriptionsRequest. } it := c.ListSubscriptions(ctx, req) for { @@ -318,7 +318,7 @@ func ExampleSubscriptionAdminClient_ModifyAckDeadline() { req := &pubsubpb.ModifyAckDeadlineRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ModifyAckDeadlineRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ModifyAckDeadlineRequest. } err = c.ModifyAckDeadline(ctx, req) if err != nil { @@ -341,7 +341,7 @@ func ExampleSubscriptionAdminClient_ModifyPushConfig() { req := &pubsubpb.ModifyPushConfigRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ModifyPushConfigRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ModifyPushConfigRequest. } err = c.ModifyPushConfig(ctx, req) if err != nil { @@ -364,7 +364,7 @@ func ExampleSubscriptionAdminClient_Pull() { req := &pubsubpb.PullRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#PullRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#PullRequest. } resp, err := c.Pull(ctx, req) if err != nil { @@ -389,7 +389,7 @@ func ExampleSubscriptionAdminClient_Seek() { req := &pubsubpb.SeekRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#SeekRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#SeekRequest. } resp, err := c.Seek(ctx, req) if err != nil { @@ -454,7 +454,7 @@ func ExampleSubscriptionAdminClient_UpdateSnapshot() { req := &pubsubpb.UpdateSnapshotRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#UpdateSnapshotRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#UpdateSnapshotRequest. } resp, err := c.UpdateSnapshot(ctx, req) if err != nil { @@ -479,7 +479,7 @@ func ExampleSubscriptionAdminClient_UpdateSubscription() { req := &pubsubpb.UpdateSubscriptionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#UpdateSubscriptionRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#UpdateSubscriptionRequest. } resp, err := c.UpdateSubscription(ctx, req) if err != nil { diff --git a/pubsub/v2/apiv1/topic_admin_client.go b/pubsub/v2/apiv1/topic_admin_client.go index 9e8dfabc2f98..64dff45ddfb1 100755 --- a/pubsub/v2/apiv1/topic_admin_client.go +++ b/pubsub/v2/apiv1/topic_admin_client.go @@ -27,7 +27,7 @@ import ( "time" iampb "cloud.google.com/go/iam/apiv1/iampb" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/iterator" "google.golang.org/api/option" diff --git a/pubsub/v2/apiv1/topic_admin_client_example_go123_test.go b/pubsub/v2/apiv1/topic_admin_client_example_go123_test.go index 9df9e3659ce9..db2dfb60bac4 100644 --- a/pubsub/v2/apiv1/topic_admin_client_example_go123_test.go +++ b/pubsub/v2/apiv1/topic_admin_client_example_go123_test.go @@ -21,8 +21,8 @@ package pubsub_test import ( "context" - pubsub "cloud.google.com/go/pubsub/apiv1" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsub "cloud.google.com/go/pubsub/v2/apiv1" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" ) func ExampleTopicAdminClient_ListTopicSnapshots_all() { @@ -40,7 +40,7 @@ func ExampleTopicAdminClient_ListTopicSnapshots_all() { req := &pubsubpb.ListTopicSnapshotsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListTopicSnapshotsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListTopicSnapshotsRequest. } for resp, err := range c.ListTopicSnapshots(ctx, req).All() { if err != nil { @@ -66,7 +66,7 @@ func ExampleTopicAdminClient_ListTopicSubscriptions_all() { req := &pubsubpb.ListTopicSubscriptionsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListTopicSubscriptionsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListTopicSubscriptionsRequest. } for resp, err := range c.ListTopicSubscriptions(ctx, req).All() { if err != nil { @@ -92,7 +92,7 @@ func ExampleTopicAdminClient_ListTopics_all() { req := &pubsubpb.ListTopicsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListTopicsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListTopicsRequest. } for resp, err := range c.ListTopics(ctx, req).All() { if err != nil { diff --git a/pubsub/v2/apiv1/topic_admin_client_example_test.go b/pubsub/v2/apiv1/topic_admin_client_example_test.go index e8e3fed20276..84891a60e4da 100644 --- a/pubsub/v2/apiv1/topic_admin_client_example_test.go +++ b/pubsub/v2/apiv1/topic_admin_client_example_test.go @@ -20,8 +20,8 @@ import ( "context" iampb "cloud.google.com/go/iam/apiv1/iampb" - pubsub "cloud.google.com/go/pubsub/apiv1" - pubsubpb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pubsub "cloud.google.com/go/pubsub/v2/apiv1" + pubsubpb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "google.golang.org/api/iterator" ) @@ -74,7 +74,7 @@ func ExampleTopicAdminClient_CreateTopic() { req := &pubsubpb.Topic{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#Topic. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#Topic. } resp, err := c.CreateTopic(ctx, req) if err != nil { @@ -99,7 +99,7 @@ func ExampleTopicAdminClient_DeleteTopic() { req := &pubsubpb.DeleteTopicRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#DeleteTopicRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#DeleteTopicRequest. } err = c.DeleteTopic(ctx, req) if err != nil { @@ -122,7 +122,7 @@ func ExampleTopicAdminClient_DetachSubscription() { req := &pubsubpb.DetachSubscriptionRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#DetachSubscriptionRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#DetachSubscriptionRequest. } resp, err := c.DetachSubscription(ctx, req) if err != nil { @@ -147,7 +147,7 @@ func ExampleTopicAdminClient_GetTopic() { req := &pubsubpb.GetTopicRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#GetTopicRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#GetTopicRequest. } resp, err := c.GetTopic(ctx, req) if err != nil { @@ -172,7 +172,7 @@ func ExampleTopicAdminClient_ListTopicSnapshots() { req := &pubsubpb.ListTopicSnapshotsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListTopicSnapshotsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListTopicSnapshotsRequest. } it := c.ListTopicSnapshots(ctx, req) for { @@ -209,7 +209,7 @@ func ExampleTopicAdminClient_ListTopicSubscriptions() { req := &pubsubpb.ListTopicSubscriptionsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListTopicSubscriptionsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListTopicSubscriptionsRequest. } it := c.ListTopicSubscriptions(ctx, req) for { @@ -246,7 +246,7 @@ func ExampleTopicAdminClient_ListTopics() { req := &pubsubpb.ListTopicsRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#ListTopicsRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#ListTopicsRequest. } it := c.ListTopics(ctx, req) for { @@ -283,7 +283,7 @@ func ExampleTopicAdminClient_Publish() { req := &pubsubpb.PublishRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#PublishRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#PublishRequest. } resp, err := c.Publish(ctx, req) if err != nil { @@ -308,7 +308,7 @@ func ExampleTopicAdminClient_UpdateTopic() { req := &pubsubpb.UpdateTopicRequest{ // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/pubsub/apiv1/pubsubpb#UpdateTopicRequest. + // See https://pkg.go.dev/cloud.google.com/go/pubsub/v2/apiv1/pubsubpb#UpdateTopicRequest. } resp, err := c.UpdateTopic(ctx, req) if err != nil { diff --git a/pubsub/v2/doc.go b/pubsub/v2/doc.go index 9d9a2818bccf..7d6e687edb6f 100644 --- a/pubsub/v2/doc.go +++ b/pubsub/v2/doc.go @@ -169,4 +169,4 @@ and use a client as usual: } defer client.Close() */ -package pubsub // import "cloud.google.com/go/pubsub" +package pubsub // import "cloud.google.com/go/pubsub/v2" diff --git a/pubsub/v2/example_subscription_iterator_test.go b/pubsub/v2/example_subscription_iterator_test.go index 3f463a2be929..3263158dbb1d 100644 --- a/pubsub/v2/example_subscription_iterator_test.go +++ b/pubsub/v2/example_subscription_iterator_test.go @@ -19,7 +19,7 @@ import ( "errors" "fmt" - "cloud.google.com/go/pubsub" + "cloud.google.com/go/pubsub/v2" "google.golang.org/api/iterator" ) diff --git a/pubsub/v2/example_test.go b/pubsub/v2/example_test.go index f32db4c8a9ed..99bc4d465439 100644 --- a/pubsub/v2/example_test.go +++ b/pubsub/v2/example_test.go @@ -20,7 +20,7 @@ import ( "fmt" "time" - "cloud.google.com/go/pubsub" + "cloud.google.com/go/pubsub/v2" "google.golang.org/api/iterator" ) diff --git a/pubsub/v2/example_topic_iterator_test.go b/pubsub/v2/example_topic_iterator_test.go index 3246dbfc2fd1..ffa249c26a4b 100644 --- a/pubsub/v2/example_topic_iterator_test.go +++ b/pubsub/v2/example_topic_iterator_test.go @@ -19,7 +19,7 @@ import ( "errors" "fmt" - "cloud.google.com/go/pubsub" + "cloud.google.com/go/pubsub/v2" "google.golang.org/api/iterator" ) diff --git a/pubsub/v2/go.mod b/pubsub/v2/go.mod index 14c5730eec78..9332ff6760de 100644 --- a/pubsub/v2/go.mod +++ b/pubsub/v2/go.mod @@ -6,6 +6,7 @@ require ( cloud.google.com/go v0.116.0 cloud.google.com/go/iam v1.2.2 cloud.google.com/go/kms v1.20.1 + cloud.google.com/go/pubsub v1.45.1 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/googleapis/gax-go/v2 v2.14.0 diff --git a/pubsub/v2/integration_test.go b/pubsub/v2/integration_test.go index 322ff8d59f8c..99ec0e67d493 100644 --- a/pubsub/v2/integration_test.go +++ b/pubsub/v2/integration_test.go @@ -35,8 +35,8 @@ import ( "cloud.google.com/go/internal/version" kms "cloud.google.com/go/kms/apiv1" "cloud.google.com/go/kms/apiv1/kmspb" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" testutil2 "cloud.google.com/go/pubsub/internal/testutil" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" gax "github.com/googleapis/gax-go/v2" diff --git a/pubsub/v2/iterator.go b/pubsub/v2/iterator.go index 762f2d5f22cd..560198d4a3a1 100644 --- a/pubsub/v2/iterator.go +++ b/pubsub/v2/iterator.go @@ -24,9 +24,9 @@ import ( "time" ipubsub "cloud.google.com/go/internal/pubsub" - vkit "cloud.google.com/go/pubsub/apiv1" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" "cloud.google.com/go/pubsub/internal/distribution" + vkit "cloud.google.com/go/pubsub/v2/apiv1" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" "github.com/googleapis/gax-go/v2/apierror" "go.opentelemetry.io/otel/attribute" @@ -70,7 +70,7 @@ type messageIterator struct { cancel func() // the function that will cancel ctx; called in stop po *pullOptions ps *pullStream - subc *vkit.SubscriberClient + subc *vkit.SubscriptionAdminClient projectID string subID string subName string @@ -125,7 +125,7 @@ type messageIterator struct { // subName is the full name of the subscription to pull messages from. // Stop must be called on the messageIterator when it is no longer needed. // The iterator always uses the background context for acking messages and extending message deadlines. -func newMessageIterator(subc *vkit.SubscriberClient, subName string, po *pullOptions) *messageIterator { +func newMessageIterator(subc *vkit.SubscriptionAdminClient, subName string, po *pullOptions) *messageIterator { var ps *pullStream if !po.synchronous { maxMessages := po.maxOutstandingMessages diff --git a/pubsub/v2/iterator_test.go b/pubsub/v2/iterator_test.go index 6eccb0f2211c..f3e4d2128f0f 100644 --- a/pubsub/v2/iterator_test.go +++ b/pubsub/v2/iterator_test.go @@ -27,8 +27,8 @@ import ( ipubsub "cloud.google.com/go/internal/pubsub" "cloud.google.com/go/internal/testutil" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" - "cloud.google.com/go/pubsub/pstest" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" + "cloud.google.com/go/pubsub/v2/pstest" "google.golang.org/api/option" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/pubsub/v2/message.go b/pubsub/v2/message.go index 33d87735cb41..694c4ac2300e 100644 --- a/pubsub/v2/message.go +++ b/pubsub/v2/message.go @@ -19,7 +19,7 @@ import ( "time" ipubsub "cloud.google.com/go/internal/pubsub" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" ) // Message represents a Pub/Sub message. diff --git a/pubsub/v2/mock_test.go b/pubsub/v2/mock_test.go index 89dc40b8d0d7..6589b2252cc2 100644 --- a/pubsub/v2/mock_test.go +++ b/pubsub/v2/mock_test.go @@ -24,7 +24,7 @@ import ( "time" "cloud.google.com/go/internal/testutil" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/pubsub/v2/pstest_test.go b/pubsub/v2/pstest_test.go index a9f16aa6bd44..5402ccf128b8 100644 --- a/pubsub/v2/pstest_test.go +++ b/pubsub/v2/pstest_test.go @@ -22,8 +22,8 @@ import ( "testing" "cloud.google.com/go/internal/testutil" - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsub/pstest" + "cloud.google.com/go/pubsub/v2" + "cloud.google.com/go/pubsub/v2/pstest" "google.golang.org/api/option" "google.golang.org/grpc" ) diff --git a/pubsub/v2/pubsub.go b/pubsub/v2/pubsub.go index d4124bcb952a..654ad715983c 100644 --- a/pubsub/v2/pubsub.go +++ b/pubsub/v2/pubsub.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package pubsub // import "cloud.google.com/go/pubsub" +package pubsub // import "cloud.google.com/go/pubsub/v2" import ( "context" @@ -25,8 +25,8 @@ import ( "time" "cloud.google.com/go/internal/detect" - vkit "cloud.google.com/go/pubsub/apiv1" "cloud.google.com/go/pubsub/internal" + vkit "cloud.google.com/go/pubsub/v2/apiv1" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -50,15 +50,15 @@ const ( // A Client may be shared by multiple goroutines. type Client struct { projectID string - pubc *vkit.PublisherClient - subc *vkit.SubscriberClient + pubc *vkit.TopicAdminClient + subc *vkit.SubscriptionAdminClient enableTracing bool } // ClientConfig has configurations for the client. type ClientConfig struct { - PublisherCallOptions *vkit.PublisherCallOptions - SubscriberCallOptions *vkit.SubscriberCallOptions + PublisherCallOptions *vkit.TopicAdminCallOptions + SubscriberCallOptions *vkit.SubscriptionAdminCallOptions // EnableOpenTelemetryTracing enables tracing for this client. // This option allows selectively disabling Pub/Sub traces. @@ -71,14 +71,14 @@ type ClientConfig struct { // mergePublisherCallOptions merges two PublisherCallOptions into one and the first argument has // a lower order of precedence than the second one. If either is nil, return the other. -func mergePublisherCallOptions(a *vkit.PublisherCallOptions, b *vkit.PublisherCallOptions) *vkit.PublisherCallOptions { +func mergePublisherCallOptions(a *vkit.TopicAdminCallOptions, b *vkit.TopicAdminCallOptions) *vkit.TopicAdminCallOptions { if a == nil { return b } if b == nil { return a } - res := &vkit.PublisherCallOptions{} + res := &vkit.TopicAdminCallOptions{} resVal := reflect.ValueOf(res).Elem() aVal := reflect.ValueOf(a).Elem() bVal := reflect.ValueOf(b).Elem() @@ -99,14 +99,14 @@ func mergePublisherCallOptions(a *vkit.PublisherCallOptions, b *vkit.PublisherCa // mergeSubscribercallOptions merges two SubscriberCallOptions into one and the first argument has // a lower order of precedence than the second one. If either is nil, the other is used. -func mergeSubscriberCallOptions(a *vkit.SubscriberCallOptions, b *vkit.SubscriberCallOptions) *vkit.SubscriberCallOptions { +func mergeSubscriberCallOptions(a *vkit.SubscriptionAdminCallOptions, b *vkit.SubscriptionAdminCallOptions) *vkit.SubscriptionAdminCallOptions { if a == nil { return b } if b == nil { return a } - res := &vkit.SubscriberCallOptions{} + res := &vkit.SubscriptionAdminCallOptions{} resVal := reflect.ValueOf(res).Elem() aVal := reflect.ValueOf(a).Elem() bVal := reflect.ValueOf(b).Elem() @@ -175,11 +175,11 @@ func NewClientWithConfig(ctx context.Context, projectID string, config *ClientCo } } o = append(o, opts...) - pubc, err := vkit.NewPublisherClient(ctx, o...) + pubc, err := vkit.NewTopicAdminClient(ctx, o...) if err != nil { return nil, fmt.Errorf("pubsub(publisher): %w", err) } - subc, err := vkit.NewSubscriberClient(ctx, o...) + subc, err := vkit.NewSubscriptionAdminClient(ctx, o...) if err != nil { return nil, fmt.Errorf("pubsub(subscriber): %w", err) } diff --git a/pubsub/v2/pubsub_test.go b/pubsub/v2/pubsub_test.go index 6c741a4aba5f..667589ad1563 100644 --- a/pubsub/v2/pubsub_test.go +++ b/pubsub/v2/pubsub_test.go @@ -19,9 +19,9 @@ import ( "testing" "time" - vkit "cloud.google.com/go/pubsub/apiv1" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" - "cloud.google.com/go/pubsub/pstest" + vkit "cloud.google.com/go/pubsub/v2/apiv1" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" + "cloud.google.com/go/pubsub/v2/pstest" "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" "google.golang.org/grpc" @@ -33,7 +33,7 @@ func TestClient_ApplyClientConfig(t *testing.T) { ctx := context.Background() srv := pstest.NewServer() // Add a retry for an obscure error. - pco := &vkit.PublisherCallOptions{ + pco := &vkit.TopicAdminCallOptions{ Publish: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnCodes([]codes.Code{ diff --git a/pubsub/v2/pullstream.go b/pubsub/v2/pullstream.go index 231e5a64ada9..7c659e18981b 100644 --- a/pubsub/v2/pullstream.go +++ b/pubsub/v2/pullstream.go @@ -22,7 +22,7 @@ import ( "sync" "time" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" "google.golang.org/grpc" ) diff --git a/pubsub/v2/pullstream_test.go b/pubsub/v2/pullstream_test.go index b8282fe7ec83..ccbbdcaf75a1 100644 --- a/pubsub/v2/pullstream_test.go +++ b/pubsub/v2/pullstream_test.go @@ -20,8 +20,8 @@ import ( "time" "cloud.google.com/go/internal/testutil" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" - "cloud.google.com/go/pubsub/pstest" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" + "cloud.google.com/go/pubsub/v2/pstest" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/option" "google.golang.org/grpc" diff --git a/pubsub/v2/schema.go b/pubsub/v2/schema.go index 1bd9e7488d96..2c631df1e230 100644 --- a/pubsub/v2/schema.go +++ b/pubsub/v2/schema.go @@ -21,8 +21,8 @@ import ( "google.golang.org/api/option" - vkit "cloud.google.com/go/pubsub/apiv1" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + vkit "cloud.google.com/go/pubsub/v2/apiv1" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" ) // SchemaClient is a Pub/Sub schema client scoped to a single project. diff --git a/pubsub/v2/schema_test.go b/pubsub/v2/schema_test.go index 2455343cc2d1..aa14737064bb 100644 --- a/pubsub/v2/schema_test.go +++ b/pubsub/v2/schema_test.go @@ -27,7 +27,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "cloud.google.com/go/pubsub/pstest" + "cloud.google.com/go/pubsub/v2/pstest" ) func newSchemaFake(t *testing.T) (*SchemaClient, *pstest.Server) { diff --git a/pubsub/v2/snapshot.go b/pubsub/v2/snapshot.go index d5d1dd2dfd74..cb5007d7a61a 100644 --- a/pubsub/v2/snapshot.go +++ b/pubsub/v2/snapshot.go @@ -20,7 +20,7 @@ import ( "strings" "time" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" fmpb "google.golang.org/protobuf/types/known/fieldmaskpb" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/pubsub/v2/streaming_pull_test.go b/pubsub/v2/streaming_pull_test.go index 7f9943d4b7af..365d8e060f94 100644 --- a/pubsub/v2/streaming_pull_test.go +++ b/pubsub/v2/streaming_pull_test.go @@ -29,7 +29,7 @@ import ( "time" "cloud.google.com/go/internal/testutil" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "google.golang.org/api/option" diff --git a/pubsub/v2/subscription.go b/pubsub/v2/subscription.go index ebd522bc013b..21079d69bd08 100644 --- a/pubsub/v2/subscription.go +++ b/pubsub/v2/subscription.go @@ -26,8 +26,8 @@ import ( "cloud.google.com/go/iam" "cloud.google.com/go/internal/optional" ipubsub "cloud.google.com/go/internal/pubsub" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" "cloud.google.com/go/pubsub/internal/scheduler" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "github.com/google/uuid" gax "github.com/googleapis/gax-go/v2" semconv "go.opentelemetry.io/otel/semconv/v1.26.0" @@ -39,7 +39,7 @@ import ( durpb "google.golang.org/protobuf/types/known/durationpb" fmpb "google.golang.org/protobuf/types/known/fieldmaskpb" - vkit "cloud.google.com/go/pubsub/apiv1" + vkit "cloud.google.com/go/pubsub/v2/apiv1" ) // Subscription is a reference to a PubSub subscription. diff --git a/pubsub/v2/subscription_test.go b/pubsub/v2/subscription_test.go index d2cdfe3f86fb..30a239355a04 100644 --- a/pubsub/v2/subscription_test.go +++ b/pubsub/v2/subscription_test.go @@ -23,8 +23,8 @@ import ( "time" "cloud.google.com/go/internal/testutil" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" - "cloud.google.com/go/pubsub/pstest" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" + "cloud.google.com/go/pubsub/v2/pstest" "github.com/google/go-cmp/cmp/cmpopts" "google.golang.org/api/iterator" "google.golang.org/api/option" diff --git a/pubsub/v2/timeout_test.go b/pubsub/v2/timeout_test.go index e1ee689a5aa0..97d7264463d3 100644 --- a/pubsub/v2/timeout_test.go +++ b/pubsub/v2/timeout_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "cloud.google.com/go/pubsub/pstest" + "cloud.google.com/go/pubsub/v2/pstest" "google.golang.org/api/option" "google.golang.org/grpc" ) diff --git a/pubsub/v2/topic.go b/pubsub/v2/topic.go index eb46c318282d..423d232cfbdf 100644 --- a/pubsub/v2/topic.go +++ b/pubsub/v2/topic.go @@ -27,9 +27,9 @@ import ( "cloud.google.com/go/iam" "cloud.google.com/go/internal/optional" ipubsub "cloud.google.com/go/internal/pubsub" - vkit "cloud.google.com/go/pubsub/apiv1" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" "cloud.google.com/go/pubsub/internal/scheduler" + vkit "cloud.google.com/go/pubsub/v2/apiv1" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" gax "github.com/googleapis/gax-go/v2" "go.opencensus.io/stats" "go.opencensus.io/tag" diff --git a/pubsub/v2/topic_test.go b/pubsub/v2/topic_test.go index 688c1c2be39c..96d830d7c93d 100644 --- a/pubsub/v2/topic_test.go +++ b/pubsub/v2/topic_test.go @@ -25,9 +25,9 @@ import ( "time" "cloud.google.com/go/internal/testutil" - "cloud.google.com/go/pubsub/apiv1/pubsubpb" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" - "cloud.google.com/go/pubsub/pstest" + "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" + "cloud.google.com/go/pubsub/v2/pstest" "github.com/google/go-cmp/cmp/cmpopts" "google.golang.org/api/iterator" "google.golang.org/api/option" diff --git a/pubsub/v2/trace.go b/pubsub/v2/trace.go index 6ff88a847934..97245ad7c118 100644 --- a/pubsub/v2/trace.go +++ b/pubsub/v2/trace.go @@ -20,8 +20,8 @@ import ( "log" "sync" - pb "cloud.google.com/go/pubsub/apiv1/pubsubpb" "cloud.google.com/go/pubsub/internal" + pb "cloud.google.com/go/pubsub/v2/apiv1/pubsubpb" "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" @@ -266,7 +266,7 @@ func recordStat(ctx context.Context, m *stats.Int64Measure, n int64) { stats.Record(ctx, m.M(n)) } -const defaultTracerName = "cloud.google.com/go/pubsub" +const defaultTracerName = "cloud.google.com/go/pubsub/v2" func tracer() trace.Tracer { return otel.Tracer(defaultTracerName, trace.WithInstrumentationVersion(internal.Version)) diff --git a/pubsub/v2/trace_test.go b/pubsub/v2/trace_test.go index eee99d29d9d9..2e7c2d81133b 100644 --- a/pubsub/v2/trace_test.go +++ b/pubsub/v2/trace_test.go @@ -24,7 +24,7 @@ import ( "cloud.google.com/go/internal/testutil" "cloud.google.com/go/pubsub/internal" - "cloud.google.com/go/pubsub/pstest" + "cloud.google.com/go/pubsub/v2/pstest" "github.com/google/go-cmp/cmp" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -122,21 +122,21 @@ func TestTrace_PublishSpan(t *testing.T) { }, ChildSpanCount: 2, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, tracetest.SpanStub{ Name: publishFCSpanName, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, tracetest.SpanStub{ Name: batcherSpanName, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, @@ -150,7 +150,7 @@ func TestTrace_PublishSpan(t *testing.T) { attribute.String(gcpProjectIDAttribute, projName), }, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, Links: []sdktrace.Link{ @@ -356,7 +356,7 @@ func TestTrace_SubscribeSpans(t *testing.T) { }, }, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, @@ -400,21 +400,21 @@ func TestTrace_SubscribeSpans(t *testing.T) { }, // ChildSpanCount: 3, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, tracetest.SpanStub{ Name: scheduleSpanName, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, tracetest.SpanStub{ Name: ccSpanName, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, @@ -437,14 +437,14 @@ func TestTrace_SubscribeSpans(t *testing.T) { attribute.String(gcpProjectIDAttribute, projName), }, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, }, tracetest.SpanStub{ Name: fmt.Sprintf("%s %s", subID, modackSpanName), InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, Links: []sdktrace.Link{ @@ -609,7 +609,7 @@ func getPublishSpanStubsWithError(topicID string, m *Message, err error) tracete attribute.String(gcpProjectIDAttribute, projName), }, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, Status: sdktrace.Status{ @@ -625,7 +625,7 @@ func getFlowControlSpanStubs(err error) tracetest.SpanStubs { tracetest.SpanStub{ Name: publishFCSpanName, InstrumentationLibrary: instrumentation.Scope{ - Name: "cloud.google.com/go/pubsub", + Name: "cloud.google.com/go/pubsub/v2", Version: internal.Version, }, Status: sdktrace.Status{