src/Http/Controller/ServerController.php
public function events(Request $request): array
    {
        // 1 server event
        // 2 swoole event
        $type = (int)$request->query('type');

        if ($type === 1) {
            return ServerListenerCollector::getCollector();
        }

        if ($type === 2) {
            return SwooleListenerCollector::getCollector();
        }

        return [
            'server' => ServerListenerCollector::getCollector(),
            'swoole' => SwooleListenerCollector::getCollector(),
        ];
    }
public function events(Request $request): array
    {
        // 1 server event
        // 2 swoole event
        $type = (int)$request->query('type');

        if ($type === 1) {
            return ServerListenerCollector::getCollector();
        }

        if ($type === 2) {
            return SwooleListenerCollector::getCollector();
        }

        return [
            'server' => ServerListenerCollector::getCollector(),
            'swoole' => SwooleListenerCollector::getCollector(),
        ];
    }
get all registered events list
@RequestMapping(route="events", method=RequestMethod::GET)
@param Request $request
@return array