rskit-server
Service-facing server abstractions for rskit.
Responsibilities
- owns the HTTP server abstraction (
HttpServerBuilder,HttpServerConfig) - defines the canonical interceptor ordering: tracing -> logging -> auth -> validation -> handler -> metrics
- exposes health routers and lifecycle-managed startup/shutdown
- remains the home for shared server lifecycle pieces consumed by
rskit-grpc - consumes
rskit-httpfor HTTP transport policy and Tower layer construction - serves HTTP directly over rustls when
HttpServerConfig::tlsis configured - enforces request body limits, request timeout middleware, HTTP/1 header-read timeout, and HTTP/2 keepalive timeout from
HttpServerConfig
Usage
[]
= "0.2.0-alpha.1"
use ;
use ;
use CancellationToken;
let server = new
.with_router
.build?;
TLS policy
HttpServerConfig::tls uses rskit_security::TlsConfig with cert_file and key_file required for direct HTTPS serving. Client-only settings such as skip_verify, ca_file, and server_name are rejected for server TLS.
GrpcServerConfig::tls uses tonic/rustls modern defaults. Server TLS prefers TLS 1.3, permits TLS 1.2 as the compatibility floor, and does not enable legacy protocols.