Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrBiosCfgCollect = errors.New("error collecting BIOS configuration") ErrInventoryCollect = errors.New("error collecting inventory data") )
var (
ErrFetcherQuery = errors.New("error querying asset data from store")
)
Functions ¶
This section is empty.
Types ¶
type AssetIterCollector ¶
type AssetIterCollector struct {
// contains filtered or unexported fields
}
AssetIterCollector holds attributes to iterate over the assets in the store repository and collect inventory, bios configuration for them remotely.
func NewAssetIterCollector ¶
func NewAssetIterCollector( ctx context.Context, storeKind model.StoreKind, appKind model.AppKind, cfg *app.Configuration, syncWG *sync.WaitGroup, logger *logrus.Logger, ) (*AssetIterCollector, error)
NewAssetIterCollector is a constructor method that returns an AssetIterCollector.
func NewAssetIterCollectorWithStore ¶
func NewAssetIterCollectorWithStore( appKind model.AppKind, repository store.Repository, concurrency int32, syncWG *sync.WaitGroup, logger *logrus.Logger, ) (*AssetIterCollector, error)
NewAssetIterCollectorWithStore is a constructor method that accepts an initialized store to return an AssetIterCollector.
func (*AssetIterCollector) Collect ¶
func (d *AssetIterCollector) Collect(ctx context.Context)
Collect iterates over assets returned by the AssetIterator and collects their inventory, bios configuration data.
type AssetIterator ¶
type AssetIterator struct {
// contains filtered or unexported fields
}
AssetIterator holds methods to recurse over assets in a store and return them over the asset channel.
func NewAssetIterator ¶
func NewAssetIterator(repository store.Repository, logger *logrus.Logger) *AssetIterator
NewAssetIterator is a constructor method that returns an AssetIterator.
The returned AssetIterator will recurse over all assets in the store and send them over the asset channel, The caller of this method should invoke AssetChannel() to retrieve the channel to read assets from.
func (*AssetIterator) Channel ¶
func (s *AssetIterator) Channel() <-chan *model.Asset
Channel returns the channel to read assets from when the fetcher is invoked through its Iter* method.
func (*AssetIterator) IterInBatches ¶
func (s *AssetIterator) IterInBatches(ctx context.Context, batchSize int, pauser *Pauser)
IterInBatches queries the store for assets in batches, returning them over the assetCh
nolint:gocyclo // for now it makes sense to have the iter method logic in one method
type DeviceCollector ¶
type DeviceCollector struct {
// contains filtered or unexported fields
}
DeviceCollector holds attributes to collect inventory, bios configuration data from a single device.
func NewDeviceCollector ¶
func NewDeviceCollector(ctx context.Context, storeKind model.StoreKind, appKind model.AppKind, cfg *app.Configuration, logger *logrus.Logger) (*DeviceCollector, error)
NewDeviceCollector is a constructor method to return a inventory, bios configuration data collector.
func NewDeviceCollectorWithStore ¶
func NewDeviceCollectorWithStore(repository store.Repository, appKind model.AppKind, logger *logrus.Logger) (*DeviceCollector, error)
NewDeviceCollectorWithStore is a constructor method that accepts an initialized store repository - to return a inventory, bios configuration data collector.
func (*DeviceCollector) CollectInband ¶
func (c *DeviceCollector) CollectInband(ctx context.Context, asset *model.Asset, outputStdout bool) error
CollectInband querys inventory and bios configuration data for a device through the host OS this expects Alloy is running within the alloy-inband docker image based on ironlib.
func (*DeviceCollector) CollectOutofband ¶
func (c *DeviceCollector) CollectOutofband(ctx context.Context, asset *model.Asset, outputStdout bool) error
CollectOutofband querys inventory and bios configuration data for a device through its BMC.