fun <A> driver(baseDirectory: String = "build/${getTimestampAsDirectoryName()}", portAllocation: PortAllocation = PortAllocation.Incremental(10000), debugPortAllocation: PortAllocation = PortAllocation.Incremental(5005), isDebug: Boolean = false, dsl: DriverDSLExposedInterface.() -> A): A
driver allows one to start up nodes like this: driver { val noService = startNode("NoService") val notary = startNode("Notary")
(...) }
Note that DriverDSL.startNode does not wait for the node to start up synchronously, but rather returns a Future of the NodeInfo that may be waited on, which completes when the new node registered with the network map service.
The driver implicitly bootstraps a NetworkMapService that may be accessed through a local cache DriverDSL.networkMapCache.
baseDirectory
- The base directory node directories go into, defaults to "build//". The node
directories themselves are "//", where legalName defaults to "-"
and may be specified in DriverDSL.startNode.portAllocation
- The port allocation strategy to use for the messaging and the web server addresses. Defaults to incremental.debugPortAllocation
- The port allocation strategy to use for jvm debugging. Defaults to incremental.isDebug
- Indicates whether the spawned nodes should start in jdwt debug mode.dsl
- The dsl itself.Return
The value returned in the dsl closure.