extract pull logic to own manager. (#54)

This commit is contained in:
Miroslav Šedivý
2022-04-09 17:17:28 +02:00
committed by GitHub
parent 4708fb9371
commit 06ea90b994
7 changed files with 120 additions and 103 deletions
+4 -2
View File
@@ -12,13 +12,15 @@ import (
type ApiManagerCtx struct {
logger zerolog.Logger
rooms types.RoomManager
pull types.PullManager
conf *config.API
}
func New(roomManager types.RoomManager, conf *config.API) *ApiManagerCtx {
func New(rooms types.RoomManager, pull types.PullManager, conf *config.API) *ApiManagerCtx {
return &ApiManagerCtx{
logger: log.With().Str("module", "api").Logger(),
rooms: roomManager,
rooms: rooms,
pull: pull,
conf: conf,
}
}