expectedpowershelf

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManageExpectedPowerShelf

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

ManageExpectedPowerShelf is an activity wrapper for managing ExpectedPowerShelf lifecycle that allows injecting DB access

func NewManageExpectedPowerShelf

func NewManageExpectedPowerShelf(dbSession *cdb.Session, siteClientPool *sc.ClientPool) ManageExpectedPowerShelf

NewManageExpectedPowerShelf returns a new ManageExpectedPowerShelf activity

func (ManageExpectedPowerShelf) UpdateExpectedPowerShelvesInDB

func (mei ManageExpectedPowerShelf) UpdateExpectedPowerShelvesInDB(ctx context.Context, siteID uuid.UUID, expectedPowerShelfInventory *cwssaws.ExpectedPowerShelfInventory) error

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

Jump to

Keyboard shortcuts

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