MCPcopy
hub / github.com/mudler/LocalAI / DistributedModelStore

Struct DistributedModelStore

core/services/nodes/distributed_store.go:14–17  ·  view source on GitHub ↗

DistributedModelStore wraps a local in-memory store with PostgreSQL-backed lookup via NodeRegistry. Models that aren't in the local cache are looked up in the database — this makes shutdown, listing, and watchdog work even when the frontend process restarted or a different instance loaded the model.

Source from the content-addressed store, hash-verified

12// in the database — this makes shutdown, listing, and watchdog work even when
13// the frontend process restarted or a different instance loaded the model.
14type DistributedModelStore struct {
15 local model.ModelStore
16 registry ModelLookup
17}
18
19func NewDistributedModelStore(local model.ModelStore, registry ModelLookup) *DistributedModelStore {
20 return &DistributedModelStore{local: local, registry: registry}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected