add context to store
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package store
|
||||
|
||||
import "context"
|
||||
|
||||
type noopStore struct {
|
||||
opts Options
|
||||
}
|
||||
@@ -27,19 +29,19 @@ func (n *noopStore) String() string {
|
||||
return "noop"
|
||||
}
|
||||
|
||||
func (n *noopStore) Read(key string, opts ...ReadOption) ([]*Record, error) {
|
||||
func (n *noopStore) Read(ctx context.Context, key string, opts ...ReadOption) ([]*Record, error) {
|
||||
return []*Record{}, nil
|
||||
}
|
||||
|
||||
func (n *noopStore) Write(r *Record, opts ...WriteOption) error {
|
||||
func (n *noopStore) Write(ctx context.Context, r *Record, opts ...WriteOption) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *noopStore) Delete(key string, opts ...DeleteOption) error {
|
||||
func (n *noopStore) Delete(ctx context.Context, key string, opts ...DeleteOption) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *noopStore) List(opts ...ListOption) ([]string, error) {
|
||||
func (n *noopStore) List(ctx context.Context, opts ...ListOption) ([]string, error) {
|
||||
return []string{}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user