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: resource attribute options #276

Merged
merged 7 commits into from
Sep 28, 2022

Conversation

chesedo
Copy link
Contributor

@chesedo chesedo commented Jul 22, 2022

This makes it possible for resource attributes to take in options like the following:

#[shuttle_service::main]
async fn poem(#[shared::Postgres(size = "10Gb", public = false)] pool: PgPool) -> ShuttlePoem {
    //                           ----------------------------- Options that will be passed to builder
}

This will bring us one step closer to string interpolation from env variables for resource configuration

Copy link
Collaborator

@brokad brokad left a comment

Choose a reason for hiding this comment

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

LGTM 😀

I like the idea of grabbing the arguments to the argument annotation and mapping them to the builder pattern!

@chesedo chesedo merged commit 4bdfdba into shuttle-hq:main Sep 28, 2022
@chesedo chesedo deleted the feat/builder_options branch September 28, 2022 16:05
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.

2 participants