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

Struct scriptedForwardClient

core/services/cloudproxy/backend_forward_test.go:19–23  ·  view source on GitHub ↗

scriptedForwardClient is a fake ForwardClient that returns a fixed sequence of replies. Each Recv pops the next reply or returns the terminal error. Used to drive forwardReader through scripted gRPC responses without standing up a real backend.

Source from the content-addressed store, hash-verified

17// terminal error. Used to drive forwardReader through scripted gRPC
18// responses without standing up a real backend.
19type scriptedForwardClient struct {
20 replies []*pb.ForwardReply
21 final error
22 idx int
23}
24
25func (s *scriptedForwardClient) Send(*pb.ForwardRequest) error { return nil }
26func (s *scriptedForwardClient) CloseSend() error { return nil }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected