MCPcopy
hub / github.com/seaweedfs/seaweedfs / Detect

Method Detect

weed/plugin/worker/worker_test.go:451–466  ·  view source on GitHub ↗
(ctx context.Context, _ *plugin_pb.RunDetectionRequest, sender DetectionSender)

Source from the content-addressed store, hash-verified

449}
450
451func (h *detectionQueueTestHandler) Detect(ctx context.Context, _ *plugin_pb.RunDetectionRequest, sender DetectionSender) error {
452 select {
453 case h.detectEntered <- struct{}{}:
454 default:
455 }
456
457 select {
458 case <-ctx.Done():
459 return ctx.Err()
460 case <-h.detectContinue:
461 }
462
463 return sender.SendComplete(&plugin_pb.DetectionComplete{
464 Success: true,
465 })
466}
467
468func (h *detectionQueueTestHandler) Execute(context.Context, *plugin_pb.ExecuteJobRequest, ExecutionSender) error {
469 return nil

Callers

nothing calls this directly

Calls 3

ErrMethod · 0.65
SendCompleteMethod · 0.65
DoneMethod · 0.45

Tested by

no test coverage detected