Example #1
0
func NewHealthcheckController(nc *natsio.Nats) (hc *HealthcheckController) {
	hc = &HealthcheckController{}
	hc.natsCon = nc
	hc.routes = []*r.NatsRoute{
		r.NewNatsRoute("user.healthcheck", hc.Healthcheck),
	}
	return
}
Example #2
0
func (c *PostsController) GetRoutes() []*r.NatsRoute {
	return []*r.NatsRoute{
		r.NewNatsRoute("blog.posts.list", c.List),
	}
}
Example #3
0
func (c *UsersController) GetRoutes() []*r.NatsRoute {
	return []*r.NatsRoute{
		r.NewNatsRoute(mqmsgspec.AuthenticateUserSubject, c.Authenticate),
	}
}