]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/driver/rados/rgw_sync_module_es.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rgw / driver / rados / 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 #pragma once
5
6 #include "rgw_sync_module.h"
7
8 enum class ESType {
9 /* string datatypes */
10 String, /* Deprecated Since 5.X+ */
11 Text,
12 Keyword,
13
14 /* Numeric Types */
15 Long, Integer, Short, Byte, Double, Float, Half_Float, Scaled_Float,
16
17 /* Date Type */
18 Date,
19
20 /* Boolean */
21 Boolean,
22
23 /* Binary; Must Be Base64 Encoded */
24 Binary,
25
26 /* Range Types */
27 Integer_Range, Float_Range, Long_Range, Double_Range, Date_Range,
28
29 /* A Few Specialized Types */
30 Geo_Point,
31 Ip
32 };
33
34
35 class RGWElasticSyncModule : public RGWSyncModule {
36 public:
37 RGWElasticSyncModule() {}
38 bool supports_data_export() override {
39 return false;
40 }
41 int create_instance(const DoutPrefixProvider *dpp, CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) override;
42 };
43
44 class RGWElasticDataSyncModule;
45 class RGWRESTConn;
46
47 class RGWElasticSyncModuleInstance : public RGWSyncModuleInstance {
48 std::unique_ptr<RGWElasticDataSyncModule> data_handler;
49 public:
50 RGWElasticSyncModuleInstance(const DoutPrefixProvider *dpp, CephContext *cct, const JSONFormattable& config);
51 RGWDataSyncModule *get_data_handler() override;
52 RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override;
53 RGWRESTConn *get_rest_conn();
54 std::string get_index_path();
55 std::map<std::string, std::string>& get_request_headers();
56 bool supports_user_writes() override {
57 return true;
58 }
59 };