MCPcopy
hub / github.com/prometheus/node_exporter / getNetClassInfo

Method getNetClassInfo

collector/netclass_linux.go:157–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155}
156
157func (c *netClassCollector) getNetClassInfo() (sysfs.NetClass, error) {
158 netClass := sysfs.NetClass{}
159 netDevices, err := c.fs.NetClassDevices()
160 if err != nil {
161 return netClass, err
162 }
163
164 for _, device := range netDevices {
165 if c.ignoredDevicesPattern.MatchString(device) {
166 continue
167 }
168 interfaceClass, err := c.fs.NetClassByIface(device)
169 if err != nil {
170 return netClass, err
171 }
172 netClass[device] = *interfaceClass
173 }
174
175 return netClass, nil
176}
177
178func getAdminState(flags *int64) string {
179 if flags == nil {

Callers 1

netClassSysfsUpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected