Files
argo-cd/util/cache/client.go
2019-02-13 15:20:40 -08:00

22 lines
349 B
Go

package cache
import (
"errors"
"time"
)
var ErrCacheMiss = errors.New("cache: key is missing")
type Item struct {
Key string
Object interface{}
// Expiration is the cache expiration time.
Expiration time.Duration
}
type CacheClient interface {
Set(item *Item) error
Get(key string, obj interface{}) error
Delete(key string) error
}