mirror of
https://github.com/datarhei/core.git
synced 2025-10-28 10:11:50 +08:00
Promote core version in cluster about
This commit is contained in:
@@ -29,8 +29,8 @@ func (v versionInfo) MinorString() string {
|
|||||||
// Version of the app
|
// Version of the app
|
||||||
var Version = versionInfo{
|
var Version = versionInfo{
|
||||||
Major: 16,
|
Major: 16,
|
||||||
Minor: 18,
|
Minor: 19,
|
||||||
Patch: 2,
|
Patch: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit is the git commit the app is build from. It should be filled in during compilation
|
// Commit is the git commit the app is build from. It should be filled in during compilation
|
||||||
|
|||||||
@@ -1369,6 +1369,7 @@ type ClusterNodeCore struct {
|
|||||||
Error error
|
Error error
|
||||||
LastContact time.Duration
|
LastContact time.Duration
|
||||||
Latency time.Duration
|
Latency time.Duration
|
||||||
|
Version string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClusterAboutLeader struct {
|
type ClusterAboutLeader struct {
|
||||||
@@ -1458,6 +1459,7 @@ func (c *cluster) About() (ClusterAbout, error) {
|
|||||||
Error: nodeAbout.Core.Error,
|
Error: nodeAbout.Core.Error,
|
||||||
LastContact: nodeAbout.Core.LastContact,
|
LastContact: nodeAbout.Core.LastContact,
|
||||||
Latency: nodeAbout.Core.Latency,
|
Latency: nodeAbout.Core.Latency,
|
||||||
|
Version: nodeAbout.Core.Version,
|
||||||
},
|
},
|
||||||
Resources: ClusterNodeResources{
|
Resources: ClusterNodeResources{
|
||||||
IsThrottling: nodeAbout.Resources.IsThrottling,
|
IsThrottling: nodeAbout.Resources.IsThrottling,
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ type ClusterNodeCore struct {
|
|||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
LastContact float64 `json:"last_contact_ms"` // milliseconds
|
LastContact float64 `json:"last_contact_ms"` // milliseconds
|
||||||
Latency float64 `json:"latency_ms"` // milliseconds
|
Latency float64 `json:"latency_ms"` // milliseconds
|
||||||
|
Version string `json:"version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClusterNodeResources struct {
|
type ClusterNodeResources struct {
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ func (h *ClusterHandler) marshalClusterNode(node cluster.ClusterNode) api.Cluste
|
|||||||
Status: node.Core.Status,
|
Status: node.Core.Status,
|
||||||
LastContact: node.Core.LastContact.Seconds() * 1000,
|
LastContact: node.Core.LastContact.Seconds() * 1000,
|
||||||
Latency: node.Core.Latency.Seconds() * 1000,
|
Latency: node.Core.Latency.Seconds() * 1000,
|
||||||
|
Version: node.Core.Version,
|
||||||
},
|
},
|
||||||
Resources: api.ClusterNodeResources{
|
Resources: api.ClusterNodeResources{
|
||||||
IsThrottling: node.Resources.IsThrottling,
|
IsThrottling: node.Resources.IsThrottling,
|
||||||
|
|||||||
Reference in New Issue
Block a user