Documentation
¶
Overview ¶
Package inventory provides Docker resource inventory collection for the agent.
Index ¶
- type Collector
- func (c *Collector) Collect(ctx context.Context) (*protocol.Inventory, error)
- func (c *Collector) CollectByFilter(ctx context.Context, f filters.Args) ([]protocol.ContainerInfo, error)
- func (c *Collector) CollectContainersOnly(ctx context.Context) ([]protocol.ContainerInfo, error)
- func (c *Collector) CollectImagesOnly(ctx context.Context) ([]protocol.ImageInfo, error)
- func (c *Collector) GetCached() (*protocol.Inventory, bool)
- func (c *Collector) QuickStats(ctx context.Context) (*protocol.QuickStats, error)
- type CollectorConfig
- type InventoryDiff
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector collects Docker resource inventory.
func NewCollector ¶
NewCollector creates a new inventory collector.
func (*Collector) CollectByFilter ¶
func (c *Collector) CollectByFilter(ctx context.Context, f filters.Args) ([]protocol.ContainerInfo, error)
CollectByFilter collects containers matching a filter.
func (*Collector) CollectContainersOnly ¶
CollectContainersOnly collects only container inventory.
func (*Collector) CollectImagesOnly ¶
CollectImagesOnly collects only image inventory.
func (*Collector) QuickStats ¶
QuickStats returns quick stats for heartbeat.
type CollectorConfig ¶
CollectorConfig configures the inventory collector.
type InventoryDiff ¶
type InventoryDiff struct {
AddedContainers []string
RemovedContainers []string
ChangedContainers []string
AddedImages []string
RemovedImages []string
AddedVolumes []string
RemovedVolumes []string
AddedNetworks []string
RemovedNetworks []string
}
InventoryDiff represents changes between inventories.
func Diff ¶
func Diff(old, new *protocol.Inventory) *InventoryDiff
Diff compares two inventories and returns differences.
func (*InventoryDiff) HasChanges ¶
func (d *InventoryDiff) HasChanges() bool
HasChanges returns true if there are any differences.
Click to show internal directories.
Click to hide internal directories.