Admin APIs for participant management (#13)

* stubs for room admin APIs

* room store APIs to persist participants

* participant persistence

* updated protobufs

* implemented APIs to mute/remove/etc

* fixed mute handling
This commit is contained in:
David Zhao
2021-02-10 00:06:32 -08:00
committed by GitHub
parent 61b9569e38
commit 38140debdf
30 changed files with 3016 additions and 289 deletions
+12
View File
@@ -1,6 +1,8 @@
package routing
import (
"errors"
"strings"
"time"
"github.com/thoas/go-funk"
@@ -24,3 +26,13 @@ func GetAvailableNodes(nodes []*livekit.Node) []*livekit.Node {
func participantKey(roomName, identity string) string {
return roomName + "|" + identity
}
func parseParticipantKey(pkey string) (roomName string, identity string, err error) {
parts := strings.Split(pkey, "|")
if len(parts) != 2 {
err = errors.New("invalid participant key")
return
}
return parts[0], parts[1], nil
}