Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
GatewayConfig
Defined in the gateway module.
Rust AI Agent SDK
Configuration for a gateway.
Fields
| Name | Type | Description |
|---|
host | String | Host to bind to |
port | u16 | Port to listen on |
max_connections | usize | Maximum connections |
session_timeout | u64 | Session timeout in seconds |
auth_enabled | bool | Enable authentication |
auth_token | Option<String> | Authentication token (if auth_enabled) |
tls_enabled | bool | Enable TLS |
tls_cert_path | Option<String> | TLS certificate path |
tls_key_path | Option<String> | TLS key path |
Methods
new
Create a new config with defaults.
host
fn host(mut self, host: impl Into<String>) -> Self
Set host.
Parameters:
| Name | Type |
|---|
host | impl Into<String> |
port
fn port(mut self, port: u16) -> Self
Set port.
Parameters:
max_connections
fn max_connections(mut self, max: usize) -> Self
Set max connections.
Parameters:
session_timeout
fn session_timeout(mut self, timeout: u64) -> Self
Set session timeout.
Parameters:
auth
fn auth(mut self, token: impl Into<String>) -> Self
Enable authentication with token.
Parameters:
| Name | Type |
|---|
token | impl Into<String> |
tls
fn tls(mut self, cert_path: impl Into<String>, key_path: impl Into<String>) -> Self
Enable TLS.
Parameters:
| Name | Type |
|---|
cert_path | impl Into<String> |
key_path | impl Into<String> |
Source
View on GitHub
praisonai/src/gateway/mod.rs at line 298