github.com/influxdata/influxdb/v2@v2.7.6/telegraf/plugins/inputs/swap.go (about) 1 package inputs 2 3 import ( 4 "fmt" 5 ) 6 7 // SwapStats is based on telegraf SwapStats. 8 type SwapStats struct { 9 baseInput 10 } 11 12 // PluginName is based on telegraf plugin name. 13 func (s *SwapStats) PluginName() string { 14 return "swap" 15 } 16 17 // TOML encodes to toml string. 18 func (s *SwapStats) TOML() string { 19 return fmt.Sprintf(`[[inputs.%s]] 20 # no configuration 21 `, s.PluginName()) 22 } 23 24 // UnmarshalTOML decodes the parsed data to the object 25 func (s *SwapStats) UnmarshalTOML(data interface{}) error { 26 return nil 27 }