type exampleMgr struct {}
func (t *exampleMgr) Topic() Topic {
return "example"
}
func (t *exampleMgr) HandleEvent(e TopicEvent, out chan<- TopicEvent) {
out <- e // echo the event
}
func main() {
hub := NewHub()
hub.AddManager(&exampleMgr{})
hub.Listen("127.0.0.1:8080")
}
-
Notifications
You must be signed in to change notification settings - Fork 0
tiepp/topic_sockets
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published