@@ -6,13 +6,14 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/urfave/cli/v2"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
)
|
||||
|
||||
func generateKeys(c *cli.Context) error {
|
||||
|
||||
+1
-2
@@ -11,11 +11,10 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/livekit/protocol/auth"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
|
||||
@@ -14,7 +14,7 @@ require (
|
||||
github.com/google/wire v0.5.0
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
github.com/jxskiss/base62 v0.0.0-20191017122030-4f11678b909b
|
||||
github.com/livekit/protocol v0.7.8
|
||||
github.com/livekit/protocol v0.8.0
|
||||
github.com/magefile/mage v1.11.0
|
||||
github.com/maxbrunsfeld/counterfeiter/v6 v6.3.0
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
|
||||
@@ -241,8 +241,8 @@ github.com/lithammer/shortuuid/v3 v3.0.6 h1:pr15YQyvhiSX/qPxncFtqk+v4xLEpOZObbsY
|
||||
github.com/lithammer/shortuuid/v3 v3.0.6/go.mod h1:vMk8ke37EmiewwolSO1NLW8vP4ZaKlRuDIi8tWWmAts=
|
||||
github.com/livekit/ion-sfu v1.20.8 h1:nNyih1cq82dmuBv41XKH3qTDFtRvTnHwCKmUBFGz/Vc=
|
||||
github.com/livekit/ion-sfu v1.20.8/go.mod h1:g8hwobZI5fvX1RXvayf4ZXkgP7spV5YGE4yTSsumpB4=
|
||||
github.com/livekit/protocol v0.7.8 h1:UqiJ3iv3D9aDK5swIj1zW1AjeNSatXC9EWtLMe3XW+U=
|
||||
github.com/livekit/protocol v0.7.8/go.mod h1:Vk04t1uIJa+U2L5SeANEmDl6ebjc9tKVi4kk3CpqW74=
|
||||
github.com/livekit/protocol v0.8.0 h1:cfiSy12WUozFBLi0dE6LEoignJOOPra0Fvf/5MJOI1I=
|
||||
github.com/livekit/protocol v0.8.0/go.mod h1:OczgiKz3Uo6g35oav5g/m3fAFrxd1sROWKmOj3wsVx0=
|
||||
github.com/lucsky/cuid v1.0.2 h1:z4XlExeoderxoPj2/dxKOyPxe9RCOu7yNq9/XWxIUMQ=
|
||||
github.com/lucsky/cuid v1.0.2/go.mod h1:QaaJqckboimOmhRSJXSx/+IT+VTfxfPGSo/6mfgUfmE=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
|
||||
+5
-108
@@ -4,7 +4,6 @@ package main
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"go/build"
|
||||
@@ -15,10 +14,8 @@ import (
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/magefile/mage/mg"
|
||||
"github.com/magefile/mage/target"
|
||||
|
||||
"github.com/livekit/livekit-server/version"
|
||||
)
|
||||
@@ -45,101 +42,9 @@ func Deps() error {
|
||||
return installTools(true)
|
||||
}
|
||||
|
||||
type modInfo struct {
|
||||
Path string
|
||||
Version string
|
||||
Time time.Time
|
||||
Dir string
|
||||
GoMod string
|
||||
GoVersion string
|
||||
}
|
||||
|
||||
// regenerate protobuf
|
||||
func Proto() error {
|
||||
cmd := exec.Command("go", "list", "-m", "-json", "github.com/livekit/protocol")
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
info := modInfo{}
|
||||
if err = json.Unmarshal(out, &info); err != nil {
|
||||
return err
|
||||
}
|
||||
protoDir := info.Dir
|
||||
updated, err := target.Path("proto/livekit_models.pb.go",
|
||||
protoDir+"/livekit_internal.proto",
|
||||
protoDir+"/livekit_models.proto",
|
||||
protoDir+"/livekit_recording.proto",
|
||||
protoDir+"/livekit_room.proto",
|
||||
protoDir+"/livekit_rtc.proto",
|
||||
protoDir+"/livekit_webhook.proto",
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !updated {
|
||||
return nil
|
||||
}
|
||||
|
||||
fmt.Println("generating protobuf")
|
||||
target := "proto"
|
||||
if err := os.MkdirAll(target, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
protoc, err := getToolPath("protoc")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
protocGoPath, err := getToolPath("protoc-gen-go")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
twirpPath, err := getToolPath("protoc-gen-twirp")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// generate twirp-related protos
|
||||
cmd = exec.Command(protoc,
|
||||
"--go_out", target,
|
||||
"--twirp_out", target,
|
||||
"--go_opt=paths=source_relative",
|
||||
"--twirp_opt=paths=source_relative",
|
||||
"--plugin=go="+protocGoPath,
|
||||
"--plugin=twirp="+twirpPath,
|
||||
"-I="+protoDir,
|
||||
protoDir+"/livekit_recording.proto",
|
||||
protoDir+"/livekit_room.proto",
|
||||
)
|
||||
connectStd(cmd)
|
||||
if err := cmd.Run(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// generate basic protobuf
|
||||
cmd = exec.Command(protoc,
|
||||
"--go_out", target,
|
||||
"--go_opt=paths=source_relative",
|
||||
"--plugin=go="+protocGoPath,
|
||||
"-I="+protoDir,
|
||||
protoDir+"/livekit_recording.proto",
|
||||
protoDir+"/livekit_rtc.proto",
|
||||
protoDir+"/livekit_internal.proto",
|
||||
protoDir+"/livekit_models.proto",
|
||||
protoDir+"/livekit_webhook.proto",
|
||||
)
|
||||
connectStd(cmd)
|
||||
if err := cmd.Run(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// builds LiveKit server
|
||||
func Build() error {
|
||||
mg.Deps(Proto, generateWire)
|
||||
mg.Deps(generateWire)
|
||||
if !checksummer.IsChanged() {
|
||||
fmt.Println("up to date")
|
||||
return nil
|
||||
@@ -162,7 +67,7 @@ func Build() error {
|
||||
|
||||
// builds binary that runs on linux amd64
|
||||
func BuildLinux() error {
|
||||
mg.Deps(Proto, generateWire)
|
||||
mg.Deps(generateWire)
|
||||
if !checksummer.IsChanged() {
|
||||
fmt.Println("up to date")
|
||||
return nil
|
||||
@@ -191,7 +96,7 @@ func BuildLinux() error {
|
||||
|
||||
// builds docker image for LiveKit server
|
||||
func Docker() error {
|
||||
mg.Deps(Proto, generateWire)
|
||||
mg.Deps(generateWire)
|
||||
cmd := exec.Command("docker", "build", ".", "-t", fmt.Sprintf("%s:v%s", imageName, version.Version))
|
||||
connectStd(cmd)
|
||||
if err := cmd.Run(); err != nil {
|
||||
@@ -219,7 +124,6 @@ func PublishDocker() error {
|
||||
|
||||
// run unit tests, skipping integration
|
||||
func Test() error {
|
||||
mg.Deps(Proto)
|
||||
cmd := exec.Command("go", "test", "-short", "./...")
|
||||
connectStd(cmd)
|
||||
return cmd.Run()
|
||||
@@ -227,7 +131,6 @@ func Test() error {
|
||||
|
||||
// run all tests including integration
|
||||
func TestAll() error {
|
||||
mg.Deps(Proto)
|
||||
// "-v", "-race",
|
||||
cmd := exec.Command("go", "test", "./...", "-count=1", "-timeout=3m")
|
||||
connectStd(cmd)
|
||||
@@ -243,7 +146,7 @@ func Clean() {
|
||||
|
||||
// regenerate code
|
||||
func Generate() error {
|
||||
mg.Deps(installDeps, Proto)
|
||||
mg.Deps(installDeps)
|
||||
|
||||
fmt.Println("generating...")
|
||||
|
||||
@@ -254,7 +157,7 @@ func Generate() error {
|
||||
|
||||
// code generation for wiring
|
||||
func generateWire() error {
|
||||
mg.Deps(installDeps, Proto)
|
||||
mg.Deps(installDeps)
|
||||
if !checksummer.IsChanged() {
|
||||
return nil
|
||||
}
|
||||
@@ -286,13 +189,7 @@ func installDeps() error {
|
||||
}
|
||||
|
||||
func installTools(force bool) error {
|
||||
if _, err := getToolPath("protoc"); err != nil {
|
||||
return fmt.Errorf("protoc is required but is not found")
|
||||
}
|
||||
|
||||
tools := []string{
|
||||
"google.golang.org/protobuf/cmd/protoc-gen-go",
|
||||
"github.com/twitchtv/twirp/protoc-gen-twirp",
|
||||
"github.com/google/wire/cmd/wire",
|
||||
}
|
||||
for _, t := range tools {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package rtc_test
|
||||
|
||||
import (
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types/typesfakes"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
func newMockParticipant(identity string, protocol types.ProtocolVersion, hidden bool) *typesfakes.FakeParticipant {
|
||||
|
||||
@@ -3,7 +3,7 @@ package rtc
|
||||
import (
|
||||
"strings"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/sdp/v3"
|
||||
"github.com/pion/webrtc/v3"
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package rtc
|
||||
import (
|
||||
"testing"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pion/ion-sfu/pkg/buffer"
|
||||
"github.com/pion/ion-sfu/pkg/sfu"
|
||||
@@ -18,7 +19,6 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
"github.com/livekit/livekit-server/pkg/utils/stats"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pion/ion-sfu/pkg/sfu"
|
||||
"github.com/pion/ion-sfu/pkg/twcc"
|
||||
"github.com/pion/rtcp"
|
||||
@@ -14,14 +16,11 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/livekit/protocol/utils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
"github.com/livekit/livekit-server/pkg/utils/stats"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/livekit-server/version"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -12,7 +13,6 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/routing/routingfakes"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types/typesfakes"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
func TestIsReady(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -7,6 +7,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pion/ion-sfu/pkg/buffer"
|
||||
"google.golang.org/protobuf/proto"
|
||||
@@ -15,7 +16,6 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
"github.com/livekit/livekit-server/pkg/utils/stats"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,16 +5,15 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types/typesfakes"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,11 +4,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bep/debounce"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pion/ion-sfu/pkg/sfu"
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,13 +5,12 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/bep/debounce"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/utils/stats"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
func TestMissingAnswerDuringICERestart(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
)
|
||||
|
||||
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/rtcp"
|
||||
webrtc "github.com/pion/webrtc/v3"
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
)
|
||||
|
||||
type FakePublishedTrack struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/ion-sfu/pkg/sfu"
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -6,11 +6,11 @@ import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/webrtc/v3"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
)
|
||||
|
||||
// encapsulates CRUD operations for room settings
|
||||
|
||||
@@ -6,10 +6,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
type RecordingService struct {
|
||||
|
||||
@@ -5,11 +5,10 @@ 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"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
func TestParticipantPersistence(t *testing.T) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gammazero/workerpool"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
"github.com/pion/webrtc/v3"
|
||||
@@ -15,7 +16,6 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -3,13 +3,14 @@ package service_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/routing/routingfakes"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/livekit-server/pkg/service/servicefakes"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestCreateRoom(t *testing.T) {
|
||||
|
||||
@@ -3,12 +3,12 @@ package service
|
||||
import (
|
||||
"context"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/thoas/go-funk"
|
||||
"github.com/twitchtv/twirp"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
// A rooms service that supports a single node
|
||||
|
||||
@@ -3,7 +3,7 @@ package service
|
||||
import (
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
)
|
||||
|
||||
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
type RTCService struct {
|
||||
|
||||
@@ -10,17 +10,16 @@ import (
|
||||
"runtime/pprof"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/protocol/auth"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pion/turn/v2"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/urfave/negroni"
|
||||
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/utils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/livekit-server/version"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
)
|
||||
|
||||
type FakeRoomStore struct {
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/google/wire"
|
||||
"github.com/livekit/protocol/auth"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
var ServiceSet = wire.NewSet(
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// Code generated by Wire. DO NOT EDIT.
|
||||
|
||||
//go:generate go run github.com/google/wire/cmd/wire
|
||||
//go:build !wireinject
|
||||
// +build !wireinject
|
||||
//+build !wireinject
|
||||
|
||||
package service
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -3,7 +3,7 @@ package stats
|
||||
import (
|
||||
"sync/atomic"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
linuxproc "github.com/c9s/goprocinfo/linux"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/pion/interceptor"
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/rtp"
|
||||
|
||||
@@ -12,6 +12,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pion/rtcp"
|
||||
"github.com/pion/rtp"
|
||||
"github.com/pion/webrtc/v3"
|
||||
@@ -21,8 +23,6 @@ import (
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
)
|
||||
|
||||
type RTCClient struct {
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/livekit/protocol/auth"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/twitchtv/twirp"
|
||||
|
||||
@@ -18,7 +19,6 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
testclient "github.com/livekit/livekit-server/test/client"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
)
|
||||
|
||||
func TestMultiNodeRouting(t *testing.T) {
|
||||
|
||||
+2
-3
@@ -6,15 +6,14 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/pion/turn/v2"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/livekit/protocol/utils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
func testTurnServer(t *testing.T) {
|
||||
|
||||
@@ -8,17 +8,18 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/livekit/protocol/auth"
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
)
|
||||
|
||||
func TestWebhooks(t *testing.T) {
|
||||
|
||||
@@ -5,6 +5,4 @@ package tools
|
||||
import (
|
||||
_ "github.com/google/wire/cmd/wire"
|
||||
_ "github.com/maxbrunsfeld/counterfeiter/v6"
|
||||
_ "github.com/twitchtv/twirp/protoc-gen-twirp"
|
||||
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user