github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/datadog/config.go (about)

     1  package datadog
     2  
     3  import (
     4  	"log"
     5  
     6  	"gopkg.in/zorkian/go-datadog-api.v2"
     7  )
     8  
     9  // Config holds API and APP keys to authenticate to Datadog.
    10  type Config struct {
    11  	APIKey string
    12  	APPKey string
    13  }
    14  
    15  // Client returns a new Datadog client.
    16  func (c *Config) Client() *datadog.Client {
    17  
    18  	client := datadog.NewClient(c.APIKey, c.APPKey)
    19  	log.Printf("[INFO] Datadog Client configured ")
    20  
    21  	return client
    22  }