Interfaces (#97)

* create interface

* move room manager to interface

* interfaces

* updates

* fix loop

* fix fakes

* remove node types
This commit is contained in:
David Colburn
2021-08-28 18:28:08 -05:00
committed by GitHub
parent 4553695631
commit 69c1d4c295
16 changed files with 394 additions and 373 deletions
+2 -2
View File
@@ -96,11 +96,11 @@ func NewTurnServer(conf *config.Config, roomStore RoomStore, node routing.LocalN
func newTurnAuthHandler(roomStore RoomStore) turn.AuthHandler {
return func(username, realm string, srcAddr net.Addr) (key []byte, ok bool) {
// room id should be the username, create a hashed room id
rm, err := roomStore.GetRoom(username)
rm, err := roomStore.LoadRoom(username)
if err != nil {
return nil, false
}
return turn.GenerateAuthKey(username, livekitRealm, rm.TurnPassword), true
}
}
}