(name string, s *Session)
| 49 | } |
| 50 | |
| 51 | func NewSessionModule(name string, s *Session) SessionModule { |
| 52 | m := SessionModule{ |
| 53 | Name: name, |
| 54 | Session: s, |
| 55 | Started: false, |
| 56 | StatusLock: &sync.RWMutex{}, |
| 57 | State: &sync.Map{}, |
| 58 | |
| 59 | requires: make([]string, 0), |
| 60 | handlers: make([]ModuleHandler, 0), |
| 61 | params: make(map[string]*ModuleParam), |
| 62 | tag: AsTag(name), |
| 63 | } |
| 64 | |
| 65 | return m |
| 66 | } |
| 67 | |
| 68 | func (m *SessionModule) Extra() map[string]interface{} { |
| 69 | extra := make(map[string]interface{}) |