package tezos-stdlib-unix

  1. Overview
  2. Docs

The module Query provides a fold function over the events stored by a given instantiation of the SINK.t.

module Time_constraint : sig ... end
module Report : sig ... end

The fold function returns a list of non-fatal errors and warnings that happened during the scan, those are defined in Report.item.

val fold : ?on_unknown:(string -> unit Tezos_error_monad.Error_monad.tzresult Lwt.t) -> ?only_sections:string option list -> ?only_names:string list -> ?time_query:Time_constraint.t -> Uri.t -> init:'a -> f: ('a -> time_stamp:float -> Tezos_event_logging.Internal_event.Generic.event -> 'a Tezos_error_monad.Error_monad.tzresult Lwt.t) -> (Report.item list * 'a) Tezos_error_monad.Error_monad.tzresult Lwt.t

Scan a folder for events.

  • ?on_unknown is a function which takes a path to a JSON file.
  • ?only_sections is an optional filter on the sections in which the events have been emitted (Internal_event.Section.t).
  • ?only_names is an optional filter on the event names.
  • ?time_query is a filter restricting the allowed events' emission dates (cf. Time_constraint).

See also an example of use in Client_event_logging_commands (command "tezos-client-admin query events from unix-files:///...").

OCaml

Innovation. Community. Security.