aboutsummaryrefslogtreecommitdiffstats
path: root/signer/storage
diff options
context:
space:
mode:
Diffstat (limited to 'signer/storage')
-rw-r--r--signer/storage/storage.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/signer/storage/storage.go b/signer/storage/storage.go
index 60f4e3892..50c55e455 100644
--- a/signer/storage/storage.go
+++ b/signer/storage/storage.go
@@ -17,10 +17,6 @@
package storage
-import (
- "fmt"
-)
-
type Storage interface {
// Put stores a value by key. 0-length keys results in no-op
Put(key, value string)
@@ -39,7 +35,7 @@ func (s *EphemeralStorage) Put(key, value string) {
if len(key) == 0 {
return
}
- fmt.Printf("storage: put %v -> %v\n", key, value)
+ //fmt.Printf("storage: put %v -> %v\n", key, value)
s.data[key] = value
}
@@ -47,7 +43,7 @@ func (s *EphemeralStorage) Get(key string) string {
if len(key) == 0 {
return ""
}
- fmt.Printf("storage: get %v\n", key)
+ //fmt.Printf("storage: get %v\n", key)
if v, exist := s.data[key]; exist {
return v
}
@@ -60,3 +56,11 @@ func NewEphemeralStorage() Storage {
}
return s
}
+
+// NoStorage is a dummy construct which doesn't remember anything you tell it
+type NoStorage struct{}
+
+func (s *NoStorage) Put(key, value string) {}
+func (s *NoStorage) Get(key string) string {
+ return ""
+}