package async_smtp

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

Module Smtp_spool_message.On_disk_spoolSource

Sourcetype t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourcetype spool = t
Sourceval dir : t -> string
Sourceval load : ?create_if_missing:unit -> string -> t Async.Deferred.Or_error.t

Open a Multispool.t. This function will fail by default if the spool directory does not exist, does not look like a spool, or does not contain the set of directories named after the strings returned by Spoolable.Queue.to_dir. Pass ~create_if_missing:() to create the necessary directories.

Note that, even if ~create_if_missing:() is specified, this function will still fail if the supplied directory is non-empty and not already a spool.

Sourceval load_unsafe : string -> t

Open a Multispool.t with no spool directory validation.

Sourceval create : string -> t Async.Deferred.Or_error.t

Open a Multispool.t and create the spool directory if necessary. This is functionally identical to load ?create_if_missing:().

Sourcemodule Data_file : sig ... end

Provide access to a Spoolable.Data.t. Data_file.t functions as a "handle" to the underlying data so the user can choose when to read a Spoolable.Data.t.

Sourcemodule Entry : sig ... end

An Entry is associated with a particular queue

Sourcemodule Unique_name : sig ... end

Add a Spoolable to a queue. An Entry.t is returned, but it may make sense to ignore it.

Sourceval with_entry : f: (On_disk.Metadata.t -> Data_file.t -> ([ `Save of On_disk.Metadata.t * On_disk.Queue.t | `Remove ] * 'a) Async.Deferred.t) -> Entry.t -> 'a Async.Deferred.Or_error.t

Do something with the contents of an entry within f. Use with_entry if you expect to be the only user of an Entry.t and it is an error if the Entry.t is grabbed by another process (or otherwise disappears). See checkout for a lower-level interface.

Sourceval with_entry' : f: (On_disk.Metadata.t -> Data_file.t -> ([ `Save of On_disk.Metadata.t * On_disk.Queue.t | `Remove ] * 'a) Async.Deferred.t) -> Entry.t -> [ `Ok of 'a | `Not_found ] Async.Deferred.Or_error.t

Like with_entry, but use with_entry' if you expect that another process might race to grab an Entry.t and want straightforward handling. See checkout' for a lower-level interface.

Sourcemodule Queue_reader : sig ... end

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

Sourcemodule Expert : sig ... end
OCaml

Innovation. Community. Security.