MCPcopy Create free account
hub / github.com/prometheus/procfs / IPVSBackendStatus

Method IPVSBackendStatus

ipvs.go:126–134  ·  view source on GitHub ↗

IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem.

()

Source from the content-addressed store, hash-verified

124
125// IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem.
126func (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
136func parseIPVSBackendStatus(file io.Reader) ([]IPVSBackendStatus, error) {
137 var (

Callers 1

TestIPVSBackendStatusFunction · 0.80

Calls 2

parseIPVSBackendStatusFunction · 0.85
PathMethod · 0.45

Tested by 1

TestIPVSBackendStatusFunction · 0.64