22 lines
336 B
Go
22 lines
336 B
Go
package inputs
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// Kernel is based on telegraf Kernel.
|
|
type Kernel struct {
|
|
baseInput
|
|
}
|
|
|
|
// PluginName is based on telegraf plugin name.
|
|
func (k *Kernel) PluginName() string {
|
|
return "kernel"
|
|
}
|
|
|
|
// TOML encodes to toml string
|
|
func (k *Kernel) TOML() string {
|
|
return fmt.Sprintf(`[[inputs.%s]]
|
|
`, k.PluginName())
|
|
}
|