Taking interface{} -> any modernize bits (#4204)
This commit is contained in:
@@ -1093,8 +1093,8 @@ func (t *MediaTrackReceiver) onDownTrackCreated(downTrack *sfu.DownTrack) {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) DebugInfo() map[string]interface{} {
|
||||
info := map[string]interface{}{
|
||||
func (t *MediaTrackReceiver) DebugInfo() map[string]any {
|
||||
info := map[string]any{
|
||||
"ID": t.ID(),
|
||||
"Kind": t.Kind().String(),
|
||||
"PubMuted": t.IsMuted(),
|
||||
|
||||
@@ -355,8 +355,8 @@ func (t *MediaTrackSubscriptions) getAllSubscribedTracksLocked() []types.Subscri
|
||||
return subTracks
|
||||
}
|
||||
|
||||
func (t *MediaTrackSubscriptions) DebugInfo() []map[string]interface{} {
|
||||
subscribedTrackInfo := make([]map[string]interface{}, 0)
|
||||
func (t *MediaTrackSubscriptions) DebugInfo() []map[string]any {
|
||||
subscribedTrackInfo := make([]map[string]any, 0)
|
||||
for _, val := range t.getAllSubscribedTracks() {
|
||||
if st, ok := val.(*SubscribedTrack); ok {
|
||||
subscribedTrackInfo = append(subscribedTrackInfo, st.DownTrack().DebugInfo())
|
||||
|
||||
@@ -3496,13 +3496,13 @@ func (p *ParticipantImpl) getPublishedTrackBySdpCid(clientId string) types.Media
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) DebugInfo() map[string]interface{} {
|
||||
info := map[string]interface{}{
|
||||
func (p *ParticipantImpl) DebugInfo() map[string]any {
|
||||
info := map[string]any{
|
||||
"ID": p.ID(),
|
||||
"State": p.State().String(),
|
||||
}
|
||||
|
||||
pendingTrackInfo := make(map[string]interface{})
|
||||
pendingTrackInfo := make(map[string]any)
|
||||
p.pendingTracksLock.RLock()
|
||||
for clientID, pti := range p.pendingTracks {
|
||||
var trackInfos []string
|
||||
@@ -3510,7 +3510,7 @@ func (p *ParticipantImpl) DebugInfo() map[string]interface{} {
|
||||
trackInfos = append(trackInfos, ti.String())
|
||||
}
|
||||
|
||||
pendingTrackInfo[clientID] = map[string]interface{}{
|
||||
pendingTrackInfo[clientID] = map[string]any{
|
||||
"TrackInfos": trackInfos,
|
||||
"Migrated": pti.migrated,
|
||||
}
|
||||
|
||||
+3
-3
@@ -1795,15 +1795,15 @@ func (r *Room) handleNewJobs(ad *livekit.AgentDispatch, inc *sutils.IncrementalD
|
||||
})
|
||||
}
|
||||
|
||||
func (r *Room) DebugInfo() map[string]interface{} {
|
||||
info := map[string]interface{}{
|
||||
func (r *Room) DebugInfo() map[string]any {
|
||||
info := map[string]any{
|
||||
"Name": r.protoRoom.Name,
|
||||
"Sid": r.protoRoom.Sid,
|
||||
"CreatedAt": r.protoRoom.CreationTime,
|
||||
}
|
||||
|
||||
participants := r.GetParticipants()
|
||||
participantInfo := make(map[string]interface{})
|
||||
participantInfo := make(map[string]any)
|
||||
for _, p := range participants {
|
||||
participantInfo[string(p.Identity())] = p.DebugInfo()
|
||||
}
|
||||
|
||||
@@ -398,16 +398,16 @@ func (u *UpTrackManager) maybeRevokeSubscriptions() {
|
||||
}
|
||||
}
|
||||
|
||||
func (u *UpTrackManager) DebugInfo() map[string]interface{} {
|
||||
info := map[string]interface{}{}
|
||||
publishedTrackInfo := make(map[livekit.TrackID]interface{})
|
||||
func (u *UpTrackManager) DebugInfo() map[string]any {
|
||||
info := map[string]any{}
|
||||
publishedTrackInfo := make(map[livekit.TrackID]any)
|
||||
|
||||
u.lock.RLock()
|
||||
for trackID, track := range u.publishedTracks {
|
||||
if mt, ok := track.(*MediaTrack); ok {
|
||||
publishedTrackInfo[trackID] = mt.DebugInfo()
|
||||
} else {
|
||||
publishedTrackInfo[trackID] = map[string]interface{}{
|
||||
publishedTrackInfo[trackID] = map[string]any{
|
||||
"ID": track.ID(),
|
||||
"Kind": track.Kind().String(),
|
||||
"PubMuted": track.IsMuted(),
|
||||
|
||||
+2
-2
@@ -117,7 +117,7 @@ func Recover(l logger.Logger) any {
|
||||
|
||||
// logger helpers
|
||||
func LoggerWithParticipant(l logger.Logger, identity livekit.ParticipantIdentity, sid livekit.ParticipantID, isRemote bool) logger.Logger {
|
||||
values := make([]interface{}, 0, 4)
|
||||
values := make([]any, 0, 4)
|
||||
if identity != "" {
|
||||
values = append(values, "participant", identity)
|
||||
}
|
||||
@@ -130,7 +130,7 @@ func LoggerWithParticipant(l logger.Logger, identity livekit.ParticipantIdentity
|
||||
}
|
||||
|
||||
func LoggerWithRoom(l logger.Logger, name livekit.RoomName, roomID livekit.RoomID) logger.Logger {
|
||||
values := make([]interface{}, 0, 2)
|
||||
values := make([]any, 0, 2)
|
||||
if name != "" {
|
||||
values = append(values, "room", name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user