RateMap is a simple goroutine-safe map of string to float64.
type RateMap struct {
// contains filtered or unexported fields
}
func New() *RateMap
New returns a new RateMap.
func (m *RateMap) Get(name string) float64
Get retrieves the rate for the given name, or 1.0 if none is set. Get is safe for concurrent access by multiple goroutines.
func (m *RateMap) Set(name string, rate float64)
Set writes the given name/rate pair to the map. Set is safe for concurrent access by multiple goroutines.