You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngs/examples/cluster/master/init.go

24 lines
417 B
Go

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)
}