IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem.
()
| 124 | |
| 125 | // IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem. |
| 126 | func (fs FS) IPVSBackendStatus() ([]IPVSBackendStatus, error) { |
| 127 | file, err := os.Open(fs.proc.Path("net/ip_vs")) |
| 128 | if err != nil { |
| 129 | return nil, err |
| 130 | } |
| 131 | defer file.Close() |
| 132 | |
| 133 | return parseIPVSBackendStatus(file) |
| 134 | } |
| 135 | |
| 136 | func parseIPVSBackendStatus(file io.Reader) ([]IPVSBackendStatus, error) { |
| 137 | var ( |