1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
diff --git a/go.mod b/go.mod
index ade444996c8376b67b94f5c38298bb4ae3f86d64..d01b7a475bcb42ffc285330991531b5b4dc50262 100644
--- a/go.mod
+++ b/go.mod
@@ -15,6 +15,7 @@ github.com/jawher/mow.cli v1.2.0
github.com/josephspurrier/goversioninfo v1.4.0
github.com/ogen-go/ogen v0.73.0
github.com/pelletier/go-toml/v2 v2.1.0
+ github.com/prometheus/client_golang v1.16.0
go.opentelemetry.io/otel v1.16.0
go.opentelemetry.io/otel/metric v1.16.0
go.opentelemetry.io/otel/trace v1.16.0
@@ -27,6 +28,8 @@ )
require (
github.com/akavel/rsrc v0.10.2 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
@@ -37,6 +40,10 @@ github.com/golang/protobuf v1.5.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
+ github.com/prometheus/client_model v0.3.0 // indirect
+ github.com/prometheus/common v0.42.0 // indirect
+ github.com/prometheus/procfs v0.10.1 // indirect
github.com/segmentio/asm v1.2.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 // indirect
diff --git a/go.sum b/go.sum
index c5fba1b94c8299a9fac31ec42d7dce8a9d796170..3e79c1b1cc6c1ac6d80fb12961e2871d918b3af1 100644
--- a/go.sum
+++ b/go.sum
@@ -5,6 +5,10 @@ github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw=
github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
+github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -27,6 +31,8 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
@@ -45,12 +51,22 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
+github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
+github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/ogen-go/ogen v0.73.0 h1:h9HFV2V/h7UTKewlJpvOjx0gHIjjn4O9mjKe3eLNWkY=
github.com/ogen-go/ogen v0.73.0/go.mod h1:CS1RfTfLLcxw968GF2pEw8r6P6YTlU+mCOTGJvl7P2c=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
+github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
+github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
+github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
+github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM=
+github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
+github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg=
+github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
@@ -83,6 +99,7 @@ golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
diff --git a/go.work.sum b/go.work.sum
index 5caa5f8f765360f3a9433d235cde5611566d8edc..05617a0df9fa92ac1e6a2df52b6563c70e9846f0 100644
--- a/go.work.sum
+++ b/go.work.sum
@@ -1,21 +1,31 @@
cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
+github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE=
+github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
-github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q=
github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss=
+github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
+github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.48.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA=
+github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
diff --git a/internal/config/configs.go b/internal/config/configs.go
index b46938f62a6911af931f7d33a75af269f1578847..d250b196adf2471ac66eec5248ea2667dd172ae4 100644
--- a/internal/config/configs.go
+++ b/internal/config/configs.go
@@ -14,12 +14,20 @@ General struct {
Bind string `toml:"bind-to"`
Host string `toml:"host"`
} `toml:"general"`
+ Advanced struct {
+ EnableInstrumentation bool `toml:"enable-instrumentation"`
+ } `toml:"advanced"`
}{
General: struct {
Bind string `toml:"bind-to"`
Host string `toml:"host"`
}{
Bind: "127.1.2.4:1558",
+ },
+ Advanced: struct {
+ EnableInstrumentation bool `toml:"enable-instrumentation"`
+ }{
+ EnableInstrumentation: false,
},
}
diff --git a/internal/mansion/instrumentation.go b/internal/mansion/instrumentation.go
new file mode 100644
index 0000000000000000000000000000000000000000..b4b44277add3ea7680d256636262f414a663f94e
--- /dev/null
+++ b/internal/mansion/instrumentation.go
@@ -0,0 +1,32 @@
+package mansion
+
+// SPDX-FileCopyrightText: © Moritz Poldrack & AUTHORS
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+func (m *Mansion) GetRoomCount() int {
+ m.roomsMtx.RLock()
+ defer m.roomsMtx.RUnlock()
+ return len(m.rooms)
+}
+
+func (m *Mansion) SessionCounter() uint64 {
+ return m.clientID.Load()
+}
+
+func (m *Mansion) ActiveSessions() int {
+ var count int
+
+ m.roomsMtx.RLock()
+ defer m.roomsMtx.RUnlock()
+ for _, r := range m.rooms {
+ r.clientFeedMtx.Lock()
+ for _, c := range r.clientFeed {
+ if !c.Dead() {
+ count++
+ }
+ }
+ r.clientFeedMtx.Unlock()
+ }
+
+ return count
+}
diff --git a/internal/server/http/serve.go b/internal/server/http/serve.go
index e9486dc1fe0220d44167fd59aee1b1a3d5c60d26..5c9ce75edc3862a25a5ca9fde22c4cd8a2c50984 100644
--- a/internal/server/http/serve.go
+++ b/internal/server/http/serve.go
@@ -11,7 +11,9 @@ "path"
"strings"
templates "webinterface"
+ "git.sr.ht/~mpldr/uniview/internal/config"
"git.sr.ht/~mpldr/uniview/internal/conman"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
)
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@@ -33,9 +35,16 @@
switch r.URL.Path {
case "/":
log.Debug("serving index")
+ s.lobbyPagesServed.Inc()
s.templates[TemplateIndex].Execute(w, nil)
case "/healthcheck":
w.WriteHeader(http.StatusNoContent)
+ case "/metrics":
+ if config.Server.Advanced.EnableInstrumentation {
+ promhttp.Handler().ServeHTTP(w, r)
+ return
+ }
+ fallthrough
default:
data, err := templates.Templates.ReadFile(path.Join("dist", r.URL.Path))
if err == nil {
@@ -46,6 +55,7 @@ return
}
log.Debug("serving room interface")
+ s.roomPagesServed.Inc()
s.templates[TemplateRoom].Execute(w, nil)
}
}
diff --git a/internal/server/http/wrapper.go b/internal/server/http/wrapper.go
index 1f73a14fe3becb76778350395363d741a83249db..86ccf0e8491816f95251f49f22d1425e692bebb5 100644
--- a/internal/server/http/wrapper.go
+++ b/internal/server/http/wrapper.go
@@ -10,12 +10,19 @@ "log/slog"
"net/http"
"sync/atomic"
templates "webinterface"
+
+ "git.sr.ht/~mpldr/uniview/internal/config"
+ "git.sr.ht/~mpldr/uniview/internal/mansion"
+ "github.com/prometheus/client_golang/prometheus"
)
type Server struct {
grpc http.Handler
templates []*template.Template
requestID *atomic.Uint64
+
+ lobbyPagesServed prometheus.Counter
+ roomPagesServed prometheus.Counter
}
const (
@@ -28,10 +35,54 @@ "dist/index.html",
"dist/room.html",
}
-func NewServer(g http.Handler) (*Server, error) {
+func NewServer(g http.Handler, m *mansion.Mansion) (*Server, error) {
srv := &Server{
grpc: g,
requestID: &atomic.Uint64{},
+
+ lobbyPagesServed: prometheus.NewCounter(prometheus.CounterOpts{
+ Namespace: "uniview",
+ Subsystem: "httpserver",
+ Name: "lobby_served",
+ Help: "number of times the lobby (/) has been served",
+ }),
+ roomPagesServed: prometheus.NewCounter(prometheus.CounterOpts{
+ Namespace: "uniview",
+ Subsystem: "httpserver",
+ Name: "roomui_served",
+ Help: "number of times the room ui has been served",
+ }),
+ }
+
+ if config.Server.Advanced.EnableInstrumentation {
+ prometheus.MustRegister(
+ prometheus.NewCounterFunc(prometheus.CounterOpts{
+ Namespace: "uniview",
+ Subsystem: "httpserver",
+ Name: "requests",
+ Help: "the total number of received HTTP requests",
+ }, func() float64 { return float64(srv.requestID.Load()) }),
+ srv.lobbyPagesServed,
+ srv.roomPagesServed,
+ prometheus.NewCounterFunc(prometheus.CounterOpts{
+ Namespace: "uniview",
+ Subsystem: "grpcserver",
+ Name: "sessions",
+ Help: "the total number of initiated sessions",
+ }, func() float64 { return float64(m.SessionCounter()) }),
+ prometheus.NewCounterFunc(prometheus.CounterOpts{
+ Namespace: "uniview",
+ Subsystem: "grpcserver",
+ Name: "active_sessions",
+ Help: "the total number of connected sessions",
+ }, func() float64 { return float64(m.ActiveSessions()) }),
+ prometheus.NewCounterFunc(prometheus.CounterOpts{
+ Namespace: "uniview",
+ Subsystem: "grpcserver",
+ Name: "open_rooms",
+ Help: "the total number of allocated rooms",
+ }, func() float64 { return float64(m.GetRoomCount()) }),
+ )
}
var templateError bool
diff --git a/server.go b/server.go
index e348eeefd72345d22d8a01e8beff68b72a13a9e8..23f524018faf62dc0e25a3caedfcb7cbbd9ca047 100644
--- a/server.go
+++ b/server.go
@@ -64,7 +64,7 @@ return fmt.Errorf("failed to start listener: %w", err)
}
var handler http.Handler
- handler, err = wraphttp.NewServer(grpcsrv)
+ handler, err = wraphttp.NewServer(grpcsrv, roomMan)
if err != nil {
return fmt.Errorf("failed to wrap gRPC: %w", err)
}
|