Learn about Shuttle’s OpenDAL resource annotation.
shuttle-opendal
to the dependencies for your service by running cargo add shuttle-opendal
.
This resource will be provided by adding the shuttle_opendal::Opendal
attribute to your Shuttle main
decorated function.
It returns a opendal::Operator
for you to connect the storage service.
Parameter | Type | Default | Description |
---|---|---|---|
scheme | str | "memory" | The scheme of the storage service to connect to. |
Secrets.toml
file.
For instance, when using s3
, you can configure the scheme to s3
and specify the secrets: bucket
, access_key_id
, and secret_access_key
.
Visit the OpenDAL Documentation for more information on how to setup the secrets for the storage service you want to connect to.