config rework to handle distributed setup, fixed redis bugs

This commit is contained in:
David Zhao
2021-01-17 17:06:50 -08:00
parent 30e99e8c6b
commit 458241d1f1
21 changed files with 382 additions and 104 deletions
+11 -1
View File
@@ -25,10 +25,14 @@ func NewLocalRouter(currentNode LocalNode) *LocalRouter {
}
}
func (r *LocalRouter) GetNodeIdForRoom(roomName string) (string, error) {
func (r *LocalRouter) GetNodeForRoom(roomName string) (string, error) {
return r.currentNode.Id, nil
}
func (r *LocalRouter) SetNodeForRoom(roomName string, nodeId string) error {
return nil
}
func (r *LocalRouter) RegisterNode() error {
return nil
}
@@ -44,6 +48,12 @@ func (r *LocalRouter) GetNode(nodeId string) (*livekit.Node, error) {
return nil, ErrNotFound
}
func (r *LocalRouter) ListNodes() ([]*livekit.Node, error) {
return []*livekit.Node{
r.currentNode,
}, nil
}
func (r *LocalRouter) StartParticipant(roomName, participantId, participantName string) error {
// treat it as a new participant connecting
if r.onNewParticipant == nil {