Skip to content

tiepp/topic_sockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Topic Sockets

Usage

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages