Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Modules

rightsize-modules ships twenty-three preconfigured containers on top of the rightsize core: Redis, Memcached, ArangoDB, MongoDB, Redpanda, Kafka, SpringCloudConfig, PostgreSQL, MySQL, Apache Pinot, RabbitMQ, MariaDB, WireMock, ClickHouse, Keycloak, Neo4j, Floci, Apache Flink, Valkey, MinIO, Cassandra, Elasticsearch, and Qdrant. Each module is a thin newtype wrapping Container — no subclassing, just the spec-customizer and post-start hooks the core exposes (see Containers & Guards) — with connection helpers on its guard.

ModuleHelper(s)
RedisContaineruri()
ValkeyContaineruri() (Redis-protocol-compatible; deliberately returns redis://, not valkey://)
MemcachedContaineraddress() (protocol-level VERSION probe, not a bare port wait)
MongoDbContainerconnection_string() (single-node replica set, auto-initiated)
ArangoContainerendpoint(), with_root_password(…)
PostgresContainerconnection_string(), username(), password(), database_name(), with_username/with_password/with_database(…)
MySqlContainerconnection_string(), username(), password(), database_name(), with_username/with_password/with_database(…)
MariaDbContainerconnection_string(), username(), password(), database_name(), with_username/with_password/with_database(…)
RedpandaContainerbootstrap_servers(), schema_registry_url()
KafkaContainerbootstrap_servers() (KRaft single node)
RabbitMqContaineramqp_url(), management_url(), username(), password(), with_username/with_password(…)
ClickHouseContainerhttp_url(), username(), password(), database_name(), with_username/with_password/with_database(…)
SpringCloudConfigContaineruri() (defaults with_memory_limit(1024))
PinotContainercontroller_url(), broker_url() (defaults with_memory_limit(4096))
WireMockContainerbase_url(), admin_url()
KeycloakContainerauth_server_url(), management_url(), admin_username(), admin_password(), with_admin_username/with_admin_password(…) (defaults with_memory_limit(1024))
Neo4jContainerhttp_url(), bolt_url(), username(), password(), with_password(…) (defaults with_memory_limit(1024))
FlociContainerFlociContainer::aws()/azure()/gcp(), endpoint_url()
FlinkContainerrest_url(), with_task_manager() (docker only; defaults with_memory_limit(1024))
MinioContainers3_url(), console_url(), root_user(), root_password(), with_root_user/with_root_password(…) (no memory limit set)
CassandraContainercontact_point(), cql_port(), local_datacenter() (defaults with_memory_limit(2560))
ElasticsearchContainerrest_url() (no new() — Elastic publishes no floating tag, so with_image always requires an explicit version; defaults with_memory_limit(2560))
QdrantContainerrest_url() (new() floats to qdrant/qdrant:latest; no memory limit set)

Backend wiring is a Cargo feature choice, not a runtime one: backend-msb and backend-docker (both on by default) pull in rightsize-msb and rightsize-docker respectively, so you can trim the one you don’t need.

Compatibility checking

Every module’s with_image takes impl Into<ImageName> and checks the supplied image’s repository (registry host, tag, and digest stripped) against what that module declares it understands, before ever touching a backend — a mismatch fails fast with RightsizeError::IncompatibleImage rather than surfacing later as a bare wait-strategy timeout. The check runs at the top of start(), not in the constructor, so every constructor here stays infallible; ImageName::parse(image).as_compatible_substitute_for(repo) is the escape hatch for a verified drop-in replacement from another registry. Each module’s own page states the exact repository it expects under “Expected repository” near the top, and walks the check in its own “Compatibility checking” section. FlociContainer is the one exception to “one repository per module”: it wraps three unrelated images behind a single type, and each of its three factories (aws/azure/gcp) checks against its own distinct repository — see its page.

Anything not on this list

Twenty-three modules is not an exhaustive catalog — it’s the current coverage, growing as needs arise. Anything else is the plain Container API (see Containers & Guards); a thin wrapper following the existing modules’ shape (a newtype over Container, a *Guard newtype over ContainerGuard with connection helpers, a with_image/new pair) is a small, welcome contribution — see the repository’s CONTRIBUTING.md.