(auth *coreauth.Auth)
| 629 | } |
| 630 | |
| 631 | func 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 | } |
no test coverage detected