AdminConfig

data class AdminConfig(val enabled: Boolean, val port: Int, val pingPath: String, val versionPath: String, val healthCheckPath: String, val threadDumpPath: String, val host: String? = null, val filters: List<Filter> = [])

Configuration data for administrative HTTP endpoints exposed by GenericService and GenericKtorService.

Controls whether the admin servlet group is enabled and defines the port, bind address, filters, and URL paths for standard operational endpoints (ping, version, health check, thread dump). Paths may be given with or without a leading slash.

The endpoints are served without authentication unless filters add it, and they reveal a good deal: the thread dump shows every thread's stack, and the health check names each check and whether it passes. So the admin server binds only loopback unless host says otherwise, and binding every interface logs a WARN.

Constructors

Link copied to clipboard
constructor(enabled: Boolean, port: Int, pingPath: String, versionPath: String, healthCheckPath: String, threadDumpPath: String, host: String? = null, filters: List<Filter> = [])

Properties

Link copied to clipboard

Whether the admin endpoints are enabled.

Link copied to clipboard
val filters: List<Filter>

Servlet filters that every request to the admin server passes through, in list order, before it reaches an endpoint: the built-in ones and those the init method's servlet block adds. A filter can answer a request itself, for example with a 401, to require authentication. Empty by default. On GenericKtorService's server they wrap each servlet, so a request for a path no servlet serves, or for a route the initKtor block adds, does not pass through them. A filter instance given to both this and MetricsConfig.filters is initialized and destroyed by each server.

Link copied to clipboard

The URL path for the health check endpoint.

Link copied to clipboard
val host: String?

The interface the admin server binds to. The default, null, binds 127.0.0.1, so only local clients can connect; use "0.0.0.0" to accept connections on every interface. Before 6.0.0, null bound every interface.

Link copied to clipboard

The URL path for the ping (liveness) endpoint.

Link copied to clipboard
val port: Int

The HTTP port on which admin servlets are served.

Link copied to clipboard

The URL path for the thread dump endpoint.

Link copied to clipboard

The URL path for the version information endpoint.