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

chore(resources): rename service-info to metadata #1165

Merged
merged 6 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ commands:
shuttle-shared-db = { path = "$PWD/resources/shared-db" }
shuttle-secrets = { path = "$PWD/resources/secrets" }
shuttle-static-folder = { path = "$PWD/resources/static-folder" }
shuttle-service-info = { path = "$PWD/resources/service-info" }
shuttle-metadata = { path = "$PWD/resources/metadata" }
shuttle-turso = { path = "$PWD/resources/turso" }

shuttle-axum = { path = "$PWD/services/shuttle-axum" }
Expand Down Expand Up @@ -621,7 +621,7 @@ workflows:
- resources/persist
- resources/secrets
- resources/static-folder
- resources/service-info
- resources/metadata
- resources/turso
- services/shuttle-actix-web
- services/shuttle-axum
Expand Down Expand Up @@ -836,7 +836,7 @@ workflows:
"resources/secrets",
"resources/shared-db",
"resources/static-folder",
"resources/service-info",
"resources/metadata",
"resources/turso",
]
name: publish-<< matrix.path >>
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ shuttle-persist = { path = "[base]/shuttle/resources/persist" }
shuttle-shared-db = { path = "[base]/shuttle/resources/shared-db" }
shuttle-secrets = { path = "[base]/shuttle/resources/secrets" }
shuttle-static-folder = { path = "[base]/shuttle/resources/static-folder" }
shuttle-service-info = { path = "[base]/shuttle/resources/service-info" }
shuttle-metadata = { path = "[base]/shuttle/resources/metadata" }
shuttle-turso = { path = "[base]/shuttle/resources/turso" }

shuttle-axum = { path = "[base]/shuttle/services/shuttle-axum" }
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ publish-resources: publish-resources/aws-rds \
publish-resources/persist \
publish-resources/shared-db \
publish-resources/static-folder \
publish-resources/service-info
publish-resources/metadata

publish-cargo-shuttle: publish-resources/secrets
cd cargo-shuttle; cargo publish
Expand Down
2 changes: 1 addition & 1 deletion deployer/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [[ $PROD != "true" ]]; then
shuttle-shared-db = { path = "/usr/src/shuttle/resources/shared-db" }
shuttle-secrets = { path = "/usr/src/shuttle/resources/secrets" }
shuttle-static-folder = { path = "/usr/src/shuttle/resources/static-folder" }
shuttle-service-info = { path = "/usr/src/shuttle/resources/service-info" }
shuttle-metadata = { path = "/usr/src/shuttle/resources/metadata" }
shuttle-turso = { path = "/usr/src/shuttle/resources/turso" }

shuttle-actix-web = { path = "/usr/src/shuttle/services/shuttle-actix-web" }
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/integration/helpers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ shuttle-persist = {{ path = "{}" }}
shuttle-shared-db = {{ path = "{}" }}
shuttle-secrets = {{ path = "{}" }}
shuttle-static-folder = {{ path = "{}" }}
shuttle-service-info = {{ path = "{}" }}
shuttle-metadata = {{ path = "{}" }}

shuttle-axum = {{ path = "{}" }}
shuttle-actix-web = {{ path = "{}" }}
Expand All @@ -72,7 +72,7 @@ shuttle-warp = {{ path = "{}" }}"#,
.display(),
WORKSPACE_ROOT
.join("resources")
.join("service-info")
.join("metadata")
.display(),
WORKSPACE_ROOT
.join("services")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "shuttle-service-info"
name = "shuttle-metadata"
version = "0.24.0"
edition = "2021"
license = "Apache-2.0"
description = "Plugin to get Shuttle service information"
keywords = ["shuttle-service", "service-info"]
keywords = ["shuttle-service", "metadata"]

[dependencies]
async-trait = "0.1.56"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This plugin allows applications to obtain certain information about their runtim

## Usage

Add `shuttle-service-info` to the dependencies for your service.
Add `shuttle-metadata` to the dependencies for your service.

You can get this resource using the `shuttle_service_info::ShuttleServiceInfo` attribute to get a `ServiceInfo`. This struct will contain information such as the Shuttle service name.

Expand All @@ -15,8 +15,8 @@ async fn app(
) -> __ { ... }
```

#### Example projects that use `shuttle-service-info`
#### Example projects that use `shuttle-metadata`

| Framework | Link |
| --------- | ------------------------------------------------------------------------------------------ |
| Axum | [axum example](https://github.com/shuttle-hq/shuttle-examples/tree/main/axum/service-info) |
| Axum | [axum example](https://github.com/shuttle-hq/shuttle-examples/tree/main/axum/metadata) |
File renamed without changes.