Esempio n. 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
}
Esempio n. 2
0
func (c *PostsController) GetRoutes() []*r.NatsRoute {
	return []*r.NatsRoute{
		r.NewNatsRoute("blog.posts.list", c.List),
	}
}
Esempio n. 3
0
func (c *UsersController) GetRoutes() []*r.NatsRoute {
	return []*r.NatsRoute{
		r.NewNatsRoute(mqmsgspec.AuthenticateUserSubject, c.Authenticate),
	}
}