pub struct AsyncFlagPoller { /* private fields */ }Expand description
Asynchronous poller for feature flag definitions.
Runs a tokio task that periodically fetches flag definitions from the
PostHog API and updates the shared cache. Use this for async applications.
For blocking/sync applications, use FlagPoller instead.
Implementations§
Source§impl AsyncFlagPoller
impl AsyncFlagPoller
pub fn new(config: LocalEvaluationConfig, cache: FlagCache) -> Self
Sourcepub async fn load_flags(&self) -> Result<(), Error>
pub async fn load_flags(&self) -> Result<(), Error>
Load flags asynchronously
Sourcepub async fn is_running(&self) -> bool
pub async fn is_running(&self) -> bool
Check if the poller is running
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncFlagPoller
impl !RefUnwindSafe for AsyncFlagPoller
impl Send for AsyncFlagPoller
impl Sync for AsyncFlagPoller
impl Unpin for AsyncFlagPoller
impl !UnwindSafe for AsyncFlagPoller
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