| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function watching(string $folder, string $keys, Chan $notify) : void |
||
| 29 | { |
||
| 30 | $path = $keys === '*' ? $folder : sprintf('%s/%s', $folder, $keys); |
||
| 31 | |||
| 32 | $ig = function () use ($path) { |
||
| 33 | return (new KVGetting($this->agent))->path($path); |
||
| 34 | }; |
||
| 35 | |||
| 36 | $do = function (KVGetting $lister) use ($notify) { |
||
| 37 | yield $notify->send($this->changed(yield $lister->result())); |
||
| 38 | }; |
||
| 39 | |||
| 40 | $this->nwProcess($notify->closed(), $ig, $do, 'KVStore watcher interrupted', ['path' => $path]); |
||
| 41 | } |
||
| 43 |