diff --git a/pkg/core/probe.go b/pkg/core/probe.go deleted file mode 100644 index 2a9f515a..00000000 --- a/pkg/core/probe.go +++ /dev/null @@ -1,31 +0,0 @@ -package core - -import "time" - -type Probe struct { - deadline time.Time - items map[any]struct{} -} - -func NewProbe(enable bool) *Probe { - if enable { - return &Probe{ - deadline: time.Now().Add(time.Second * 3), - items: map[any]struct{}{}, - } - } else { - return nil - } -} - -// Active return true if probe enabled and not finish -func (p *Probe) Active() bool { - return len(p.items) < 2 && time.Now().Before(p.deadline) -} - -// Append safe to run if Probe is nil -func (p *Probe) Append(v any) { - if p != nil { - p.items[v] = struct{}{} - } -}