File tree Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Expand file tree Collapse file tree 4 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ trait InteractsWithServers
1313 * Run the given server process.
1414 *
1515 * @param \Symfony\Component\Process\Process $server
16- * @param \Laravel\Octane\Swoole\ServerProcessInspector|\Laravel\Octane\RoadRunner \ServerProcessInspector $inspector
16+ * @param \Laravel\Octane\Contracts \ServerProcessInspector $inspector
1717 * @param string $type
1818 * @return int
1919 */
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Laravel \Octane \Contracts ;
4+
5+ interface ServerProcessInspector
6+ {
7+ /**
8+ * Determine if the server process is running.
9+ *
10+ * @return bool
11+ */
12+ public function serverIsRunning (): bool ;
13+
14+ /**
15+ * Reload the workers.
16+ *
17+ * @return void
18+ */
19+ public function reloadServer (): void ;
20+
21+ /**
22+ * Stop the server.
23+ *
24+ * @return bool
25+ */
26+ public function stopServer (): bool ;
27+ }
Original file line number Diff line number Diff line change 22
33namespace Laravel \Octane \RoadRunner ;
44
5+ use Laravel \Octane \Contracts \ServerProcessInspector as ServerProcessInspectorContract ;
56use Laravel \Octane \PosixExtension ;
67use Laravel \Octane \RoadRunner \Concerns \FindsRoadRunnerBinary ;
78use Laravel \Octane \SymfonyProcessFactory ;
89use RuntimeException ;
910use Symfony \Component \Process \Process ;
1011
11- class ServerProcessInspector
12+ class ServerProcessInspector implements ServerProcessInspectorContract
1213{
1314 use FindsRoadRunnerBinary;
1415
Original file line number Diff line number Diff line change 22
33namespace Laravel \Octane \Swoole ;
44
5+ use Laravel \Octane \Contracts \ServerProcessInspector as ServerProcessInspectorContract ;
56use Laravel \Octane \Exec ;
67
7- class ServerProcessInspector
8+ class ServerProcessInspector implements ServerProcessInspectorContract
89{
910 public function __construct (
1011 protected SignalDispatcher $ dispatcher ,
You can’t perform that action at this time.
0 commit comments