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

Method BatchUpdateMetadata

agent/agenttest/client.go:382–394  ·  view source on GitHub ↗
(ctx context.Context, req *agentproto.BatchUpdateMetadataRequest)

Source from the content-addressed store, hash-verified

380}
381
382func (f *FakeAgentAPI) BatchUpdateMetadata(ctx context.Context, req *agentproto.BatchUpdateMetadataRequest) (*agentproto.BatchUpdateMetadataResponse, error) {
383 f.Lock()
384 defer f.Unlock()
385 if f.metadata == nil {
386 f.metadata = make(map[string]agentsdk.Metadata)
387 }
388 for _, md := range req.Metadata {
389 smd := agentsdk.MetadataFromProto(md)
390 f.metadata[md.Key] = smd
391 f.logger.Debug(ctx, "post metadata", slog.F("key", md.Key), slog.F("md", md))
392 }
393 return &agentproto.BatchUpdateMetadataResponse{}, nil
394}
395
396func (f *FakeAgentAPI) SetLogsChannel(ch chan<- *agentproto.BatchCreateLogsRequest) {
397 f.Lock()

Callers

nothing calls this directly

Calls 3

MetadataFromProtoFunction · 0.92
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected