types

package
v0.84.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Code generated by tutone: DO NOT EDIT

Index

Constants

View Source
const (
	ApmKeyword                 = "Apm"
	DeployedByTagKey           = "nr_deployed_by"
	DefaultDeployedBy          = "newrelic-cli"
	TagSeparator               = ":"
	BuiltinTags                = DeployedByTagKey + TagSeparator + DefaultDeployedBy
	EnvInstallCustomAttributes = "INSTALL_CUSTOM_ATTRIBUTES"
)
View Source
const (
	InfraAgentRecipeName        = "infrastructure-agent-installer"
	LoggingRecipeName           = "logs-integration"
	LoggingSuperAgentRecipeName = "logs-integration-super-agent"
	GoldenRecipeName            = "alerts-golden-signal"
	SuperAgentRecipeName        = "super-agent"
)
View Source
const PaymentRequiredExceptionMessage = `` /* 167-byte string literal not displayed */

Variables

View Source
var (
	// ErrInterrupt represents a context cancellation.
	ErrInterrupt = errors.New("operation canceled")

	ErrConnectionStringFormat = "" /* 399-byte string literal not displayed */
	ErrValidation             = errors.New("there was a failure locating the data that was posted to New Relic. Please try again later or contact New Relic support. For real-time platform status info visit https://status.newrelic.com/")
	ErrDiscovery              = errors.New("failed to detect your system's hostname. Please contact New Relic support")
	ErrPostEvent              = errors.New("there was a failure posting data to New Relic. Please try again later or contact New Relic support. For real-time platform status info visit https://status.newrelic.com/")
	ErrLicenseKey             = errors.New("the configured license key is invalid for the configured account. Please set a valid license key with the `newrelic profile` command. For more details visit https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key")
)
View Source
var ErrorFetchingLicenseKey = errors.New("Oops, we're having some difficulties fetching your license key. Please try again later, or see our documentation for installing manually https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/install-configure/install-new-relic")

nolint: golint

