]> git.proxmox.com Git - ceph.git/blame - ceph/src/cls/log/cls_log_client.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / cls / log / cls_log_client.h
CommitLineData
7c673cae
FG
1#ifndef CEPH_CLS_LOG_CLIENT_H
2#define CEPH_CLS_LOG_CLIENT_H
3
11fdf7f2 4#include "include/rados/librados_fwd.hpp"
7c673cae
FG
5#include "cls_log_types.h"
6
7/*
8 * log objclass
9 */
10
11void cls_log_add_prepare_entry(cls_log_entry& entry, const utime_t& timestamp,
12 const string& section, const string& name, bufferlist& bl);
13
14void cls_log_add(librados::ObjectWriteOperation& op, list<cls_log_entry>& entries, bool monotonic_inc);
15void cls_log_add(librados::ObjectWriteOperation& op, cls_log_entry& entry);
16void cls_log_add(librados::ObjectWriteOperation& op, const utime_t& timestamp,
17 const string& section, const string& name, bufferlist& bl);
18
19void cls_log_list(librados::ObjectReadOperation& op, utime_t& from, utime_t& to,
20 const string& in_marker, int max_entries,
21 list<cls_log_entry>& entries,
22 string *out_marker, bool *truncated);
23
24void cls_log_trim(librados::ObjectWriteOperation& op, const utime_t& from_time, const utime_t& to_time,
25 const string& from_marker, const string& to_marker);
9f95a23c
TL
26
27// these overloads which call io_ctx.operate() should not be called in the rgw.
28// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()
29#ifndef CLS_CLIENT_HIDE_IOCTX
7c673cae
FG
30int cls_log_trim(librados::IoCtx& io_ctx, const string& oid, const utime_t& from_time, const utime_t& to_time,
31 const string& from_marker, const string& to_marker);
9f95a23c 32#endif
7c673cae
FG
33
34void cls_log_info(librados::ObjectReadOperation& op, cls_log_header *header);
35
36#endif