region

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var DefaultBaseURLs = map[Region]string{
	US:      "https://api.newrelic.com/v2",
	EU:      "https://api.eu.newrelic.com/v2",
	Staging: "https://staging-api.newrelic.com/v2",
}

DefaultBaseURLs represents the base API URLs for the different environments of the New Relic REST API V2.

View Source
var NerdGraphBaseURLs = map[Region]string{
	US:      "https://api.newrelic.com/graphql",
	EU:      "https://api.eu.newrelic.com/graphql",
	Staging: "https://staging-api.newrelic.com/graphql",
}

NerdGraphBaseURLs describes the base URLs for the NerdGraph API.

Functions

This section is empty.

Types

type Region

type Region int

Region represents the members of the Region enumeration.

const (

	// US represents New Relic's US-based production deployment.
	US Region = iota

	// EU represents New Relic's EU-based production deployment.
	EU

	// Staging represents New Relic's US-based staging deployment.
	// This is for internal New Relic use only.
	Staging
)
const Default Region = US

Default represents the region returned if nothing was specified

func Parse

func Parse(r string) Region

Parse takes a Region string and returns a RegionType

func (Region) String

func (r Region) String() string

String returns a human readable value for the specified Region

Jump to

Keyboard shortcuts

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