Class RdsConfig.Builder
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfigBuilder<RdsConfig.Builder,RdsConfig>
io.floci.testcontainers.config.services.RdsConfig.Builder
- Enclosing class:
- RdsConfig
public static class RdsConfig.Builder
extends AbstractServiceConfigBuilder<RdsConfig.Builder,RdsConfig>
Builder for
RdsConfig.-
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutableRdsConfigfrom this builder.defaultMariadbImage(String defaultMariadbImage) Sets the default Docker image for MariaDB RDS instances.defaultMysqlImage(String defaultMysqlImage) Sets the default Docker image for MySQL RDS instances.defaultPostgresImage(String defaultPostgresImage) Sets the default Docker image for PostgreSQL RDS instances.dockerNetwork(String dockerNetwork) Sets the Docker network that RDS database containers should join.mock(boolean mock) Sets whether DB clusters and instances are created instantly without a real Docker container or auth proxy (API/metadata only).proxyPortRange(int basePort, int amount) Sets the port range for the RDS proxy.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled
-
Method Details
-
mock
Sets whether DB clusters and instances are created instantly without a real Docker container or auth proxy (API/metadata only). Useful for CI and environments without access to the Docker socket.- Parameters:
mock-trueto enable mock mode (default false)- Returns:
- this builder
-
proxyPortRange
Sets the port range for the RDS proxy.- Parameters:
basePort- the base port (default 7000)amount- the amount of ports (default 10)- Returns:
- this builder
-
defaultPostgresImage
Sets the default Docker image for PostgreSQL RDS instances.- Parameters:
defaultPostgresImage- the image name (default "postgres:16-alpine")- Returns:
- this builder
-
defaultMysqlImage
Sets the default Docker image for MySQL RDS instances.- Parameters:
defaultMysqlImage- the image name (default "mysql:8.0")- Returns:
- this builder
-
defaultMariadbImage
Sets the default Docker image for MariaDB RDS instances.- Parameters:
defaultMariadbImage- the image name (default "mariadb:11")- Returns:
- this builder
-
dockerNetwork
Sets the Docker network that RDS database containers should join.- Parameters:
dockerNetwork- the network name, ornullto use the default bridge- Returns:
- this builder
-
build
Creates an immutableRdsConfigfrom this builder.- Specified by:
buildin classAbstractServiceConfigBuilder<RdsConfig.Builder,RdsConfig> - Returns:
- the RDS configuration
-