pub struct SyncService { /* private fields */ }Expand description
Sync service for polling upstream APIs and detecting changes
Implementations§
Source§impl SyncService
impl SyncService
Sourcepub fn new(config: SyncConfig, database: Arc<RecorderDatabase>) -> Self
pub fn new(config: SyncConfig, database: Arc<RecorderDatabase>) -> Self
Create a new sync service
Sourcepub fn start(&self) -> JoinHandle<()>
pub fn start(&self) -> JoinHandle<()>
Start the sync service (runs in background)
Sourcepub async fn sync_with_gitops(
&self,
gitops_handler: Option<&GitOpsSyncHandler>,
) -> Result<(Vec<DetectedChange>, usize, Option<PRResult>)>
pub async fn sync_with_gitops( &self, gitops_handler: Option<&GitOpsSyncHandler>, ) -> Result<(Vec<DetectedChange>, usize, Option<PRResult>)>
Perform sync with GitOps integration
Sourcepub async fn sync_with_gitops_and_drift(
&self,
gitops_handler: Option<&GitOpsSyncHandler>,
drift_evaluator: Option<&SyncDriftEvaluator>,
) -> Result<(Vec<DetectedChange>, usize, Option<PRResult>)>
pub async fn sync_with_gitops_and_drift( &self, gitops_handler: Option<&GitOpsSyncHandler>, drift_evaluator: Option<&SyncDriftEvaluator>, ) -> Result<(Vec<DetectedChange>, usize, Option<PRResult>)>
Perform sync with GitOps and drift budget evaluation
Sourcepub async fn get_status(&self) -> SyncStatus
pub async fn get_status(&self) -> SyncStatus
Get current sync status
Sourcepub async fn get_config(&self) -> SyncConfig
pub async fn get_config(&self) -> SyncConfig
Get sync configuration
Sourcepub async fn update_config(&self, new_config: SyncConfig)
pub async fn update_config(&self, new_config: SyncConfig)
Update sync configuration
Auto Trait Implementations§
impl Freeze for SyncService
impl !RefUnwindSafe for SyncService
impl Send for SyncService
impl Sync for SyncService
impl Unpin for SyncService
impl !UnwindSafe for SyncService
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