MCPcopy
hub / github.com/safing/portmaster / processQuery

Method processQuery

spn/navigator/database.go:93–107  ·  view source on GitHub ↗
(m *Map, q *query.Query, it *iterator.Iterator)

Source from the content-addressed store, hash-verified

91}
92
93func (s *StorageInterface) processQuery(m *Map, q *query.Query, it *iterator.Iterator) {
94 // Return all matching pins.
95 for _, pin := range m.sortedPins(true) {
96 export := pin.Export()
97 if q.Matches(export) {
98 select {
99 case it.Next <- export:
100 case <-it.Done:
101 return
102 }
103 }
104 }
105
106 it.Finish(nil)
107}
108
109func registerMapDatabase() error {
110 _, err := database.Register(&database.Database{

Callers 1

QueryMethod · 0.95

Calls 4

sortedPinsMethod · 0.80
MatchesMethod · 0.65
ExportMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected