mediaapi/types: Rename member to ActiveRemoteRequests.MXCToCond

Clearer that it's a map from mxc URLs to sync.Cond
main
Robert Swain 2017-05-26 14:17:54 +02:00
parent e8d3b4648b
commit 0affdae889
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ func Setup(servMux *http.ServeMux, httpClient *http.Client, cfg *config.MediaAPI
})) }))
activeRemoteRequests := &types.ActiveRemoteRequests{ activeRemoteRequests := &types.ActiveRemoteRequests{
Set: map[string]*sync.Cond{}, MXCToCond: map[string]*sync.Cond{},
} }
r0mux.Handle("/download/{serverName}/{mediaId}", r0mux.Handle("/download/{serverName}/{mediaId}",
prometheus.InstrumentHandler("download", http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { prometheus.InstrumentHandler("download", http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {

View File

@ -68,5 +68,5 @@ type MediaMetadata struct {
type ActiveRemoteRequests struct { type ActiveRemoteRequests struct {
sync.Mutex sync.Mutex
// The string key is an mxc:// URL // The string key is an mxc:// URL
Set map[string]*sync.Cond MXCToCond map[string]*sync.Cond
} }