workspacepg

package
v0.0.14-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 16 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 workspacepg stores independent workspace configurations and durable Environment filesystem ownership. Execution writes use Core's existing lease.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execution

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

func NewExecution

func NewExecution(lease *pgunit.Lease, cipher *credentialcrypto.Cipher, installation string) *Execution

func (*Execution) BeginDelete

func (e *Execution) BeginDelete(ctx context.Context, ref workspacefs.Reference) error

func (*Execution) Bind

func (e *Execution) Bind(ctx context.Context, tenant, environment, configuration string, capacityMiB uint32) (workspaces.Record, error)

func (*Execution) MarkDeleted

func (e *Execution) MarkDeleted(ctx context.Context, ref workspacefs.Reference) error

func (*Execution) MarkReady

func (e *Execution) MarkReady(ctx context.Context, ref workspacefs.Reference, attachment workspacefs.Attachment) error

func (*Execution) SelectConfiguration

func (e *Execution) SelectConfiguration(ctx context.Context, config workspacefs.ConfigurationRecord, tenantCapacityMiB uint32) error

SelectConfiguration atomically changes the selection and tenant capacity policy without changing any configuration's definition or any existing Environment's binding. The admission row lock fences concurrent Bind calls.

type Store

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

func New

func New(pool *pgunit.Pool, cipher *credentialcrypto.Cipher, installation string) *Store

func (*Store) ActiveConfiguration

func (s *Store) ActiveConfiguration(ctx context.Context) (workspacefs.ConfigurationRecord, error)

func (*Store) Configuration

func (s *Store) Configuration(ctx context.Context, id string) (workspacefs.ConfigurationRecord, error)

func (*Store) DeletionCandidates

func (s *Store) DeletionCandidates(ctx context.Context, after string) ([]workspaces.Record, error)

func (*Store) Get

func (s *Store) Get(ctx context.Context, tenant, environment string) (workspaces.Record, error)

func (*Store) Selection

func (s *Store) Selection(ctx context.Context) (workspaces.Selection, error)

Selection reads the public selection and policy in one statement; it never opens the credential.

Jump to

Keyboard shortcuts

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