Skip to content

Commit 916844a

Browse files
authored
Merge pull request #12 from reactphp-parallel/add-documentation
Add Documentation
2 parents 9c376c1 + a72fd86 commit 916844a

File tree

1 file changed

+57
-2
lines changed

1 file changed

+57
-2
lines changed

README.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,57 @@
1-
# streams
2-
Interthread communication using channels
1+
# Streams abstraction around ext-parallel Channels for ReactPHP
2+
3+
![Continuous Integration](https://github.com/Reactphp-parallel/streams/workflows/Continuous%20Integration/badge.svg)
4+
[![Latest Stable Version](https://poser.pugx.org/React-parallel/streams/v/stable.png)](https://packagist.org/packages/React-parallel/streams)
5+
[![Total Downloads](https://poser.pugx.org/React-parallel/streams/downloads.png)](https://packagist.org/packages/React-parallel/streams)
6+
[![Code Coverage](https://scrutinizer-ci.com/g/Reactphp-parallel/streams/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Reactphp-parallel/streams/?branch=master)
7+
[![Type Coverage](https://shepherd.dev/github/Reactphp-parallel/streams/coverage.svg)](https://shepherd.dev/github/Reactphp-parallel/streams)
8+
[![License](https://poser.pugx.org/React-parallel/streams/license.png)](https://packagist.org/packages/React-parallel/streams)
9+
10+
### Installation ###
11+
12+
To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `~`.
13+
14+
```
15+
composer require react-parallel/streams
16+
```
17+
18+
# Usage
19+
20+
This package currently only offers channel to observable conversion through two methods:
21+
22+
```php
23+
$loop = EventLoopFactory::create();
24+
$eventLoopBridge = new EventLoopBridge($loop);
25+
$factory = new Factory($eventLoopBridge);
26+
$factory->channel($channel); // Returns an observble that will continue until the channel closes
27+
$factory->single($channel); // Returns a promise that will resolve with the first message it receives
28+
```
29+
30+
## Contributing ##
31+
32+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
33+
34+
## License ##
35+
36+
Copyright 2020 [Cees-Jan Kiewiet](http://wyrihaximus.net/)
37+
38+
Permission is hereby granted, free of charge, to any person
39+
obtaining a copy of this software and associated documentation
40+
files (the "Software"), to deal in the Software without
41+
restriction, including without limitation the rights to use,
42+
copy, modify, merge, publish, distribute, sublicense, and/or sell
43+
copies of the Software, and to permit persons to whom the
44+
Software is furnished to do so, subject to the following
45+
conditions:
46+
47+
The above copyright notice and this permission notice shall be
48+
included in all copies or substantial portions of the Software.
49+
50+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
51+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
52+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
53+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
54+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
55+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
56+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
57+
OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)