blob: 29fa148303bde3cb6aed597ceabd4c21ecd92cfe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "discovery.h"
namespace NSQLComplete {
namespace {
class TClusterDiscovery: public IClusterDiscovery {
public:
explicit TClusterDiscovery(TVector<TString> instances)
: ClusterList_(std::move(instances))
{
}
NThreading::TFuture<TClusterList> Query() const override {
return NThreading::MakeFuture(ClusterList_);
}
private:
TVector<TString> ClusterList_;
};
} // namespace
IClusterDiscovery::TPtr MakeStaticClusterDiscovery(TVector<TString> instances) {
return new TClusterDiscovery(std::move(instances));
}
} // namespace NSQLComplete
|