-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was introduced to be able to handle out of disk size errors. In such case, buffering stops and STDIN is consumed by Responder directly. Originally I wanted this mechanism to be triggered by write failure, but upstream is making this effort harder - see: amphp/byte-stream#52 amphp/byte-stream#54
- Loading branch information
1 parent
a3832df
commit 80aa37a
Showing
10 changed files
with
245 additions
and
97 deletions.
There are no files selected for viewing
Empty file.
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,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ostrolucky\Stdinho\Bufferer; | ||
|
||
use Amp\ByteStream\InputStream; | ||
use Amp\Promise; | ||
|
||
abstract class AbstractBufferer | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $filePath; | ||
/** | ||
* @var InputStream|null | ||
*/ | ||
public $inputStream; | ||
|
||
public function __construct(string $filePath) | ||
{ | ||
$this->filePath = $filePath; | ||
} | ||
|
||
abstract public function __invoke(): Promise; | ||
|
||
abstract public function isBuffering(): bool; | ||
|
||
abstract public function waitForWrite(): Promise; | ||
|
||
abstract public function getMimeType(): Promise; | ||
|
||
abstract public function getCurrentProgress(): int; | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.