diff options
Diffstat (limited to 'crates/turtle/src/atuin_daemon/components/search.rs')
| -rw-r--r-- | crates/turtle/src/atuin_daemon/components/search.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/turtle/src/atuin_daemon/components/search.rs b/crates/turtle/src/atuin_daemon/components/search.rs index 85191cff..17decdad 100644 --- a/crates/turtle/src/atuin_daemon/components/search.rs +++ b/crates/turtle/src/atuin_daemon/components/search.rs @@ -34,7 +34,7 @@ const FRECENCY_REFRESH_INTERVAL_SECS: u64 = 60; /// - Loads history from the database on startup /// - Updates the index when history events occur /// - Provides the Search gRPC service -pub struct SearchComponent { +pub(crate) struct SearchComponent { index: Arc<RwLock<SearchIndex>>, handle: tokio::sync::RwLock<Option<DaemonHandle>>, loader_handle: Option<tokio::task::JoinHandle<()>>, @@ -43,7 +43,7 @@ pub struct SearchComponent { impl SearchComponent { /// Create a new search component. - pub fn new() -> Self { + pub(crate) fn new() -> Self { Self { index: Arc::new(RwLock::new(SearchIndex::new())), handle: tokio::sync::RwLock::new(None), @@ -53,7 +53,7 @@ impl SearchComponent { } /// Get the gRPC service for this component. - pub fn grpc_service(&self) -> SearchServer<SearchGrpcService> { + pub(crate) fn grpc_service(&self) -> SearchServer<SearchGrpcService> { SearchServer::new(SearchGrpcService { index: self.index.clone(), }) @@ -273,7 +273,7 @@ impl Component for SearchComponent { } /// The gRPC service implementation. -pub struct SearchGrpcService { +pub(crate) struct SearchGrpcService { index: Arc<RwLock<SearchIndex>>, } @@ -395,7 +395,7 @@ fn convert_filter_mode( } #[cfg(windows)] -pub fn with_trailing_slash(s: &str) -> String { +pub(crate) fn with_trailing_slash(s: &str) -> String { if s.ends_with('\\') { s.to_string() } else { @@ -404,7 +404,7 @@ pub fn with_trailing_slash(s: &str) -> String { } #[cfg(not(windows))] -pub fn with_trailing_slash(s: &str) -> String { +pub(crate) fn with_trailing_slash(s: &str) -> String { if s.ends_with('/') { s.to_string() } else { |
