pub struct DaemonConfig {
pub socket_path: PathBuf,
pub data_dir: PathBuf,
pub state_dir: PathBuf,
pub ws_port: Option<u16>,
pub grace_period_secs: u64,
}Expand description
Configuration for the daemon.
Fields§
§socket_path: PathBufPath to the daemon UDS socket (ephemeral, platform-native temp dir).
data_dir: PathBufDirectory for chat files. Each room gets <data_dir>/<room_id>.chat.
Defaults to ~/.room/data/; overridable with --data-dir.
state_dir: PathBufDirectory for state files (token maps, cursors, subscriptions).
Defaults to ~/.room/state/.
ws_port: Option<u16>Optional WebSocket/REST port.
grace_period_secs: u64Seconds to wait after the last connection closes before shutting down.
Default is 30 seconds. Set to 0 for immediate shutdown when the last client disconnects. Has no effect if there are always active connections.
Implementations§
Source§impl DaemonConfig
impl DaemonConfig
Sourcepub fn token_map_path(&self, room_id: &str) -> PathBuf
pub fn token_map_path(&self, room_id: &str) -> PathBuf
Resolve the token-map persistence path for a given room.
Sourcepub fn system_tokens_path(&self) -> PathBuf
pub fn system_tokens_path(&self) -> PathBuf
System-level token persistence path: <state_dir>/tokens.json.
Used by the daemon to share a single token store across all rooms.
Production default is ~/.room/state/tokens.json; tests override
state_dir with a temp directory.
Sourcepub fn subscription_map_path(&self, room_id: &str) -> PathBuf
pub fn subscription_map_path(&self, room_id: &str) -> PathBuf
Resolve the subscription-map persistence path for a given room.
Sourcepub fn event_filter_map_path(&self, room_id: &str) -> PathBuf
pub fn event_filter_map_path(&self, room_id: &str) -> PathBuf
Resolve the event-filter-map persistence path for a given room.
Trait Implementations§
Source§impl Clone for DaemonConfig
impl Clone for DaemonConfig
Source§fn clone(&self) -> DaemonConfig
fn clone(&self) -> DaemonConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DaemonConfig
impl Debug for DaemonConfig
Source§impl Default for DaemonConfig
impl Default for DaemonConfig
Source§fn default() -> DaemonConfig
fn default() -> DaemonConfig
Auto Trait Implementations§
impl Freeze for DaemonConfig
impl RefUnwindSafe for DaemonConfig
impl Send for DaemonConfig
impl Sync for DaemonConfig
impl Unpin for DaemonConfig
impl UnsafeUnpin for DaemonConfig
impl UnwindSafe for DaemonConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more