package master import ( "git.noahlan.cn/northlan/ngs/component" "git.noahlan.cn/northlan/ngs/session" ) var ( // Services is All services in master server Services = &component.Components{} // topicService Topic service topicService = newTopicService() // ... other services ) func init() { Services.Register(topicService) } func OnSessionClosed(s *session.Session) { topicService.userDisconnected(s) }