(ctx context.Context, req *agentproto.BatchUpdateMetadataRequest)
| 380 | } |
| 381 | |
| 382 | func (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 | |
| 396 | func (f *FakeAgentAPI) SetLogsChannel(ch chan<- *agentproto.BatchCreateLogsRequest) { |
| 397 | f.Lock() |
nothing calls this directly
no test coverage detected