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

Method SetMessagingClient

core/services/galleryop/operation.go:219–223  ·  view source on GitHub ↗

SetMessagingClient enables cross-replica OpCache sync. Once set, Set/ SetBackend/DeleteUUID publish OpCacheEvent messages that peer OpCaches merge into their local maps. Call Start after this to subscribe.

(nc messaging.MessagingClient)

Source from the content-addressed store, hash-verified

217// SetBackend/DeleteUUID publish OpCacheEvent messages that peer OpCaches
218// merge into their local maps. Call Start after this to subscribe.
219func (m *OpCache) SetMessagingClient(nc messaging.MessagingClient) {
220 m.mu.Lock()
221 defer m.mu.Unlock()
222 m.nats = nc
223}
224
225// SetGalleryStore enables PostgreSQL-backed OpCache persistence.
226// Set/SetBackend upsert the cache_key + is_backend_op columns; Start

Callers 2

APIFunction · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected