]>
Commit | Line | Data |
---|---|---|
11fdf7f2 | 1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
9f95a23c | 2 | // vim: ts=8 sw=2 smarttab ft=cpp |
11fdf7f2 | 3 | |
7c673cae FG |
4 | #ifndef CEPH_RGW_SYNC_MODULE_ES_H |
5 | #define CEPH_RGW_SYNC_MODULE_ES_H | |
6 | ||
7 | #include "rgw_sync_module.h" | |
8 | ||
a8e16298 TL |
9 | enum class ESType { |
10 | /* string datatypes */ | |
11 | String, /* Deprecated Since 5.X+ */ | |
12 | Text, | |
13 | Keyword, | |
14 | ||
15 | /* Numeric Types */ | |
16 | Long, Integer, Short, Byte, Double, Float, Half_Float, Scaled_Float, | |
17 | ||
18 | /* Date Type */ | |
19 | Date, | |
20 | ||
21 | /* Boolean */ | |
22 | Boolean, | |
23 | ||
24 | /* Binary; Must Be Base64 Encoded */ | |
25 | Binary, | |
26 | ||
27 | /* Range Types */ | |
28 | Integer_Range, Float_Range, Long_Range, Double_Range, Date_Range, | |
29 | ||
30 | /* A Few Specialized Types */ | |
31 | Geo_Point, | |
32 | Ip | |
33 | }; | |
34 | ||
35 | ||
7c673cae FG |
36 | class RGWElasticSyncModule : public RGWSyncModule { |
37 | public: | |
38 | RGWElasticSyncModule() {} | |
39 | bool supports_data_export() override { | |
40 | return false; | |
41 | } | |
11fdf7f2 | 42 | int create_instance(CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) override; |
31f18b77 FG |
43 | }; |
44 | ||
45 | class RGWElasticDataSyncModule; | |
46 | class RGWRESTConn; | |
47 | ||
48 | class RGWElasticSyncModuleInstance : public RGWSyncModuleInstance { | |
49 | std::unique_ptr<RGWElasticDataSyncModule> data_handler; | |
50 | public: | |
11fdf7f2 | 51 | RGWElasticSyncModuleInstance(CephContext *cct, const JSONFormattable& config); |
31f18b77 FG |
52 | RGWDataSyncModule *get_data_handler() override; |
53 | RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override; | |
54 | RGWRESTConn *get_rest_conn(); | |
55 | std::string get_index_path(); | |
a8e16298 | 56 | map<string, string>& get_request_headers(); |
11fdf7f2 TL |
57 | bool supports_user_writes() override { |
58 | return true; | |
59 | } | |
7c673cae FG |
60 | }; |
61 | ||
62 | #endif |