github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/datadog/config.go (about)

     1  package datadog
     2  
     3  import (
     4  	"log"
     5  
     6  	"github.com/zorkian/go-datadog-api"
     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, error) {
    17  
    18  	client := datadog.NewClient(c.APIKey, c.APPKey)
    19  
    20  	log.Printf("[INFO] Datadog Client configured ")
    21  
    22  	return client, nil
    23  }