MCPcopy
hub / github.com/projectdiscovery/katana / GetActiveURLs

Method GetActiveURLs

pkg/engine/headless/debugger.go:81–97  ·  view source on GitHub ↗

GetActiveURLs returns currently active URLs with durations

()

Source from the content-addressed store, hash-verified

79
80// GetActiveURLs returns currently active URLs with durations
81func (cd *CrawlDebugger) GetActiveURLs() []ActiveURL {
82 if cd == nil {
83 return nil
84 }
85
86 cd.mu.RLock()
87 defer cd.mu.RUnlock()
88
89 urls := make([]ActiveURL, 0, len(cd.activeURLs))
90 now := time.Now()
91 for _, au := range cd.activeURLs {
92 copy := *au
93 copy.Duration = now.Sub(au.StartTime).String()
94 urls = append(urls, copy)
95 }
96 return urls
97}
98
99// HTTP handlers
100func (cd *CrawlDebugger) handleActiveURLs(w http.ResponseWriter, r *http.Request) {

Callers 1

handleActiveURLsMethod · 0.95

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected