assets_guardian.core.domain.engines.collector_engineο
Classes
|
IAM collection engine with checkpoint (caching) support. |
|
Result of a single collector execution. |
- class assets_guardian.core.domain.engines.collector_engine.CollectorEngine(cache: CacheManager | None = None)[source]ο
Bases:
objectIAM collection engine with checkpoint (caching) support.
- run_collect(collector: Any, mode: AssetsGuardianMode) CollectorResult[source]ο
Runs a collector with checkpoint (caching) support.
For each data type, checks if it is already present in the cache; if not, triggers a live collection.
- Parameters:
collector β The collector instance to execute.
mode β The command mode (βsyncβ or βauditβ) used to determine the cache namespace.
- Returns:
The result containing collected data or failure info.
- Return type:
- class assets_guardian.core.domain.engines.collector_engine.CollectorResult(source_name: str, instance_id: str, identities: Iterable[Identity] = <factory>, assets: Iterable[Asset] = <factory>, accesses: Iterable[Access] = <factory>, success: bool = True, error: str | None = None)[source]ο
Bases:
objectResult of a single collector execution.
- Variables:
source_name (str) β Name of the source (e.g., βgitlabβ).
instance_id (str) β ID of the collection instance (e.g., βprodβ).
identities (collections.abc.Iterable[assets_guardian.core.domain.models.identity.Identity]) β Iterable of collected identities.
assets (collections.abc.Iterable[assets_guardian.core.domain.models.asset.Asset]) β Iterable of collected assets.
accesses (collections.abc.Iterable[assets_guardian.core.domain.models.access.Access]) β Iterable of collected access data.
success (bool) β Flag indicating if the collection succeeded.
error (str | None) β Error message if the collection failed.