Documentation ¶
Index ¶
Constants ¶
const ( OutofbandLoginError model.CollectorError = "OutofbandLoginError" OutofbandInventoryError model.CollectorError = "OutofbandInventoryError" OutofbandGetBiosConfigError model.CollectorError = "OutofbandGetBiosConfigError" )
Variables ¶
var (
ErrCollectorKind = errors.New("invalid collector kind")
)
var (
ErrConnect = errors.New("error connecting to BMC")
)
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface { // InventoryRemote spawns an iterator that listens on the AssetCh and // collects inventory remotely (through its BMC) for each of the assets until the AssetCh is closed, // the collected inventory is then sent on the collector channel to be published. InventoryRemote(ctx context.Context) error // InventoryLocal collects and returns inventory and bios configuration on the local host for the given asset. InventoryLocal(ctx context.Context) (*model.Asset, error) // SetMockGetter sets a mock device inventory getter to be used for tests. SetMockGetter(getter interface{}) }
Collector interface defines methods to collect device inventory
func NewInbandCollector ¶
New returns an inband inventory collector
func NewOutOfBandCollector ¶
NewOutOfBandCollector returns a instance of the OutOfBandCollector inventory collector
type InbandCollector ¶
type InbandCollector struct {
// contains filtered or unexported fields
}
Inband collector collects hardware, firmware inventory inband
func (*InbandCollector) InventoryLocal ¶
InventoryLocal implements the Collector interface to collect inventory and bios configuration locally (inband).
func (*InbandCollector) InventoryRemote ¶
func (i *InbandCollector) InventoryRemote(_ context.Context) error
InventoryRemote implements is present here to satisfy the Collector interface.
func (*InbandCollector) SetMockGetter ¶
func (i *InbandCollector) SetMockGetter(getter interface{})
type OutOfBandCollector ¶
type OutOfBandCollector struct {
// contains filtered or unexported fields
}
OutOfBand collector collects hardware, firmware inventory out of band
func (*OutOfBandCollector) InventoryLocal ¶
InventoryLocal implements the Collector interface just to satisfy it.
func (*OutOfBandCollector) InventoryRemote ¶
func (o *OutOfBandCollector) InventoryRemote(ctx context.Context) error
InventoryRemote iterates over assets received on the asset channel and collects inventory out-of-band (remotely) for the assets received, the collected inventory is then sent over the collector channel to the publisher.
This method returns after all the routines it dispatched (to the worker pool) have returned.
RunInventoryCollect implements the Collector interface.
nolint:gocyclo // this method is better not split up in its current form.
func (*OutOfBandCollector) SetMockGetter ¶
func (o *OutOfBandCollector) SetMockGetter(getter interface{})