ProxyHttpService

internal class ProxyHttpService(proxy: Proxy, val httpPort: Int, isTestMode: Boolean) : GenericIdleService(source)

HTTP server that serves Prometheus scrape requests.

Runs a Ktor CIO embedded server on a configurable port. Incoming HTTP GET requests are routed by ProxyHttpRoutes to the appropriate agent via gRPC, and the scraped metrics are returned to Prometheus. Also serves the optional service discovery endpoint.

Parameters

proxy

the parent Proxy instance

httpPort

the HTTP listen port for Prometheus scrape requests

isTestMode

when true, suppresses verbose logging during tests

See also

Constructors

Link copied to clipboard
constructor(proxy: Proxy, httpPort: Int, isTestMode: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addListener(listener: Service.Listener, executor: Executor)
Link copied to clipboard
fun awaitRunning(timeout: Duration)
fun awaitRunning(timeout: Long, unit: TimeUnit)
Link copied to clipboard
fun awaitTerminated(timeout: Long, unit: TimeUnit)
Link copied to clipboard
Link copied to clipboard
@CanIgnoreReturnValue
fun startAsync(): Service
Link copied to clipboard
fun startSync(maxWait: Duration)
Link copied to clipboard
fun state(): Service.State
Link copied to clipboard
@CanIgnoreReturnValue
fun stopAsync(): Service
Link copied to clipboard
fun stopSync(maxWait: Duration)
Link copied to clipboard
open override fun toString(): String