knowledgecatalog

package
v1.1.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: EPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 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}/knowledge.

func LookupFromStore

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

LookupFromStore returns Knowledge status from local_knowledge.

func Release

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

Release clears knowledge 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 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

type ProjectItem struct {
	Name        string
	ContentPath string
	Generation  int64
}

ProjectItem is one Ready Knowledge 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.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.

Jump to

Keyboard shortcuts

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