<?php

declare(strict_types=1);

namespace App\Framework\Redis;

use App\Framework\DI\Container;
use App\Framework\DI\Initializer;
use App\Framework\Redis\Services\RedisMonitoringService;

final readonly class RedisMonitoringServiceInitializer
{
    #[Initializer]
    public function __invoke(Container $container): void
    {
        $connectionPool = $container->get(RedisConnectionPool::class);

        $monitoringService = new RedisMonitoringService($connectionPool);

        $container->singleton(RedisMonitoringService::class, $monitoringService);
    }
}
