示例#1
0
//Bind all service endpoints to their topics.
func bindListeners(g *G.Gilmour) {
	//Third argument is for Opts, which in this case is nil
	g.ReplyTo("weather.fetch", fetchReply(g), nil)
	g.ReplyTo("weather.group", groupReply(g), nil)
	g.ReplyTo("weather.min", minReply(g), nil)
	g.ReplyTo("weather.max", maxReply(g), nil)
}
示例#2
0
func bindListeners(e *G.Gilmour) {
	o := G.NewHandlerOpts().SetGroup(fibTopic)
	e.ReplyTo(fibTopic, fibRequest, o)
}
示例#3
0
func bindListeners(g *G.Gilmour) {
	opts := G.NewHandlerOpts().SetGroup("exclusive")
	g.ReplyTo("echo", echoReply, opts)
}
示例#4
0
//Bind all service endpoints to their topics.
func bindListeners(g *G.Gilmour) {
	//Third argument is for Opts, which in this case is nil
	g.ReplyTo("example.fetch", fetchReply(g), nil)
	g.ReplyTo("example.words", wordsReply(g), nil)
	g.ReplyTo("example.count", countReply(g), nil)
	g.ReplyTo("example.stopfilter", stopWordsReply(g, &stopWords), nil)
	g.ReplyTo("example.popular3", popularReply(g, 3), nil)
	g.ReplyTo("example.popular4", popularReply(g, 4), nil)
	g.ReplyTo("example.popular5", popularReply(g, 5), nil)
	g.ReplyTo("example.find", findReply(g), nil)
	g.ReplyTo("example.save", saveReply(g), nil)
}