telegraf/plugins/inputs/ethtool/ethtool.go

24 lines
524 B
Go
Raw Normal View History

//go:generate ../../../tools/readme_config_includer/generator
2019-11-09 03:55:37 +08:00
package ethtool
import (
_ "embed"
2019-11-09 03:55:37 +08:00
)
const pluginName = "ethtool"
//go:embed sample.conf
var sampleConfig string
2019-11-09 03:55:37 +08:00
type Command interface {
Init() error
DriverName(intf NamespacedInterface) (string, error)
Interfaces(includeNamespaces bool) ([]NamespacedInterface, error)
Stats(intf NamespacedInterface) (map[string]uint64, error)
Get(intf NamespacedInterface) (map[string]uint64, error)
2019-11-09 03:55:37 +08:00
}
func (*Ethtool) SampleConfig() string {
return sampleConfig
}