namespace EntKube.Provisioning.Domain;

/// <summary>
/// Defines how the provisioning service persists and retrieves service instances.
/// </summary>
public interface IServiceInstanceRepository
{
    Task<ServiceInstance?> GetByIdAsync(Guid id, CancellationToken ct = default);
    Task<IReadOnlyList<ServiceInstance>> GetByClusterIdAsync(Guid clusterId, CancellationToken ct = default);
    Task<IReadOnlyList<ServiceInstance>> GetAllAsync(CancellationToken ct = default);
    Task AddAsync(ServiceInstance instance, CancellationToken ct = default);
    Task UpdateAsync(ServiceInstance instance, CancellationToken ct = default);
}
