using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace StellaOps.Scanner.Queue;

public interface IScanQueue
{
    ValueTask<QueueEnqueueResult> EnqueueAsync(
        ScanQueueMessage message,
        CancellationToken cancellationToken = default);

    ValueTask<IReadOnlyList<IScanQueueLease>> LeaseAsync(
        QueueLeaseRequest request,
        CancellationToken cancellationToken = default);

    ValueTask<IReadOnlyList<IScanQueueLease>> ClaimExpiredLeasesAsync(
        QueueClaimOptions options,
        CancellationToken cancellationToken = default);
}
