pub struct GatewayConfig {
pub host: String,
pub port: u16,
pub token: String,
}Available on crate feature
gateway only.Expand description
Gateway configuration.
Fields§
§host: StringGateway host (default: 127.0.0.1)
port: u16Gateway port
token: StringBearer authentication token
Implementations§
Source§impl GatewayConfig
impl GatewayConfig
Sourcepub fn new(host: impl Into<String>, port: u16, token: impl Into<String>) -> Self
pub fn new(host: impl Into<String>, port: u16, token: impl Into<String>) -> Self
Create a new gateway configuration.
Sourcepub fn from_runtime_dir() -> Result<Self, GatewayError>
pub fn from_runtime_dir() -> Result<Self, GatewayError>
Load configuration from SyniLife runtime directory.
Reads port from ~/Library/Application Support/SyniLife/runtime/gateway.port
and token from ~/Library/Application Support/SyniLife/runtime/gateway.token
Sourcepub fn ingest_url(&self) -> String
pub fn ingest_url(&self) -> String
Get the behavioral ingest endpoint URL.
Sourcepub fn health_url(&self) -> String
pub fn health_url(&self) -> String
Get the health check endpoint URL.
Trait Implementations§
Source§impl Clone for GatewayConfig
impl Clone for GatewayConfig
Source§fn clone(&self) -> GatewayConfig
fn clone(&self) -> GatewayConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GatewayConfig
impl RefUnwindSafe for GatewayConfig
impl Send for GatewayConfig
impl Sync for GatewayConfig
impl Unpin for GatewayConfig
impl UnwindSafe for GatewayConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more