modelcatalog

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: EPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWaiting means create must not run until named models are Ready.
	ErrWaiting = errors.New(models.CatalogWaitingMessage)
	// ErrFailed means a named model is missing or Failed.
	ErrFailed = errors.New("catalog model is missing or failed")
)

Functions

func Cleanup

func Cleanup(diskDirectory, msUUID string) error

Cleanup removes the per-microservice catalog projection.

func HostDir

func HostDir(diskDirectory, msUUID string) string

HostDir is {diskDirectory}/volumes/microservices/{msUUID}/models.

func LookupFromStore

func LookupFromStore(db *store.DB) models.ModelStatusLookup

LookupFromStore returns model status from local_models.

func Release

func Release(diskDirectory string, db *store.DB, msUUID string) error

Release clears workload model refs and the on-disk catalog tree.

func WrapDecision

func WrapDecision(res *PrepareResult) error

WrapDecision returns a sentinel error for wait/fail start-gate outcomes.

Types

type PrepareResult

type PrepareResult struct {
	Decision     models.CatalogGateDecision
	Message      string
	HostDir      string
	MountChanged bool
}

PrepareResult is the start-gate and projection outcome for one microservice.

func Prepare

func Prepare(diskDirectory string, db *store.DB, ms *models.Microservice, requiredSource string, forStart bool) (*PrepareResult, error)

Prepare evaluates the start gate, records workload model refs, and projects Ready content when create is allowed. forStart applies wait/fail; refresh keeps an existing tree when models are not Ready.

type ProjectItem

type ProjectItem struct {
	Name        string
	ContentPath string
	Generation  int64
}

ProjectItem is one Ready model to materialize under {name}/.

type ProjectResult

type ProjectResult struct {
	HostDir      string
	MountChanged bool
}

ProjectResult is the outcome of writing a per-microservice catalog tree.

func Project

func Project(diskDirectory, msUUID string, catalog *models.ModelCatalog, items []ProjectItem) (*ProjectResult, error)

Project writes {HostDir}/{name}/ from Ready content/ via hardlinks (copy if hardlinks are rejected) and an atomic ..data swing. Absolute host content/ paths are never symlinked into the mount.

Jump to

Keyboard shortcuts

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