TegralApplicationBuilder

Builder for a Tegral application. This class allows you to install features, tweak the application's configuration, add modules, classes and components of your own, etc. This is the class that is used as a receiver within the tegral block.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Applies sane defaults to the given application builder. Specifically, this function:

Link copied to clipboard
open override fun build(): TegralApplication
Link copied to clipboard
open override fun <T> install(featureBuilder: FeatureBuilder<T>)

Adds a feature that will be installed in the application upon build.

Link copied to clipboard

Install the feature onto this application.

fun <T> TegralApplicationDsl.install(feature: Feature<T>, configBlock: T.(FeatureContext) -> Unit)

Install the feature onto this application, additionally configuring it with the provided lambda.

Link copied to clipboard
open override fun meta(action: ContextBuilderDsl.() -> Unit)
Link copied to clipboard
open override fun <T : Any> put(declaration: Declaration<T>)
Link copied to clipboard
open override fun useConfiguration(configuration: ConfigLoaderBuilder.() -> Unit)

Configures the ConfigLoaderBuilder used to load application configuration using the given lambda.

open override fun <T : RootConfig> useConfiguration(configClass: KClass<T>, configuration: ConfigLoaderBuilder.() -> Unit)

Sets the class to use for loading the configuration classes and optionally applies custom logic to the Hoplite ConfigLoaderBuilder instance.

Link copied to clipboard
inline fun <T : RootConfig> TegralApplicationDsl.useConfiguration(noinline configuration: ConfigLoaderBuilder.() -> Unit = {})

Equivalent to TegralApplicationDsl.useConfiguration, but uses a reified type instead.

Properties

Link copied to clipboard
open override val configSources: MutableList<ConfigSource>

List of all the Hoplite configuration sources that will be used to load this application.