sandboxpool

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxPoolSize is the maximum number of sandboxes allowed in a pool
	// This prevents runaway growth even if there are bugs in scaling logic
	MaxPoolSize = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager reconciles SandboxPool entities by ensuring the actual number of sandbox instances matches the desired number specified in the pool. Implements controller.ReconcileControllerI[*compute_v1alpha.SandboxPool]

func NewManager

func NewManager(
	log *slog.Logger,
	eac *entityserver_v1alpha.EntityAccessClient,
) *Manager

NewManager creates a new SandboxPoolManager

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, poolID entity.Id) error

Delete handles pool deletion by stopping all sandboxes in the pool. This prevents orphaned sandboxes when a pool is deleted. Implements controller.DeletingReconcileController

func (*Manager) Init

func (m *Manager) Init(ctx context.Context) error

Init initializes the controller (required by ReconcileControllerI)

func (*Manager) Reconcile

func (m *Manager) Reconcile(ctx context.Context, pool *compute_v1alpha.SandboxPool, meta *entity.Meta) error

Reconcile brings the actual sandbox state in line with the desired state specified in the pool entity. This method is called by the controller framework for both Add and Update events.

Jump to

Keyboard shortcuts

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