]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_sync_module_es.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / rgw / rgw_sync_module_es.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
3
4 #ifndef CEPH_RGW_SYNC_MODULE_ES_H
5 #define CEPH_RGW_SYNC_MODULE_ES_H
6
7 #include "rgw_sync_module.h"
8
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
36 class RGWElasticSyncModule : public RGWSyncModule {
37 public:
38 RGWElasticSyncModule() {}
39 bool supports_data_export() override {
40 return false;
41 }
42 int create_instance(const DoutPrefixProvider *dpp, CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) override;
43 };
44
45 class RGWElasticDataSyncModule;
46 class RGWRESTConn;
47
48 class RGWElasticSyncModuleInstance : public RGWSyncModuleInstance {
49 std::unique_ptr<RGWElasticDataSyncModule> data_handler;
50 public:
51 RGWElasticSyncModuleInstance(const DoutPrefixProvider *dpp, CephContext *cct, const JSONFormattable& config);
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();
56 std::map<std::string, std::string>& get_request_headers();
57 bool supports_user_writes() override {
58 return true;
59 }
60 };
61
62 #endif