@@ 104-110 (lines=7) @@ | ||
101 | */ |
|
102 | protected function configureManagers() |
|
103 | { |
|
104 | $this->laravel->singleton(ChannelManager::class, function () { |
|
105 | $mode = config('websockets.replication.mode', 'local'); |
|
106 | ||
107 | $class = config("websockets.replication.modes.{$mode}.channel_manager"); |
|
108 | ||
109 | return new $class($this->loop); |
|
110 | }); |
|
111 | } |
|
112 | ||
113 | /** |
|
@@ 121-127 (lines=7) @@ | ||
118 | */ |
|
119 | protected function configureStatistics() |
|
120 | { |
|
121 | $this->laravel->singleton(StatisticsCollector::class, function () { |
|
122 | $replicationMode = config('websockets.replication.mode', 'local'); |
|
123 | ||
124 | $class = config("websockets.replication.modes.{$replicationMode}.collector"); |
|
125 | ||
126 | return new $class; |
|
127 | }); |
|
128 | ||
129 | $this->laravel->singleton(StatisticsStore::class, function () { |
|
130 | $class = config('websockets.statistics.store'); |