package async_smtp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Interface for iteration and waiting on queue activity. Multiple processes will not interfere with one another.

type t
val create : spool -> S.Queue.t -> t Async.Deferred.Or_error.t
val iter : ?stop:unit Async.Deferred.t -> f: (S.Metadata.t -> Data_file.t -> [ `Save of S.Metadata.t * S.Queue.t | `Remove ] Async.Deferred.t) -> t -> unit Async.Deferred.Or_error.t

Iterate over entries in a queue and call f on each, and wait for a new entry if the list is exhausted.

val iter_available : f: (S.Metadata.t -> Data_file.t -> [ `Save of S.Metadata.t * S.Queue.t | `Remove ] Async.Deferred.t) -> t -> unit Async.Deferred.Or_error.t

Iterate over entries in a queue and call f on each, if any are available. Do not wait.

OCaml

Innovation. Community. Security.