Ejemplo n.º 1
0
func GetNodes(c *gin.Context) {
	memConfMux.RLock()
	nodes := make([]*models.Node, 0)
	for _, node := range memConfNodes {
		_node := *node
		_node.DataVersionStr = ""
		_node.AppVersion = conf.VersionString()
		nodes = append(nodes, &_node)
	}
	memConfMux.RUnlock()

	Success(c, nodes)
}
Ejemplo n.º 2
0
func VersionHandler(c *gin.Context) {
	c.String(200, conf.VersionString())
}