feat(middle): add middle worker function

This commit is contained in:
Sodesnei 2021-10-09 17:50:54 +08:00
parent 79bef5ba72
commit dca19238da
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ func (m *MiddleWare) middleWorker() {
for _, singles := range m.plugins {
for _, single := range singles {
single.Exec(workEvent)
}
}

View File

@ -8,6 +8,7 @@ import (
func TestWorker(t *testing.T) {
event := event.NewEvent("LogContext")
m := NewMiddleWare()
m.eventDriver.Put(event)