pub struct ServerBuilder { /* private fields */ }Expand description
Builder for configuring and creating a HyperStack server
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn websocket_config(self, config: WebSocketConfig) -> Self
pub fn websocket_config(self, config: WebSocketConfig) -> Self
Configure WebSocket server
Sourcepub fn websocket_auth_plugin(self, plugin: Arc<dyn WebSocketAuthPlugin>) -> Self
pub fn websocket_auth_plugin(self, plugin: Arc<dyn WebSocketAuthPlugin>) -> Self
Set a WebSocket auth plugin used to authorize inbound connections.
Sourcepub fn websocket_usage_emitter(
self,
emitter: Arc<dyn WebSocketUsageEmitter>,
) -> Self
pub fn websocket_usage_emitter( self, emitter: Arc<dyn WebSocketUsageEmitter>, ) -> Self
Set an async usage emitter for billing-grade websocket usage events.
Sourcepub fn websocket_max_clients(self, max_clients: usize) -> Self
pub fn websocket_max_clients(self, max_clients: usize) -> Self
Set the maximum number of concurrent WebSocket clients.
Sourcepub fn websocket_rate_limit_config(self, config: RateLimitConfig) -> Self
pub fn websocket_rate_limit_config(self, config: RateLimitConfig) -> Self
Configure rate limiting for WebSocket connections.
This sets global rate limits such as maximum connections per IP, timeouts, and rate windows. Per-subject limits are controlled via AuthContext.Limits from the authentication token.
Sourcepub fn bind(self, addr: impl Into<SocketAddr>) -> Self
pub fn bind(self, addr: impl Into<SocketAddr>) -> Self
Set the bind address for WebSocket server
Sourcepub fn yellowstone(self, config: YellowstoneConfig) -> Self
pub fn yellowstone(self, config: YellowstoneConfig) -> Self
Configure Yellowstone gRPC connection
Sourcepub fn health_monitoring(self) -> Self
pub fn health_monitoring(self) -> Self
Enable health monitoring with default configuration
Sourcepub fn health_config(self, config: HealthConfig) -> Self
pub fn health_config(self, config: HealthConfig) -> Self
Configure health monitoring
Sourcepub fn reconnection(self) -> Self
pub fn reconnection(self) -> Self
Enable reconnection with default configuration
Sourcepub fn reconnection_config(self, config: ReconnectionConfig) -> Self
pub fn reconnection_config(self, config: ReconnectionConfig) -> Self
Configure reconnection behavior
Sourcepub fn http_health(self) -> Self
pub fn http_health(self) -> Self
Enable HTTP health server with default configuration (port 8081)
Sourcepub fn http_health_config(self, config: HttpHealthConfig) -> Self
pub fn http_health_config(self, config: HttpHealthConfig) -> Self
Configure HTTP health server
Sourcepub fn health_bind(self, addr: impl Into<SocketAddr>) -> Self
pub fn health_bind(self, addr: impl Into<SocketAddr>) -> Self
Set the bind address for HTTP health server