github.com/newrelic/newrelic-client-go@v1.1.0/pkg/nrdb/nrdb.go (about)

     1  // Package nrdb provides a programmatic API for interacting with NRDB, New Relic's Datastore
     2  package nrdb
     3  
     4  import (
     5  	"github.com/newrelic/newrelic-client-go/internal/http"
     6  	"github.com/newrelic/newrelic-client-go/pkg/config"
     7  	"github.com/newrelic/newrelic-client-go/pkg/logging"
     8  )
     9  
    10  // Nrdb is used to communicate with the New Relic's Datastore, NRDB.
    11  type Nrdb struct {
    12  	client http.Client
    13  	logger logging.Logger
    14  }
    15  
    16  // New returns a new GraphQL client for interacting with New Relic's Datastore
    17  func New(config config.Config) Nrdb {
    18  	return Nrdb{
    19  		client: http.NewClient(config),
    20  		logger: config.GetLogger(),
    21  	}
    22  }