Module Bounded_queue.Send

Sending side

type 'a t = {
  1. push : 'a list -> unit;
    (*

    Push items. This might discard some of them.

    • raises Closed

      if the queue is closed.

    *)
  2. close : unit -> unit;
    (*

    Close the queue. Items currently in the queue will still be accessible to consumers until the queue is emptied out. Idempotent.

    *)
  3. common : Common.t;
}
val push : 'a t -> 'a list -> unit
val close : 'a t -> unit
val closed : 'a t -> bool
val num_discarded : 'a t -> int
val size : 'a t -> int
val high_watermark : 'a t -> int
val map : ('a list -> 'b list) -> 'b t -> 'a t
val to_emitter : signal_name:string -> close_queue_on_close:bool -> 'a t -> 'a Opentelemetry_emitter.Emitter.t

Turn the writing end of the queue into an emitter.

  • parameter close_queue_on_close

    if true, closing the emitter will close the queue