warm

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID               string
	TemplateName     string
	SessionID        string
	WorkspacePath    string
	Frequency        int64
	ColdStartP95MS   int64
	SizeScore        float64
	Priority         float64
	HitCount         int64
	LastHitAt        string
	ColdStartSavedMS int64
	MemoryMB         int64
	DiskBytes        int64
	EvictionReason   string
	Status           string
	CreatedAt        string
	UpdatedAt        string
}

type Service

type Service struct {
	DB    *sql.DB
	Paths store.Paths
}

func (Service) Create

func (s Service) Create(templateName string, size int) ([]Item, error)

func (Service) CreateFromSeed

func (s Service) CreateFromSeed(templateName string, size int, seedWorkspace string) ([]Item, error)

func (Service) EvictIfOverLimit

func (s Service) EvictIfOverLimit(templateName string, maxItems int) (Item, bool, error)

func (Service) Hit

func (s Service) Hit(templateName, sessionID string, coldStartSavedMS, memoryMB int64) (Item, bool, error)

func (Service) Status

func (s Service) Status() ([]Item, error)

Jump to

Keyboard shortcuts

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