Module type Events.Message

Signature required for a Message module.

type t

The type of the messages.

val to_json : t -> string

Convert a message to a JSON string.

  • parameter msg

    the message to be converted

val get_size : t -> Size.t

Returns the size of a message.

  • parameter msg

    the message whose size we want

val processing_time : t -> int

Returns the amount of time required to process a message, in millisseconds.

  • parameter msg

    the message whose processing time we want

val identifier : t -> int

Returns an integer that identifies the content of a message.

  • parameter msg

    a message