forked from p93542168/wheat-cache
feat(worker): feat get the io
This commit is contained in:
parent
b168eecbb4
commit
929f931cd6
|
@ -137,6 +137,10 @@ func (d *Driver) Put(event *Event) {
|
||||||
d.queue <- event
|
d.queue <- event
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *Driver) GetLength() int {
|
||||||
|
return len(d.queue)
|
||||||
|
}
|
||||||
|
|
||||||
// NewDriver 新建 Driver
|
// NewDriver 新建 Driver
|
||||||
func NewDriver(maxSize int) DriverInterface {
|
func NewDriver(maxSize int) DriverInterface {
|
||||||
return &Driver{
|
return &Driver{
|
||||||
|
|
Loading…
Reference in New Issue