mirror of
https://gh.wpcy.net/https://github.com/itk-dev/freescout-itk-prometheus.git
synced 2026-07-16 08:38:49 +08:00
28 lines
539 B
PHP
28 lines
539 B
PHP
<?php
|
|
|
|
namespace Modules\ItkPrometheus\Http\Controllers;
|
|
|
|
use Illuminate\Routing\Controller;
|
|
use Modules\ItkPrometheus\Service\PrometheusService;
|
|
|
|
class ItkPrometheusController extends Controller {
|
|
|
|
private PrometheusService $service;
|
|
|
|
public function __construct(PrometheusService $service) {
|
|
$this->service = $service;
|
|
}
|
|
|
|
/**
|
|
* Provide metrics endpoint.
|
|
*
|
|
* @return string
|
|
* The metrics data.
|
|
*
|
|
* @throws \Throwable
|
|
*/
|
|
public function metrics(): string {
|
|
return $this->service->metrics();
|
|
}
|
|
|
|
}
|