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

     1  // Package edge provides a programmatic API for interacting with New Relic Edge.
     2  package edge
     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  // Edge is used to communicate with the New Relic Edge product.
    11  type Edge struct {
    12  	client http.Client
    13  	logger logging.Logger
    14  }
    15  
    16  // New returns a new client for interacting with New Relic Edge.
    17  func New(config config.Config) Edge {
    18  	return Edge{
    19  		client: http.NewClient(config),
    20  		logger: config.GetLogger(),
    21  	}
    22  }