Closed connor4312 closed 8 years ago
I'm a bit timid to add this knowing it has a reasonable chance of providing duplicate node IDs and in that case it would cause this package to be unable to guarantee that it's generating unique IDs.
Fair enough 😄
Adds a quick
NewNodeByHostname()
function which assigns an ID based off a hash of the hostname. Not 100% super duper safe but good for smaller clusters (< 38 nodes, at which point the chance of two nodes having the same ID exceeds 50%) or clusters where consensus is not immediately available.