2021-01-19 09:40:25 +00:00
|
|
|
#pragma once
|
|
|
|
#include <IO/ReadBufferFromMemory.h>
|
|
|
|
|
2021-10-27 23:10:39 +00:00
|
|
|
#include <libnuraft/nuraft.hxx>
|
2021-01-19 09:40:25 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ReadBufferFromNuraftBuffer : public ReadBufferFromMemory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit ReadBufferFromNuraftBuffer(nuraft::ptr<nuraft::buffer> buffer)
|
|
|
|
: ReadBufferFromMemory(buffer->data_begin(), buffer->size())
|
|
|
|
{}
|
2021-01-20 16:25:30 +00:00
|
|
|
explicit ReadBufferFromNuraftBuffer(nuraft::buffer & buffer)
|
|
|
|
: ReadBufferFromMemory(buffer.data_begin(), buffer.size())
|
|
|
|
{}
|
2021-01-19 09:40:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|