source

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 2 Imported by: 48

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// BootPath is where the /boot directory of the system to be inspected is located
	BootDir = HostDir(pathPrefix + "boot")
	// EtcPath is where the /etc directory of the system to be inspected is located
	EtcDir = HostDir(pathPrefix + "etc")
	// SysfsPath is where the /sys directory of the system to be inspected is located
	SysfsDir = HostDir(pathPrefix + "sys")
)

Functions

This section is empty.

Types

type Config added in v0.6.0

type Config interface {
}

type FeatureSource

type FeatureSource interface {
	// Name returns a friendly name for this source of node feature.
	Name() string

	// Discover returns discovered features for this node.
	Discover() (Features, error)

	// NewConfig returns a new default config of the source
	NewConfig() Config

	// GetConfig returns the effective configuration of the source
	GetConfig() Config

	// SetConfig changes the effective configuration of the source
	SetConfig(Config)
}

FeatureSource represents a source of a discovered node feature.

type FeatureValue added in v0.4.0

type FeatureValue interface{}

Value of a feature

type Features added in v0.4.0

type Features map[string]FeatureValue

type HostDir added in v0.6.0

type HostDir string

HostDir is a helper for handling host system directories

func (HostDir) Path added in v0.6.0

func (d HostDir) Path(elem ...string) string

Path returns a full path to a file under HostDir

type MockFeatureSource added in v0.4.0

type MockFeatureSource struct {
	mock.Mock
}

MockFeatureSource is an autogenerated mock type for the FeatureSource type

func (*MockFeatureSource) Discover added in v0.4.0

func (_m *MockFeatureSource) Discover() (Features, error)

Discover provides a mock function with given fields:

func (*MockFeatureSource) GetConfig added in v0.6.0

func (_m *MockFeatureSource) GetConfig() Config

GetConfig provides a mock function with given fields:

func (*MockFeatureSource) Name added in v0.4.0

func (_m *MockFeatureSource) Name() string

Name provides a mock function with given fields:

func (*MockFeatureSource) NewConfig added in v0.6.0

func (_m *MockFeatureSource) NewConfig() Config

NewConfig provides a mock function with given fields:

func (*MockFeatureSource) SetConfig added in v0.6.0

func (_m *MockFeatureSource) SetConfig(_a0 Config)

SetConfig provides a mock function with given fields: _a0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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