// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef NETDATA_RRD_H
#define NETDATA_RRD_H 1
#ifdef __cplusplus
extern "C" {
#endif
// non-existing structs instead of voids
// to enable type checking at compile time
typedef struct storage_instance STORAGE_INSTANCE;
typedef struct storage_metric_handle STORAGE_METRIC_HANDLE;
// forward typedefs
typedef struct rrdhost RRDHOST;
typedef struct rrddim RRDDIM;
typedef struct rrdset RRDSET;
typedef struct rrdvar RRDVAR;
typedef struct rrdsetvar RRDSETVAR;
typedef struct rrddimvar RRDDIMVAR;
typedef struct rrdcalc RRDCALC;
typedef struct rrdcalctemplate RRDCALCTEMPLATE;
typedef struct alarm_entry ALARM_ENTRY;
typedef struct context_param CONTEXT_PARAM;
typedef void *ml_host_t;
typedef void *ml_dimension_t;
// forward declarations
struct rrddim_tier;
struct rrdset_volatile;
struct context_param;
#ifdef ENABLE_DBENGINE
struct rrdeng_page_descr;
struct rrdengine_instance;
struct pg_cache_page_index;
#endif
#include "daemon/common.h"
#include "web/api/queries/query.h"
#include "web/api/queries/rrdr.h"
#include "rrdvar.h"
#include "rrdsetvar.h"
#include "rrddimvar.h"
#include "rrdcalc.h"
#include "rrdcalctemplate.h"
#include "streaming/rrdpush.h"
#include "aclk/aclk_rrdhost_state.h"
#include "sqlite/sqlite_health.h"
#include "rrdcontext.h"
extern int storage_tiers;
extern int storage_tiers_grouping_iterations[RRD_STORAGE_TIERS];
typedef enum {
RRD_BACKFILL_NONE,
RRD_BACKFILL_FULL,
RRD_BACKFILL_NEW
} RRD_BACKFILL;
extern RRD_BACKFILL storage_tiers_backfill[RRD_STORAGE_TIERS];
enum {
CONTEXT_FLAGS_ARCHIVE = 0x01,
CONTEXT_FLAGS_CHART = 0x02,
CONTEXT_FLAGS_CONTEXT = 0x04
};
struct context_param {
RRDDIM *rd;
time_t first_entry_t