View Source
var EventTypes = struct {
	InstallStarted             EventType
	AccountIDMissing           EventType
	APIKeyMissing              EventType
	RegionMissing              EventType
	UnableToConnect            EventType
	UnableToFetchLicenseKey    EventType
	LicenseKeyFetchedOk        EventType
	UnableToOverrideClient     EventType
	UnableToPostData           EventType
	InstallCompleted           EventType
	InstallCancelled           EventType
	InvalidIngestKey           EventType
	UnableToDiscover           EventType
	NrIntegrationPollingErrror EventType
	OtherError                 EventType
	UnableToLocatePostedData   EventType
	InvalidUserAPIKeyFormat    EventType
	InvalidRegion              EventType
}{
	InstallStarted:             "InstallStarted",
	AccountIDMissing:           "AccountIDMissing",
	APIKeyMissing:              "APIKeyMissing",
	RegionMissing:              "RegionMissing",
	UnableToConnect:            "UnableToConnect",
	UnableToFetchLicenseKey:    "UnableToFetchLicenseKey",
	LicenseKeyFetchedOk:        "LicenseKeyFetchedOk",
	UnableToPostData:           "UnableToPostData",
	UnableToLocatePostedData:   "UnableToLocatePostedData",
	InstallCompleted:           "InstallCompleted",
	InstallCancelled:           "InstallCancelled",
	UnableToOverrideClient:     "UnableToOverrideClient",
	InvalidIngestKey:           "InvalidIngestKey",
	UnableToDiscover:           "UnableToDiscover",
	NrIntegrationPollingErrror: "NrIntegrationPollingErrror",
	OtherError:                 "OtherError",
	InvalidUserAPIKeyFormat:    "InvalidUserAPIKeyFormat",
	InvalidRegion:              "InvalidRegion",
}
View Source
var OpenInstallationDiscoveryModeTypes = struct {
	GUIDED     OpenInstallationDiscoveryMode
	TARGETED   OpenInstallationDiscoveryMode
	FromString map[string]OpenInstallationDiscoveryMode
}{
	GUIDED:   "GUIDED",
	TARGETED: "TARGETED",
}
View Source
var OpenInstallationOperatingSystemTypes = struct {
	// MacOS operating system
	DARWIN OpenInstallationOperatingSystem
	// Linux-based operating system
	LINUX OpenInstallationOperatingSystem
	// Windows operating system
	WINDOWS OpenInstallationOperatingSystem
}{

	DARWIN: "DARWIN",

	LINUX: "LINUX",

	WINDOWS: "WINDOWS",
}
View Source
var OpenInstallationPlatformFamilyTypes = struct {
	// Debian distribution family
	DEBIAN OpenInstallationPlatformFamily
	// RHEL distribution family
	RHEL OpenInstallationPlatformFamily
	// openSUSE distribution family
	SUSE OpenInstallationPlatformFamily
}{

	DEBIAN: "DEBIAN",

	RHEL: "RHEL",

	SUSE: "SUSE",
}
View Source
var OpenInstallationPlatformTypes = struct {
	// Amazon Linux operating system
	AMAZON OpenInstallationPlatform
	// CentOS operating system
	CENTOS OpenInstallationPlatform
	// Debian operating system
	DEBIAN OpenInstallationPlatform
	// RedHat Enterprise Linux operating system
	REDHAT OpenInstallationPlatform
	// SUSE operating system
	SUSE OpenInstallationPlatform
	// Ubuntu operating system
	UBUNTU OpenInstallationPlatform
	// Rocky operating system
	ROCKY OpenInstallationPlatform
	// AlmaLinux operating system
	ALMALINUX OpenInstallationPlatform
}{

	AMAZON: "AMAZON",

	CENTOS: "CENTOS",

	DEBIAN: "DEBIAN",

	REDHAT: "REDHAT",

	SUSE: "SUSE",

	UBUNTU: "UBUNTU",

	ROCKY: "ROCKY",

	ALMALINUX: "ALMALINUX",
}
View Source
var OpenInstallationStabilityTypes = struct {
	// Recipe is disabled
	DISABLED OpenInstallationStability
	// Recipe is experimental
	EXPERIMENTAL OpenInstallationStability
	// Recipe is stable
	STABLE OpenInstallationStability
}{

	DISABLED: "DISABLED",

	EXPERIMENTAL: "EXPERIMENTAL",

	STABLE: "STABLE",
}
View Source
var OpenInstallationSuccessLinkTypeTypes = struct {
	// Explorer link
	EXPLORER OpenInstallationSuccessLinkType
	// Host entity link
	HOST OpenInstallationSuccessLinkType
}{

	EXPLORER: "EXPLORER",

	HOST: "HOST",
}
View Source
var OpenInstallationTargetTypeTypes = struct {
	// APM agent installation
	APPLICATION OpenInstallationTargetType
	// Cloud provider installation
	CLOUD OpenInstallationTargetType
	// Docker container installation
	DOCKER OpenInstallationTargetType
	// Bare metal, virtual machine, or host-based installation
	HOST OpenInstallationTargetType
	// Kubernetes installation
	KUBERNETES OpenInstallationTargetType
	// Serverless installation
	SERVERLESS OpenInstallationTargetType
}{

	APPLICATION: "APPLICATION",

	CLOUD: "CLOUD",

	DOCKER: "DOCKER",

	HOST: "HOST",

	KUBERNETES: "KUBERNETES",

	SERVERLESS: "SERVERLESS",
}
View Source
var RecipeVariables = map[string]string{}
View Source
var ValidDiscoveryModes = map[string]OpenInstallationDiscoveryMode{
	"GUIDED":   OpenInstallationDiscoveryModeTypes.GUIDED,
	"TARGETED": OpenInstallationDiscoveryModeTypes.TARGETED,
}

Functions

This section is empty.

Types

type ConnectionError added in v0.68.5

type ConnectionError struct {
	Err error
}

func (ConnectionError) Error added in v0.68.5

func (p ConnectionError) Error() string

type DetailError added in v0.68.5

type DetailError struct {
	EventName EventType
	Details   string
}

func NewDetailError added in v0.68.5

func NewDetailError(eventName EventType, details string) *DetailError

func (*DetailError) Error added in v0.68.5

func (e *DetailError) Error() string

type DiscoveryManifest

