#shuttle-service

shuttle-shared-db

Plugin for managing shared databases on shuttle

22 breaking releases

0.27.0 Sep 21, 2023
0.25.0 Aug 28, 2023
0.22.0 Jul 31, 2023
0.13.0 Mar 27, 2023
0.7.2 Oct 28, 2022

#2 in #shuttle-service

Download history 92/week @ 2023-06-13 150/week @ 2023-06-20 173/week @ 2023-06-27 289/week @ 2023-07-04 212/week @ 2023-07-11 338/week @ 2023-07-18 165/week @ 2023-07-25 213/week @ 2023-08-01 301/week @ 2023-08-08 443/week @ 2023-08-15 400/week @ 2023-08-22 261/week @ 2023-08-29 490/week @ 2023-09-05 328/week @ 2023-09-12 497/week @ 2023-09-19 251/week @ 2023-09-26

1,616 downloads per month

Apache-2.0

10KB
147 lines

Shuttle Shared Databases

This plugin manages databases that are shared with other services on shuttle.

Usage

Add shuttle-shared-db to the dependencies for your service. Every type of shareable database is behind the following feature flag and attribute path (*-rustls uses rustls for TLS, the default uses native-tls).

Engine Feature flags Attribute path
Postgres postgres / postgres-rustls shuttle_shared_db::Postgres
MongoDB mongodb shuttle_shared_db::MongoDb

An example using the Rocket framework can be found on GitHub

Postgres

This resource has the following options

Option Type Description
local_uri &str Don't spin a local docker instance of Postgres, but rather connect to this URI instead for cargo shuttle run

MongoDB

This resource has the following options

Option Type Description
local_uri &str Don't spin a local docker instance of MongoDB, but rather connect to this URI instead for cargo shuttle run

Dependencies

~6–50MB
~835K SLoC