2 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
3 // vim: ts=8 sw=2 smarttab ft=cpp
6 * Ceph - scalable distributed file system
8 * Copyright (C) 2019 Red Hat, Inc.
10 * This is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License version 2.1, as published by the Free Software
13 * Foundation. See file COPYING.
20 #include "cls/otp/cls_otp_types.h"
22 #include "rgw/rgw_service.h"
24 #include "svc_otp_types.h"
25 #include "svc_meta_be_otp.h"
29 class RGWSI_OTP
: public RGWServiceInstance
31 RGWSI_OTP_BE_Handler be_handler
;
32 std::unique_ptr
<RGWSI_MetaBackend::Module
> be_module
;
34 int do_start() override
;
38 RGWSI_OTP
*otp
{nullptr};
39 RGWSI_Zone
*zone
{nullptr};
40 RGWSI_Meta
*meta
{nullptr};
41 RGWSI_MetaBackend
*meta_be
{nullptr};
44 RGWSI_OTP(CephContext
*cct
);
47 RGWSI_OTP_BE_Handler
& get_be_handler() {
51 void init(RGWSI_Zone
*_zone_svc
,
52 RGWSI_Meta
*_meta_svc
,
53 RGWSI_MetaBackend
*_meta_be_svc
);
55 int read_all(RGWSI_OTP_BE_Ctx
& ctx
,
57 otp_devices_list_t
*devices
,
59 RGWObjVersionTracker
*objv_tracker
,
61 int read_all(RGWSI_OTP_BE_Ctx
& ctx
,
63 otp_devices_list_t
*devices
,
65 RGWObjVersionTracker
*objv_tracker
,
67 int store_all(RGWSI_OTP_BE_Ctx
& ctx
,
69 const otp_devices_list_t
& devices
,
71 RGWObjVersionTracker
*objv_tracker
,
73 int store_all(RGWSI_OTP_BE_Ctx
& ctx
,
75 const otp_devices_list_t
& devices
,
77 RGWObjVersionTracker
*objv_tracker
,
79 int remove_all(RGWSI_OTP_BE_Ctx
& ctx
,
81 RGWObjVersionTracker
*objv_tracker
,
83 int remove_all(RGWSI_OTP_BE_Ctx
& ctx
,
85 RGWObjVersionTracker
*objv_tracker
,