Update to go-redis v9. Fixed Redis cluster support (#1415)

* Update to go-redis v9. Fixed Redis cluster support
This commit is contained in:
David Zhao
2023-02-12 22:22:21 -08:00
committed by GitHub
parent e6eabb3a03
commit ea12e1477f
11 changed files with 55 additions and 60 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"google.golang.org/protobuf/proto"
"github.com/livekit/protocol/auth"
+12 -13
View File
@@ -209,23 +209,22 @@ func (r *LocalRouter) statsWorker() {
}
/*
func (r *LocalRouter) memStatsWorker() {
ticker := time.NewTicker(time.Second * 30)
defer ticker.Stop()
func (r *LocalRouter) memStatsWorker() {
ticker := time.NewTicker(time.Second * 30)
defer ticker.Stop()
for {
<-ticker.C
for {
<-ticker.C
var m runtime.MemStats
runtime.ReadMemStats(&m)
logger.Infow("memstats",
"mallocs", m.Mallocs, "frees", m.Frees, "m-f", m.Mallocs-m.Frees,
"hinuse", m.HeapInuse, "halloc", m.HeapAlloc, "frag", m.HeapInuse-m.HeapAlloc,
)
var m runtime.MemStats
runtime.ReadMemStats(&m)
logger.Infow("memstats",
"mallocs", m.Mallocs, "frees", m.Frees, "m-f", m.Mallocs-m.Frees,
"hinuse", m.HeapInuse, "halloc", m.HeapAlloc, "frag", m.HeapInuse-m.HeapAlloc,
)
}
}
}
*/
func (r *LocalRouter) rtcMessageWorker() {
// is a new channel available? if so swap to that one
if !r.isStarted.Load() {
+1 -1
View File
@@ -3,7 +3,7 @@ package routing
import (
"context"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"go.uber.org/atomic"
"google.golang.org/protobuf/proto"
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"sync"
"time"
"github.com/go-redis/redis/v8"
"github.com/pkg/errors"
"github.com/redis/go-redis/v9"
"go.uber.org/atomic"
"google.golang.org/protobuf/proto"