-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c39f44
commit 745e0d6
Showing
20 changed files
with
404 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TinyBlocks\DockerContainer\Internal; | ||
|
||
use TinyBlocks\DockerContainer\Contracts\ExecutionCompleted; | ||
use TinyBlocks\DockerContainer\Internal\Commands\Command; | ||
use TinyBlocks\DockerContainer\Internal\Commands\DockerList; | ||
use TinyBlocks\DockerContainer\Internal\Commands\DockerRun; | ||
use TinyBlocks\DockerContainer\Internal\Containers\Models\Container; | ||
use TinyBlocks\DockerContainer\Internal\Exceptions\DockerCommandExecutionFailed; | ||
|
||
/** | ||
* Handles Docker command execution. | ||
*/ | ||
interface CommandHandler | ||
{ | ||
/** | ||
* Executes a Docker run command. | ||
* | ||
* @param DockerRun $dockerRun The command to run the container. | ||
* @return Container The created container. | ||
* @throws DockerCommandExecutionFailed If the command execution fails. | ||
*/ | ||
public function run(DockerRun $dockerRun): Container; | ||
|
||
/** | ||
* Finds a container based on the provided criteria. | ||
* | ||
* @param DockerList $dockerList The criteria to find the container. | ||
* @return Container The found container or a new one if not found. | ||
* @throws DockerCommandExecutionFailed If the command execution fails. | ||
*/ | ||
public function findBy(DockerList $dockerList): Container; | ||
|
||
/** | ||
* Executes a generic Docker command. | ||
* | ||
* @param Command $command The command to execute. | ||
* @return ExecutionCompleted The result of the execution. | ||
* @throws DockerCommandExecutionFailed If the command execution fails. | ||
*/ | ||
public function execute(Command $command): ExecutionCompleted; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.