From ce25a41fe1fd6da7e037eefcbe567364491fdb21 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 5 Nov 2020 23:35:55 +0300 Subject: [PATCH] remove cache as store can do the same thing Signed-off-by: Vasiliy Tolstov --- cache/cache.go | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 cache/cache.go diff --git a/cache/cache.go b/cache/cache.go deleted file mode 100644 index be75b839..00000000 --- a/cache/cache.go +++ /dev/null @@ -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 - } -}