示例#1
0
文件: types.go 项目: na--/nedomi
// This file is generated with go generate. Any changes to it will be lost after
// subsequent generates.
// If you want to edit it go to types.go.template

package cache

import (
	"github.com/ironsmile/nedomi/config"
	"github.com/ironsmile/nedomi/types"

	"github.com/ironsmile/nedomi/cache/lru"
)

type newCacheFunc func(*config.CacheZone, func(*types.ObjectIndex) error, types.Logger) types.CacheAlgorithm

var cacheTypes = map[string]newCacheFunc{

	"lru": func(cz *config.CacheZone, remove func(*types.ObjectIndex) error,
		logger types.Logger) types.CacheAlgorithm {
		return lru.New(cz, remove, logger)
	},
}
示例#2
0
// This file is generated with go generate. Any changes to it will be lost after
// subsequent generates.
// If you want to edit it go to types.go.template

package cache

import (
	"github.com/ironsmile/nedomi/config"
	"github.com/ironsmile/nedomi/types"

	"github.com/ironsmile/nedomi/cache/lru"
)

type newCacheFunc func(*config.CacheZoneSection) types.CacheAlgorithm

var cacheTypes = map[string]newCacheFunc{

	"lru": func(cz *config.CacheZoneSection) types.CacheAlgorithm {
		return lru.New(cz)
	},
}