StatsProvider provides realtime stats abount endpoints, backends and locations
| 20 | |
| 21 | // StatsProvider provides realtime stats abount endpoints, backends and locations |
| 22 | type StatsProvider interface { |
| 23 | FrontendStats(FrontendKey) (*RoundTripStats, error) |
| 24 | ServerStats(ServerKey) (*RoundTripStats, error) |
| 25 | BackendStats(BackendKey) (*RoundTripStats, error) |
| 26 | |
| 27 | // TopFrontends returns locations sorted by criteria (faulty, slow, most used) |
| 28 | // if hostname or backendId is present, will filter out locations for that host or backendId |
| 29 | TopFrontends(*BackendKey) ([]Frontend, error) |
| 30 | |
| 31 | // TopServers returns endpoints sorted by criteria (faulty, slow, mos used) |
| 32 | // if backendId is not empty, will filter out endpoints for that backendId |
| 33 | TopServers(*BackendKey) ([]Server, error) |
| 34 | } |
| 35 | |
| 36 | type KeyPair struct { |
| 37 | Key []byte |
no outgoing calls
no test coverage detected