aries_cloudagent.multitenant package¶
Subpackages¶
Submodules¶
aries_cloudagent.multitenant.askar_profile_manager module¶
aries_cloudagent.multitenant.base module¶
aries_cloudagent.multitenant.cache module¶
Cache for multitenancy profiles.
-
class
aries_cloudagent.multitenant.cache.
ProfileCache
(capacity: int)[source]¶ Bases:
object
Profile cache that caches based on LRU strategy.
-
get
(key: str) → Optional[aries_cloudagent.core.profile.Profile][source]¶ Get profile with associated key from cache.
If a profile is open but has been evicted from the cache, this will reinsert the profile back into the cache. This prevents attempting to open a profile that is already open. Triggers clean up.
Parameters: key (str) – the key to get the profile for. Returns: Profile if found in cache. Return type: Optional[Profile]
-
has
(key: str) → bool[source]¶ Check whether there is a profile with associated key in the cache.
Parameters: key (str) – the key to check for a profile Returns: Whether the key exists in the cache Return type: bool
-
put
(key: str, value: aries_cloudagent.core.profile.Profile) → None[source]¶ Add profile with associated key to the cache.
If new profile exceeds the cache capacity least recently used profiles that are not used will be removed from the cache.
Parameters: - key (str) – the key to set
- value (Profile) – the profile to set
-
aries_cloudagent.multitenant.error module¶
Multitenant error classes.
-
exception
aries_cloudagent.multitenant.error.
WalletKeyMissingError
(*args, error_code: str = None, **kwargs)[source]¶ Bases:
aries_cloudagent.core.error.BaseError
Wallet key missing exception.
aries_cloudagent.multitenant.manager module¶
aries_cloudagent.multitenant.manager_provider module¶
Profile manager for multitenancy.
-
class
aries_cloudagent.multitenant.manager_provider.
MultitenantManagerProvider
(root_profile)[source]¶ Bases:
aries_cloudagent.config.base.BaseProvider
Multitenant manager provider.
Decides which manager to use based on the settings.
-
MANAGER_TYPES
= {'askar-profile': 'aries_cloudagent.multitenant.askar_profile_manager.AskarProfileMultitenantManager', 'basic': 'aries_cloudagent.multitenant.manager.MultitenantManager'}¶
-
askar_profile_manager_path
= 'aries_cloudagent.multitenant.askar_profile_manager.AskarProfileMultitenantManager'¶
-