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

Struct fakeGRPCBackend

core/services/nodes/inflight_test.go:51–56  ·  view source on GitHub ↗

fakeGRPCBackend implements grpc.Backend with stub methods. Only the methods we test (Predict, PredictStream) have real behavior; the rest panic if called unexpectedly.

Source from the content-addressed store, hash-verified

49// Only the methods we test (Predict, PredictStream) have real behavior;
50// the rest panic if called unexpectedly.
51type fakeGRPCBackend struct {
52 predictReply *pb.Reply
53 predictErr error
54 streamReplies []*pb.Reply
55 streamErr error
56}
57
58func (f *fakeGRPCBackend) IsBusy() bool { return false }
59func (f *fakeGRPCBackend) HealthCheck(_ context.Context) (bool, error) { return true, nil }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected