Class OpenSearchConfig.Builder
java.lang.Object
io.floci.testcontainers.config.services.AbstractServiceConfigBuilder<OpenSearchConfig.Builder,OpenSearchConfig>
io.floci.testcontainers.config.services.OpenSearchConfig.Builder
- Enclosing class:
- OpenSearchConfig
public static class OpenSearchConfig.Builder
extends AbstractServiceConfigBuilder<OpenSearchConfig.Builder,OpenSearchConfig>
Builder for
OpenSearchConfig.-
Field Summary
Fields inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutableOpenSearchConfigfrom this builder.defaultImage(String defaultImage) Sets the default Docker image for OpenSearch instances.dockerNetwork(String dockerNetwork) Sets the Docker network that OpenSearch containers should join.mock(boolean mock) Sets whether domains are simulated in-memory without real Docker containers.proxyPortRange(int basePort, int amount) Sets the port range for the OpenSearch proxy.Methods inherited from class io.floci.testcontainers.config.services.AbstractServiceConfigBuilder
enabled
-
Method Details
-
mock
Sets whether domains are simulated in-memory without real Docker containers.- Parameters:
mock-trueto enable mock mode (default false)- Returns:
- this builder
-
defaultImage
Sets the default Docker image for OpenSearch instances.- Parameters:
defaultImage- the image name, ornullto use the Floci default (defaultnull)- Returns:
- this builder
-
proxyPortRange
Sets the port range for the OpenSearch proxy.- Parameters:
basePort- the base port (default 9400)amount- the amount of ports (default 10)- Returns:
- this builder
-
dockerNetwork
Sets the Docker network that OpenSearch containers should join.- Parameters:
dockerNetwork- the network name, ornullto use the default bridge- Returns:
- this builder
-
build
Creates an immutableOpenSearchConfigfrom this builder.- Specified by:
buildin classAbstractServiceConfigBuilder<OpenSearchConfig.Builder,OpenSearchConfig> - Returns:
- the OpenSearch configuration
-