You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
353 B
20 lines
353 B
package service |
|
|
|
import ( |
|
"go-common/app/job/main/search/model" |
|
) |
|
|
|
// stat get stat |
|
func (s *Service) stat(appid string) (st *model.Stat) { |
|
s.mutex.RLock() |
|
st = s.stats[appid] |
|
s.mutex.RUnlock() |
|
return |
|
} |
|
|
|
// updateStat update stat |
|
func (s *Service) updateStat(appid string, st *model.Stat) { |
|
s.mutex.Lock() |
|
s.stats[appid] = st |
|
s.mutex.Unlock() |
|
}
|
|
|