MockzillaConfig

data class MockzillaConfig(val port: Int, val endpoints: List<EndpointConfiguration>, val isRelease: Boolean, val localhostOnly: Boolean, val logLevel: MockzillaConfig.LogLevel, val releaseModeConfig: MockzillaConfig.ReleaseModeConfig, val isNetworkDiscoveryEnabled: Boolean, val additionalLogWriters: List<MockzillaLogWriter>)

Top-level configuration for a Mockzilla server instance. All properties are set via MockzillaConfig.Builder.

Constructors

Link copied to clipboard
constructor(port: Int, endpoints: List<EndpointConfiguration>, isRelease: Boolean, localhostOnly: Boolean, logLevel: MockzillaConfig.LogLevel, releaseModeConfig: MockzillaConfig.ReleaseModeConfig, isNetworkDiscoveryEnabled: Boolean, additionalLogWriters: List<MockzillaLogWriter>)

Types

Link copied to clipboard
class Builder
Link copied to clipboard

Defines the verbosity of Mockzilla's internal logging.

Link copied to clipboard
data class ReleaseModeConfig(val rateLimit: Int = 60, val rateLimitRefillPeriod: Duration = 60.seconds, val tokenLifeSpan: Duration = 0.5.seconds)

Rate Limiting: Uses Ktor's rate limiting, params described here: https://ktor.io/docs/rate-limit.html#configure-rate-limiting Each network call will require a token with the provided lifespan

Properties

Link copied to clipboard

Extra log sinks in addition to standard output.

Link copied to clipboard

The mock endpoints registered on this server.

Link copied to clipboard

When true, Mockzilla broadcasts itself via ZeroConf (Bonjour) so the management desktop can discover it. Always disabled in release mode.

Link copied to clipboard

When true, activates release mode: rate limiting, token authentication, and localhost-only restrictions are applied. See ReleaseModeConfig for details.

Link copied to clipboard

When true, the server only accepts connections from 127.0.0.1, blocking the management desktop interface and other external tools.

Link copied to clipboard

Verbosity of Mockzilla's internal logging.

Link copied to clipboard
val port: Int

The port the server binds to. 0 causes the OS to assign an available port.

Link copied to clipboard

Rate limiting and authentication config applied in release mode.