telegraf/registry/name.go

21 lines
228 B
Go
Raw Normal View History

2017-02-06 16:45:35 +00:00
package registry
import (
"sync"
)
var nameOverride string
var mu sync.Mutex
func SetName(s string) {
mu.Lock()
nameOverride = s
mu.Unlock()
}
func GetName() string {
mu.Lock()
defer mu.Unlock()
return nameOverride
}