Documentation
¶
Index ¶
- Constants
- type ManageSite
- func (mst ManageSite) CheckOTPExpirationAndRenewForAllSites(ctx context.Context) error
- func (mst ManageSite) DeleteOrphanedSiteTemporalNamespaces(ctx context.Context) error
- func (mst ManageSite) DeleteSiteComponentsFromDB(ctx context.Context, siteID uuid.UUID, infrastructureProviderID uuid.UUID, ...) error
- func (mst ManageSite) GetAllSiteIDs(ctx context.Context) ([]uuid.UUID, error)
- func (mst ManageSite) MonitorInventoryReceiptForAllSites(ctx context.Context) error
- func (mst ManageSite) UpdateAgentCertExpiry(ctx context.Context, siteID uuid.UUID, certExpiry time.Time) error
Constants ¶
const ( // SiteInventoryReceiptThreshold is the period since last Site inventory receipt before error is logged SiteInventoryReceiptThreshold = 15 * 60 * time.Second // 10 minutes )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManageSite ¶
type ManageSite struct {
// contains filtered or unexported fields
}
ManageSite is an activity wrapper for managing Site lifecycle that allows injecting DB access
func NewManageSite ¶
func NewManageSite(dbSession *cdb.Session, siteClientPool *sc.ClientPool, tc client.Client, cfg *config.Config) ManageSite
NewManageSite returns a new ManageSite activity
func (ManageSite) CheckOTPExpirationAndRenewForAllSites ¶
func (mst ManageSite) CheckOTPExpirationAndRenewForAllSites(ctx context.Context) error
CheckOTPExpirationAndRenewForAllSites periodically checks all sites and rotates OTPs if necessary
func (ManageSite) DeleteOrphanedSiteTemporalNamespaces ¶
func (mst ManageSite) DeleteOrphanedSiteTemporalNamespaces(ctx context.Context) error
DeleteOrphanedSiteTemporalNamespaces finds and deletes orphaned Temporal namespaces for sites
func (ManageSite) DeleteSiteComponentsFromDB ¶
func (mst ManageSite) DeleteSiteComponentsFromDB(ctx context.Context, siteID uuid.UUID, infrastructureProviderID uuid.UUID, purgeMachines bool) error
DeleteSiteComponentsFromDB is a Temporal activity that initiates delete for instance type, machine, machine interface, machine capability, operating system site association, instance, subnet, vpc, vpc peering, vpc prefix, infiniband partition, nvlink logical partition, dpu extension service deployment, interface, nvlink interface, infiniband interface, ssh key group associations to site and instance, sku, expected machine, expected switch and expected power shelf.
func (ManageSite) GetAllSiteIDs ¶
GetAllSites returns all sites
func (ManageSite) MonitorInventoryReceiptForAllSites ¶
func (mst ManageSite) MonitorInventoryReceiptForAllSites(ctx context.Context) error
MonitorInventoryReceiptForAllSites loops through all Sites and checks when the last inventory was received
func (ManageSite) UpdateAgentCertExpiry ¶
func (mst ManageSite) UpdateAgentCertExpiry(ctx context.Context, siteID uuid.UUID, certExpiry time.Time) error
UpdateAgentCertExpiry updates the AgentCertExpiry field for a site