expectedmachine

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManageExpectedMachine

type ManageExpectedMachine struct {
	// contains filtered or unexported fields
}

ManageExpectedMachine is an activity wrapper for managing ExpectedMachine lifecycle that allows injecting DB access

func NewManageExpectedMachine

func NewManageExpectedMachine(dbSession *cdb.Session, siteClientPool *sc.ClientPool) ManageExpectedMachine

NewManageExpectedMachine returns a new ManageExpectedMachine activity

func (ManageExpectedMachine) UpdateExpectedMachinesInDB

func (mei ManageExpectedMachine) UpdateExpectedMachinesInDB(ctx context.Context, siteID uuid.UUID, expectedMachineInventory *cwssaws.ExpectedMachineInventory) error

UpdateExpectedMachinesInDB is a Temporal activity that takes a collection of ExpectedMachine data pushed by Site Agent and updates the DB Expected Machine records have two unique values (MAC and UUID). We ignore the MAC value and only rely on the UUID for uniqueness. NICo is the source of truth: out of the race-condition window we make the DB match NICo exactly. The reconciliation logic is as follows: - UUID existing in NICo but not in DB: create record in DB - UUID existing in both NICo and DB with differences: update record in DB - UUID existing in DB but not in NICo: delete record in DB

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL