Documentation
¶
Index ¶
- type Launcher
- func (l *Launcher) AddonAssociationHandler() controller.HandlerFunc
- func (l *Launcher) CreatePoolForVersion(ctx context.Context, ver *core_v1alpha.AppVersion, service string) (entity.Id, error)
- func (l *Launcher) Init(ctx context.Context) error
- func (l *Launcher) Reconcile(ctx context.Context, app *core_v1alpha.App, meta *entity.Meta) error
- type PoolWithEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Launcher ¶
type Launcher struct {
Log *slog.Logger
EAC *entityserver_v1alpha.EntityAccessClient
// DataPath is the root data directory for local storage checks.
DataPath string
// PoolReadyTimeout is how long to wait for new pools to have ready instances
// before proceeding with old pool cleanup. Defaults to 60s.
PoolReadyTimeout time.Duration
// contains filtered or unexported fields
}
Launcher watches App entities and proactively creates SandboxPools when ActiveVersion changes. This enables immediate startup for fixed-mode services and pool reuse across deployments.
func NewLauncher ¶
func NewLauncher(log *slog.Logger, eac *entityserver_v1alpha.EntityAccessClient) *Launcher
func (*Launcher) AddonAssociationHandler ¶ added in v0.4.0
func (l *Launcher) AddonAssociationHandler() controller.HandlerFunc
AddonAssociationHandler returns a controller.HandlerFunc that watches AddonAssociation changes and re-triggers app reconciliation so the launcher can re-evaluate addon readiness.
func (*Launcher) CreatePoolForVersion ¶ added in v0.8.0
func (l *Launcher) CreatePoolForVersion(ctx context.Context, ver *core_v1alpha.AppVersion, service string) (entity.Id, error)
CreatePoolForVersion creates a sandbox pool for the given version and service on demand. This implements activator.PoolCreator for ephemeral versions that bypass the normal DeploymentLauncher reconciliation loop.
type PoolWithEntity ¶
type PoolWithEntity struct {
Pool *compute_v1alpha.SandboxPool
Entity entity.Entity
}
PoolWithEntity wraps a SandboxPool with its entity, allowing updates without re-fetching