2018-10-05 21:43:01 +00:00
|
|
|
package inputs
|
|
|
|
|
2018-10-16 00:38:36 +00:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
2018-10-05 21:43:01 +00:00
|
|
|
// Processes is based on telegraf Processes.
|
2018-10-16 00:38:36 +00:00
|
|
|
type Processes struct {
|
|
|
|
baseInput
|
|
|
|
}
|
|
|
|
|
|
|
|
// PluginName is based on telegraf plugin name.
|
|
|
|
func (p *Processes) PluginName() string {
|
|
|
|
return "processes"
|
|
|
|
}
|
2018-10-05 21:43:01 +00:00
|
|
|
|
|
|
|
// TOML encodes to toml string
|
|
|
|
func (p *Processes) TOML() string {
|
2018-10-16 00:38:36 +00:00
|
|
|
return fmt.Sprintf(`[[inputs.%s]]
|
|
|
|
`, p.PluginName())
|
2018-10-05 21:43:01 +00:00
|
|
|
}
|
2018-10-17 19:51:35 +00:00
|
|
|
|
|
|
|
// UnmarshalTOML decodes the parsed data to the object
|
|
|
|
func (p *Processes) UnmarshalTOML(data interface{}) error {
|
|
|
|
return nil
|
|
|
|
}
|