using StellaOps.Signals.Models;
namespace StellaOps.Signals.Persistence;
///
/// Repository for persisting and querying proc snapshot documents.
///
public interface IProcSnapshotRepository
{
///
/// Upsert a proc snapshot document.
///
Task UpsertAsync(ProcSnapshotDocument document, CancellationToken cancellationToken);
///
/// Get a proc snapshot by ID.
///
Task GetByIdAsync(string id, CancellationToken cancellationToken);
///
/// Get all proc snapshots for a specific image digest.
///
Task> GetByImageDigestAsync(
string tenant,
string imageDigest,
int limit = 100,
CancellationToken cancellationToken = default);
///
/// Get the most recent proc snapshot for an image digest and runtime type.
///
Task GetLatestAsync(
string tenant,
string imageDigest,
string runtimeType,
CancellationToken cancellationToken);
///
/// Delete expired proc snapshots.
///
Task DeleteExpiredAsync(CancellationToken cancellationToken);
}