From f131c1f35b3763411c0e83abf313b72206b83251 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Mon, 26 Oct 2020 13:12:01 -0400 Subject: [PATCH] add noop store that does nothing --- store/noop.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 store/noop.go diff --git a/store/noop.go b/store/noop.go new file mode 100644 index 0000000..9e5d815 --- /dev/null +++ b/store/noop.go @@ -0,0 +1,15 @@ +package store + +import "github.com/lbryio/lbry.go/v2/stream" + +// NoopStore is a store that does nothing +type NoopStore struct{} + +const nameNoop = "noop" + +func (n *NoopStore) Name() string { return nameNoop } +func (n *NoopStore) Has(_ string) (bool, error) { return false, nil } +func (n *NoopStore) Get(_ string) (stream.Blob, error) { return nil, nil } +func (n *NoopStore) Put(_ string, _ stream.Blob) error { return nil } +func (n *NoopStore) PutSD(_ string, _ stream.Blob) error { return nil } +func (n *NoopStore) Delete(_ string) error { return nil }