mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-13 01:00:50 -04:00
* provider/datadog: Pulls v2 and removes v1 of library go-datadog-api.
See https://github.com/zorkian/go-datadog-api/issues/56 for context.
* Fixes bug in backoff implementation that decreased performance significantly.
* Uses pointers for field types, providing support of distinguishing
between if a value is set, or the default value for that type is
effective.
* provider/datadog: Convert provider to use v2 of go-datadog-api.
* provider/datadog: Update vendored library.
* provider/datadog: Update dashboard resource to reflect API updates.
23 lines
391 B
Go
23 lines
391 B
Go
package datadog
|
|
|
|
import (
|
|
"log"
|
|
|
|
"gopkg.in/zorkian/go-datadog-api.v2"
|
|
)
|
|
|
|
// Config holds API and APP keys to authenticate to Datadog.
|
|
type Config struct {
|
|
APIKey string
|
|
APPKey string
|
|
}
|
|
|
|
// Client returns a new Datadog client.
|
|
func (c *Config) Client() *datadog.Client {
|
|
|
|
client := datadog.NewClient(c.APIKey, c.APPKey)
|
|
log.Printf("[INFO] Datadog Client configured ")
|
|
|
|
return client
|
|
}
|