fix: use static catalog for capabilities (not dynamic query)
This commit is contained in:
parent
477b82d60a
commit
e8cc66636c
@ -1,6 +1,8 @@
|
||||
package httpapi
|
||||
|
||||
import "net/http"
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Capability represents a detection capability the device supports.
|
||||
type Capability struct {
|
||||
@ -69,11 +71,12 @@ func (s *Server) handleCapabilities(w http.ResponseWriter, r *http.Request) {
|
||||
})
|
||||
}
|
||||
|
||||
// installedNodeTypes queries the media-server's graph node types API.
|
||||
// installedNodeTypes returns all node types known to this agent build.
|
||||
// The media-server binary carries the same plugin set, so all catalogued
|
||||
// types are considered available.
|
||||
func (s *Server) installedNodeTypes() map[string]bool {
|
||||
set := map[string]bool{}
|
||||
nodeTypes := graphNodeTypesCatalog()
|
||||
for _, nt := range nodeTypes {
|
||||
for _, nt := range graphNodeTypesCatalog() {
|
||||
set[nt.Type] = true
|
||||
}
|
||||
return set
|
||||
|
||||
Loading…
Reference in New Issue
Block a user