Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discoverer ¶
type Discoverer interface {
Discover(context.Context) (*types.DiscoveryManifest, error)
}
Discoverer is reesponsible for discovering informataion about the host system.
type FileFilterer ¶
type FileFilterer interface {
Filter(context.Context, []types.OpenInstallationRecipe) ([]types.OpenInstallationLogMatch, error)
}
FileFilterer determines the existence of files on the underlying filesystem.
type GlobFileFilterer ¶
type GlobFileFilterer struct{}
GlobFileFilterer is an implementation of the FileFilterer interface that uses glob-based filesystem searches to locate the existence of files.
func NewGlobFileFilterer ¶
func NewGlobFileFilterer() *GlobFileFilterer
NewGlobFileFilterer returns a new instance of GlobFileFilterer.
func (*GlobFileFilterer) Filter ¶
func (f *GlobFileFilterer) Filter(ctx context.Context, recipes []types.OpenInstallationRecipe) ([]types.OpenInstallationLogMatch, error)
Filter uses the patterns provided in the passed recipe to return matches based on which files exist in the underlying file system.
type ManifestValidator ¶ added in v0.22.0
type ManifestValidator struct {
// contains filtered or unexported fields
}
func NewEmptyManifestValidator ¶ added in v0.22.0
func NewEmptyManifestValidator() *ManifestValidator
func NewManifestValidator ¶ added in v0.22.0
func NewManifestValidator() *ManifestValidator
NewManifestValidator returns a new instance of ManifestValidator.
func (*ManifestValidator) Execute ¶ added in v0.22.0
func (mv *ManifestValidator) Execute(m *types.DiscoveryManifest) error
func (*ManifestValidator) FindAllValidationErrors ¶ added in v0.22.0
func (mv *ManifestValidator) FindAllValidationErrors(m *types.DiscoveryManifest) []error
type MockDiscoverer ¶
type MockDiscoverer struct {
DiscoveryManifest *types.DiscoveryManifest
}
func NewMockDiscoverer ¶
func NewMockDiscoverer() *MockDiscoverer
func (*MockDiscoverer) Discover ¶
func (d *MockDiscoverer) Discover(context.Context) (*types.DiscoveryManifest, error)
func (*MockDiscoverer) GetManifest ¶ added in v0.22.0
func (d *MockDiscoverer) GetManifest() *types.DiscoveryManifest
func (*MockDiscoverer) SetOs ¶ added in v0.22.0
func (d *MockDiscoverer) SetOs(os string)
func (*MockDiscoverer) SetPlatform ¶ added in v0.26.1
func (d *MockDiscoverer) SetPlatform(p string)
func (*MockDiscoverer) SetPlatformVersion ¶ added in v0.22.0
func (d *MockDiscoverer) SetPlatformVersion(pf string)
type MockFileFilterer ¶
type MockFileFilterer struct { FilterCallCount int FilterErr error FilterVal []types.OpenInstallationLogMatch }
MockFileFilterer is a mock implementation of the FileFilterer interface that provides method spies for testing scenarios.
func NewMockFileFilterer ¶
func NewMockFileFilterer() *MockFileFilterer
NewMockFileFilterer creates a new instance of MockFileFilterer.
func (*MockFileFilterer) Filter ¶
func (m *MockFileFilterer) Filter(ctx context.Context, recipes []types.OpenInstallationRecipe) ([]types.OpenInstallationLogMatch, error)
type NoOpProcessFilterer ¶ added in v0.26.0
type NoOpProcessFilterer struct{}
func NewNoOpProcessFilterer ¶ added in v0.26.0
func NewNoOpProcessFilterer() *NoOpProcessFilterer
type OsValidator ¶ added in v0.22.0
type OsValidator struct{}
func NewOsValidator ¶ added in v0.22.0
func NewOsValidator() *OsValidator
func (*OsValidator) Execute ¶ added in v0.22.0
func (v *OsValidator) Execute(m *types.DiscoveryManifest) error
type OsVersionValidator ¶ added in v0.26.1
type OsVersionValidator struct {
// contains filtered or unexported fields
}
func NewOsVersionValidator ¶ added in v0.26.1
func NewOsVersionValidator(os string, platform string, minMajor int, minMinor int) *OsVersionValidator
func (*OsVersionValidator) Execute ¶ added in v0.26.1
func (v *OsVersionValidator) Execute(m *types.DiscoveryManifest) error
type PSUtilDiscoverer ¶
type PSUtilDiscoverer struct {
// contains filtered or unexported fields
}
func NewPSUtilDiscoverer ¶
func NewPSUtilDiscoverer(f ProcessFilterer) *PSUtilDiscoverer
func (*PSUtilDiscoverer) Discover ¶
func (p *PSUtilDiscoverer) Discover(ctx context.Context) (*types.DiscoveryManifest, error)
type PSUtilProcess ¶
func (PSUtilProcess) Cmdline ¶ added in v0.18.17
func (p PSUtilProcess) Cmdline() (string, error)
func (PSUtilProcess) Name ¶
func (p PSUtilProcess) Name() (string, error)
func (PSUtilProcess) PID ¶
func (p PSUtilProcess) PID() int32
type ProcessFilterer ¶
type ProcessFilterer interface {
// contains filtered or unexported methods
}
type RegexProcessFilterer ¶
type RegexProcessFilterer struct {
// contains filtered or unexported fields
}
func NewRegexProcessFilterer ¶
func NewRegexProcessFilterer(r recipes.RecipeFetcher) *RegexProcessFilterer
type Validator ¶ added in v0.22.0
type Validator interface {
Execute(m *types.DiscoveryManifest) error
}
Source Files ¶
- discoverer.go
- file_filterer.go
- glob_file_filterer.go
- manifest_validator.go
- mock_discoverer.go
- mock_empty_discoverer.go
- mock_file_filterer.go
- mock_process.go
- noop_process_filterer.go
- os_validator.go
- os_version_validator.go
- process_filterer.go
- psutil_discoverer.go
- psutil_process.go
- regex_process_filterer.go