Expand description

The QueuedMonitor is the multi-threaded version of the API. Deadlines are evaluated immediately and the resulting verdicts are returned through a queue retrieved using the output_queue method. This API should be used in an online monitoring setting.

The QueuedMonitor is parameterized over its input and output method. The preferred method to create an API is using the ConfigBuilder and the queued_monitor method.

Input Method

An input method has to implement the Input trait. Out of the box two different methods are provided:

  • EventInput: Provides a basic input method for anything that already is an Event or that can be transformed into one using Into<Event>.
  • RecordInput: Is a more elaborate input method. It allows to provide a custom data structure to the monitor as an input, as long as it implements the Record trait. If implemented this traits provides functionality to generate a new value for any input stream from the data structure.

Output Method

The QueuedMonitor can provide output with a varying level of detail captured by the VerdictRepresentation trait. The different output formats are:

  • Incremental: For each processed event a condensed list of monitor state changes is provided.
  • Total: For each event a complete snapshot of the current monitor state is returned
  • TotalIncremental: For each processed event a complete list of monitor state changes is provided
  • TriggerMessages: For each event a list of violated triggers with their description is produced.
  • TriggersWithInfoValues: For each event a list of violated triggers with their specified corresponding values is returned.

Structs

The QueuedMonitor is a threaded version of the Api allowing deadlines to be evaluated immediately.
The verdict of the queued monitor. It is either triggered by a deadline or an event described by the kind field. The time when the verdict occurred is given by ts. verdict finally describes the changes to input and output streams as defined by the VerdictRepresentation.
The receiving side of a channel.
An error returned from the recv method.

Enums

Represents an error emitted by the API.
Represents the length of a queue used for communication. Bounding its length can be useful in resource constraint environments.
An error returned from the recv_timeout method.
An error returned from the try_recv method.
Represents the kind of the verdict. I.e. whether the evaluation was triggered by an event, or by a deadline.