Update agents service to updated protocol (#2837)

- Deprecate namespace field
- Restore former semantic of starting a job for each registered namespace, for a given Agent Name
- Add agentName field
- Use "dispatcher" naming convention
This commit is contained in:
Benjamin Pracht
2024-07-08 17:09:11 -07:00
committed by GitHub
parent e4fba5634a
commit fb7eb3450e
10 changed files with 142 additions and 114 deletions
+3 -7
View File
@@ -527,16 +527,12 @@ func (s *RTCService) startConnection(
return connectionResult{}, nil, err
}
for _, ag := range internal.Agents {
if ag.Type != livekit.JobType_JT_ROOM {
continue
}
for _, ag := range internal.AgentDispatches {
go s.agentClient.LaunchJob(ctx, &agent.JobRequest{
JobType: ag.Type,
JobType: livekit.JobType_JT_ROOM,
Room: cr.Room,
Metadata: ag.Metadata,
Namespace: ag.Namespace,
AgentName: ag.AgentName,
})
}
}