supervisor

package
v1.0.0-rc.13 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 11 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 supervisor owns shared modeld workers and their client sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

Pool manages owner-controlled children and retains admission until native work ends.

type Service

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

Service routes requests through the shared owner's worker pool.

func New

func New(pool Pool, modelsDir, epoch string, inventory func(context.Context) (transport.Inventory, error)) (*Service, error)

New constructs a shared owner with an explicit child pool and model store.

func (*Service) Admission

func (s *Service) Admission(ctx context.Context) (admission.Snapshot, error)

Admission reads the scheduler owned by this daemon epoch.

func (*Service) ClaimDevices

ClaimDevices delegates allocation ownership to the same pool that controls worker termination.

func (*Service) Close

func (s *Service) Close() error

Close stops and joins all owned children before their allocations can be reclaimed.

func (*Service) CloseClient

func (s *Service) CloseClient(ctx context.Context, clientID string) error

CloseClient releases unused completion protection without changing worker allocations or another client's sessions.

func (*Service) ConfigureAdmission

func (s *Service) ConfigureAdmission(ctx context.Context, policy admission.Config) error

ConfigureAdmission changes shared queue policy through the existing scheduler.

func (*Service) ConfigureCeilings

func (s *Service) ConfigureCeilings(ctx context.Context, ceilings map[string]float64) error

ConfigureCeilings replaces the device ceilings through the existing scheduler.

func (*Service) Describe

Describe checks the requested model and allocation in its compatible worker.

func (*Service) DiskStats

func (s *Service) DiskStats(ctx context.Context) (transport.NodeDiskStats, error)

DiskStats reports the shared model store's filesystem capacity.

func (*Service) Embed

Embed holds admission until native embedding has completed or its worker has stopped.

func (*Service) InspectWorker

InspectWorker resolves a child locally and returns its observations through the owner connection.

func (*Service) Inventory

func (s *Service) Inventory(ctx context.Context) (transport.Inventory, error)

Inventory reports backend availability and devices without allocating a native model.

func (*Service) ListModels

func (s *Service) ListModels(ctx context.Context) ([]transport.NodeModel, error)

ListModels lists installed artifacts without starting a worker or loading a model.

func (*Service) LoadModel

LoadModel requires session-scoped managed execution so another client's allocation cannot be replaced.

func (*Service) OpenSession

OpenSession retains worker admission until the client's native session has closed.

func (*Service) ReceiveModel

func (s *Service) ReceiveModel(ctx context.Context, manifest transport.PushManifest, reader io.Reader) (transport.PushResult, error)

ReceiveModel installs a verified artifact when no worker retains its previous version.

func (*Service) RemoveModel

func (s *Service) RemoveModel(ctx context.Context, name string) error

RemoveModel rejects removal while a shared worker retains the artifact.

func (*Service) RenderMedia

func (s *Service) RenderMedia(ctx context.Context, request transport.MediaRequest) (transport.MediaResult, error)

func (*Service) ResumeAtBoundary

func (s *Service) ResumeAtBoundary(ctx context.Context, permit admission.Permit) error

ResumeAtBoundary waits for compute admission while retaining the worker's session permit.

func (*Service) ShutdownOwner

func (s *Service) ShutdownOwner(ctx context.Context, request transport.OwnerShutdownRequest) error

ShutdownOwner refuses active work before stopping and joining idle children.

func (*Service) ShutdownReady

func (s *Service) ShutdownReady() <-chan struct{}

ShutdownReady closes after idle children terminate and the transport may drain.

func (*Service) Status

func (s *Service) Status(ctx context.Context) (transport.DaemonStatus, error)

Status reports the owner epoch and its workers without loading a model.

func (*Service) UnloadModel

func (s *Service) UnloadModel(ctx context.Context, req transport.UnloadModelRequest) error

UnloadModel releases a selected idle worker while preserving all active client sessions.

func (*Service) WaitYield

func (s *Service) WaitYield(ctx context.Context, permit admission.Permit) error

WaitYield requests a cooperative boundary only within this owner's worker generation.

Jump to

Keyboard shortcuts

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