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

Struct scriptedMessagingClient

core/services/nodes/managers_distributed_test.go:26–35  ·  view source on GitHub ↗

scriptedMessagingClient maps a NATS subject to a canned reply payload (or error). Used so each fan-out request can simulate a different worker outcome without spinning up real NATS.

Source from the content-addressed store, hash-verified

24// (or error). Used so each fan-out request can simulate a different worker
25// outcome without spinning up real NATS.
26type scriptedMessagingClient struct {
27 mu sync.Mutex
28 replies map[string][]byte
29 errs map[string]error
30 calls []requestCall
31 matchedReplies map[string][]matchedReply
32 publishes []progressPublishCall
33 scheduledProgressPublishes []scheduledProgressPublish
34 subscribes []string
35}
36
37// progressPublishCall records a single Publish invocation. The progress
38// publisher tests assert on the sequence of BackendInstallProgressEvent

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected