MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / hostRecentRequests

Function hostRecentRequests

internal/pluginhost/auth_callbacks.go:631–648  ·  view source on GitHub ↗
(auth *coreauth.Auth)

Source from the content-addressed store, hash-verified

629}
630
631func hostRecentRequests(auth *coreauth.Auth) []pluginapi.HostRecentRequestEntry {
632 if auth == nil {
633 return nil
634 }
635 snapshot := auth.RecentRequestsSnapshot(time.Now())
636 if len(snapshot) == 0 {
637 return nil
638 }
639 out := make([]pluginapi.HostRecentRequestEntry, 0, len(snapshot))
640 for _, entry := range snapshot {
641 out = append(out, pluginapi.HostRecentRequestEntry{
642 Time: entry.Time,
643 Success: entry.Success,
644 Failed: entry.Failed,
645 })
646 }
647 return out
648}

Callers 1

Calls 1

Tested by

no test coverage detected