It would make things less complicated in my repos if I was able to have a couple more public functions for reading the registry. Right now only being able to get active PID info only by inputing the specific ID I'm looking for isn't too helpful for my case. I require the ability to check what the active PIDs are upon request. Using the event stream to monitor this just bloats my code by needing to create my own mapping to just replicate the privated one. I understand it is privated for mutex reasons, but if these functions could be added it would be very helpful. I have used these functions in my own code before using my fork with no issues, but I think this could be useful to others as well.
registry.go
...
func (r *Registry) GetIDs() []string {
r.mu.RLock()
defer r.mu.RUnlock()
keys := make([]string, 0, len(r.lookup))
for k := range r.lookup {
keys = append(keys, k)
}
return keys
}
func (r *Registry) GetPIDs() []*PID {
r.mu.RLock()
defer r.mu.RUnlock()
keys := make([]*PID, 0, len(r.lookup))
for _, v := range r.lookup {
keys = append(keys, v.PID())
}
return keys
}
...
It would make things less complicated in my repos if I was able to have a couple more public functions for reading the registry. Right now only being able to get active PID info only by inputing the specific ID I'm looking for isn't too helpful for my case. I require the ability to check what the active PIDs are upon request. Using the event stream to monitor this just bloats my code by needing to create my own mapping to just replicate the privated one. I understand it is privated for mutex reasons, but if these functions could be added it would be very helpful. I have used these functions in my own code before using my fork with no issues, but I think this could be useful to others as well.