]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_dmclock.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
5 * Ceph - scalable distributed file system
7 * Copyright (C) 2019 Red Hat, Inc.
8 * Copyright (C) 2019 SUSE LLC
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.
19 #include "dmclock/src/dmclock_server.h"
21 namespace rgw::dmclock
{
22 // TODO: implement read vs write
23 enum class client_id
{
24 admin
, //< /admin apis
25 auth
, //< swift auth, sts
26 data
, //< PutObj, GetObj
27 metadata
, //< bucket operations, object metadata
31 // TODO move these to dmclock/types or so in submodule
32 using crimson::dmclock::Cost
;
33 using crimson::dmclock::ClientInfo
;
35 enum class scheduler_t
{
41 inline scheduler_t
get_scheduler_t(CephContext
* const cct
)
43 const auto scheduler_type
= cct
->_conf
.get_val
<std::string
>("rgw_scheduler_type");
44 if (scheduler_type
== "dmclock")
45 return scheduler_t::dmclock
;
46 else if (scheduler_type
== "throttler")
47 return scheduler_t::throttler
;
49 return scheduler_t::none
;
52 } // namespace rgw::dmclock
54 #endif /* RGW_DMCLOCK_H */