slot

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package slot enforces modeld's single active local model invariant.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Service)

Option configures a slot Service.

func WithBackend

func WithBackend(backend string) Option

WithBackend records the backend mode for Status.

func WithOwner

func WithOwner(owner string) Option

WithOwner records the owner instance expected on direct calls. The gRPC layer also fences requests; this keeps direct tests and future in-process callers honest.

type Service

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

Service wraps a backend transport.Service and exposes it as one active model slot. The wrapped backend still owns native inference; this layer owns residency cardinality, generation fencing, and switch/unload safety.

func New

func New(backend transport.Service, opts ...Option) *Service

New returns a transport service that allows only one active resident model.

func (*Service) Describe

func (*Service) Embed

func (*Service) LoadModel

func (*Service) OpenSession

func (*Service) Status

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

func (*Service) UnloadModel

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

Jump to

Keyboard shortcuts

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