mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-04 16:33:49 +08:00
NET-1782: Fetch Node Connection Status from metrics (#3237)
* add live status of node * handle static node status * add public IP field to server configuration * get public Ip from config * improve node status logic * improvise status check * use only checkin status on old nodes --------- Co-authored-by: the_aceix <aceixsmartx@gmail.com>
This commit is contained in:
@@ -52,6 +52,7 @@ type ApiNode struct {
|
||||
IsStatic bool `json:"is_static"`
|
||||
IsUserNode bool `json:"is_user_node"`
|
||||
StaticNode ExtClient `json:"static_node"`
|
||||
Status NodeStatus `json:"status"`
|
||||
}
|
||||
|
||||
// ApiNode.ConvertToServerNode - converts an api node to a server node
|
||||
@@ -192,6 +193,7 @@ func (nm *Node) ConvertToAPINode() *ApiNode {
|
||||
apiNode.IsStatic = nm.IsStatic
|
||||
apiNode.IsUserNode = nm.IsUserNode
|
||||
apiNode.StaticNode = nm.StaticNode
|
||||
apiNode.Status = nm.Status
|
||||
return &apiNode
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user