Documentation ¶
Overview ¶
Package region describes the operational regions defined for New Relic
Regions are geographical locations where the New Relic platform operates and this package provides an abstraction layer for handling them within the New Relic Client and underlying APIs
Index ¶
- Variables
- type InvalidError
- type Name
- type Region
- func (r *Region) InfrastructureURL(path ...string) string
- func (r *Region) InsightsURL(accountID int) string
- func (r *Region) LogsURL() string
- func (r *Region) NerdGraphURL(path ...string) string
- func (r *Region) RestURL(path ...string) string
- func (r *Region) SetInfrastructureBaseURL(url string)
- func (r *Region) SetInsightsBaseURL(url string)
- func (r *Region) SetLogsBaseURL(url string)
- func (r *Region) SetNerdGraphBaseURL(url string)
- func (r *Region) SetRestBaseURL(url string)
- func (r *Region) SetSyntheticsBaseURL(url string)
- func (r *Region) String() string
- func (r *Region) SyntheticsURL(path ...string) string
- type UnknownError
- type UnknownUsingDefaultError
Constants ¶
This section is empty.
Variables ¶
var Regions = map[Name]*Region{ US: { // contains filtered or unexported fields }, EU: { // contains filtered or unexported fields }, Staging: { // contains filtered or unexported fields }, Local: { // contains filtered or unexported fields }, }
Regions defines the service URLs that make up the various environments.
Functions ¶
This section is empty.
Types ¶
type InvalidError ¶
type InvalidError struct {
Message string
}
InvalidError returns when the Region is not valid
func ErrorNil ¶
func ErrorNil() InvalidError
ErrorNil returns an InvalidError message saying the value was nil
func (InvalidError) Error ¶
func (e InvalidError) Error() string
Error string reported when an InvalidError happens
type Name ¶
type Name string
Name is the name of a New Relic region
const ( // US represents New Relic's US-based production deployment. US Name = "US" // EU represents New Relic's EU-based production deployment. EU Name = "EU" // Staging represents New Relic's US-based staging deployment. // This is for internal New Relic use only. Staging Name = "Staging" // Local represents a local development environment. Local Name = "Local" )
type Region ¶
type Region struct {
// contains filtered or unexported fields
}
Region represents the members of the Region enumeration.
func (*Region) InfrastructureURL ¶
InfrastructureURL returns the Full URL for Infrastructure REST API Calls, with any additional path elements appended
func (*Region) InsightsURL ¶ added in v0.26.0
InsightsURL returns the Full URL for Insights custom insert API calls
func (*Region) NerdGraphURL ¶
NerdGraphURL returns the Full URL for Infrastructure REST API Calls, with any additional path elements appended
func (*Region) RestURL ¶
RestURL returns the Full URL for REST API Calls, with any additional path elements appended
func (*Region) SetInfrastructureBaseURL ¶
SetInfrastructureBaseURL Allows overriding the Infrastructure Base URL
func (*Region) SetInsightsBaseURL ¶ added in v0.26.0
func (*Region) SetLogsBaseURL ¶ added in v0.38.0
SetLogsBaseURL Allows overriding the Logs Base URL
func (*Region) SetNerdGraphBaseURL ¶
SetNerdGraphBaseURL Allows overriding the NerdGraph Base URL
func (*Region) SetRestBaseURL ¶
SetRestBaseURL Allows overriding the REST Base URL
func (*Region) SetSyntheticsBaseURL ¶
SetSyntheticsBaseURL Allows overriding the Synthetics Base URL
func (*Region) SyntheticsURL ¶
SyntheticsURL returns the Full URL for Synthetics REST API Calls, with any additional path elements appended
type UnknownError ¶ added in v0.21.0
type UnknownError struct {
Message string
}
func (UnknownError) Error ¶ added in v0.21.0
func (e UnknownError) Error() string
type UnknownUsingDefaultError ¶ added in v0.21.0
type UnknownUsingDefaultError struct {
Message string
}
UnknownUsingDefaultError returns when the Region requested is not valid, but we want to give them something
func (UnknownUsingDefaultError) Error ¶ added in v0.21.0
func (e UnknownUsingDefaultError) Error() string
Error string reported when an InvalidError happens