Rindle.Analyzer behaviour (Rindle v0.1.5)

Copy Markdown View Source

Behaviour contract for metadata analyzers.

Analyzer callbacks produce normalized metadata maps and must be orchestrated so any storage I/O remains outside database transactions.

Summary

Callbacks

Analyzes the file at source and returns enrichment metadata.

Callbacks

analyze(source)

@callback analyze(source :: Path.t()) :: {:ok, map()} | {:error, term()}

Analyzes the file at source and returns enrichment metadata.

Implementations may inspect the file at source and return adapter-specific metadata (dimensions, EXIF, content fingerprints, etc.) as a normalized map. Storage I/O involved in fetching the source MUST happen outside DB transactions; the analyzer itself receives a local path.