@@ -1,9 +1,8 @@
|
||||
package routing
|
||||
|
||||
import (
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
// a router of messages on the same node, basic implementation for local testing
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
func TestMessageChannel_WriteMessageClosed(t *testing.T) {
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/jxskiss/base62"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
)
|
||||
|
||||
type NodeStats struct {
|
||||
|
||||
@@ -4,10 +4,9 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,13 +5,13 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/utils/stats"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
)
|
||||
|
||||
type FakeNodeSelector struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
)
|
||||
|
||||
type FakeRouter struct {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package routing
|
||||
|
||||
import (
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/thoas/go-funk"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package routing
|
||||
|
||||
import (
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/thoas/go-funk"
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ func (s *SystemLoadSelector) SelectNode(nodes []*livekit.Node, room *livekit.Roo
|
||||
return nil, ErrNoAvailableNodes
|
||||
}
|
||||
|
||||
nodesLowLoad := []*livekit.Node{}
|
||||
nodesLowLoad := make([]*livekit.Node, 0)
|
||||
for _, node := range nodes {
|
||||
numCpus := node.Stats.NumCpus
|
||||
if numCpus == 0 {
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/thoas/go-funk"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
)
|
||||
|
||||
func TestIsAvailable(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user