diff --git a/internal/app/engine.go b/internal/app/engine.go index 7b0cfd95e..01ac102d7 100644 --- a/internal/app/engine.go +++ b/internal/app/engine.go @@ -7,7 +7,6 @@ import ( "github.com/centrifugal/centrifugo/v5/internal/confighelpers" "github.com/centrifugal/centrifugo/v5/internal/natsbroker" "github.com/centrifugal/centrifugo/v5/internal/redisnatsbroker" - "github.com/centrifugal/centrifugo/v5/internal/service" "github.com/centrifugal/centrifuge" "github.com/rs/zerolog/log" @@ -19,7 +18,7 @@ type engineModes struct { presenceManagerMode string } -func configureEngines(node *centrifuge.Node, cfgContainer *config.Container, serviceManager *service.Manager) (engineModes, error) { +func configureEngines(node *centrifuge.Node, cfgContainer *config.Container) (engineModes, error) { cfg := cfgContainer.Config() var modes engineModes @@ -33,7 +32,7 @@ func configureEngines(node *centrifuge.Node, cfgContainer *config.Container, ser case "memory": broker, presenceManager, err = createMemoryEngine(node) case "redis": - broker, presenceManager, modes.engineMode, err = createRedisEngine(node, cfgContainer, serviceManager) + broker, presenceManager, modes.engineMode, err = createRedisEngine(node, cfgContainer) default: return modes, fmt.Errorf("unknown engine type: %s", cfg.Engine.Type) } @@ -98,7 +97,7 @@ func configureEngines(node *centrifuge.Node, cfgContainer *config.Container, ser case "memory": presenceManager, err = createMemoryPresenceManager(node) case "redis": - presenceManager, modes.presenceManagerMode, err = createRedisPresenceManager(node, cfgContainer, serviceManager) + presenceManager, modes.presenceManagerMode, err = createRedisPresenceManager(node, cfgContainer) default: return modes, fmt.Errorf("unknown presence manager type: %s", cfg.PresenceManager.Type) } @@ -163,7 +162,7 @@ func NatsBroker(node *centrifuge.Node, cfg config.Config) (*natsbroker.NatsBroke return natsbroker.New(node, cfg.Broker.Nats) } -func createRedisEngine(n *centrifuge.Node, cfgContainer *config.Container, _ *service.Manager) (*centrifuge.RedisBroker, centrifuge.PresenceManager, string, error) { +func createRedisEngine(n *centrifuge.Node, cfgContainer *config.Container) (*centrifuge.RedisBroker, centrifuge.PresenceManager, string, error) { cfg := cfgContainer.Config() redisShards, mode, err := confighelpers.CentrifugeRedisShards(n, cfg.Broker.Redis.Redis) if err != nil { @@ -203,7 +202,7 @@ func createRedisBroker(n *centrifuge.Node, cfgContainer *config.Container) (*cen return broker, mode, nil } -func createRedisPresenceManager(n *centrifuge.Node, cfgContainer *config.Container, _ *service.Manager) (centrifuge.PresenceManager, string, error) { +func createRedisPresenceManager(n *centrifuge.Node, cfgContainer *config.Container) (centrifuge.PresenceManager, string, error) { cfg := cfgContainer.Config() redisShards, mode, err := confighelpers.CentrifugeRedisShards(n, cfg.PresenceManager.Redis.Redis) if err != nil {