pub(crate) async fn check_for_keyset_changes(&mut self) {
        let registry_version = self.registry.get_latest_version();
        if self.last_seen_registry_version == registry_version {
            return;
        }
        debug!(
            self.logger,
            "Checking for the access keys in the registry version: {}", registry_version
        );

        let (new_readonly_keys, new_backup_keys) = match self
            .registry
            .get_own_readonly_and_backup_keysets(registry_version)
        {
            Err(error) => {
                warn!(
                    every_n_seconds => 300,
                    self.logger,
                    "Cannot retrieve the readonly & backup keysets from the registry {}", error
                );
                return;
            }
            Ok(keys) => keys,
        };

        // Update the readonly & backup keys. If it fails, log why.
        if self.update_access_keys(&new_readonly_keys, &new_backup_keys) {
            self.last_seen_registry_version = registry_version;
            self.metrics
                .ssh_access_registry_version
                .set(registry_version.get() as i64);
        }
    }
/// Checks for changes in the keysets, and updates the node accordingly.
Checks for changes in the keysets, and updates the node accordingly.
Checks for changes in the keysets and updates the node accordingly .
pub(crate) async fn check_for_keyset_changes(&mut self) {
        let registry_version = self.registry.get_latest_version();
        if self.last_seen_registry_version == registry_version {
            return;
        }
        debug!(
            self.logger,
            "Checking for the access keys in the registry version: {}", registry_version
        );
        let (new_readonly_keys, new_backup_keys) = match self
            .registry
            .get_own_readonly_and_backup_keysets(registry_version)
        {
            Err(error) => {
                warn!(
                    every_n_seconds => 300,
                    self.logger,
                    "Cannot retrieve the readonly & backup keysets from the registry {}", error
                );
                return;
            }
            Ok(keys) => keys,
        };
        // Update the readonly & backup keys. If it fails, log why.
        if self.update_access_keys(&new_readonly_keys, &new_backup_keys) {
            self.last_seen_registry_version = registry_version;
            self.metrics
                .ssh_access_registry_version
                .set(registry_version.get() as i64);
        }
    }
pub ( crate ) async fn check_for_keyset_changes ( & mut self ) { let registry_version = self . registry . get_latest_version ( ) ; if self . last_seen_registry_version == registry_version { return ; } debug ! ( self logger " " registry_version ) ; let ( new_readonly_keys , new_backup_keys ) = match self . registry . get_own_readonly_and_backup_keysets ( registry_version ) { Err ( error ) => { warn ! ( every_n_seconds 300 self logger " " error ) ; return ; } Ok ( keys ) => keys , } ; // Update the readonly & backup keys. If it fails, log why. if self . update_access_keys ( & new_readonly_keys , & new_backup_keys ) { self . last_seen_registry_version = registry_version ; self . metrics . ssh_access_registry_version . set ( registry_version . get ( ) as i64 ) ; } }
Checks for changes in the keysets, and updates the node accordingly.
Checks for changes in the keysets and updates the node accordingly .
&mut self
&mut self