instances

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// InstanceLabelKey is the key used to label AWS instances
	InstanceLabelKey = "holodeck-instance-id"
	// InstanceProvisionedLabelKey is the key used to label AWS instances with their provisioning status
	InstanceProvisionedLabelKey = "holodeck-instance-provisioned"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo added in v0.3.0

type ClusterInfo struct {
	Region               string
	ControlPlaneCount    int32
	WorkerCount          int32
	TotalNodes           int32
	ReadyNodes           int32
	ControlPlaneEndpoint string
	HAEnabled            bool
}

ClusterInfo holds summary information about a multinode cluster

type Instance

type Instance struct {
	ID          string
	Name        string
	Provider    v1alpha1.Provider
	CreatedAt   time.Time
	Status      string
	CacheFile   string
	Provisioned bool

	// Cluster information (nil for single-node)
	IsCluster   bool
	ClusterInfo *ClusterInfo
}

Instance represents a running Holodeck instance

type Manager

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

Manager handles instance operations

func NewManager

func NewManager(log *logger.FunLogger, cachePath string) *Manager

NewManager creates a new instance manager

func (*Manager) DeleteInstance

func (m *Manager) DeleteInstance(instanceID string) error

DeleteInstance removes an instance

func (*Manager) GenerateInstanceID

func (m *Manager) GenerateInstanceID() (string, error)

GenerateInstanceID creates a unique ID for a new instance

func (*Manager) GetInstance

func (m *Manager) GetInstance(instanceID string) (*Instance, error)

GetInstance returns details for a specific instance

func (*Manager) GetInstanceByFilename

func (m *Manager) GetInstanceByFilename(filename string) (*Instance, error)

GetInstanceByFilename returns details for a specific instance by its filename

func (*Manager) GetInstanceCacheFile

func (m *Manager) GetInstanceCacheFile(instanceID string) (string, error)

GetInstanceCacheFile returns the cache file path for an instance. It validates that the instance ID matches expected formats to prevent path traversal.

func (*Manager) ListInstances

func (m *Manager) ListInstances() ([]Instance, error)

ListInstances returns all running instances

Jump to

Keyboard shortcuts

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