Runtime_events.User(3) OCaml library Runtime_events.User(3)

Runtime_events.User - no description

Module Runtime_events.User

Module User
: sig end

User events is a way for libraries to provide runtime events that can be consumed by other tools. These events can carry known data types or custom values. The current maximum number of user events is 8192.

type tag = ..

The type for a user event tag. Tags are used to discriminate between user events of the same type.

type 'value t

The type for a user event. User events describe their tag, carried data type and an unique string-based name.

val register : string -> tag -> 'value Runtime_events.Type.t -> 'value t

register name tag ty registers a new event with an unique name , carrying a tag and values of type ty .

val write : 'value t -> 'value -> unit

write t v emits value v for event t .

val name : 'a t -> string

name t is the unique identifying name of event t .

val tag : 'a t -> tag

tag t is the associated tag of event t , when it is known. An event can be unknown if it was not registered in the consumer program.

2024-05-31 OCamldoc