Mojentic.Events.TerminateEvent (Mojentic v1.2.0)

Copy Markdown View Source

Special event that signals the dispatcher to stop processing.

When a TerminateEvent is dispatched, the async dispatcher will gracefully shut down after processing any remaining events in the queue.

Examples

terminate_event = %Mojentic.Events.TerminateEvent{
  source: MyAgent
}

AsyncDispatcher.dispatch(dispatcher, terminate_event)

Summary

Types

t()

@type t() :: %Mojentic.Events.TerminateEvent{
  correlation_id: String.t() | nil,
  source: module()
}