MCPcopy
hub / github.com/docker/docker-agent / stubRemoteClient

Struct stubRemoteClient

pkg/runtime/remote_contract_test.go:24–27  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

22// CreateSession) panic so an accidental wiring against them is loud
23// rather than silent.
24type stubRemoteClient struct {
25 cfg *latest.Config
26 getAgent func(context.Context, string) (*latest.Config, error)
27}
28
29func (s *stubRemoteClient) GetAgent(ctx context.Context, id string) (*latest.Config, error) {
30 if s.getAgent != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected