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.
| 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. |
| 14 | type DistributedModelStore struct { |
| 15 | local model.ModelStore |
| 16 | registry ModelLookup |
| 17 | } |
| 18 | |
| 19 | func NewDistributedModelStore(local model.ModelStore, registry ModelLookup) *DistributedModelStore { |
| 20 | return &DistributedModelStore{local: local, registry: registry} |
nothing calls this directly
no outgoing calls
no test coverage detected