// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef NETDATA_INCREMENTAL_PARSER_H
#define NETDATA_INCREMENTAL_PARSER_H 1
#include "daemon/common.h"
#define PARSER_MAX_CALLBACKS 20
#define PARSER_MAX_RECOVER_KEYWORDS 128
// PARSER return codes
typedef enum parser_rc {
PARSER_RC_OK, // Callback was successful, go on
PARSER_RC_STOP, // Callback says STOP
PARSER_RC_ERROR // Callback failed (abort rest of callbacks)
} PARSER_RC;
typedef struct pluginsd_action {
PARSER_RC (*set_action)(void *user, RRDSET *st, RRDDIM *rd, long long int value);
PARSER_RC (*begin_action)(void *user, RRDSET *st, usec_t microseconds, int trust_durations);
PARSER_RC (*end_action)(void *user, RRDSET *st);
PARSER_RC (*chart_action)
(void *user, char *type, char *id, char *name, char *family, char *context, char *title, char *units, char *plugin,
char *module, int priority, int update_every, RRDSET_TYPE chart_type, char *options);
PARSER_RC (*dimension_action)
(void *user, RRDSET *st, char *id, char *name, char *algorithm, long multiplier, long divisor, char *options,
RRD_ALGORITHM algorithm_type);
PARSER_RC (*flush_action)(void *user, RRDSET *st);
PARSER_RC (*disable_action)(void *user);
PARSER_RC (*variable_action)(void *user, RRDHOST *host, RRDSET *st, char *name, int global, calculated_number value);
PARSER_RC (*label_action)(void *user, char *key, char *value, LABEL_SOURCE source);
PARSER_RC (*overwrite_action)(void *user, RRDHOST *host, struct label *new_labels);
PARSER_RC (*guid_action)(void *user, uuid_t *uuid);
PARSER_RC (*context_action)(void *user, uuid_t *uuid);
PARSER_RC (*tombstone_action)(void *user, uuid_t *uuid);
PARSER_RC (*host_action)(void *user, char *machine_guid, char *hostname, char *registry_hostname, int update_every, char *os,
char *timezone, char *tags);
} PLUGINSD_ACTION;
typedef enum parser_input_type {
PARSER_INPUT_SPLIT = 1