Internal_event.Generic
Helper functions to manipulate all kinds of events in a generic way.
type definition =
| Definition : (Section.t option * string * 'a event_definition) -> definition
type event =
| Event : (string * 'a event_definition * 'a) -> event
type with_name = < doc : string ; name : string >
val json_schema : definition -> < schema : Json_schema.schema ; with_name >
Get the JSON schema (together with name and doc) of a given event definition.
name
doc
val explode_event : event -> < pp : Stdlib.Format.formatter -> unit -> unit ; json : Data_encoding.json ; with_name >
Get the JSON representation and a pretty-printer for a given event instance.