Struct unleash_edge::http::feature_refresher::FeatureRefresher
source · pub struct FeatureRefresher {
pub unleash_client: Arc<UnleashClient>,
pub tokens_to_refresh: Arc<DashMap<String, TokenRefresh>>,
pub features_cache: Arc<DashMap<String, ClientFeatures>>,
pub engine_cache: Arc<DashMap<String, EngineState>>,
pub refresh_interval: Duration,
pub persistence: Option<Arc<dyn EdgePersistence>>,
}
Fields§
§unleash_client: Arc<UnleashClient>
§tokens_to_refresh: Arc<DashMap<String, TokenRefresh>>
§features_cache: Arc<DashMap<String, ClientFeatures>>
§engine_cache: Arc<DashMap<String, EngineState>>
§refresh_interval: Duration
§persistence: Option<Arc<dyn EdgePersistence>>
Implementations§
source§impl FeatureRefresher
impl FeatureRefresher
pub fn new( unleash_client: Arc<UnleashClient>, features: Arc<DashMap<String, ClientFeatures>>, engines: Arc<DashMap<String, EngineState>>, features_refresh_interval: Duration, persistence: Option<Arc<dyn EdgePersistence>> ) -> Self
pub fn with_client(client: Arc<UnleashClient>) -> Self
sourcepub async fn register_token_for_refresh(
&self,
token: EdgeToken,
etag: Option<EntityTag>
)
pub async fn register_token_for_refresh( &self, token: EdgeToken, etag: Option<EntityTag> )
Registers a token for refresh, the token will be discarded if it can be subsumed by another previously registered token
pub async fn start_refresh_features_background_task(&self)
pub async fn hydrate_new_tokens(&self)
pub async fn refresh_features(&self)
pub async fn refresh_single(&self, refresh: TokenRefresh)
pub fn backoff(&self, token: &EdgeToken)
pub fn update_last_check(&self, token: &EdgeToken)
pub fn update_last_refresh(&self, token: &EdgeToken, etag: Option<EntityTag>)
Trait Implementations§
source§impl Clone for FeatureRefresher
impl Clone for FeatureRefresher
source§fn clone(&self) -> FeatureRefresher
fn clone(&self) -> FeatureRefresher
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FeatureRefresher
impl !RefUnwindSafe for FeatureRefresher
impl Send for FeatureRefresher
impl Sync for FeatureRefresher
impl Unpin for FeatureRefresher
impl !UnwindSafe for FeatureRefresher
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