ru.tinkoff.kora.http.server.common.HttpServerConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-server-common Show documentation
Show all versions of http-server-common Show documentation
Kora http-server-common module
The newest version!
package ru.tinkoff.kora.http.server.common;
import ru.tinkoff.kora.config.common.annotation.ConfigValueExtractor;
import ru.tinkoff.kora.http.server.common.telemetry.HttpServerTelemetryConfig;
import java.time.Duration;
@ConfigValueExtractor
public interface HttpServerConfig {
default int publicApiHttpPort() {
return 8080;
}
default int privateApiHttpPort() {
return 8085;
}
default String privateApiHttpMetricsPath() {
return "/metrics";
}
default String privateApiHttpReadinessPath() {
return "/system/readiness";
}
default String privateApiHttpLivenessPath() {
return "/system/liveness";
}
default boolean ignoreTrailingSlash() {
return false;
}
default int ioThreads() {
return Math.max(Runtime.getRuntime().availableProcessors(), 2);
}
default int blockingThreads() {
return Math.min(Math.max(Runtime.getRuntime().availableProcessors(), 2) * 8, 200);
}
default Duration threadKeepAliveTimeout() {
return Duration.ofSeconds(60);
}
default Duration socketReadTimeout() {
return Duration.ZERO;
}
default Duration socketWriteTimeout() {
return Duration.ZERO;
}
default boolean socketKeepAliveEnabled() {
return false;
}
default Duration shutdownWait() {
return Duration.ofSeconds(30);
}
HttpServerTelemetryConfig telemetry();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy