MCPcopy Index your code
hub / github.com/coder/coder / fakeSubAgentClient

Struct fakeSubAgentClient

agent/agentcontainers/api_test.go:381–392  ·  view source on GitHub ↗

fakeSubAgentClient implements SubAgentClient for testing purposes.

Source from the content-addressed store, hash-verified

379
380// fakeSubAgentClient implements SubAgentClient for testing purposes.
381type fakeSubAgentClient struct {
382 logger slog.Logger
383
384 mu sync.Mutex // Protects following.
385 agents map[uuid.UUID]agentcontainers.SubAgent
386
387 listErrC chan error // If set, send to return error, close to return nil.
388 created []agentcontainers.SubAgent
389 createErrC chan error // If set, send to return error, close to return nil.
390 deleted []uuid.UUID
391 deleteErrC chan error // If set, send to return error, close to return nil.
392}
393
394func (m *fakeSubAgentClient) List(ctx context.Context) ([]agentcontainers.SubAgent, error) {
395 if m.listErrC != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected