placementpg

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package placementpg loads the placement facts of the sandbox deployment and applies the placements package placement decides, on the caller's transaction-bound queries. It has no Store, pool or transaction runner: deploymentpg, sessionpg and Session creation call it inside their own transactions, which supply the authority.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeBlocksAdmission

func ComputeBlocksAdmission(ctx context.Context, q *sqlc.Queries, session pgtype.UUID) (bool, error)

ComputeBlocksAdmission reports whether the Session's managed compute is in its suspension cycle: quiescing, suspending, suspended, restoring or waking.

func LoadNodes

func LoadNodes(ctx context.Context, q *sqlc.Queries) ([]placement.Node, error)

LoadNodes returns the installation's nodes with their presence and usage.

func LoadReserved

func LoadReserved(ctx context.Context, q *sqlc.Queries, environment pgtype.UUID) (placement.Reserved, error)

LoadReserved returns the node placement reserved for the Environment.

func LoadRestore

func LoadRestore(ctx context.Context, q *sqlc.Queries, nodeID pgtype.UUID, generation uint64) (placement.Restore, error)

LoadRestore locks the deployment and returns what restoring suspended compute of the generation on the node reads.

func LockDeployment

func LockDeployment(ctx context.Context, q *sqlc.Queries) (placement.Deployment, error)

LockDeployment locks the deployment and returns it as placement reads it. Admission, placement, restore and node removal serialize on this lock.

func ReleasePlacement

func ReleasePlacement(ctx context.Context, q *sqlc.Queries, environment pgtype.UUID) error

ReleasePlacement releases the node placement of the Environment, if any.

func ReservePlacement

func ReservePlacement(ctx context.Context, q *sqlc.Queries, session pgtype.UUID, p placement.Placement) error

ReservePlacement reserves the placement for the Session's Environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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