add psrpc room service (#2171)
* add psrpc room service * update deps * disable by default * feedback * config * test
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package routing
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/rpc"
|
||||
)
|
||||
|
||||
type topicFormatter struct{}
|
||||
|
||||
func NewTopicFormatter() rpc.TopicFormatter {
|
||||
return topicFormatter{}
|
||||
}
|
||||
|
||||
func (f topicFormatter) ParticipantTopic(ctx context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) rpc.ParticipantTopic {
|
||||
return rpc.FormatParticipantTopic(roomName, identity)
|
||||
}
|
||||
|
||||
func (f topicFormatter) RoomTopic(ctx context.Context, roomName livekit.RoomName) rpc.RoomTopic {
|
||||
return rpc.FormatRoomTopic(roomName)
|
||||
}
|
||||
Reference in New Issue
Block a user