-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to support arbitrary clusters (#3)
* Refactor to support arbitrary clusters * Update README.md
- Loading branch information
1 parent
a7bfb0b
commit 110a916
Showing
11 changed files
with
194 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
core/src/main/scala/testcontainers/containers/ArbitraryNebulaCluster.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package testcontainers.containers | ||
|
||
import scala.jdk.OptionConverters._ | ||
|
||
/** | ||
* The simplest Nebula service, with one storaged, one metad, and one graphd. | ||
* @param cluster | ||
* The number of graphd/metad/storaged in the cluster | ||
* @param version | ||
* The image version/tag | ||
* @param absoluteHostPathPrefix | ||
* The prefix of your host path, eg: prefix/data/meta1:/data/meta, prefix/logs/meta1:/logs | ||
*/ | ||
final case class ArbitraryNebulaCluster( | ||
cluster: Int = 1, | ||
version: String = Nebula.DefaultTag, | ||
absoluteHostPathPrefix: Option[String] = None, | ||
subnetIp: String = "172.28.0.0/16" | ||
) extends NebulaClusterContainer(cluster, version, absoluteHostPathPrefix, subnetIp) { | ||
|
||
def this(version: String) = | ||
this(1, version, java.util.Optional.empty().toScala) | ||
|
||
def this(cluster: Int) = | ||
this(cluster, Nebula.DefaultTag, java.util.Optional.empty().toScala) | ||
|
||
def this(cluster: Int, version: String, absoluteBindingPath: java.util.Optional[String]) = | ||
this(cluster, version, absoluteBindingPath.toScala) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.