Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for custom query/gRPC headers #76

Merged
merged 17 commits into from
Apr 12, 2024

Conversation

alespour
Copy link
Contributor

@alespour alespour commented Apr 8, 2024

Proposed Changes

  • Adds custom headers (from either ClientConfig and/or provided to query via WithHeader options) to a gRPC query request.
  • Query call examples are now in "godoc" style - compilable (but not executed during go test) code in example_query_test.go, from which documentation examples are generated and linked with functions and types on pkg.go.dev portal, see fix: use godoc examples instead of code comments #78

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.38%. Comparing base (f0bf1b6) to head (6615c39).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
+ Coverage   83.09%   83.38%   +0.28%     
==========================================
  Files          12       12              
  Lines         994     1011      +17     
==========================================
+ Hits          826      843      +17     
  Misses        138      138              
  Partials       30       30              

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

@alespour alespour force-pushed the feat/custom-grpc-query-headers branch from e824853 to b0f7542 Compare April 9, 2024 06:58
@alespour alespour marked this pull request as ready for review April 9, 2024 07:16
@alespour alespour assigned karel-rehor and unassigned karel-rehor Apr 9, 2024
@alespour alespour requested review from karel-rehor and removed request for karel-rehor April 9, 2024 10:18
@alespour alespour marked this pull request as draft April 9, 2024 10:22
@alespour alespour marked this pull request as ready for review April 9, 2024 13:00
Copy link
Contributor

@karel-rehor karel-rehor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functional options pattern took a moment to understand, but it's neat. Tests pass locally. Everything else looks OK.

@alespour alespour merged commit bd8ca70 into main Apr 12, 2024
11 checks passed
@alespour alespour deleted the feat/custom-grpc-query-headers branch April 12, 2024 13:25
@bednar bednar added this to the 0.7.0 milestone Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants