Equal reports whether two Hosts have the same identity in the placement ring. The Load field is daprd-local and excluded from the comparison: two Hosts representing the same placement-ring entry can carry different daprd-observed load values without being considered different.
(o *Host)
| 112 | // Hosts representing the same placement-ring entry can carry different |
| 113 | // daprd-observed load values without being considered different. |
| 114 | func (h *Host) Equal(o *Host) bool { |
| 115 | if h == nil || o == nil { |
| 116 | return h == o |
| 117 | } |
| 118 | return h.Name == o.Name && h.Port == o.Port && h.AppID == o.AppID |
| 119 | } |
| 120 | |
| 121 | // Equal reports whether two consistent hash rings would route actors to the |
| 122 | // same set of hosts. Only the inputs to ring construction (loadMap entries |
no outgoing calls