MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / GetByHost

Method GetByHost

server-source-code/internal/context/registry.go:155–166  ·  view source on GitHub ↗

GetByHost returns the entry for the given host (exact match, case-insensitive), or nil if not found.

(host string)

Source from the content-addressed store, hash-verified

153
154// GetByHost returns the entry for the given host (exact match, case-insensitive), or nil if not found.
155func (r *Registry) GetByHost(host string) *Entry {
156 if r == nil {
157 return nil
158 }
159 key := strings.ToLower(strings.TrimSpace(host))
160 if key == "" {
161 return nil
162 }
163 r.mu.RLock()
164 defer r.mu.RUnlock()
165 return r.byHost[key]
166}
167
168// ListHosts returns all active hosts. Used by automation jobs to process all hosts.
169func (r *Registry) ListHosts() []string {

Callers 2

MiddlewareFunction · 0.45
GetOrCreateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected