cache: remove the unused old gc primitives

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
docker-18.09
Tonis Tiigi 2018-09-18 10:50:19 -07:00
parent 0940cdc6fe
commit ae321cc9cf
2 changed files with 0 additions and 29 deletions

27
cache/gc.go vendored
View File

@ -1,27 +0,0 @@
package cache
import (
"context"
"errors"
"time"
)
// GCPolicy defines policy for garbage collection
type GCPolicy struct {
MaxSize uint64
MaxKeepDuration time.Duration
}
// // CachePolicy defines policy for keeping a resource in cache
// type CachePolicy struct {
// Priority int
// LastUsed time.Time
// }
//
// func defaultCachePolicy() CachePolicy {
// return CachePolicy{Priority: 10, LastUsed: time.Now()}
// }
func (cm *cacheManager) GC(ctx context.Context) error {
return errors.New("GC not implemented")
}

2
cache/manager.go vendored
View File

@ -25,7 +25,6 @@ var (
type ManagerOpt struct {
Snapshotter snapshot.SnapshotterBase
GCPolicy GCPolicy
MetadataStore *metadata.Store
PruneRefChecker ExternalRefCheckerFunc
}
@ -40,7 +39,6 @@ type Accessor interface {
type Controller interface {
DiskUsage(ctx context.Context, info client.DiskUsageInfo) ([]*client.UsageInfo, error)
Prune(ctx context.Context, ch chan client.UsageInfo, info ...client.PruneInfo) error
GC(ctx context.Context) error
}
type Manager interface {