Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPoolTimeout = fmt.Errorf("timeout waiting for sandbox from pool")
View Source
var ErrSandboxDiedEarly = fmt.Errorf("sandbox died while booting")
Functions ¶
This section is empty.
Types ¶
type AppActivator ¶
type AppActivator interface {
AcquireLease(ctx context.Context, ver *core_v1alpha.AppVersion, service string) (*Lease, error)
ReleaseLease(ctx context.Context, lease *Lease) error
RenewLease(ctx context.Context, lease *Lease) (*Lease, error)
// Invalidations returns a channel that receives notifications when
// sandboxes become non-RUNNING. Consumers should invalidate any cached
// leases referencing the invalidated sandbox.
Invalidations() <-chan SandboxInvalidation
// SetPoolCreator registers a callback for on-demand pool creation.
// This is used by ephemeral deployments where the DeploymentLauncher
// doesn't pre-create pools.
SetPoolCreator(pc PoolCreator)
}
func NewLocalActivator ¶
func NewLocalActivator(ctx context.Context, log *slog.Logger, eac *entityserver_v1alpha.EntityAccessClient) AppActivator
type Lease ¶
func NewTestLease ¶ added in v0.6.0
func NewTestLease(sb *compute_v1alpha.Sandbox, size int, url string) *Lease
NewTestLease creates a Lease with the given sandbox, size, and URL. This is only intended for use in tests outside the activator package.
func (*Lease) Sandbox ¶
func (l *Lease) Sandbox() *compute_v1alpha.Sandbox
func (*Lease) SandboxEntity ¶
func (*Lease) Version ¶
func (l *Lease) Version() *core_v1alpha.AppVersion
type PoolCreator ¶ added in v0.8.0
type PoolCreator interface {
CreatePoolForVersion(ctx context.Context, ver *core_v1alpha.AppVersion, service string) (entity.Id, error)
}
PoolCreator creates sandbox pools on demand for versions that don't have one pre-created by the DeploymentLauncher (e.g., ephemeral versions).
type SandboxInvalidation ¶ added in v0.6.0
SandboxInvalidation is sent when a sandbox transitions away from RUNNING, signaling that any cached leases pointing to it should be invalidated.
Click to show internal directories.
Click to hide internal directories.