type DiscoveryManifest struct {
	Hostname        string `json:"hostname"`
	KernelArch      string `json:"kernelArch"`
	KernelVersion   string `json:"kernelVersion"`
	OS              string `json:"os"`
	Platform        string `json:"platform"`
	PlatformFamily  string `json:"platformFamily"`
	PlatformVersion string `json:"platformVersion"`
	IsUnsupported   bool   `json:"isUnsupported"`
}

DiscoveryManifest contains the discovered information about the host.

func (*DiscoveryManifest) ConstrainRecipes added in v0.24.0

func (d *DiscoveryManifest) ConstrainRecipes(allRecipes []OpenInstallationRecipe) []OpenInstallationRecipe

type ErrNonZeroExitCode added in v0.27.0

type ErrNonZeroExitCode struct {
	GoTaskError
	// contains filtered or unexported fields
}

ErrNonZeroExitCode represents a non-zero exit code error reported by go-task.

func NewNonZeroExitCode added in v0.27.0

func NewNonZeroExitCode(originalError GoTaskError, additionalContext string) ErrNonZeroExitCode

func (ErrNonZeroExitCode) Error added in v0.27.0

func (e ErrNonZeroExitCode) Error() string

type ErrUnalbeToFetchLicenseKey added in v0.68.5

type ErrUnalbeToFetchLicenseKey struct {
	Err     error
	Details string
}

func (*ErrUnalbeToFetchLicenseKey) Error added in v0.68.5

type EventType added in v0.68.5

type EventType string

func TryParseEventType added in v0.68.5

func TryParseEventType(e string) (EventType, bool)

type GenericProcess

type GenericProcess interface {
	Name() (string, error)
	Cmd() (string, error)
	PID() int32
}

GenericProcess is an abstracted representation of a process.

type GoTaskError added in v0.27.0

type GoTaskError interface {
	error
	TaskPath() []string
	SetError(msg string)
}

func NewGoTaskGeneralError added in v0.27.0

func NewGoTaskGeneralError(err error) GoTaskError

type GoTaskGeneralError added in v0.27.0

type GoTaskGeneralError struct {
	// contains filtered or unexported fields
}

GoTaskError represents a task failure reported by go-task.

func (GoTaskGeneralError) Error added in v0.27.0

func (e GoTaskGeneralError) Error() string

func (GoTaskGeneralError) SetError added in v0.27.0

func (e GoTaskGeneralError) SetError(msg string)

func (GoTaskGeneralError) TaskPath added in v0.27.2

func (e GoTaskGeneralError) TaskPath() []string

type InstallerContext added in v0.28.0

type InstallerContext struct {
	AssumeYes   bool
	RecipeNames []string
	RecipePaths []string
	// LocalRecipes is the path to a local recipe directory from which to load recipes.
	LocalRecipes string
	// contains filtered or unexported fields
}

nolint: maligned

func (*InstallerContext) GetDeployedBy added in v0.62.0

func (i *InstallerContext) GetDeployedBy() string

func (*InstallerContext) IsRecipeTargeted added in v0.70.0

func (i *InstallerContext) IsRecipeTargeted(name string) bool

func (*InstallerContext) RecipeNamesProvided added in v0.28.0

func (i *InstallerContext) RecipeNamesProvided() bool

func (*InstallerContext) RecipePathsProvided added in v0.28.0

func (i *InstallerContext) RecipePathsProvided() bool

func (*InstallerContext) SetTags added in v0.58.0

func (i *InstallerContext) SetTags(tags []string)

type MatchedProcess added in v0.18.17

type MatchedProcess struct {
	GenericProcess
	MatchingPattern string
	MatchingRecipe  OpenInstallationRecipe
}

type NRQL

type NRQL string

NRQL - This scalar represents a NRQL query string.

