Add cloud_pubsub input plugin (#5136)

This commit is contained in:
emily
2019-01-03 16:20:07 -08:00
committed by Daniel Nelson
parent 3a7a40a0a4
commit f42d9378ba
8 changed files with 747 additions and 0 deletions

View File

@@ -18,7 +18,9 @@ import (
"time"
"unicode"
"fmt"
"github.com/alecthomas/units"
"runtime"
)
const alphanum string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
@@ -58,6 +60,11 @@ func Version() string {
return version
}
// ProductToken returns a tag for Telegraf that can be used in user agents.
func ProductToken() string {
return fmt.Sprintf("Telegraf/%s Go/%s", Version(), runtime.Version())
}
// UnmarshalTOML parses the duration from the TOML config file
func (d *Duration) UnmarshalTOML(b []byte) error {
var err error