stubRemoteClient is a RemoteClient that returns enough state for the non-streaming Runtime contract to exercise RemoteRuntime end-to-end. Methods used only by streaming paths (RunAgent, RunAgentWithAgentName, CreateSession) panic so an accidental wiring against them is loud rather than silent.
| 22 | // CreateSession) panic so an accidental wiring against them is loud |
| 23 | // rather than silent. |
| 24 | type stubRemoteClient struct { |
| 25 | cfg *latest.Config |
| 26 | getAgent func(context.Context, string) (*latest.Config, error) |
| 27 | } |
| 28 | |
| 29 | func (s *stubRemoteClient) GetAgent(ctx context.Context, id string) (*latest.Config, error) { |
| 30 | if s.getAgent != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected