2015-10-23 05:42:19 +02:00
|
|
|
package datadog
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"github.com/zorkian/go-datadog-api"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Config holds API and APP keys to authenticate to Datadog.
|
|
|
|
type Config struct {
|
|
|
|
APIKey string
|
|
|
|
APPKey string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Client returns a new Datadog client.
|
2016-12-08 11:17:42 +01:00
|
|
|
func (c *Config) Client() *datadog.Client {
|
2015-10-23 05:42:19 +02:00
|
|
|
|
|
|
|
client := datadog.NewClient(c.APIKey, c.APPKey)
|
|
|
|
log.Printf("[INFO] Datadog Client configured ")
|
|
|
|
|
2016-12-08 11:17:42 +01:00
|
|
|
return client
|
2015-10-23 05:42:19 +02:00
|
|
|
}
|