Skip to content

Allow application to optionally configure storage infra clients#719

Merged
AlCutter merged 6 commits into
transparency-dev:mainfrom
AlCutter:storage_clients
Jul 21, 2025
Merged

Allow application to optionally configure storage infra clients#719
AlCutter merged 6 commits into
transparency-dev:mainfrom
AlCutter:storage_clients

Conversation

@AlCutter

Copy link
Copy Markdown
Collaborator

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.New take a Config struct, as in the gcp and aws packages 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.

Comment thread storage/aws/aws.go Outdated
// 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread storage/posix/files.go Outdated
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ta - reworded.

@AlCutter AlCutter merged commit 48ac7b3 into transparency-dev:main Jul 21, 2025
15 checks passed
@AlCutter AlCutter deleted the storage_clients branch July 21, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants