Some more files with types (#302)

This commit is contained in:
Raja Subramanian
2021-12-30 16:43:20 +05:30
committed by GitHub
parent 1b66fe1e23
commit 07db1ba726
14 changed files with 109 additions and 105 deletions
+4 -2
View File
@@ -3,13 +3,15 @@ package routing
import (
"errors"
"strings"
"github.com/livekit/protocol/livekit"
)
func participantKey(roomName, identity string) string {
func participantKey(roomName livekit.RoomName, identity livekit.ParticipantIdentity) string {
return roomName + "|" + identity
}
func parseParticipantKey(pkey string) (roomName string, identity string, err error) {
func parseParticipantKey(pkey string) (roomName livekit.RoomName, identity livekit.ParticipantIdentity, err error) {
parts := strings.Split(pkey, "|")
if len(parts) != 2 {
err = errors.New("invalid participant key")