From 929f931cd64f9a436633aab1c17dae76173f59d1 Mon Sep 17 00:00:00 2001 From: HuangJiaLuo <1820799930@qq.com> Date: Sat, 9 Oct 2021 10:35:03 +0800 Subject: [PATCH] feat(worker): feat get the io --- pkg/event/driver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/event/driver.go b/pkg/event/driver.go index b5c5636..764ff22 100644 --- a/pkg/event/driver.go +++ b/pkg/event/driver.go @@ -137,6 +137,10 @@ func (d *Driver) Put(event *Event) { d.queue <- event } +func (d *Driver) GetLength() int { + return len(d.queue) +} + // NewDriver 新建 Driver func NewDriver(maxSize int) DriverInterface { return &Driver{