mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 00:45:43 +03:00
client, structs comments
This commit is contained in:
@@ -1227,6 +1227,8 @@ func (c *Client) updateNodeFromFingerprint(response *fingerprint.FingerprintResp
|
||||
}
|
||||
|
||||
// COMPAT(0.10): Remove in 0.10
|
||||
// update the response networks with the config
|
||||
// if we still have node changes, merge them
|
||||
if response.Resources != nil {
|
||||
response.Resources.Networks = updateNetworks(
|
||||
c.config.Node.Resources.Networks,
|
||||
@@ -1238,6 +1240,8 @@ func (c *Client) updateNodeFromFingerprint(response *fingerprint.FingerprintResp
|
||||
}
|
||||
}
|
||||
|
||||
// update the response networks with the config
|
||||
// if we still have node changes, merge them
|
||||
if response.NodeResources != nil {
|
||||
response.NodeResources.Networks = updateNetworks(
|
||||
c.config.Node.NodeResources.Networks,
|
||||
|
||||
@@ -1811,7 +1811,7 @@ func (r *Resources) Equals(o *Resources) bool {
|
||||
type ResourceDevices []*RequestedDevice
|
||||
|
||||
// COMPAT(0.10): Remove in 0.10
|
||||
// Equals ResourceDevices as set on Name
|
||||
// Equals ResourceDevices as set keyed by Name
|
||||
func (d *ResourceDevices) Equals(o *ResourceDevices) bool {
|
||||
if d == nil && o == nil {
|
||||
return true
|
||||
@@ -2145,6 +2145,7 @@ func (r *RequestedDevice) Equals(o *RequestedDevice) bool {
|
||||
}
|
||||
|
||||
// r.Constraints == o.Constraints, order sensitive
|
||||
// REVIEW: should this be a set comparison?
|
||||
if len(r.Constraints) != len(o.Constraints) {
|
||||
return false
|
||||
}
|
||||
@@ -2346,6 +2347,7 @@ func (n *NodeResources) Equals(o *NodeResources) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Equals equates Networks as a set
|
||||
func (n *Networks) Equals(o *Networks) bool {
|
||||
if n == o {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user