Skip to content

Conversation

@dbolduc
Copy link
Member

@dbolduc dbolduc commented Aug 28, 2025

Part of the work for #2041

Template the client::Storage on the stub::Storage implementing it. I use S for Stub, and because no other generics used S. That kept the diff in check.

The default template is a transport::Storage in the client and the builders. This means code like: let client: Storage = Storage::builder().build().await keeps working as before.

The builder() method is only available on the "real" client. It only ever gives you a real client.

We need to make the default template type public, although it does not need to be name-able by applications.

The next PR will add the client::Storage::from_stub() method and make sure all types like RequestOptions are name-able outside of the crate.

@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Aug 28, 2025
@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.41%. Comparing base (0492eb8) to head (5b817d9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3167      +/-   ##
==========================================
+ Coverage   96.39%   96.41%   +0.02%     
==========================================
  Files         110      110              
  Lines        4433     4433              
==========================================
+ Hits         4273     4274       +1     
+ Misses        160      159       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbolduc dbolduc marked this pull request as ready for review August 28, 2025 19:37
@dbolduc dbolduc requested a review from a team as a code owner August 28, 2025 19:37
@dbolduc dbolduc merged commit a966476 into googleapis:main Aug 28, 2025
24 checks passed
@dbolduc dbolduc deleted the refactor-storage-templated-client branch August 28, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants