]> git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/services/svc_config_key_rados.h
import ceph pacific 16.2.5
[ceph.git] / ceph / src / rgw / services / svc_config_key_rados.h
1
2
3 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
4 // vim: ts=8 sw=2 smarttab ft=cpp
5
6 /*
7 * Ceph - scalable distributed file system
8 *
9 * Copyright (C) 2019 Red Hat, Inc.
10 *
11 * This is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License version 2.1, as published by the Free Software
14 * Foundation. See file COPYING.
15 *
16 */
17
18
19 #pragma once
20
21 #include <atomic>
22
23 #include "rgw/rgw_service.h"
24
25 #include "svc_config_key.h"
26
27 class RGWSI_RADOS;
28
29 class RGWSI_ConfigKey_RADOS : public RGWSI_ConfigKey
30 {
31 bool maybe_insecure_mon_conn{false};
32 std::atomic_flag warned_insecure = ATOMIC_FLAG_INIT;
33
34 int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
35
36 void warn_if_insecure();
37
38 public:
39 struct Svc {
40 RGWSI_RADOS *rados{nullptr};
41 } svc;
42
43 void init(RGWSI_RADOS *rados_svc) {
44 svc.rados = rados_svc;
45 }
46
47 RGWSI_ConfigKey_RADOS(CephContext *cct) : RGWSI_ConfigKey(cct) {}
48
49 int get(const string& key, bool secure, bufferlist *result) override;
50 };
51
52