pub struct AsyncGraphRAGCore { /* private fields */ }Expand description
Core async GraphRAG processor with concurrency control and monitoring
Implementations§
Source§impl AsyncGraphRAGCore
impl AsyncGraphRAGCore
Sourcepub async fn new(
graph: KnowledgeGraph,
config: AsyncConfig,
) -> Result<Self, GraphRAGError>
pub async fn new( graph: KnowledgeGraph, config: AsyncConfig, ) -> Result<Self, GraphRAGError>
Creates a new async GraphRAG core instance with configuration
Initializes the knowledge graph, rate limiter, concurrent processor, and metrics tracking system.
§Parameters
graph: Knowledge graph for entity storageconfig: Configuration for async processing behavior
§Returns
Configured async GraphRAG instance, or an error if initialization fails
Sourcepub async fn process_documents_async(
&self,
documents: Vec<Document>,
) -> Result<Vec<ProcessingResult>, GraphRAGError>
pub async fn process_documents_async( &self, documents: Vec<Document>, ) -> Result<Vec<ProcessingResult>, GraphRAGError>
Sourcepub async fn process_single_document_async(
&self,
document: Document,
) -> Result<ProcessingResult, GraphRAGError>
pub async fn process_single_document_async( &self, document: Document, ) -> Result<ProcessingResult, GraphRAGError>
Processes a single document asynchronously with rate limiting
Applies entity extraction and updates the knowledge graph for one document. Automatically handles rate limiting and metrics collection.
§Parameters
document: Document to process
§Returns
Processing result containing extraction statistics, or an error
Sourcepub async fn query_async(&self, query: &str) -> Result<String, GraphRAGError>
pub async fn query_async(&self, query: &str) -> Result<String, GraphRAGError>
Sourcepub fn get_metrics(&self) -> &ProcessingMetrics
pub fn get_metrics(&self) -> &ProcessingMetrics
Sourcepub fn get_config(&self) -> &AsyncConfig
pub fn get_config(&self) -> &AsyncConfig
Sourcepub async fn health_check(&self) -> HealthStatus
pub async fn health_check(&self) -> HealthStatus
Performs health check on all system components
Checks the status of the knowledge graph and rate limiter to determine overall system health.
§Returns
Health status summary for all components
Sourcepub async fn shutdown(&self) -> Result<(), GraphRAGError>
pub async fn shutdown(&self) -> Result<(), GraphRAGError>
Shuts down the async processor gracefully
Allows current operations to complete before shutting down. In a full implementation, this cancels pending tasks and cleans up resources.
§Returns
Ok on successful shutdown, or an error if cleanup fails
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncGraphRAGCore
impl !RefUnwindSafe for AsyncGraphRAGCore
impl Send for AsyncGraphRAGCore
impl Sync for AsyncGraphRAGCore
impl Unpin for AsyncGraphRAGCore
impl UnsafeUnpin for AsyncGraphRAGCore
impl !UnwindSafe for AsyncGraphRAGCore
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> 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