Allow application to optionally configure storage infra clients#719
Merged
Conversation
mhutchinson
approved these changes
Jul 21, 2025
| // Maximum idle database connections in the connection pool. | ||
| MaxIdleConns int | ||
|
|
||
| // HTTPClient will be used for other HTTP requests. If unset, Tessera wil use the net/http DefaultClient. |
Contributor
There was a problem hiding this comment.
Suggested change
| // HTTPClient will be used for other HTTP requests. If unset, Tessera wil use the net/http DefaultClient. | |
| // HTTPClient will be used for other HTTP requests. If unset, Tessera will use the net/http DefaultClient. |
| type NewTreeFunc func(size uint64, root []byte) error | ||
|
|
||
| type Config struct { | ||
| // HTTPClient will be used for other HTTP requests. If unset, Tessera wil use the net/http DefaultClient. |
Contributor
There was a problem hiding this comment.
Suggested change
| // HTTPClient will be used for other HTTP requests. If unset, Tessera wil use the net/http DefaultClient. | |
| // HTTPClient will be used for other HTTP requests. If unset, Tessera will use the net/http DefaultClient. |
Contributor
There was a problem hiding this comment.
It's not clear what "other HTTP requests" here actually means. Other than what?
It looks like it's just used for witnessing, but maybe you're trying to avoid enumeration.
feb34f3 to
3af1773
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows applications using Tessera to (optionally) pass pre-configured instances of infrastructure clients to the drivers, enabling applications to tune those clients to the intended usage patterns and environment (e.g. https://pkg.go.dev/google.golang.org/api/option).
In this PR, we also make
posix.Newtake aConfigstruct, as in thegcpandawspackages to both improve ergonomics when switching between backends, and to open the door to adding future config options to POSIX in a backwards-compatible manner.