Newer
Older
#ifndef __VEREIGN_KVSTORE_STORAGE_HH
#define __VEREIGN_KVSTORE_STORAGE_HH
#include <vereign/bytes/buffer.hh>
namespace vereign::kvstore {
class Storage {
public:
virtual void Lock() = 0;
virtual void Unlock() = 0;
virtual void PutBytes(const std::string& key, bytes::View value) = 0;
virtual void GetBytes(const std::string& key, bytes::Buffer& value) = 0;
virtual void PutInt64(const std::string& key, int64_t value) = 0;
virtual auto GetInt64(const std::string& key) -> int64_t = 0;
virtual ~Storage() = default;
};
} // namespace vereign::kvstore
#endif // __VEREIGN_KVSTORE_STORAGE_HH