github.com/smithx10/nomad@v0.9.1-rc1/client/fingerprint/arch.go (about) 1 package fingerprint 2 3 import ( 4 "runtime" 5 6 log "github.com/hashicorp/go-hclog" 7 ) 8 9 // ArchFingerprint is used to fingerprint the architecture 10 type ArchFingerprint struct { 11 StaticFingerprinter 12 logger log.Logger 13 } 14 15 // NewArchFingerprint is used to create an OS fingerprint 16 func NewArchFingerprint(logger log.Logger) Fingerprint { 17 f := &ArchFingerprint{logger: logger.Named("arch")} 18 return f 19 } 20 21 func (f *ArchFingerprint) Fingerprint(req *FingerprintRequest, resp *FingerprintResponse) error { 22 resp.AddAttribute("cpu.arch", runtime.GOARCH) 23 resp.Detected = true 24 return nil 25 }