Documentation
¶
Index ¶
- Variables
- func Cleanup(diskDirectory, msUUID string) error
- func HostDir(diskDirectory, msUUID string) string
- func LookupFromStore(db *store.DB) models.KnowledgeStatusLookup
- 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 Knowledge is Ready. ErrWaiting = modelcatalog.ErrWaiting // ErrFailed means a named Knowledge is missing or Failed. ErrFailed = modelcatalog.ErrFailed )
Functions ¶
func LookupFromStore ¶
func LookupFromStore(db *store.DB) models.KnowledgeStatusLookup
LookupFromStore returns Knowledge status from local_knowledge.
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 knowledge refs, and projects Ready content when create is allowed. forStart applies wait/fail; refresh keeps an existing tree when Knowledge is not Ready.
type ProjectItem ¶
ProjectItem is one Ready Knowledge 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.KnowledgeCatalog, 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.