Lock room creation to ensure atomic creation & node assignment (#46)
* Lock room creation to ensure atomic creation & node assignment * more tests
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
)
|
||||
|
||||
@@ -15,6 +17,11 @@ type RoomStore interface {
|
||||
ListRooms() ([]*livekit.Room, error)
|
||||
DeleteRoom(idOrName string) error
|
||||
|
||||
// enable locking on a specific room to prevent race
|
||||
// returns a (lock uuid, error)
|
||||
LockRoom(name string, duration time.Duration) (string, error)
|
||||
UnlockRoom(name string, uid string) error
|
||||
|
||||
PersistParticipant(roomName string, participant *livekit.ParticipantInfo) error
|
||||
GetParticipant(roomName, identity string) (*livekit.ParticipantInfo, error)
|
||||
ListParticipants(roomName string) ([]*livekit.ParticipantInfo, error)
|
||||
|
||||
Reference in New Issue
Block a user