|
@@ 192-196 (lines=5) @@
|
| 189 |
|
*/ |
| 190 |
|
public function configurePubSub() |
| 191 |
|
{ |
| 192 |
|
if (config('websockets.replication.driver', 'local') === 'local') { |
| 193 |
|
$this->laravel->singleton(ReplicationInterface::class, function () { |
| 194 |
|
return new LocalClient; |
| 195 |
|
}); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
if (config('websockets.replication.driver', 'local') === 'redis') { |
| 199 |
|
$this->laravel->singleton(ReplicationInterface::class, function () { |
|
@@ 198-202 (lines=5) @@
|
| 195 |
|
}); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
if (config('websockets.replication.driver', 'local') === 'redis') { |
| 199 |
|
$this->laravel->singleton(ReplicationInterface::class, function () { |
| 200 |
|
return (new RedisClient)->boot($this->loop); |
| 201 |
|
}); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
$this->laravel |
| 205 |
|
->get(ReplicationInterface::class) |