File_event_sink.Query
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 Mavryk_base.TzPervasives.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 ->
Mavryk_event_logging.Internal_event.Generic.event ->
'a Mavryk_base.TzPervasives.Error_monad.tzresult Lwt.t) ->
(Report.item list * 'a) Mavryk_base.TzPervasives.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 "mavkit-client-admin query events from
unix-files:///..."
).