示例#1
0
文件: ping.go 项目: src-d/lazlo
func pingRun(b *lazlo.Broker) {
	cb := b.MessageCallback(`(?i)(ping|syn)`, true)
	for {
		pm := <-cb.Chan
		pm.Event.Reply(randReply())
	}
}
示例#2
0
文件: help.go 项目: src-d/lazlo
func helpRun(b *lazlo.Broker) {
	cb := b.MessageCallback(`(?i)help`, true)
	for {
		pm := <-cb.Chan
		go getHelp(b, &pm)
	}
}