types

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Code generated by tutone: DO NOT EDIT

Index

Constants

View Source
const (
	InfraAgentRecipeName = "infrastructure-agent-installer"
	LoggingRecipeName    = "logs-integration"
)

Variables

View Source
var ErrInterrupt = errors.New("operation canceled")

ErrInterrupt represents a context cancellation.

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 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
}{

	AMAZON: "AMAZON",

	CENTOS: "CENTOS",

	DEBIAN: "DEBIAN",

	REDHAT: "REDHAT",

	SUSE: "SUSE",

	UBUNTU: "UBUNTU",
}
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",
}

Functions

This section is empty.

Types

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"`
	Processes       []MatchedProcess `json:"processes"`
}

DiscoveryManifest contains the discovered information about the host.

func (*DiscoveryManifest) AddMatchedProcess added in v0.18.17

func (d *DiscoveryManifest) AddMatchedProcess(p MatchedProcess)

AddMatchedProcess adds a discovered process to the underlying manifest.

type GenericProcess

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

GenericProcess is an abstracted representation of a process.

type LogMatch

type LogMatch struct {
	Name       string             `yaml:"name"`
	File       string             `yaml:"file"`
	Attributes LogMatchAttributes `yaml:"attributes,omitempty"`
	Pattern    string             `yaml:"pattern,omitempty"`
	Systemd    string             `yaml:"systemd,omitempty"`
}

LogMatch represents a pattern that may match one or more logs on the underlying host.

type LogMatchAttributes

type LogMatchAttributes struct {
	LogType string `yaml:"logtype"`
}

LogMatchAttributes contains metadata about its parent LogMatch.

type MatchedProcess added in v0.18.17

type MatchedProcess struct {
	Command         string `json:"command"`
	Process         GenericProcess
	MatchingPattern string
}

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 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
	Prompt string `json:"prompt,omitempty"`
	// Message/Docs notice displayed to user prior to running recipe
	Info string `json:"info,omitempty"`
}

OpenInstallationPreInstallConfiguration - Optional pre-install configuration items

type OpenInstallationRecipe

type OpenInstallationRecipe struct {
	// 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 pre-install configuration items
	PreInstall OpenInstallationPreInstallConfiguration `json:"preInstall,omitempty"`
	// Object representing optional post-install configuration items
	PostInstall OpenInstallationPostInstallConfiguration `json:"postInstall,omitempty"`
	// List of process definitions used to match CLI process detection
	ProcessMatch []string `json:"processMatch"`
	// Github repository url
	Repository string `json:"repository"`
	// NRQL the newrelic-cli uses to validate this recipe
	// is successfully sending data to New Relic
	ValidationNRQL NRQL `json:"validationNrql,omitempty"`
	// Metadata to support generating a URL after installation success
	SuccessLinkConfig SuccessLinkConfig `json:"successLinkConfig,omitempty"`
}

OpenInstallationRecipe - Installation instructions and definition of an instrumentation integration

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 OpenInstallationTargetType

type OpenInstallationTargetType string

OpenInstallationTargetType - Installation target type

type Recipe

type Recipe struct {
	ID                string                                   `json:"id"`
	Description       string                                   `json:"description"`
	DisplayName       string                                   `json:"displayName"`
	File              string                                   `json:"file"`
	InstallTargets    []OpenInstallationRecipeInstallTarget    `json:"installTargets"`
	Keywords          []string                                 `json:"keywords"`
	LogMatch          []LogMatch                               `json:"logMatch"`
	Name              string                                   `json:"name"`
	PreInstall        OpenInstallationPreInstallConfiguration  `json:"preInstall"`
	PostInstall       OpenInstallationPostInstallConfiguration `json:"postInstall"`
	ProcessMatch      []string                                 `json:"processMatch"`
	Repository        string                                   `json:"repository"`
	SuccessLinkConfig SuccessLinkConfig                        `json:"successLinkConfig"`
	ValidationNRQL    string                                   `json:"validationNrql"`
	Vars              map[string]interface{}
}

func (*Recipe) AddVar

func (r *Recipe) AddVar(key string, value interface{})

AddVar is responsible for including a new variable on the recipe Vars struct, which is used by go-task executor.

func (*Recipe) HasApplicationTargetType added in v0.18.29

func (r *Recipe) HasApplicationTargetType() bool

func (*Recipe) HasHostTargetType added in v0.18.29

func (r *Recipe) HasHostTargetType() bool

func (*Recipe) HasKeyword added in v0.22.0

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

func (*Recipe) HasTargetType added in v0.18.29

func (r *Recipe) HasTargetType(t OpenInstallationTargetType) bool

func (*Recipe) IsApm added in v0.22.0

func (r *Recipe) IsApm() bool

func (*Recipe) PostInstallMessage added in v0.18.25

func (r *Recipe) PostInstallMessage() string

func (*Recipe) PreInstallMessage added in v0.18.25

func (r *Recipe) PreInstallMessage() string

type RecipeVars

type RecipeVars map[string]string

type SuccessLinkConfig added in v0.20.3

type SuccessLinkConfig struct {
	Type   string `json:"type"`
	Filter string `json:"filter"`
}

SuccessLinkConfig contains metadata to support generating a URL after installation success

Jump to

Keyboard shortcuts

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