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 API key to communicate with the backend New Relic APIs that power the client. Using a Personal API key is the preferred method but an Admin API key is required for several different resource types. Check each package's documentation for more information on which key is required. See the API key documentation below for more information on how to locate these keys:
https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // 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 // Note this will be deprecated in the future! // see: https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#admin AdminAPIKey string // Timeout is the client timeout for HTTP requests. Timeout *time.Duration // HTTPTransport allows customization of the client's underlying transport. HTTPTransport http.RoundTripper // 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) GetLogger ¶ added in v0.3.0
GetLogger returns a logger instance based on the config values.