Documentation ¶
Index ¶
- Variables
- type ConfigValidator
- type Discoverer
- type FileFilterer
- type LicenseKeyFetcher
- type MockLicenseKeyFetcher
- 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, } logLevel := configAPI.GetLogLevel() config.InitFileLogger(logLevel) err := assertProfileIsValid() if err != nil { log.Fatal(err) } i := NewRecipeInstaller(ic, client.NRClient) if err := i.Install(); err != nil { if err == types.ErrInterrupt { return } if _, ok := err.(*types.UpdateRequiredError); ok { return } fallbackErrorMsg := fmt.Sprintf("We encountered an issue during the installation: %s.", err) fallbackHelpMsg := "If this problem persists, visit the documentation and support page for additional help here at https://one.newrelic.com/-/06vjAeZLKjP." if _, ok := err.(*types.UncaughtError); ok { fmt.Print(fallbackErrorMsg) fmt.Printf("\nFor more information about about what happened, rerun the command using the --debug flag.\n") fmt.Print("\n newrelic install --debug \n\n") fmt.Print(fallbackHelpMsg) } else { log.Debug(fallbackErrorMsg) log.Debug(fallbackHelpMsg) } fmt.Print("\n\n") } }, }
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 information 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 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, types.RecipeVars) (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.