instancetype

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

Types

type ManageInstanceType

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

ManageInstanceType is an activity wrapper for managing InstanceType lifecycle that allows injecting DB access

func NewManageInstanceType

func NewManageInstanceType(dbSession *cdb.Session, siteClientPool *sc.ClientPool) ManageInstanceType

NewManageInstanceType returns a new ManageInstanceType activity

func (ManageInstanceType) AddInstanceTypeToCloud

func (mv ManageInstanceType) AddInstanceTypeToCloud(ctx context.Context, site *cdbm.Site, instanceTypeDAO cdbm.InstanceTypeDAO, macCapDAO cdbm.MachineCapabilityDAO, controllerInstanceType *cwssaws.InstanceType) (*cdbm.InstanceType, error)

Handles the creation of a new InstanceType and associated capabilities based on InstanceType data returned from site.

func (ManageInstanceType) ProtobufCapabilitiesFromCloudCapabilities

func (mv ManageInstanceType) ProtobufCapabilitiesFromCloudCapabilities(mcs []cdbm.MachineCapability) ([]*cwssaws.InstanceTypeMachineCapabilityFilterAttributes, error)

func (ManageInstanceType) UpdateInstanceTypeInCloud

func (mv ManageInstanceType) UpdateInstanceTypeInCloud(ctx context.Context, site *cdbm.Site, instanceTypeDAO cdbm.InstanceTypeDAO, macCapDAO cdbm.MachineCapabilityDAO, instanceType *cdbm.InstanceType, controllerInstanceType *cwssaws.InstanceType) error

Handles metadata and capability updates for an existing InstanceType that is known to both site and cloud, using data returned from site. The *cdbm.InstanceType sent in will be modified in place if necessary. New capabilities will be added and capabilities no longer reported by site will be removed.

func (ManageInstanceType) UpdateInstanceTypesInDB

func (mv ManageInstanceType) UpdateInstanceTypesInDB(ctx context.Context, siteID uuid.UUID, instanceTypeInventory *cwssaws.InstanceTypeInventory) error

UpdateInstanceTypesInDB is a Temporal activity that takes a collection of InstanceType data pushed by Site Agent and updates the DB

Jump to

Keyboard shortcuts

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