X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fcls%2Flog%2Fcls_log_client.h;fp=src%2Fceph%2Fsrc%2Fcls%2Flog%2Fcls_log_client.h;h=5af80755596ebefe36876d7cb8cfc8c1ce73eab5;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/cls/log/cls_log_client.h b/src/ceph/src/cls/log/cls_log_client.h new file mode 100644 index 0000000..5af8075 --- /dev/null +++ b/src/ceph/src/cls/log/cls_log_client.h @@ -0,0 +1,36 @@ +#ifndef CEPH_CLS_LOG_CLIENT_H +#define CEPH_CLS_LOG_CLIENT_H + +#include "cls_log_types.h" + +namespace librados { + class ObjectWriteOperation; + class ObjectReadOperation; + class IoCtx; +} + +/* + * log objclass + */ + +void cls_log_add_prepare_entry(cls_log_entry& entry, const utime_t& timestamp, + const string& section, const string& name, bufferlist& bl); + +void cls_log_add(librados::ObjectWriteOperation& op, list& entries, bool monotonic_inc); +void cls_log_add(librados::ObjectWriteOperation& op, cls_log_entry& entry); +void cls_log_add(librados::ObjectWriteOperation& op, const utime_t& timestamp, + const string& section, const string& name, bufferlist& bl); + +void cls_log_list(librados::ObjectReadOperation& op, utime_t& from, utime_t& to, + const string& in_marker, int max_entries, + list& entries, + string *out_marker, bool *truncated); + +void cls_log_trim(librados::ObjectWriteOperation& op, const utime_t& from_time, const utime_t& to_time, + const string& from_marker, const string& to_marker); +int cls_log_trim(librados::IoCtx& io_ctx, const string& oid, const utime_t& from_time, const utime_t& to_time, + const string& from_marker, const string& to_marker); + +void cls_log_info(librados::ObjectReadOperation& op, cls_log_header *header); + +#endif