config

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

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

	// Region of the New Relic platform to use
	// Valid values are: US, EU
	Region string

	// HTTP
	Timeout               *time.Duration
	HTTPTransport         http.RoundTripper
	UserAgent             string
	BaseURL               string
	SyntheticsBaseURL     string
	InfrastructureBaseURL string
	NerdGraphBaseURL      string
	ServiceName           string

	// LogLevel can be one of the following values:
	// "panic", "fatal", "error", "warn", "info", "debug", "trace"
	LogLevel string
	LogJSON  bool
	Logger   logging.Logger
}

Config contains all the configuration data for the API Client.

func (*Config) GetLogger added in v0.3.0

func (c *Config) GetLogger() logging.Logger

GetLogger returns a logger instance based on the config values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL