]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/include/rados/librados.h
update sources to v12.1.1
[ceph.git] / ceph / src / include / rados / librados.h
index 8fa4b69f5709b468f3cdc112ae2042bbf06df1ba..544c2dbca393c035928e24b56d1fb028d9b0b5be 100644 (file)
@@ -3677,6 +3677,7 @@ typedef void (*rados_log_callback_t)(void *arg,
  */
 typedef void (*rados_log_callback2_t)(void *arg,
                                     const char *line,
+                                    const char *channel,
                                     const char *who,
                                     const char *name,
                                     uint64_t sec, uint64_t nsec,
@@ -3688,6 +3689,47 @@ CEPH_RADOS_API int rados_monitor_log(rados_t cluster, const char *level,
 CEPH_RADOS_API int rados_monitor_log2(rados_t cluster, const char *level,
                                      rados_log_callback2_t cb, void *arg);
 
+
+/**
+ * register daemon instance for a service
+ *
+ * Register us as a daemon providing a particular service.  We identify
+ * the service (e.g., 'rgw') and our instance name (e.g., 'rgw.$hostname').
+ * The metadata is a map of keys and values with arbitrary static metdata
+ * for this instance.  The encoding is a series of NULL-terminated strings,
+ * alternating key names and values, terminating with an empty key name.
+ * For example,  "foo\0bar\0this\0that\0\0" is the dict {foo=bar,this=that}.
+ *
+ * For the lifetime of the librados instance, regular beacons will be sent
+ * to the cluster to maintain our registration in the service map.
+ *
+ * @param cluster handle
+ * @param service service name
+ * @param daemon deamon instance name
+ * @param metadata_dict static daemon metadata dict
+ */
+CEPH_RADOS_API int rados_service_register(
+  rados_t cluster,
+  const char *service,
+  const char *daemon,
+  const char *metadata_dict);
+
+/**
+ * update daemon status
+ *
+ * Update our mutable status information in the service map.
+ *
+ * The status dict is encoded the same way the daemon metadata is encoded
+ * for rados_service_register.  For example, "foo\0bar\0this\0that\0\0" is
+ * {foo=bar,this=that}.
+ *
+ * @param cluster rados cluster handle
+ * @param status_dict status dict
+ */
+CEPH_RADOS_API int rados_service_update_status(
+  rados_t cluster,
+  const char *status_dict);
+
 /** @} Mon/OSD/PG commands */
 
 /*