rename mapper_cache to mappercache

Signed-off-by: glightfoot <glightfoot@rsglab.com>
This commit is contained in:
glightfoot 2021-02-06 23:27:11 -05:00
parent 940e653ea6
commit aa529c8884
6 changed files with 12 additions and 12 deletions

View file

@ -39,8 +39,8 @@ import (
"github.com/prometheus/statsd_exporter/pkg/line"
"github.com/prometheus/statsd_exporter/pkg/listener"
"github.com/prometheus/statsd_exporter/pkg/mapper"
"github.com/prometheus/statsd_exporter/pkg/mapper_cache/lru"
"github.com/prometheus/statsd_exporter/pkg/mapper_cache/randomreplacement"
"github.com/prometheus/statsd_exporter/pkg/mappercache/lru"
"github.com/prometheus/statsd_exporter/pkg/mappercache/randomreplacement"
)
const (

View file

@ -18,8 +18,8 @@ import (
"math/rand"
"testing"
"github.com/prometheus/statsd_exporter/pkg/mapper_cache/lru"
"github.com/prometheus/statsd_exporter/pkg/mapper_cache/randomreplacement"
"github.com/prometheus/statsd_exporter/pkg/mappercache/lru"
"github.com/prometheus/statsd_exporter/pkg/mappercache/randomreplacement"
)
var (

View file

@ -19,7 +19,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/statsd_exporter/pkg/mapper_cache/lru"
"github.com/prometheus/statsd_exporter/pkg/mappercache/lru"
)
type mappings []struct {

View file

@ -18,12 +18,12 @@ import (
lru2 "github.com/hashicorp/golang-lru"
"github.com/prometheus/statsd_exporter/pkg/mapper_cache"
"github.com/prometheus/statsd_exporter/pkg/mappercache"
)
type metricMapperLRUCache struct {
cache *lru2.Cache
metrics *mapper_cache.CacheMetrics
metrics *mappercache.CacheMetrics
}
func NewMetricMapperLRUCache(reg prometheus.Registerer, size int) (*metricMapperLRUCache, error) {
@ -31,7 +31,7 @@ func NewMetricMapperLRUCache(reg prometheus.Registerer, size int) (*metricMapper
return nil, nil
}
metrics := mapper_cache.NewCacheMetrics(reg)
metrics := mappercache.NewCacheMetrics(reg)
cache, err := lru2.New(size)
if err != nil {
return &metricMapperLRUCache{}, err

View file

@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package mapper_cache
package mappercache
import "github.com/prometheus/client_golang/prometheus"

View file

@ -18,14 +18,14 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/statsd_exporter/pkg/mapper_cache"
"github.com/prometheus/statsd_exporter/pkg/mappercache"
)
type metricMapperRRCache struct {
lock sync.RWMutex
size int
items map[string]interface{}
metrics *mapper_cache.CacheMetrics
metrics *mappercache.CacheMetrics
}
func NewMetricMapperRRCache(reg prometheus.Registerer, size int) (*metricMapperRRCache, error) {
@ -33,7 +33,7 @@ func NewMetricMapperRRCache(reg prometheus.Registerer, size int) (*metricMapperR
return nil, nil
}
metrics := mapper_cache.NewCacheMetrics(reg)
metrics := mappercache.NewCacheMetrics(reg)
c := &metricMapperRRCache{
items: make(map[string]interface{}, size+1),
size: size,