删除文件 pkg/lru/cleanwork.go

This commit is contained in:
K-on 2021-10-11 11:09:59 +00:00 committed by Gitee
parent aebab3b3d7
commit 5459c7710c
1 changed files with 0 additions and 28 deletions

View File

@ -1,28 +0,0 @@
package lru
import (
"context"
"gitee.com/timedb/wheatCache/pkg/event"
"gitee.com/timedb/wheatCache/pkg/proto"
"time"
)
type cleanWorkSingle struct {
timeOut time.Duration
lru *SingleCache
}
func (clean *cleanWorkSingle) cleanWork() (*proto.ReduceResponse, error) {
cxt := context.Background()
lruCleanEvent := event.NewEvent(CleanEventName)
lruCleanEvent.InitWaitEvent()
lruCleanEvent.SetValue(WorkFuncEventKey, clean.lru.DelToClearSize())
clean.lru.lruCleanProduce.Call(cxt, lruCleanEvent)
resp, err := lruCleanEvent.StartWaitEvent(clean.timeOut)
if err != nil{
return nil, err
}
return &proto.ReduceResponse{
Result: resp.(string),
}, nil
}