SOLA
Loading...
Searching...
No Matches
management_overlay_minhton.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef SOLA_MANAGEMENT_OVERLAY_MINHTON_H_
8#define SOLA_MANAGEMENT_OVERLAY_MINHTON_H_
9
10#include <future>
11#include <memory>
12#include <vector>
13
14#include "minhton/core/definitions.h"
15#include "minhton/core/minhton.h"
16#include "minhton/logging/logger.h"
17#include "minhton/utils/config_node.h"
18#include "storage/storage.h"
19
20namespace sola {
21class ManagementOverlayMinhton final : public Storage {
22public:
23 using Logger = minhton::Logger::LoggerPtr;
25
26 explicit ManagementOverlayMinhton(const minhton::ConfigNode &config);
27
28 void insert(std::vector<Entry> entries) override;
29 std::future<minhton::FindResult> find(Request r) override;
30 void stop() override;
31 bool canStop() const override;
32
33 bool isRunning() const { return node_->getState() == minhton::State::kConnected; }
34
35private:
36 std::unique_ptr<minhton::Minhton> node_;
37};
38
39} // namespace sola
40
41#endif
Definition config_node.h:30
Definition management_overlay_minhton.h:21
Definition storage.h:27
Definition storage.h:18