pub struct ValknutEngine { /* private fields */ }Expand description
Main valknut analysis engine
Implementations§
Source§impl ValknutEngine
Factory and analysis methods for ValknutEngine.
impl ValknutEngine
Factory and analysis methods for ValknutEngine.
Sourcepub async fn new(config: ApiAnalysisConfig) -> Result<Self>
pub async fn new(config: ApiAnalysisConfig) -> Result<Self>
Create a new valknut engine with the given configuration
Sourcepub async fn new_from_valknut_config(
valknut_config: ValknutConfig,
) -> Result<Self>
pub async fn new_from_valknut_config( valknut_config: ValknutConfig, ) -> Result<Self>
Create a new engine directly from a fully-populated ValknutConfig.
This avoids lossy round-trips through the public API config when we need to preserve advanced settings like denoising and dedupe thresholds.
Sourcepub async fn analyze_directory<P: AsRef<Path>>(
&mut self,
path: P,
) -> Result<AnalysisResults>
pub async fn analyze_directory<P: AsRef<Path>>( &mut self, path: P, ) -> Result<AnalysisResults>
Analyze a directory of code files
Sourcepub async fn analyze_files<P: AsRef<Path>>(
&mut self,
files: &[P],
) -> Result<AnalysisResults>
pub async fn analyze_files<P: AsRef<Path>>( &mut self, files: &[P], ) -> Result<AnalysisResults>
Analyze specific files
Sourcepub async fn analyze_vectors(
&mut self,
vectors: Vec<FeatureVector>,
) -> Result<AnalysisResults>
pub async fn analyze_vectors( &mut self, vectors: Vec<FeatureVector>, ) -> Result<AnalysisResults>
Analyze pre-extracted feature vectors (for testing and advanced usage)
Sourcepub fn config(&self) -> &ValknutConfig
pub fn config(&self) -> &ValknutConfig
Get the current configuration
Sourcepub fn get_status(&self) -> EngineStatus
pub fn get_status(&self) -> EngineStatus
Get pipeline status information
Sourcepub async fn health_check(&self) -> HealthCheckResult
pub async fn health_check(&self) -> HealthCheckResult
Perform a health check of the engine
Auto Trait Implementations§
impl Freeze for ValknutEngine
impl !RefUnwindSafe for ValknutEngine
impl Send for ValknutEngine
impl Sync for ValknutEngine
impl Unpin for ValknutEngine
impl !UnwindSafe for ValknutEngine
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
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>
Converts
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>
Converts
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