Remove unused functions for mesh (#1251)

These functions were used with weaveworks/mesh,
but are no longer needed with memberlist.
This commit is contained in:
stuart nelson 2018-02-16 18:16:06 +01:00 committed by GitHub
parent 28db2409fd
commit 0f9c9a0bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 22 deletions

View File

@ -436,28 +436,6 @@ func listen(listen string, router *route.Router, logger log.Logger) {
} }
} }
func mustHardwareAddr() string {
// TODO(fabxc): consider a safe-guard against colliding MAC addresses.
ifaces, err := net.Interfaces()
if err != nil {
panic(err)
}
for _, iface := range ifaces {
if s := iface.HardwareAddr.String(); s != "" {
return s
}
}
panic("no valid network interfaces")
}
func mustHostname() string {
hostname, err := os.Hostname()
if err != nil {
panic(err)
}
return hostname
}
func md5HashAsMetricValue(data []byte) float64 { func md5HashAsMetricValue(data []byte) float64 {
sum := md5.Sum(data) sum := md5.Sum(data)
// We only want 48 bits as a float64 only has a 53 bit mantissa. // We only want 48 bits as a float64 only has a 53 bit mantissa.