コード例 #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
ファイル: types.go プロジェクト: gitter-badger/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.CacheZoneSection) types.CacheAlgorithm

var cacheTypes = map[string]newCacheFunc{

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