Documentation ¶
Overview ¶
Package config provides cross-cutting configuration support for the newrelic-client-go project.
Package config provides a configuration surface area for configuring the underlying client.
Authentication ¶
You will need a valid Personal API key to communicate with the backend New Relic APIs that power the client. See the API key documentation below for more information on how to locate this key:
https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Compression = struct { None CompressionType Gzip CompressionType }{ None: "", Gzip: "gzip", }
Compression is an Enum of compression types available
Functions ¶
This section is empty.
Types ¶
type CompressionType ¶
type CompressionType string
CompressionType to use during transport.
func ParseCompression ¶
func ParseCompression(name string) CompressionType
ParseCompression takes a named compression and returns the Type
func (CompressionType) String ¶
func (c CompressionType) String() string
String returns the name of the compression type
type Config ¶
type Config struct { // LicenseKey to authenticate Log API requests // see: https://docs.newrelic.com/docs/accounts/accounts-billing/account-setup/new-relic-license-key LicenseKey string // PersonalAPIKey to authenticate API requests // see: https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#personal-api-key PersonalAPIKey string // AdminAPIKey to authenticate API requests // Deprecated. Use a Personal API key for authentication. // see: https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#admin AdminAPIKey string // InsightsInsertKey to send custom events to Insights InsightsInsertKey string // Timeout is the client timeout for HTTP requests. Timeout *time.Duration // HTTPTransport allows customization of the client's underlying transport. HTTPTransport http.RoundTripper // Compression used in sending data in HTTP requests. Compression CompressionType // UserAgent updates the default user agent string used by the client. UserAgent string // ServiceName is for New Relic internal use only. ServiceName string // LogLevel can be one of the following values: // "panic", "fatal", "error", "warn", "info", "debug", "trace" LogLevel string // LogJSON toggles formatting of log entries in JSON format. LogJSON bool // Logger allows customization of the client's underlying logger. Logger logging.Logger // contains filtered or unexported fields }
Config contains all the configuration data for the API Client.
func (*Config) Region ¶
Region returns the region configuration struct if one has not been set, use the default region