refactor Fingerprint to request/response construct

This commit is contained in:
Chelsea Holland Komlo
2018-01-24 09:09:53 -05:00
parent bc5d5edc38
commit 5e8151d700
48 changed files with 907 additions and 644 deletions

View File

@@ -5,8 +5,6 @@ package fingerprint
import (
"log"
"time"
"github.com/hashicorp/nomad/nomad/structs"
)
const (
@@ -49,8 +47,9 @@ func NewCGroupFingerprint(logger *log.Logger) Fingerprint {
// clearCGroupAttributes clears any node attributes related to cgroups that might
// have been set in a previous fingerprint run.
func (f *CGroupFingerprint) clearCGroupAttributes(n *structs.Node) {
delete(n.Attributes, "unique.cgroup.mountpoint")
func (f *CGroupFingerprint) clearCGroupAttributes(n map[string]string) map[string]string {
n["unique.cgroup.mountpoint"] = ""
return n
}
// Periodic determines the interval at which the periodic fingerprinter will run.