See the [NRQL Docs](https://docs.newrelic.com/docs/insights/nrql-new-relic-query-language/nrql-resources/nrql-syntax-components-functions) for more information about NRQL syntax.

type OpenInstallationAttributes

type OpenInstallationAttributes struct {
	// Built-in parsing rulesets
	Logtype string `json:"logtype,omitempty"`
}

OpenInstallationAttributes - Custom event data attributes

type OpenInstallationDiscoveryMode added in v0.70.0

type OpenInstallationDiscoveryMode string

type OpenInstallationDocsStitchedFields added in v0.29.0

type OpenInstallationDocsStitchedFields struct {
	// Fetch a recipe by ID
	Recipe OpenInstallationRecipe `json:"recipe,omitempty"`
	// Search all recipes
	RecipeSearch OpenInstallationRecipeListResult `json:"recipeSearch,omitempty"`
	// Get recommendations on what instrumentation to add
	Recommendations OpenInstallationRecommendationsResult `json:"recommendations,omitempty"`
}

OpenInstallationDocsStitchedFields - Search for and execute installation of additional instrumentation and integrations

type OpenInstallationInstallTarget added in v0.29.0

type OpenInstallationInstallTarget struct {
	// OS kernel architecture
	KernelArch string `json:"kernelArch,omitempty"`
	// OS kernel version
	KernelVersion string `json:"kernelVersion,omitempty"`
	// Operating system
	Os OpenInstallationOperatingSystem `json:"os,omitempty"`
	// OS distribution
	Platform OpenInstallationPlatform `json:"platform,omitempty"`
	// OS distribution family
	PlatformFamily OpenInstallationPlatformFamily `json:"platformFamily,omitempty"`
	// OS distribution version
	PlatformVersion string `json:"platformVersion,omitempty"`
	// Target type
	Type OpenInstallationTargetType `json:"type,omitempty"`
}

OpenInstallationInstallTarget - Unique set of attributes which represent an install target

type OpenInstallationLogMatch

type OpenInstallationLogMatch struct {
	// List of custom attributes, as key-value pairs, that can be used to send additional data with the logs which you can then query.
	Attributes OpenInstallationAttributes `json:"attributes,omitempty"`
	// Path to the log file or files.
	File string `json:"file,omitempty"`
	// Name of the log or logs.
	Name string `json:"name"`
	// Regular expression for filtering records.
	Pattern string `json:"pattern,omitempty"`
	// Service name (Linux Only).
	Systemd string `json:"systemd,omitempty"`
}

OpenInstallationLogMatch - Matches partial list of the Log forwarding parameters

type OpenInstallationOperatingSystem

type OpenInstallationOperatingSystem string

OpenInstallationOperatingSystem - Operating System of target environment

type OpenInstallationPlatform

type OpenInstallationPlatform string

OpenInstallationPlatform - Operating System distribution

type OpenInstallationPlatformFamily

type OpenInstallationPlatformFamily string

OpenInstallationPlatformFamily - Operating System distribution family

type OpenInstallationPostInstallConfiguration added in v0.18.32

type OpenInstallationPostInstallConfiguration struct {
	// Message/Docs notice displayed to user after running the recipe
	Info string `json:"info,omitempty"`
}

OpenInstallationPostInstallConfiguration - Optional post-install configuration items

type OpenInstallationPreInstallConfiguration

type OpenInstallationPreInstallConfiguration struct {
	// Message/Docs notice displayed to user prior to running recipe
	Info string `json:"info,omitempty"`
	// Message/Docs notice displayed to user prior to running recipe
	Prompt string `json:"prompt,omitempty"`
	// Script block to be executed during system discovery, a successful exit status will mark the recipe for execution
	RequireAtDiscovery string `json:"requireAtDiscovery,omitempty"`
	// Possible values, guided, targeted. Both are included if omitted.
	DiscoveryMode []OpenInstallationDiscoveryMode `json:"discoveryMode,omitempty"`
}

OpenInstallationPreInstallConfiguration - Optional pre-install configuration items

type OpenInstallationProcessDetailInput added in v0.29.0

type OpenInstallationProcessDetailInput struct {
	// Process name
	Name string `json:"name,omitempty"`
}

OpenInstallationProcessDetailInput - Process details

type OpenInstallationRecipe

type OpenInstallationRecipe struct {
	// Named list of dependencies for this recipe
	Dependencies []string `json:"dependencies"`
	// Description of the recipe
	Description string `json:"description"`
	// Friendly name of the integration
	DisplayName string `json:"displayName,omitempty"`
	// The full contents of the recipe file (yaml)
	File string `json:"file"`
	// The ID
	ID string `json:"id,omitempty"`
	// List of variables to prompt for input from the user
	InputVars []OpenInstallationRecipeInputVariable `json:"inputVars"`
	// Go-task's taskfile definition (see https://taskfile.dev/#/usage)
	Install string `json:"install"`
	// Object representing the intended install target
	InstallTargets []OpenInstallationRecipeInstallTarget `json:"installTargets"`
	// Tags
	Keywords []string `json:"keywords"`
	// # Partial list of possible Log forwarding parameters
	LogMatch []OpenInstallationLogMatch `json:"logMatch"`
	// Short unique handle for the name of the integration
	Name string `json:"name,omitempty"`
	// Object representing optional post-install configuration items
	PostInstall OpenInstallationPostInstallConfiguration `json:"postInstall,omitempty"`
	// Object representing optional pre-install configuration items
	PreInstall OpenInstallationPreInstallConfiguration `json:"preInstall,omitempty"`
	// List of process definitions used to match CLI process detection
	ProcessMatch []string `json:"processMatch"`
	// Github repository url
	Repository string `json:"repository"`
	// Indicates stability level of recipe
	Stability OpenInstallationStability `json:"stability,omitempty"`
	// Metadata to support generating a URL after installation success
	SuccessLinkConfig OpenInstallationSuccessLinkConfig `json:"successLinkConfig,omitempty"`
	// NRQL the newrelic-cli uses to validate this recipe
	// is successfully sending data to New Relic
	ValidationNRQL NRQL `json:"validationNrql,omitempty"`
	// validation url to validate with infra health endpoint
	ValidationURL string `json:"validationUrl,omitempty"`
	// integration name to validate with local validation
	ValidationIntegration string `json:"validationIntegration,omitempty"`
}

OpenInstallationRecipe - Installation instructions and definition of an instrumentation integration

func (*OpenInstallationRecipe) GetOrderKey added in v0.28.4

func (r *OpenInstallationRecipe) GetOrderKey() string

func (*OpenInstallationRecipe) HasApplicationTargetType added in v0.26.0

func (r *OpenInstallationRecipe) HasApplicationTargetType() bool

func (*OpenInstallationRecipe) HasHostTargetType added in v0.26.0

func (r *OpenInstallationRecipe) HasHostTargetType() bool

func (*OpenInstallationRecipe) HasKeyword added in v0.26.0

func (r *OpenInstallationRecipe) HasKeyword(keyword string) bool

func (*OpenInstallationRecipe) HasTargetType added in v0.26.0

func (*OpenInstallationRecipe) IsApm added in v0.26.0

func (r *OpenInstallationRecipe) IsApm() bool

func (*OpenInstallationRecipe) PostInstallMessage added in v0.26.0

func (r *OpenInstallationRecipe) PostInstallMessage() string

func (*OpenInstallationRecipe) PreInstallMessage added in v0.26.0

func (r *OpenInstallationRecipe) PreInstallMessage() string

func (*OpenInstallationRecipe) SetRecipeVar added in v0.26.0

func (r *OpenInstallationRecipe) SetRecipeVar(key string, value string)

SetRecipeVar is responsible for including a new variable on the RecipeVariables struct, which is used by go-task executor.

func (OpenInstallationRecipe) String added in v0.28.0

func (r OpenInstallationRecipe) String() string

func (*OpenInstallationRecipe) ToShortDisplayString added in v0.30.0

func (r *OpenInstallationRecipe) ToShortDisplayString() string

func (*OpenInstallationRecipe) UnmarshalYAML added in v0.26.0

func (r *OpenInstallationRecipe) UnmarshalYAML(unmarshal func(interface{}) error) error

The API response returns OpenInstallationRecipe.Install as a string. When specifying a recipe path, OpenInstallationRecipe.Install is a map[interface{}]interface{}. For this reason we need a custom unmarshal method for YAML.

type OpenInstallationRecipeInputVariable

type OpenInstallationRecipeInputVariable struct {
	// Default value of variable
	Default string `json:"default,omitempty"`
	// Name of the variable
	Name string `json:"name"`
	// Message to present to the user
	Prompt string `json:"prompt,omitempty"`
	// Indicates a password field
	Secret bool `json:"secret,omitempty"`
}

OpenInstallationRecipeInputVariable - Recipe input variable prompts displayed to the user prior to execution

type OpenInstallationRecipeInstallTarget

type OpenInstallationRecipeInstallTarget struct {
	// OS kernel architecture
	KernelArch string `json:"kernelArch,omitempty"`
	// OS kernel version
	KernelVersion string `json:"kernelVersion,omitempty"`
	// Operating system
	Os OpenInstallationOperatingSystem `json:"os,omitempty"`
	// Operating System distribution
	Platform OpenInstallationPlatform `json:"platform,omitempty"`
	// Operating System distribution family
	PlatformFamily OpenInstallationPlatformFamily `json:"platformFamily,omitempty"`
	// OS distribution version
	PlatformVersion string `json:"platformVersion,omitempty"`
	// Target type
	Type OpenInstallationTargetType `json:"type,omitempty"`
}

OpenInstallationRecipeInstallTarget - Matrix of supported installation criteria for this recipe

type OpenInstallationRecipeListResult added in v0.29.0

type OpenInstallationRecipeListResult struct {
	// Number of recipes returned
	Count int `json:"count,omitempty"`
	// List of recipes
	Results []OpenInstallationRecipe `json:"results,omitempty"`
}

OpenInstallationRecipeListResult - List of recipes

type OpenInstallationRecipeSearchCriteria added in v0.29.0

type OpenInstallationRecipeSearchCriteria struct {
	// Friendly name of the integration
	DisplayName string `json:"displayName,omitempty"`
	// Object representing the intended install target
	InstallTarget OpenInstallationInstallTarget `json:"installTarget,omitempty"`
	// Short unique handle for the name of the integration
	Name string `json:"name,omitempty"`
}

OpenInstallationRecipeSearchCriteria - Input for searching installable integration recipes

type OpenInstallationRecommendationsInput added in v0.29.0

type OpenInstallationRecommendationsInput struct {
	// Unique set of attributes which represent an install target
	InstallTarget OpenInstallationInstallTarget `json:"installTarget,omitempty"`
	// List of processes
	ProcessDetails []OpenInstallationProcessDetailInput `json:"processDetails,omitempty"`
}

OpenInstallationRecommendationsInput - Criteria for controlling recommendations

type OpenInstallationRecommendationsResult added in v0.29.0

type OpenInstallationRecommendationsResult struct {
	// Number of recipes returned
	Count int `json:"count,omitempty"`
	// List of matching recipes
	Results []OpenInstallationRecipe `json:"results"`
}

OpenInstallationRecommendationsResult - List of instrumentation recommendations

type OpenInstallationStability added in v0.23.0

type OpenInstallationStability string

OpenInstallationStability - Stability level of recipe

type OpenInstallationSuccessLinkConfig added in v0.23.0

type OpenInstallationSuccessLinkConfig struct {
	// An optional filter for appending to the URL
	Filter string `json:"filter,omitempty"`
	// The type of the link to generate
	Type OpenInstallationSuccessLinkType `json:"type"`
}

OpenInstallationSuccessLinkConfig - Metadata to support generating a URL after installation success

type OpenInstallationSuccessLinkType added in v0.23.0

type OpenInstallationSuccessLinkType string

OpenInstallationSuccessLinkType - Success link type

type OpenInstallationTargetType

type OpenInstallationTargetType string

OpenInstallationTargetType - Installation target type

type RecipeVars

type RecipeVars map[string]string

RecipeVars is used to pass dynamic data to recipes and go-task.

func (RecipeVars) ToSlice added in v0.28.0

func (r RecipeVars) ToSlice() []string

type UncaughtError added in v0.36.0

type UncaughtError struct {
	Err error
}

func (*UncaughtError) Error added in v0.36.0

func (e *UncaughtError) Error() string

type UnsupportedOperatingSystemError added in v0.43.0

type UnsupportedOperatingSystemError struct {
	Err error
}

func (*UnsupportedOperatingSystemError) Error added in v0.43.0

type UpdateRequiredError added in v0.34.0

type UpdateRequiredError struct {
	Err     error
	Details string
}

UpdateRequiredError represents when a user is using an older version of the CLI and is required to update when running the `newrelic install` command.

func (*UpdateRequiredError) Error added in v0.34.0

func (e *UpdateRequiredError) Error() string

Jump to

Keyboard shortcuts

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