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

Struct failOnceMessagingClient

core/services/nodes/unloader_test.go:226–231  ·  view source on GitHub ↗

failOnceMessagingClient wraps fakeMessagingClient but fails the Publish call at index failOn (0-based) and succeeds all others.

Source from the content-addressed store, hash-verified

224// failOnceMessagingClient wraps fakeMessagingClient but fails the Publish call
225// at index failOn (0-based) and succeeds all others.
226type failOnceMessagingClient struct {
227 inner *fakeMessagingClient
228 failOn int
229 callIdx int
230 mu sync.Mutex
231}
232
233func (f *failOnceMessagingClient) Publish(subject string, data any) error {
234 f.mu.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected