From 73d1b3d2dfb0f225132ab31a701e6378422e2a37 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Aug 2016 20:51:49 -0400 Subject: add shardCount --- Storage.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Storage.hs') diff --git a/Storage.hs b/Storage.hs index fc9e9ed..cb0e323 100644 --- a/Storage.hs +++ b/Storage.hs @@ -13,7 +13,8 @@ data Storage = Storage , obscureShards :: IO ObscureResult -- ^ run after making some calls to storeShard/retrieveShard, -- to avoid correlation attacks - } + , countShards :: IO CountResult + } -- Note that there is no interface to enumerate shards. data StoreResult = StoreSuccess | StoreFailure String deriving (Show) @@ -22,3 +23,6 @@ data RetrieveResult = RetrieveSuccess Shard | RetrieveFailure String data ObscureResult = ObscureSuccess | ObscureFailure String deriving (Show) + +data CountResult = CountResult Integer | CountFailure String + deriving (Show) -- cgit v1.2.3