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