Documentation
¶
Index ¶
- func ComputeDelta(oldInv, newInv *schema.HostInventory, logger *logrus.Logger) *schema.HostDeltaInventory
- func DebugProtoDiff(oldMsg, newMsg proto.Message) string
- func DiffGenericByHash[T proto.Message](oldList, newList []T, getKey func(T) string) (added, removed, changed []T)
- func IsDeltaEmpty(d *schema.HostDeltaInventory) bool
- func StableHash(msg proto.Message) uint64
- type Builder
- type HasResetUpdatedAt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeDelta ¶
func ComputeDelta(oldInv, newInv *schema.HostInventory, logger *logrus.Logger) *schema.HostDeltaInventory
ComputeDelta computes the difference between two HostInventory objects. It returns a HostDeltaInventory containing the changes. The delta includes added and removed packages, users, and other entities. It uses the hashMessage function to compare the objects efficiently.
func DebugProtoDiff ¶
DebugProtoDiff prints the difference between two proto messages
func DiffGenericByHash ¶
func DiffGenericByHash[T proto.Message]( oldList, newList []T, getKey func(T) string, ) (added, removed, changed []T)
DiffGenericByHash computes the difference between two lists of proto messages based on their hashes.
func IsDeltaEmpty ¶
func IsDeltaEmpty(d *schema.HostDeltaInventory) bool
IsDeltaEmpty checks if the delta inventory is empty
func StableHash ¶
StableHash return determinist hash from protobuf message
Types ¶
type Builder ¶
type Builder struct {
Log *logrus.Logger
Cfg options.RunOptions
SystemGather *models.System
Now func() time.Time
WhoAmI func() (string, error)
Store store.InventoryStore
Platform platform.PlatformCollector
Packages packages.PackagesCollector
Applications applications.ApplicationsCollector
SystemServices systemservices.SystemServicesCollector
Networks networks.NetworksCollector
Users users.UsersCollector
Processes process.ProcessCollector
SSHInfos ssh.SSHInfosCollector
ComplianceReport compliance.ComplianceCollector
VulnerabilityReport vulnerability.VulnerabilityCollector
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) ManageDelta ¶
func (b *Builder) ManageDelta(fullInventory *schema.HostInventory) (*schema.InventoryRequest, *schema.HostInventory)
type HasResetUpdatedAt ¶
type HasResetUpdatedAt interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.