Table of Contents

Class LocalEventService

Namespace
FoundationaLLM.Common.Services.Events
Assembly
FoundationaLLM.Common.dll

Subscribes to IEventService event namespaces and handles events using a decoupled, queue-based pattern.

public class LocalEventService
Inheritance
LocalEventService
Inherited Members
Extension Methods

Constructors

LocalEventService(LocalEventServiceSettings, IEventService, ILogger)

Subscribes to IEventService event namespaces and handles events using a decoupled, queue-based pattern.

public LocalEventService(LocalEventServiceSettings settings, IEventService eventService, ILogger logger)

Parameters

settings LocalEventServiceSettings

The LocalEventServiceSettings containing configuration settings for the service.

eventService IEventService

The IEventService event service that is publishing events through event namespaces.

logger ILogger

The logger used for logging.

Methods

StartLocalEventProcessing(Func<EventTypeEventArgs, Task>)

Kicks off the extraction of events from the events queue. The events are initially received from the events service and are queued internally. In the background, the extraction thread will dequeue and submit them to final processing using the provided event handler.

public void StartLocalEventProcessing(Func<EventTypeEventArgs, Task> eventHandler)

Parameters

eventHandler Func<EventTypeEventArgs, Task>

The event handler invoked to process each set of events.

SubscribeToEventTypes(List<string>)

Subscribes this instance to a specified list of event types supported by the IEventService.

public void SubscribeToEventTypes(List<string> eventTypes)

Parameters

eventTypes List<string>

The list with the event types to subscribe to.