StrategyRouter

class StrategyRouter(config: ProxyConfig, serviceRegistry: ServiceRegistry, fallback: RoutingStrategy) : Router

Router that delegates backend selection to a pluggable strategy.

Constructors

Link copied to clipboard
constructor(config: ProxyConfig, serviceRegistry: ServiceRegistry, fallback: RoutingStrategy)

Functions

Link copied to clipboard
open override fun findBackend(id: String): BackendConfig?

Finds a backend by its identifier, or null if not found.

Link copied to clipboard
open override fun selectBackend(context: RoutingContext): BackendConfig

Selects a backend for a validated connect request.

Link copied to clipboard

Returns the initial backend for a new connection.