site

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: 21 Imported by: 0

Documentation

Index

Constants

View Source
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) CheckHealthForSiteViaSiteAgent

func (mst ManageSite) CheckHealthForSiteViaSiteAgent(ctx context.Context, siteID uuid.UUID) error

CheckHealthForSiteViaSiteAgent checks the health of a Site via the Site Agent

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 initiate delete for instancetype/machine/operatingsystem/instance/subnet/vpc

func (ManageSite) GetAllSiteIDs

func (mst ManageSite) GetAllSiteIDs(ctx context.Context) ([]uuid.UUID, error)

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) OnCheckHealthForSiteViaSiteAgentError

func (mst ManageSite) OnCheckHealthForSiteViaSiteAgentError(ctx context.Context, siteID uuid.UUID, errMessage *string) error

OnCheckHealthForSiteViaSiteAgentError is a Temporal activity that is invoked when the activity CheckHealthForSiteViaSiteAgent has errored it sets the site status to error

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

Jump to

Keyboard shortcuts

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