TransportConfig

class TransportConfig @InternalWowApi constructor(val name: String, val type: String, val options: Map<String, String> = emptyMap(), val resources: StoreResources = StoreResources.NONE, val development: Boolean = false, val observer: Observer = Observer.NONE)

What a TransportProvider opens a transport from: its name and type, its own settings (options, each key relative to the transport's configuration, bootstrap-servers say), the application's resources, and whether the node runs for development (a profile of wow.dev-profiles is active, or its internal port binds a loopback address alone): a provider may say less then.

Fields may be added: the host builds it, so the constructor is internal to Wow; a provider's test builds one with of.

Constructors

Link copied to clipboard
constructor(name: String, type: String, options: Map<String, String> = emptyMap(), resources: StoreResources = StoreResources.NONE, development: Boolean = false, observer: Observer = Observer.NONE)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val key: String

The configuration key of the transport's settings, for a provider's failures to name.

Link copied to clipboard
Link copied to clipboard

The node's observer, which the transport tells what it meets, such as an offset gap.

Link copied to clipboard
Link copied to clipboard

The keys of options the transport asked for, so a test can hold them to the options its provider declares.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun option(name: String): String?

The setting name of options, or null when it is not set or blank.

fun <T : Any> option(option: ProviderOption.Defaulted<T>): T

The value of the ProviderOption.Defaulted option: its setting, parsed, else its default, so always one.

fun <T : Any> option(option: ProviderOption<T>): T?

The value of option: its setting in options, parsed, else its default; fails naming the setting when the value is not one of the option's type.

Link copied to clipboard
fun options(prefix: String): Map<String, String>

The settings under prefix, their keys relative to it.

The settings under the map option (ProviderOption.map), their keys relative to it.

Link copied to clipboard
open override fun toString(): String