package model import ( "rocommon" "roserver/baseserver" "sync" ) var ( updateList []interface{} httpParamMutex sync.RWMutex HttpNodeParam *baseserver.ServiceParam authCheckMag *AuthCheckMag ) type AuthUpdate struct { rocommon.UpdateModule //eventqueue.go } func (this *AuthUpdate) Init() { authCheckMag = NewAuthCheckMag() updateList = append(updateList, authCheckMag) } func (this *AuthUpdate) Update(ms uint64) { //对管理器进行更新操作 for _, data := range updateList { data.(rocommon.UpdateLogic).Update(ms) } } func GetAuthCheckMag() *AuthCheckMag { return authCheckMag } func GetHttpNodeParam() baseserver.ServiceParam { httpParamMutex.RLock() defer httpParamMutex.RUnlock() return *HttpNodeParam } func SetHttpNodeParam(param *baseserver.ServiceParam) { httpParamMutex.Lock() defer httpParamMutex.Unlock() HttpNodeParam = param }