Documentation ¶
Overview ¶
Package inventory contains implementation of aws:softwareInventory plugin
Index ¶
- func Name() string
- type Plugin
- func (p Plugin) ApplyInventoryFrequentCollector(gatherers map[gatherers.T]model.Config, output iohandler.IOHandler)
- func (p *Plugin) ApplyInventoryPolicy(inventoryInput PluginInput, output iohandler.IOHandler)
- func (p *Plugin) CanGathererRun(context context.T, name string) (status bool, gatherer gatherers.T, err error)
- func (p *Plugin) Execute(config contracts.Configuration, cancelFlag task.CancelFlag, ...)
- func (p *Plugin) GetSupportedGatherer(gatherName string) (gatherers.T, bool)
- func (p *Plugin) IsInventoryBeingInvokedAsAssociation(fileName string) (status bool, err error)
- func (p *Plugin) IsMulitpleAssociationPresent(currentAssociationID string, config contracts.Configuration) (status bool, othersfound string)
- func (p *Plugin) ParseAssociationIdFromFileName(input string) string
- func (p *Plugin) RunGatherers(gatherers map[gatherers.T]model.Config) (items []model.Item, err error)
- func (p *Plugin) ValidateInventoryInput(context context.T, input PluginInput) (configuredGatherers map[gatherers.T]model.Config, err error)
- func (p *Plugin) VerifyInventoryDataSize(item model.Item, items []model.Item) bool
- type PluginInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin encapsulates the logic of configuring, starting and stopping inventory plugin
func (Plugin) ApplyInventoryFrequentCollector ¶
func (p Plugin) ApplyInventoryFrequentCollector(gatherers map[gatherers.T]model.Config, output iohandler.IOHandler)
ApplyInventoryFrequentCollector applies frequent collector regarding which gatherers to run
func (*Plugin) ApplyInventoryPolicy ¶
func (p *Plugin) ApplyInventoryPolicy(inventoryInput PluginInput, output iohandler.IOHandler)
ApplyInventoryPolicy applies given inventory policy regarding which gatherers to run
func (*Plugin) CanGathererRun ¶
func (p *Plugin) CanGathererRun(context context.T, name string) (status bool, gatherer gatherers.T, err error)
CanGathererRun returns true if the gatherer can run on given OS, else it returns false. It throws error if the gatherer is not recognized.
func (*Plugin) Execute ¶
func (p *Plugin) Execute(config contracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler)
Execute runs the inventory plugin
func (*Plugin) GetSupportedGatherer ¶
func (*Plugin) IsInventoryBeingInvokedAsAssociation ¶
IsInventoryBeingInvokedAsAssociation returns true if inventory plugin is invoked via ssm-associate or else it returns false. It throws error if the detection itself fails
func (*Plugin) IsMulitpleAssociationPresent ¶
func (p *Plugin) IsMulitpleAssociationPresent(currentAssociationID string, config contracts.Configuration) (status bool, othersfound string)
IsMulitpleAssociationPresent returns true if there are multiple associations for inventory plugin else it returns false.
func (*Plugin) ParseAssociationIdFromFileName ¶
ParseAssociationIdFromFileName parses associationID from the given input NOTE: Input will be of format - AssociationID.RunID -> as per the format of bookkeepingfilename for associate documents
func (*Plugin) RunGatherers ¶
func (p *Plugin) RunGatherers(gatherers map[gatherers.T]model.Config) (items []model.Item, err error)
RunGatherers execute given array of gatherers and accordingly returns. It returns error if gatherer is not registered or if at any stage the data returned breaches size limit
func (*Plugin) ValidateInventoryInput ¶
func (p *Plugin) ValidateInventoryInput(context context.T, input PluginInput) (configuredGatherers map[gatherers.T]model.Config, err error)
ValidateInventoryInput validates inventory input and returns a map of eligible gatherers & their corresponding config. It throws an error if gatherer is not recognized/installed.
type PluginInput ¶
type PluginInput struct { contracts.PluginInput Applications string AWSComponents string NetworkConfig string BillingInfo string Files string WindowsRoles string Services string WindowsRegistry string WindowsUpdates string InstanceDetailedInformation string CustomInventory string CustomInventoryDirectory string }
PluginInput represents configuration which is applied to inventory plugin during execution.
Directories ¶
Path | Synopsis |
---|---|
Package datauploader contains routines upload inventory data to SSM - Inventory service
|
Package datauploader contains routines upload inventory data to SSM - Inventory service |
Package gatherers contains routines for different types of inventory gatherers
|
Package gatherers contains routines for different types of inventory gatherers |
application
Package application contains a application gatherer.
|
Package application contains a application gatherer. |
awscomponent
Package awscomponent contains a aws component gatherer.
|
Package awscomponent contains a aws component gatherer. |
billinginfo
Package billinginfo contains a billinginfo gatherer.
|
Package billinginfo contains a billinginfo gatherer. |
custom
Package custom contains a gatherer for collecting custom inventory items
|
Package custom contains a gatherer for collecting custom inventory items |
file
Package file contains file gatherer.
|
Package file contains file gatherer. |
instancedetailedinformation
Package instancedetailedinformation contains a gatherer for the AWS:InstanceDetailedInformation inventory type.
|
Package instancedetailedinformation contains a gatherer for the AWS:InstanceDetailedInformation inventory type. |
network
Package network contains a network gatherer.
|
Package network contains a network gatherer. |
registry
Package registry collects information about windows registry
|
Package registry collects information about windows registry |
role
Package role contains a role gatherer.
|
Package role contains a role gatherer. |
service
Package service contains a service gatherer.
|
Package service contains a service gatherer. |
mocks
|
|
datauploader
Package datauploader contains routines upload inventory data to SSM - Inventory service
|
Package datauploader contains routines upload inventory data to SSM - Inventory service |
gatherers
Package gatherers contains routines for different types of inventory gatherers
|
Package gatherers contains routines for different types of inventory gatherers |
Package model contains contracts for inventory
|
Package model contains contracts for inventory |