Some more files with types (#302)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user