pub struct ValidatorAgent {
pub id: String,
pub config: ValidatorAgentConfig,
pub communication_hub: Arc<CommunicationHub>,
pub file_lock_manager: Arc<FileLockManager>,
pub status: Arc<RwLock<ValidatorAgentStatus>>,
}Expand description
A standalone, read-only agent that runs external validators and returns a structured result to the orchestrator.
Fields§
§id: StringUnique identifier for this validator agent.
config: ValidatorAgentConfigConfiguration.
communication_hub: Arc<CommunicationHub>Communication hub for broadcasting status messages.
file_lock_manager: Arc<FileLockManager>File lock manager for acquiring read locks.
status: Arc<RwLock<ValidatorAgentStatus>>Observable status.
Implementations§
Source§impl ValidatorAgent
impl ValidatorAgent
Sourcepub fn new(
id: impl Into<String>,
config: ValidatorAgentConfig,
communication_hub: Arc<CommunicationHub>,
file_lock_manager: Arc<FileLockManager>,
) -> Self
pub fn new( id: impl Into<String>, config: ValidatorAgentConfig, communication_hub: Arc<CommunicationHub>, file_lock_manager: Arc<FileLockManager>, ) -> Self
Create a new ValidatorAgent.
Sourcepub async fn validate(&self) -> Result<ValidatorAgentResult>
pub async fn validate(&self) -> Result<ValidatorAgentResult>
Run the full validation pipeline.
- Register with the communication hub, broadcast
AgentSpawned. - Acquire read locks on all
working_set_files(best-effort). - Run
run_validationwith a wall-clock timeout. - Release locks, broadcast
AgentCompleted, unregister.
Auto Trait Implementations§
impl Freeze for ValidatorAgent
impl !RefUnwindSafe for ValidatorAgent
impl Send for ValidatorAgent
impl Sync for ValidatorAgent
impl Unpin for ValidatorAgent
impl UnsafeUnpin for ValidatorAgent
impl !UnwindSafe for ValidatorAgent
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