cache: remove the unused old gc primitives
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>docker-18.09
parent
0940cdc6fe
commit
ae321cc9cf
|
@ -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")
|
||||
}
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue