Module Event_log.Writer

Append-only writer. Not thread-safe — use one writer per file.

type t
val create : string -> t

create path opens path for writing, creating it if absent or truncating it if present. Writes the 64-byte header.

val append : t -> Event_types.Event.t -> unit

Append one event. Computes bin_prot size, writes length, crc32, then the bin_prot bytes. Updates running record_count, start_time, end_time.

val close : t -> unit

Flush OS buffers and rewrite the header with final counts/timestamps.

val record_count : t -> int64