Documentation ¶
Index ¶
- Constants
- Variables
- type GoTaskRecipeExecutor
- type InstallEventsClient
- type InstallEventsReporter
- func (r InstallEventsReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
- func (r InstallEventsReporter) InstallCanceled(status *InstallStatus) error
- func (r InstallEventsReporter) InstallComplete(status *InstallStatus) error
- func (r InstallEventsReporter) InstallStarted(status *InstallStatus) error
- func (r InstallEventsReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r InstallEventsReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r InstallEventsReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
- func (r InstallEventsReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
- func (r InstallEventsReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
- func (r InstallEventsReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
- func (r InstallEventsReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
- func (r InstallEventsReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
- func (r InstallEventsReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
- func (r InstallEventsReporter) UpdateRequired(status *InstallStatus) error
- type InstallStatus
- func (s *InstallStatus) AllSelectedRecipesInstalled() bool
- func (s *InstallStatus) DiscoveryComplete(dm types.DiscoveryManifest)
- func (s *InstallStatus) HostEntityGUID() string
- func (s *InstallStatus) InstallCanceled()
- func (s *InstallStatus) InstallComplete(err error)
- func (s *InstallStatus) InstallStarted()
- func (s *InstallStatus) IsTargetedInstall() bool
- func (s *InstallStatus) RecipeAvailable(recipe types.OpenInstallationRecipe)
- func (s *InstallStatus) RecipeDetected(recipe types.OpenInstallationRecipe)
- func (s *InstallStatus) RecipeFailed(event RecipeStatusEvent)
- func (s *InstallStatus) RecipeInstalled(event RecipeStatusEvent)
- func (s *InstallStatus) RecipeInstalling(event RecipeStatusEvent)
- func (s *InstallStatus) RecipeRecommended(event RecipeStatusEvent)
- func (s *InstallStatus) RecipeSkipped(event RecipeStatusEvent)
- func (s *InstallStatus) RecipeUnsupported(event RecipeStatusEvent)
- func (s *InstallStatus) RecipesSelected(recipes []types.OpenInstallationRecipe)
- func (s *InstallStatus) SetTargetedInstall()
- func (s *InstallStatus) SetVersions(installLibraryVersion string)
- func (s *InstallStatus) WasSuccessful() bool
- type LineCaptureBuffer
- type LinkGenerator
- type MockFailingRecipeExecutor
- type MockInstalleventsClient
- func (c *MockInstalleventsClient) InstallationCreateInstallStatus(int, installevents.InstallationInstallStatusInput) (*installevents.InstallationInstallStatus, error)
- func (c *MockInstalleventsClient) InstallationCreateRecipeEvent(int, installevents.InstallationRecipeStatus) (*installevents.InstallationRecipeEvent, error)
- type MockNerdStorageClient
- func (c *MockNerdStorageClient) WriteDocumentWithAccountScope(int, nerdstorage.WriteDocumentInput) (interface{}, error)
- func (c *MockNerdStorageClient) WriteDocumentWithEntityScope(string, nerdstorage.WriteDocumentInput) (interface{}, error)
- func (c *MockNerdStorageClient) WriteDocumentWithUserScope(nerdstorage.WriteDocumentInput) (interface{}, error)
- type MockPlatformLinkGenerator
- type MockRecipeExecutor
- type MockStatusReporter
- func (r *MockStatusReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
- func (r *MockStatusReporter) InstallCanceled(status *InstallStatus) error
- func (r *MockStatusReporter) InstallComplete(status *InstallStatus) error
- func (r *MockStatusReporter) InstallStarted(status *InstallStatus) error
- func (r *MockStatusReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r *MockStatusReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r *MockStatusReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
- func (r *MockStatusReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
- func (r *MockStatusReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
- func (r *MockStatusReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
- func (r *MockStatusReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
- func (r *MockStatusReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
- func (r *MockStatusReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
- func (r *MockStatusReporter) UpdateRequired(status *InstallStatus) error
- type NerdStorageClient
- type NerdstorageStatusReporter
- func (r NerdstorageStatusReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
- func (r NerdstorageStatusReporter) InstallCanceled(status *InstallStatus) error
- func (r NerdstorageStatusReporter) InstallComplete(status *InstallStatus) error
- func (r NerdstorageStatusReporter) InstallStarted(status *InstallStatus) error
- func (r NerdstorageStatusReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r NerdstorageStatusReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r NerdstorageStatusReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
- func (r NerdstorageStatusReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
- func (r NerdstorageStatusReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
- func (r NerdstorageStatusReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
- func (r NerdstorageStatusReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
- func (r NerdstorageStatusReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
- func (r NerdstorageStatusReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
- func (r NerdstorageStatusReporter) UpdateRequired(status *InstallStatus) error
- type PlatformLinkGenerator
- type PosixShellRecipeExecutor
- type RecipeExecutor
- type RecipeStatus
- type RecipeStatusEvent
- type RecipeStatusType
- type RecipeVarProvider
- type ShRecipeExecutor
- type StatusError
- type StatusSubscriber
- type TerminalStatusReporter
- func (r TerminalStatusReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
- func (r TerminalStatusReporter) InstallCanceled(status *InstallStatus) error
- func (r TerminalStatusReporter) InstallComplete(status *InstallStatus) error
- func (r TerminalStatusReporter) InstallStarted(status *InstallStatus) error
- func (r TerminalStatusReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r TerminalStatusReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
- func (r TerminalStatusReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
- func (r TerminalStatusReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
- func (r TerminalStatusReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
- func (r TerminalStatusReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
- func (r TerminalStatusReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
- func (r TerminalStatusReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
- func (r TerminalStatusReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
- func (r TerminalStatusReporter) UpdateRequired(status *InstallStatus) error
Constants ¶
const ( BashPath = "/bin/bash" ShPath = "/bin/sh" )
Variables ¶
var RecipeStatusTypes = struct { AVAILABLE RecipeStatusType CANCELED RecipeStatusType INSTALLING RecipeStatusType FAILED RecipeStatusType INSTALLED RecipeStatusType SKIPPED RecipeStatusType RECOMMENDED RecipeStatusType UNSUPPORTED RecipeStatusType DETECTED RecipeStatusType }{ AVAILABLE: "AVAILABLE", CANCELED: "CANCELED", INSTALLING: "INSTALLING", FAILED: "FAILED", INSTALLED: "INSTALLED", SKIPPED: "SKIPPED", RECOMMENDED: "RECOMMENDED", UNSUPPORTED: "UNSUPPORTED", DETECTED: "DETECTED", }
var StatusIconMap = map[RecipeStatusType]string{ RecipeStatusTypes.INSTALLED: ux.IconSuccess, RecipeStatusTypes.FAILED: ux.IconError, RecipeStatusTypes.UNSUPPORTED: ux.IconUnsupported, RecipeStatusTypes.SKIPPED: ux.IconMinus, RecipeStatusTypes.CANCELED: ux.IconMinus, }
Functions ¶
This section is empty.
Types ¶
type GoTaskRecipeExecutor ¶
GoTaskRecipeExecutor is an implementation of the recipeExecutor interface that uses the go-task module to execute the steps defined in each recipe.
func NewGoTaskRecipeExecutor ¶
func NewGoTaskRecipeExecutor() *GoTaskRecipeExecutor
NewGoTaskRecipeExecutor returns a new instance of GoTaskRecipeExecutor.
func (*GoTaskRecipeExecutor) Execute ¶
func (re *GoTaskRecipeExecutor) Execute(ctx context.Context, r types.OpenInstallationRecipe, recipeVars types.RecipeVars) error
func (*GoTaskRecipeExecutor) ExecutePreInstall ¶ added in v0.28.0
func (re *GoTaskRecipeExecutor) ExecutePreInstall(ctx context.Context, r types.OpenInstallationRecipe, recipeVars types.RecipeVars) error
type InstallEventsClient ¶ added in v0.31.1
type InstallEventsClient interface { InstallationCreateRecipeEvent(int, installevents.InstallationRecipeStatus) (*installevents.InstallationRecipeEvent, error) InstallationCreateInstallStatus(int, installevents.InstallationInstallStatusInput) (*installevents.InstallationInstallStatus, error) }
type InstallEventsReporter ¶ added in v0.31.1
type InstallEventsReporter struct {
// contains filtered or unexported fields
}
func NewInstallEventsReporter ¶ added in v0.31.1
func NewInstallEventsReporter(client InstallEventsClient) *InstallEventsReporter
func (InstallEventsReporter) DiscoveryComplete ¶ added in v0.31.1
func (r InstallEventsReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
func (InstallEventsReporter) InstallCanceled ¶ added in v0.31.1
func (r InstallEventsReporter) InstallCanceled(status *InstallStatus) error
func (InstallEventsReporter) InstallComplete ¶ added in v0.31.1
func (r InstallEventsReporter) InstallComplete(status *InstallStatus) error
func (InstallEventsReporter) InstallStarted ¶ added in v0.34.37
func (r InstallEventsReporter) InstallStarted(status *InstallStatus) error
func (InstallEventsReporter) RecipeAvailable ¶ added in v0.31.1
func (r InstallEventsReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
func (InstallEventsReporter) RecipeDetected ¶ added in v0.36.10
func (r InstallEventsReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
func (InstallEventsReporter) RecipeFailed ¶ added in v0.31.1
func (r InstallEventsReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
func (InstallEventsReporter) RecipeInstalled ¶ added in v0.31.1
func (r InstallEventsReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
func (InstallEventsReporter) RecipeInstalling ¶ added in v0.31.1
func (r InstallEventsReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
func (InstallEventsReporter) RecipeRecommended ¶ added in v0.31.1
func (r InstallEventsReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
func (InstallEventsReporter) RecipeSkipped ¶ added in v0.31.1
func (r InstallEventsReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
func (InstallEventsReporter) RecipeUnsupported ¶ added in v0.31.1
func (r InstallEventsReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
func (InstallEventsReporter) RecipesSelected ¶ added in v0.31.1
func (r InstallEventsReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
func (InstallEventsReporter) UpdateRequired ¶ added in v0.34.0
func (r InstallEventsReporter) UpdateRequired(status *InstallStatus) error
type InstallStatus ¶ added in v0.18.26
type InstallStatus struct { InstallID string `json:"installId"` Complete bool `json:"complete"` DiscoveryManifest types.DiscoveryManifest `json:"discoveryManifest"` EntityGUIDs []string `json:"entityGuids"` Error StatusError `json:"error"` LogFilePath string `json:"logFilePath"` Statuses []*RecipeStatus `json:"recipes"` Timestamp int64 `json:"timestamp"` CLIVersion string `json:"cliVersion"` InstallLibraryVersion string `json:"installLibraryVersion"` HasInstalledRecipes bool `json:"hasInstalledRecipes"` HasCanceledRecipes bool `json:"hasCanceledRecipes"` HasSkippedRecipes bool `json:"hasSkippedRecipes"` HasFailedRecipes bool `json:"hasFailedRecipes"` HasUnsupportedRecipes bool `json:"hasUnsupportedRecipes"` Skipped []*RecipeStatus `json:"recipesSkipped"` Canceled []*RecipeStatus `json:"recipesCanceled"` Failed []*RecipeStatus `json:"recipesFailed"` Installed []*RecipeStatus `json:"recipesInstalled"` RedirectURL string `json:"redirectUrl"` HTTPSProxy string `json:"httpsProxy"` UpdateRequired bool `json:"updateRequired"` DocumentID string PlatformLinkGenerator LinkGenerator // contains filtered or unexported fields }
nolint: maligned
func NewInstallStatus ¶ added in v0.18.26
func NewInstallStatus(reporters []StatusSubscriber, PlatformLinkGenerator LinkGenerator) *InstallStatus
func (*InstallStatus) AllSelectedRecipesInstalled ¶ added in v0.36.0
func (s *InstallStatus) AllSelectedRecipesInstalled() bool
func (*InstallStatus) DiscoveryComplete ¶ added in v0.19.1
func (s *InstallStatus) DiscoveryComplete(dm types.DiscoveryManifest)
func (*InstallStatus) HostEntityGUID ¶ added in v0.20.0
func (s *InstallStatus) HostEntityGUID() string
func (*InstallStatus) InstallCanceled ¶ added in v0.19.2
func (s *InstallStatus) InstallCanceled()
func (*InstallStatus) InstallComplete ¶ added in v0.18.26
func (s *InstallStatus) InstallComplete(err error)
func (*InstallStatus) InstallStarted ¶ added in v0.34.37
func (s *InstallStatus) InstallStarted()
func (*InstallStatus) IsTargetedInstall ¶ added in v0.20.0
func (s *InstallStatus) IsTargetedInstall() bool
func (*InstallStatus) RecipeAvailable ¶ added in v0.18.26
func (s *InstallStatus) RecipeAvailable(recipe types.OpenInstallationRecipe)
func (*InstallStatus) RecipeDetected ¶ added in v0.36.10
func (s *InstallStatus) RecipeDetected(recipe types.OpenInstallationRecipe)
RecipeDetected handles setting the DETECTED status for the provided recipe as well sending out the DETECTED status event to the install events service. RecipeDetected is called when a recipe is available and passes the checks in both the process match and the pre-install steps of recipe execution.
func (*InstallStatus) RecipeFailed ¶ added in v0.18.26
func (s *InstallStatus) RecipeFailed(event RecipeStatusEvent)
func (*InstallStatus) RecipeInstalled ¶ added in v0.18.26
func (s *InstallStatus) RecipeInstalled(event RecipeStatusEvent)
func (*InstallStatus) RecipeInstalling ¶ added in v0.18.26
func (s *InstallStatus) RecipeInstalling(event RecipeStatusEvent)
func (*InstallStatus) RecipeRecommended ¶ added in v0.18.26
func (s *InstallStatus) RecipeRecommended(event RecipeStatusEvent)
RecipeRecommended is responsible for setting the nerstorage scopes when a recipe is recommended. This is used when a recipe is found, but not a "HOST" type, and is used to indicate to the user that it is something they should consider integrating, but not something that the recipe framework will currently assist with.
func (*InstallStatus) RecipeSkipped ¶ added in v0.18.26
func (s *InstallStatus) RecipeSkipped(event RecipeStatusEvent)
func (*InstallStatus) RecipeUnsupported ¶ added in v0.28.11
func (s *InstallStatus) RecipeUnsupported(event RecipeStatusEvent)
func (*InstallStatus) RecipesSelected ¶ added in v0.18.26
func (s *InstallStatus) RecipesSelected(recipes []types.OpenInstallationRecipe)
func (*InstallStatus) SetTargetedInstall ¶ added in v0.20.0
func (s *InstallStatus) SetTargetedInstall()
func (*InstallStatus) SetVersions ¶ added in v0.32.0
func (s *InstallStatus) SetVersions(installLibraryVersion string)
func (*InstallStatus) WasSuccessful ¶ added in v0.28.0
func (s *InstallStatus) WasSuccessful() bool
type LineCaptureBuffer ¶ added in v0.27.0
type LineCaptureBuffer struct { LastFullLine string // contains filtered or unexported fields }
func NewLineCaptureBuffer ¶ added in v0.27.0
func NewLineCaptureBuffer(w io.Writer) *LineCaptureBuffer
func (*LineCaptureBuffer) Current ¶ added in v0.27.0
func (c *LineCaptureBuffer) Current() string
type LinkGenerator ¶ added in v0.28.0
type LinkGenerator interface { GenerateExplorerLink(status InstallStatus) string GenerateEntityLink(entityGUID string) string GenerateRedirectURL(status InstallStatus) string }
type MockFailingRecipeExecutor ¶ added in v0.18.11
type MockFailingRecipeExecutor struct {
// contains filtered or unexported fields
}
func NewMockFailingRecipeExecutor ¶ added in v0.18.11
func NewMockFailingRecipeExecutor() *MockFailingRecipeExecutor
func (*MockFailingRecipeExecutor) Execute ¶ added in v0.18.11
func (m *MockFailingRecipeExecutor) Execute(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
func (*MockFailingRecipeExecutor) ExecutePreInstall ¶ added in v0.28.0
func (m *MockFailingRecipeExecutor) ExecutePreInstall(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
type MockInstalleventsClient ¶ added in v0.31.1
type MockInstalleventsClient struct { CreateInstallEventVal *installevents.InstallationRecipeEvent CreateInstallStatusVal *installevents.InstallationInstallStatus CreateInstallEventErr error CreateInstallEventCallCount int CreateInstallStatusErr error CreateInstallStatusCallCount int }
func NewMockInstallEventsClient ¶ added in v0.31.1
func NewMockInstallEventsClient() *MockInstalleventsClient
func (*MockInstalleventsClient) InstallationCreateInstallStatus ¶ added in v0.32.6
func (c *MockInstalleventsClient) InstallationCreateInstallStatus(int, installevents.InstallationInstallStatusInput) (*installevents.InstallationInstallStatus, error)
func (*MockInstalleventsClient) InstallationCreateRecipeEvent ¶ added in v0.31.1
func (c *MockInstalleventsClient) InstallationCreateRecipeEvent(int, installevents.InstallationRecipeStatus) (*installevents.InstallationRecipeEvent, error)
type MockNerdStorageClient ¶
type MockNerdStorageClient struct { WriteDocumentWithUserScopeVal interface{} WriteDocumentWithEntityScopeVal interface{} WriteDocumentWithAccountScopeVal interface{} WriteDocumentWithUserScopeErr error WriteDocumentWithEntityScopeErr error WriteDocumentWithAccountScopeErr error // contains filtered or unexported fields }
func NewMockNerdStorageClient ¶
func NewMockNerdStorageClient() *MockNerdStorageClient
func (*MockNerdStorageClient) WriteDocumentWithAccountScope ¶ added in v0.27.0
func (c *MockNerdStorageClient) WriteDocumentWithAccountScope(int, nerdstorage.WriteDocumentInput) (interface{}, error)
func (*MockNerdStorageClient) WriteDocumentWithEntityScope ¶
func (c *MockNerdStorageClient) WriteDocumentWithEntityScope(string, nerdstorage.WriteDocumentInput) (interface{}, error)
func (*MockNerdStorageClient) WriteDocumentWithUserScope ¶
func (c *MockNerdStorageClient) WriteDocumentWithUserScope(nerdstorage.WriteDocumentInput) (interface{}, error)
type MockPlatformLinkGenerator ¶ added in v0.28.0
type MockPlatformLinkGenerator struct { GenerateExplorerLinkCallCount int GenerateEntityLinkCallCount int GenerateExplorerLinkVal string GenerateEntityLinkVal string }
func NewMockPlatformLinkGenerator ¶ added in v0.28.0
func NewMockPlatformLinkGenerator() *MockPlatformLinkGenerator
func (*MockPlatformLinkGenerator) GenerateEntityLink ¶ added in v0.28.0
func (g *MockPlatformLinkGenerator) GenerateEntityLink(entityGUID string) string
func (*MockPlatformLinkGenerator) GenerateExplorerLink ¶ added in v0.28.0
func (g *MockPlatformLinkGenerator) GenerateExplorerLink(status InstallStatus) string
func (*MockPlatformLinkGenerator) GenerateRedirectURL ¶ added in v0.28.0
func (g *MockPlatformLinkGenerator) GenerateRedirectURL(status InstallStatus) string
type MockRecipeExecutor ¶
type MockRecipeExecutor struct {
ExecuteErr error
}
func NewMockRecipeExecutor ¶
func NewMockRecipeExecutor() *MockRecipeExecutor
func (*MockRecipeExecutor) Execute ¶
func (m *MockRecipeExecutor) Execute(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
func (*MockRecipeExecutor) ExecutePreInstall ¶ added in v0.28.0
func (m *MockRecipeExecutor) ExecutePreInstall(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
type MockStatusReporter ¶
type MockStatusReporter struct { RecipeAvailableErr error RecipesSelectedErr error RecipeFailedErr error RecipeInstalledErr error RecipeInstallingErr error RecipeRecommendedErr error RecipeSkippedErr error RecipeUnsupportedErr error InstallStartedErr error InstallCompleteErr error InstallCanceledErr error DiscoveryCompleteErr error RecipeAvailableCallCount int RecipesSelectedCallCount int RecipeFailedCallCount int RecipeInstalledCallCount int RecipeInstallingCallCount int RecipeRecommendedCallCount int RecipeSkippedCallCount int InstallStartedCallCount int InstallCompleteCallCount int InstallCanceledCallCount int DiscoveryCompleteCallCount int RecipeUnsupportedCallCount int RecipeDetectedCallCount int ReportSkipped map[string]int ReportInstalled map[string]int ReportInstalling map[string]int ReportRecommended map[string]int ReportFailed map[string]int ReportAvailable map[string]int GUIDs []string Durations []int64 RecipeGUID map[string]string }
MockStatusReporter is a mock implementation of the ExecutionStatusReporter interface that provides method spies for testing scenarios.
func NewMockStatusReporter ¶
func NewMockStatusReporter() *MockStatusReporter
NewMockStatusReporter returns a new instance of MockExecutionStatusReporter.
func (*MockStatusReporter) DiscoveryComplete ¶ added in v0.19.1
func (r *MockStatusReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
func (*MockStatusReporter) InstallCanceled ¶ added in v0.19.2
func (r *MockStatusReporter) InstallCanceled(status *InstallStatus) error
func (*MockStatusReporter) InstallComplete ¶ added in v0.18.26
func (r *MockStatusReporter) InstallComplete(status *InstallStatus) error
func (*MockStatusReporter) InstallStarted ¶ added in v0.34.37
func (r *MockStatusReporter) InstallStarted(status *InstallStatus) error
func (*MockStatusReporter) RecipeAvailable ¶ added in v0.18.26
func (r *MockStatusReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
func (*MockStatusReporter) RecipeDetected ¶ added in v0.36.10
func (r *MockStatusReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
func (*MockStatusReporter) RecipeFailed ¶ added in v0.18.26
func (r *MockStatusReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
func (*MockStatusReporter) RecipeInstalled ¶ added in v0.18.26
func (r *MockStatusReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
func (*MockStatusReporter) RecipeInstalling ¶ added in v0.18.26
func (r *MockStatusReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
func (*MockStatusReporter) RecipeRecommended ¶ added in v0.18.26
func (r *MockStatusReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
func (*MockStatusReporter) RecipeSkipped ¶ added in v0.18.26
func (r *MockStatusReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
func (*MockStatusReporter) RecipeUnsupported ¶ added in v0.28.11
func (r *MockStatusReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
func (*MockStatusReporter) RecipesSelected ¶ added in v0.18.26
func (r *MockStatusReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
func (*MockStatusReporter) UpdateRequired ¶ added in v0.34.0
func (r *MockStatusReporter) UpdateRequired(status *InstallStatus) error
type NerdStorageClient ¶
type NerdStorageClient interface { WriteDocumentWithUserScope(nerdstorage.WriteDocumentInput) (interface{}, error) WriteDocumentWithEntityScope(string, nerdstorage.WriteDocumentInput) (interface{}, error) WriteDocumentWithAccountScope(int, nerdstorage.WriteDocumentInput) (interface{}, error) }
type NerdstorageStatusReporter ¶
type NerdstorageStatusReporter struct {
// contains filtered or unexported fields
}
NerdstorageStatusReporter is an implementation of the ExecutionStatusReporter interface that reports execution status into NerdStorage.
func NewNerdStorageStatusReporter ¶
func NewNerdStorageStatusReporter(client NerdStorageClient) *NerdstorageStatusReporter
NewNerdStorageStatusReporter returns a new instance of NerdStorageExecutionStatusReporter.
func (NerdstorageStatusReporter) DiscoveryComplete ¶ added in v0.19.1
func (r NerdstorageStatusReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
func (NerdstorageStatusReporter) InstallCanceled ¶ added in v0.19.2
func (r NerdstorageStatusReporter) InstallCanceled(status *InstallStatus) error
func (NerdstorageStatusReporter) InstallComplete ¶ added in v0.18.26
func (r NerdstorageStatusReporter) InstallComplete(status *InstallStatus) error
func (NerdstorageStatusReporter) InstallStarted ¶ added in v0.34.37
func (r NerdstorageStatusReporter) InstallStarted(status *InstallStatus) error
func (NerdstorageStatusReporter) RecipeAvailable ¶ added in v0.18.26
func (r NerdstorageStatusReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
RecipeAvailable reports that a recipe is available for installation on the underlying host.
func (NerdstorageStatusReporter) RecipeDetected ¶ added in v0.36.10
func (r NerdstorageStatusReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
func (NerdstorageStatusReporter) RecipeFailed ¶ added in v0.18.26
func (r NerdstorageStatusReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
func (NerdstorageStatusReporter) RecipeInstalled ¶ added in v0.18.26
func (r NerdstorageStatusReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
func (NerdstorageStatusReporter) RecipeInstalling ¶ added in v0.18.26
func (r NerdstorageStatusReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
func (NerdstorageStatusReporter) RecipeRecommended ¶ added in v0.18.26
func (r NerdstorageStatusReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
func (NerdstorageStatusReporter) RecipeSkipped ¶ added in v0.18.26
func (r NerdstorageStatusReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
func (NerdstorageStatusReporter) RecipeUnsupported ¶ added in v0.28.11
func (r NerdstorageStatusReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
func (NerdstorageStatusReporter) RecipesSelected ¶ added in v0.18.26
func (r NerdstorageStatusReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
func (NerdstorageStatusReporter) UpdateRequired ¶ added in v0.34.0
func (r NerdstorageStatusReporter) UpdateRequired(status *InstallStatus) error
type PlatformLinkGenerator ¶ added in v0.28.0
type PlatformLinkGenerator struct {
// contains filtered or unexported fields
}
func NewPlatformLinkGenerator ¶ added in v0.28.0
func NewPlatformLinkGenerator() *PlatformLinkGenerator
func (*PlatformLinkGenerator) GenerateEntityLink ¶ added in v0.28.0
func (g *PlatformLinkGenerator) GenerateEntityLink(entityGUID string) string
func (*PlatformLinkGenerator) GenerateExplorerLink ¶ added in v0.28.0
func (g *PlatformLinkGenerator) GenerateExplorerLink(status InstallStatus) string
func (*PlatformLinkGenerator) GenerateRedirectURL ¶ added in v0.28.0
func (g *PlatformLinkGenerator) GenerateRedirectURL(status InstallStatus) string
GenerateRedirectURL creates a URL for the user to navigate to after running through an installation. The URL is displayed in the CLI out as well and is also provided in the nerdstorage document. This provides the user two options to see their data - click from the CLI output or from the frontend.
type PosixShellRecipeExecutor ¶ added in v0.28.0
type PosixShellRecipeExecutor struct { Stderr io.Writer Stdin io.Reader Stdout io.Writer ShellPath string Dir string }
func NewPosixShellRecipeExecutor ¶ added in v0.28.0
func NewPosixShellRecipeExecutor() *PosixShellRecipeExecutor
func (*PosixShellRecipeExecutor) Execute ¶ added in v0.28.0
func (e *PosixShellRecipeExecutor) Execute(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
func (*PosixShellRecipeExecutor) ExecutePreInstall ¶ added in v0.28.0
func (e *PosixShellRecipeExecutor) ExecutePreInstall(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
type RecipeExecutor ¶
type RecipeExecutor interface { Execute(context.Context, types.OpenInstallationRecipe, types.RecipeVars) error ExecutePreInstall(context.Context, types.OpenInstallationRecipe, types.RecipeVars) error }
RecipeExecutor is responsible for execution of the task steps defined in a recipe.
type RecipeStatus ¶ added in v0.18.26
type RecipeStatus struct { DisplayName string `json:"displayName"` Error StatusError `json:"error"` Name string `json:"name"` Status RecipeStatusType `json:"status"` EntityGUID string `json:"entityGuid,omitempty"` // validationDurationMs is duration in Milliseconds that a recipe took to validate data was flowing. ValidationDurationMs int64 `json:"validationDurationMs,omitempty"` }
type RecipeStatusEvent ¶
type RecipeStatusEvent struct { Recipe types.OpenInstallationRecipe Msg string TaskPath []string EntityGUID string ValidationDurationMs int64 }
RecipeStatusEvent represents an event in a recipe's execution.
type RecipeStatusType ¶ added in v0.18.26
type RecipeStatusType string
type RecipeVarProvider ¶ added in v0.28.0
type RecipeVarProvider struct{}
func NewRecipeVarProvider ¶ added in v0.28.0
func NewRecipeVarProvider() *RecipeVarProvider
func (*RecipeVarProvider) Prepare ¶ added in v0.28.0
func (re *RecipeVarProvider) Prepare(m types.DiscoveryManifest, r types.OpenInstallationRecipe, assumeYes bool, licenseKey string) (types.RecipeVars, error)
type ShRecipeExecutor ¶ added in v0.28.0
func NewShRecipeExecutor ¶ added in v0.28.0
func NewShRecipeExecutor() *ShRecipeExecutor
func (*ShRecipeExecutor) Execute ¶ added in v0.28.0
func (e *ShRecipeExecutor) Execute(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
func (*ShRecipeExecutor) ExecutePreInstall ¶ added in v0.28.0
func (e *ShRecipeExecutor) ExecutePreInstall(ctx context.Context, r types.OpenInstallationRecipe, v types.RecipeVars) error
type StatusError ¶ added in v0.19.1
type StatusSubscriber ¶ added in v0.18.26
type StatusSubscriber interface { UpdateRequired(status *InstallStatus) error InstallStarted(status *InstallStatus) error InstallCanceled(status *InstallStatus) error InstallComplete(status *InstallStatus) error DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error }
StatusSubscriber is notified during the lifecycle of the recipe execution status.
type TerminalStatusReporter ¶ added in v0.18.11
type TerminalStatusReporter struct{}
func NewTerminalStatusReporter ¶ added in v0.18.11
func NewTerminalStatusReporter() *TerminalStatusReporter
NewTerminalStatusReporter is an implementation of the ExecutionStatusReporter interface that reports execution status to STDOUT.
func (TerminalStatusReporter) DiscoveryComplete ¶ added in v0.19.1
func (r TerminalStatusReporter) DiscoveryComplete(status *InstallStatus, dm types.DiscoveryManifest) error
func (TerminalStatusReporter) InstallCanceled ¶ added in v0.19.2
func (r TerminalStatusReporter) InstallCanceled(status *InstallStatus) error
func (TerminalStatusReporter) InstallComplete ¶ added in v0.18.26
func (r TerminalStatusReporter) InstallComplete(status *InstallStatus) error
func (TerminalStatusReporter) InstallStarted ¶ added in v0.34.37
func (r TerminalStatusReporter) InstallStarted(status *InstallStatus) error
func (TerminalStatusReporter) RecipeAvailable ¶ added in v0.18.26
func (r TerminalStatusReporter) RecipeAvailable(status *InstallStatus, recipe types.OpenInstallationRecipe) error
func (TerminalStatusReporter) RecipeDetected ¶ added in v0.36.10
func (r TerminalStatusReporter) RecipeDetected(status *InstallStatus, recipe types.OpenInstallationRecipe) error
func (TerminalStatusReporter) RecipeFailed ¶ added in v0.18.26
func (r TerminalStatusReporter) RecipeFailed(status *InstallStatus, event RecipeStatusEvent) error
func (TerminalStatusReporter) RecipeInstalled ¶ added in v0.18.26
func (r TerminalStatusReporter) RecipeInstalled(status *InstallStatus, event RecipeStatusEvent) error
func (TerminalStatusReporter) RecipeInstalling ¶ added in v0.18.26
func (r TerminalStatusReporter) RecipeInstalling(status *InstallStatus, event RecipeStatusEvent) error
func (TerminalStatusReporter) RecipeRecommended ¶ added in v0.18.26
func (r TerminalStatusReporter) RecipeRecommended(status *InstallStatus, event RecipeStatusEvent) error
func (TerminalStatusReporter) RecipeSkipped ¶ added in v0.18.26
func (r TerminalStatusReporter) RecipeSkipped(status *InstallStatus, event RecipeStatusEvent) error
func (TerminalStatusReporter) RecipeUnsupported ¶ added in v0.28.11
func (r TerminalStatusReporter) RecipeUnsupported(status *InstallStatus, event RecipeStatusEvent) error
func (TerminalStatusReporter) RecipesSelected ¶ added in v0.18.26
func (r TerminalStatusReporter) RecipesSelected(status *InstallStatus, recipes []types.OpenInstallationRecipe) error
func (TerminalStatusReporter) UpdateRequired ¶ added in v0.34.0
func (r TerminalStatusReporter) UpdateRequired(status *InstallStatus) error
Source Files ¶
- go_task_recipe_executor.go
- install_status.go
- installevents_client.go
- installevents_reporter.go
- line_capture_buffer.go
- link_generator.go
- mock_failing_recipe_executor.go
- mock_installevents_client.go
- mock_link_generator.go
- mock_nerdstorage_client.go
- mock_recipe_executor.go
- mock_status_reporter.go
- nerdstorage_client.go
- nerdstorage_status_reporter.go
- platform_link_generator.go
- posix_shell_recipe_executor.go
- recipe_executor.go
- recipe_var_provider.go
- sh_recipe_executor.go
- status_subscriber.go
- terminal_reporter.go