ModuleConfig

cc.otavia.core.config.ModuleConfig
trait ModuleConfig

SPI trait for module-specific configuration.

Modules (handler, codec-, sql-, etc.) can define their own configuration by implementing this trait and registering the config instance with OtaviaConfigBuilder.withModuleConfig. The config system stores module configs by Class key for type-safe retrieval.

Example:

// In handler module:
case class SslConfig(cacheBufferSize: Int = 20480) extends ModuleConfig:
  override def propertyPrefix: String = "cc.otavia.handler.ssl"

// Registration:
val config = OtaviaConfigBuilder()
  .withModuleConfig(SslConfig(cacheBufferSize = 32768))
  .build()

// Retrieval:
val sslCfg = system.config.getModuleConfig(classOf[SslConfig])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SslConfig

Members list

Value members

Abstract methods

def propertyPrefix: String

System property prefix for all properties in this module config.

System property prefix for all properties in this module config.

Used for backward compatibility when reading system properties as fallback.

Attributes