ClickHouseClients

The ClickHouse connection settings (wow.clickhouse.*) the Sink and the dataset backend share, and the client-v2 Client of them. Both find their client by one rule (clientOf): the application's Client bean when it has one, which Wow never closes; else one of these settings, which each opens and closes itself; with neither, a Sink that is switched on fails the start, naming both ways.

An application that wants one shared client, or uses ClickHouse itself, declares the bean over the same settings, bound with Spring's Binder (Bindable.mapOf(String::class.java, String::class.java) of wow.clickhouse), and closes it with its context: @Bean(destroyMethod = "close") fun clickHouse(...) = ClickHouseClients.of(settings).

Properties

Link copied to clipboard

The database of the Sink's tables and of a dataset whose table names none.

Link copied to clipboard

The server's HTTP endpoint.

Link copied to clipboard

The password to sign in with.

Link copied to clipboard
const val PREFIX: String

The configuration prefix of the settings.

Link copied to clipboard

The user name to sign in with.

Functions

Link copied to clipboard
fun of(settings: Map<String, String>, key: String = PREFIX): Client

A client of the endpoint and credentials of settings, keys relative to key (endpoint, username, password); fails naming <key>.endpoint when it is not set.