//
// Copyright (c) StellaOps. Licensed under AGPL-3.0-or-later.
//
namespace StellaOps.Facet;
///
/// Extracts facet information from container images.
///
public interface IFacetExtractor
{
///
/// Extract facets from a local directory (unpacked image).
///
/// Path to the unpacked image root.
/// Extraction options.
/// Cancellation token.
/// Extraction result with all facet entries.
Task ExtractFromDirectoryAsync(
string rootPath,
FacetExtractionOptions? options = null,
CancellationToken ct = default);
///
/// Extract facets from a tar archive.
///
/// Stream containing the tar archive.
/// Extraction options.
/// Cancellation token.
/// Extraction result with all facet entries.
Task ExtractFromTarAsync(
Stream tarStream,
FacetExtractionOptions? options = null,
CancellationToken ct = default);
///
/// Extract facets from an OCI image layer.
///
/// Stream containing the layer (tar.gz).
/// Extraction options.
/// Cancellation token.
/// Extraction result with all facet entries.
Task ExtractFromOciLayerAsync(
Stream layerStream,
FacetExtractionOptions? options = null,
CancellationToken ct = default);
}