Skip to content
Tracon

IArchiveSink

Namespace Tracon · Assembly Tracon.Abstractions.dll

The cold-storage extension point rows are written to before deletion.

public interface IArchiveSink

There is no default implementation (no cloud SDK dependency is taken). The consumer writes their own sink, based on the file-system example under samples/, and registers it as IArchiveSink.

If none is registered, a policy with archive = true deletes no row — data that cannot be archived is never dropped. This prevents silent data loss.

DI lifetime — singleton, optional. No default implementation is registered. A consumer that registers one must register it as a singleton — it is resolved once, as a constructor parameter of the singleton RetentionExecutor, via IServiceProvider.GetService<IArchiveSink>. A scoped registration would be a captive dependency.

WriteAsync(string, DateTimeOffset, IReadOnlyList<ArchiveRow>, CancellationToken)

Section titled “ WriteAsync(string, DateTimeOffset, IReadOnlyList<ArchiveRow>, CancellationToken)”

Writes a batch of rows to the archive.

ValueTask WriteAsync(string target, DateTimeOffset partitionDate, IReadOnlyList<ArchiveRow> rows, CancellationToken cancellationToken = default)

target string

The target name.

partitionDate DateTimeOffset

The date the batch belongs to (UTC, day precision). The sink may use this to partition the file/object path (for example, run_events/2026-08-05.jsonl.gz).

rows IReadOnlyList<ArchiveRow>

The rows to write.

cancellationToken CancellationToken

The cancellation token.

ValueTask

The completion task.