discovery

package
v0.18.10 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

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.Recipe) ([]types.LogMatch, 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.Recipe) ([]types.LogMatch, error)

Filter uses the patterns provided in the passed recipe to return matches based on which files exist in the underlying file system.

type MockDiscoverer

type MockDiscoverer struct {
	DiscoveryManifest *types.DiscoveryManifest
}

func NewMockDiscoverer

func NewMockDiscoverer() *MockDiscoverer

func (*MockDiscoverer) Discover

type MockFileFilterer

type MockFileFilterer struct {
	FilterCallCount int
	FilterErr       error
	FilterVal       []types.LogMatch
}

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.Recipe) ([]types.LogMatch, error)

type PSUtilDiscoverer

type PSUtilDiscoverer struct {
	// contains filtered or unexported fields
}

func NewPSUtilDiscoverer

func NewPSUtilDiscoverer(f ProcessFilterer) *PSUtilDiscoverer

func (*PSUtilDiscoverer) Discover

type PSUtilProcess

type PSUtilProcess process.Process

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

Jump to

Keyboard shortcuts

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