remove cache as store can do the same thing

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-11-05 23:35:55 +03:00
parent 8fa8afdfa4
commit ce25a41fe1

34
cache/cache.go vendored
View File

@ -1,34 +0,0 @@
// Package cache is a caching interface
package cache
import "context"
// Cache is an interface for caching
type Cache interface {
// Initialise options
Init(...Option) error
// Get a value
Get(ctx context.Context, key string) (interface{}, error)
// Set a value
Set(ctx context.Context, key string, val interface{}) error
// Delete a value
Delete(ctx context.Context, key string) error
// Name of the implementation
String() string
}
// Options struct
type Options struct {
Nodes []string
Context context.Context
}
// Option func
type Option func(o *Options)
// Nodes sets the nodes for the cache
func Nodes(v ...string) Option {
return func(o *Options) {
o.Nodes = v
}
}