Documentation
¶
Index ¶
- Variables
- type ConfigValidator
- type Discoverer
- type FileFilterer
- type LicenseKeyFetcher
- type MockLicenseKeyFetcher
- type PacksFetcher
- type PacksInstaller
- type Prompter
- type RecipeFileFetcher
- type RecipeFilterRunner
- type RecipeInstallFunc
- type RecipeInstaller
- type RecipeRepository
- type RecipeValidator
- type RecipeVarPreparer
- type ServiceLicenseKeyFetcher
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "install", Short: "Install New Relic.", PreRun: client.RequireClient, Run: func(cmd *cobra.Command, args []string) { ic := types.InstallerContext{ AssumeYes: assumeYes, LocalRecipes: localRecipes, RecipeNames: recipeNames, RecipePaths: recipePaths, SkipIntegrations: skipIntegrations, SkipLoggingInstall: skipLoggingInstall, SkipApm: skipApm, SkipInfraInstall: skipInfra, } config.InitFileLogger() err := assertProfileIsValid() if err != nil { log.Fatal(err) } i := NewRecipeInstaller(ic, client.NRClient) if err := i.Install(); err != nil { if err == types.ErrInterrupt { return } log.Fatalf("We encountered an error during the installation: %s. If this problem persists please visit the documentation and support page for additional help here: https://one.newrelic.com/-/06vjAeZLKjP", err) } }, }
Command represents the install command.
Functions ¶
This section is empty.
Types ¶
type ConfigValidator ¶ added in v0.28.0
type Discoverer ¶ added in v0.28.0
type Discoverer interface {
Discover(context.Context) (*types.DiscoveryManifest, error)
}
Discoverer is responsible for discovering informataion about the host system.
type FileFilterer ¶ added in v0.28.0
type FileFilterer interface {
Filter(context.Context, []types.OpenInstallationRecipe) ([]types.OpenInstallationLogMatch, error)
}
FileFilterer determines the existence of files on the underlying filesystem.
type LicenseKeyFetcher ¶ added in v0.20.6
func NewServiceLicenseKeyFetcher ¶ added in v0.20.6
func NewServiceLicenseKeyFetcher(client recipes.NerdGraphClient) LicenseKeyFetcher
type MockLicenseKeyFetcher ¶ added in v0.20.6
func NewMockLicenseKeyFetcher ¶ added in v0.20.6
func NewMockLicenseKeyFetcher() *MockLicenseKeyFetcher
func (*MockLicenseKeyFetcher) FetchLicenseKey ¶ added in v0.20.6
func (f *MockLicenseKeyFetcher) FetchLicenseKey(ctx context.Context) (string, error)
type PacksFetcher ¶ added in v0.29.0
type PacksFetcher interface {
FetchPacks(context.Context, []types.OpenInstallationRecipe) ([]types.OpenInstallationObservabilityPack, error)
}
type PacksInstaller ¶ added in v0.29.0
type PacksInstaller interface {
Install(ctx context.Context, packs []types.OpenInstallationObservabilityPack) error
}
type RecipeFileFetcher ¶ added in v0.28.0
type RecipeFileFetcher interface { FetchRecipeFile(recipeURL *url.URL) (*types.OpenInstallationRecipe, error) LoadRecipeFile(filename string) (*types.OpenInstallationRecipe, error) }
type RecipeFilterRunner ¶ added in v0.28.0
type RecipeFilterRunner interface { RunFilterAll(ctx context.Context, r []types.OpenInstallationRecipe, m *types.DiscoveryManifest) []types.OpenInstallationRecipe EnsureDoesNotFilter(ctx context.Context, r []types.OpenInstallationRecipe, m *types.DiscoveryManifest) error }
type RecipeInstallFunc ¶ added in v0.28.0
type RecipeInstallFunc func(ctx context.Context, i *RecipeInstaller, m *types.DiscoveryManifest, r *types.OpenInstallationRecipe, recipes []types.OpenInstallationRecipe) error
type RecipeInstaller ¶
type RecipeInstaller struct { types.InstallerContext // contains filtered or unexported fields }
func NewRecipeInstaller ¶
func NewRecipeInstaller(ic types.InstallerContext, nrClient *newrelic.NewRelic) *RecipeInstaller
func (*RecipeInstaller) Install ¶
func (i *RecipeInstaller) Install() error
type RecipeRepository ¶ added in v0.28.0
type RecipeRepository interface {
FindAll(m types.DiscoveryManifest) []types.OpenInstallationRecipe
}
type RecipeValidator ¶ added in v0.28.0
type RecipeValidator interface {
ValidateRecipe(context.Context, types.DiscoveryManifest, types.OpenInstallationRecipe) (entityGUID string, err error)
}
RecipeValidator validates installation of a recipe.
type RecipeVarPreparer ¶ added in v0.28.0
type RecipeVarPreparer interface {
Prepare(m types.DiscoveryManifest, r types.OpenInstallationRecipe, assumeYes bool, licenseKey string) (types.RecipeVars, error)
}
type ServiceLicenseKeyFetcher ¶ added in v0.20.6
type ServiceLicenseKeyFetcher struct {
// contains filtered or unexported fields
}
relies on the Nerdgraph service
func (*ServiceLicenseKeyFetcher) FetchLicenseKey ¶ added in v0.20.6
func (f *ServiceLicenseKeyFetcher) FetchLicenseKey(ctx context.Context) (string, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.