root/include/crm/common/xml_io.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2004-2024 the Pacemaker project contributors
   3  *
   4  * The version control history for this file may have further details.
   5  *
   6  * This source code is licensed under the GNU Lesser General Public License
   7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #ifndef PCMK__CRM_COMMON_XML_IO__H
  11 #define PCMK__CRM_COMMON_XML_IO__H
  12 
  13 #include <libxml/tree.h>    // xmlNode
  14 
  15 #ifdef __cplusplus
  16 extern "C" {
  17 #endif
  18 
  19 /**
  20  * \file
  21  * \brief Wrappers for and extensions to XML input/output functions
  22  * \ingroup core
  23  */
  24 
  25 /* Define compression parameters for IPC messages
  26  *
  27  * Compression costs a LOT, so we don't want to do it unless we're hitting
  28  * message limits. Currently, we use 128KB as the threshold, because higher
  29  * values don't play well with the heartbeat stack. With an earlier limit of
  30  * 10KB, compressing 184 of 1071 messages accounted for 23% of the total CPU
  31  * used by the cib.
  32  */
  33 #define CRM_BZ2_BLOCKS      4
  34 #define CRM_BZ2_WORK        20
  35 #define CRM_BZ2_THRESHOLD   (128 * 1024)
  36 
  37 void save_xml_to_file(const xmlNode *xml, const char *desc,
  38                       const char *filename);
  39 
  40 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
  41 #include <crm/common/xml_io_compat.h>
  42 #endif
  43 
  44 #ifdef __cplusplus
  45 }
  46 #endif
  47 
  48 #endif  // PCMK__CRM_COMMON_XML_IO__H

/* [previous][next][first][last][top][bottom][index][help] */