SinkConfig

class SinkConfig @InternalWowApi constructor(val name: String, val type: String, val options: Map<String, String> = emptyMap(), val resources: StoreResources = StoreResources.NONE, val streams: Set<AggregateType>? = null, val store: Store? = null)

What a SinkProvider opens its sinks from: their name and type, their own settings (options, each key relative to the sink's configuration, endpoint say), and the application's resources.

A Sink that writes into one of the node's stores, as an event search index written into an Elasticsearch store is, has that opened store, and writes the streams the host names, the aggregate types whose events that store is to serve; a Sink of a destination of its own has neither, and writes the streams the Manifest publishes.

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, streams: Set<AggregateType>? = null, store: Store? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val key: String

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
val store: Store?

The node's opened store this Sink writes into, null for a destination of its own.

Link copied to clipboard

The aggregate types this Sink writes, null for the streams the Manifest publishes.

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