Documentation
¶
Overview ¶
Package storage provides an in-memory implementation of the inventory.Storage interface It is the only storage implementation currently available
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
MemoryStorage implements the Storage interface with an in-memory map
func NewMemoryStorage ¶
func NewMemoryStorage() *MemoryStorage
NewMemoryStorage creates a new instance of MemoryStorage
func (*MemoryStorage) GetAllReports ¶
func (ms *MemoryStorage) GetAllReports() []inventory.Report
GetAllReports returns all stored reports
func (*MemoryStorage) GetReport ¶
func (ms *MemoryStorage) GetReport(hostname string) (inventory.Report, bool)
GetReport retrieves a report by hostname
func (*MemoryStorage) StoreReport ¶
func (ms *MemoryStorage) StoreReport(report inventory.Report) error
StoreReport stores a report in memory, keyed by hostname
Click to show internal directories.
Click to hide internal directories.