Documentation
¶
Index ¶
- Variables
- func Cleanup(diskDirectory, msUUID string) error
- func HostDir(diskDirectory, msUUID string) string
- func LookupFromStore(db *store.DB) models.ModelStatusLookup
- func Release(diskDirectory string, db *store.DB, msUUID string) error
- func WrapDecision(res *PrepareResult) error
- type PrepareResult
- type ProjectItem
- type ProjectResult
Constants ¶
This section is empty.
Variables ¶
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 LookupFromStore ¶
func LookupFromStore(db *store.DB) models.ModelStatusLookup
LookupFromStore returns model status from local_models.
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 ¶
ProjectItem is one Ready model to materialize under {name}/.
type ProjectResult ¶
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.