BroadcastModelsChanged notifies peer replicas that a model config was created, edited, or removed out-of-band of the gallery install/delete channel (e.g. the admin /models/edit, /models/import and models/toggle-state endpoints, which write the YAML and reload only the local in-memory loader). Peers
(element, op string)
| 213 | // disk) or "delete" for a removal (the element must be pruned from memory, |
| 214 | // which a reload-from-path cannot do because the loader is additive). |
| 215 | func (g *GalleryService) BroadcastModelsChanged(element, op string) { |
| 216 | g.publishCacheInvalidate(messaging.SubjectCacheInvalidateModels, messaging.CacheInvalidateEvent{ |
| 217 | Element: element, |
| 218 | Op: op, |
| 219 | }) |
| 220 | } |
| 221 | |
| 222 | // mergeStatus is the broadcast-side merge: it updates the in-memory map from |
| 223 | // a peer's GalleryProgressEvent without re-publishing to NATS or re-writing |
no test coverage detected