mongoose.core.engine

class mongoose.core.engine.Engine(*args, **kwargs)[source]

Bases: object

The Engine class is responsible for loading the configuration, initializing components (collectors, enrichers, forwarders), and managing their lifecycle (start, stop, reload).

load_config()[source]

Load configuration from the YAML file.

load_extra_config(name, config_class)[source]
reload()[source]

Reload configuration and restart all components.

start()[source]

Start all configured and enabled collectors, enrichers, and forwarders.

stop()[source]

Stop all processing by signaling the processing queue and waiting for threads.

class mongoose.core.engine.Singleton[source]

Bases: type

__call__(*args, **kwargs)[source]

Control instance creation to ensure singleton behavior.

Parameters:
  • cls (type) – The class being instantiated

  • *args – Positional arguments for class initialization

  • **kwargs – Keyword arguments for class initialization

Returns:

The singleton instance of the class

Return type:

type

Note

If an instance already exists, __init__ will still be called with the provided arguments, but no new instance is created.