package tracing

  1. Overview
  2. Docs

See docs in Writer_intf for what this is for

val next_buf : ensure_capacity:int -> (Core.read_write, Iobuf.seek) Iobuf.t

Called mainly when there isn't enough buffer space left to write a message of ensure_capacity bytes and a new buffer is needed. May also be called in certain other situations even if there's enough space in the previous buffer. Any older buffers will no longer be used after calling this function, so it's legal for a Destination to re-use Iobuf.ts to avoid allocating.

val wrote_bytes : int -> unit

Record that the writer appended a certain number of bytes to the buffer, will be called some time after the bytes are written but before next_buf is called.

val close : unit -> unit

We will no longer be writing anything. Resources should be flushed and freed.