using counterfeiter instead of gomocks, much simpler

This commit is contained in:
David Zhao
2020-12-22 17:26:26 -08:00
parent 1b396d2000
commit 3518435783
18 changed files with 3352 additions and 913 deletions
+7
View File
@@ -5,6 +5,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/thoas/go-funk"
"github.com/livekit/livekit-server/pkg/logger"
"github.com/livekit/livekit-server/pkg/utils"
@@ -47,6 +48,12 @@ func (r *Room) GetParticipant(id string) Participant {
return r.participants[id]
}
func (r *Room) GetParticipants() []Participant {
r.lock.RLock()
defer r.lock.RUnlock()
return funk.Values(r.participants).([]Participant)
}
func (r *Room) ToRoomInfo(node *livekit.Node) *livekit.RoomInfo {
return &livekit.RoomInfo{
Sid: r.Sid,