<commit_before>#ifndef CONFIG_H
#define CONFIG_H
#include <stdint.h>
#include <syslog.h>
#include <stdbool.h>
#include "radix.h"

typedef enum {
    UNKNOWN,
    KEY_VAL,
    GAUGE,
    COUNTER,
    TIMER,
    SET,
    GAUGE_DELTA
} metric_type;

typedef enum {
    SINK_TYPE_STREAM,
    SINK_TYPE_HTTP
} sink_type;

#define METRIC_TYPES 7

/**
 * A string-string KV list for loading parameters from a config file
 * before transformation/validation.  Useful if information will be
 * ordered differently and certain fields are required before others.
 */
typedef struct kv_config {
    const char* section;
    const char* k;
    const char* v;
    struct kv_config* next;
} kv_config;

///// SINK CONFIGURATION

/**
 * The sink configuration base type
 */
typedef struct sink_config {
    sink_type type;
    char* name;
    struct sink_config *next;
} sink_config;

/**
 * A stream command sink, with a binary option.
 */
typedef struct sink_config_stream {
    sink_config super;
    bool binary_stream;
    const char* stream_cmd;
} sink_config_stream;

/**
 * An HTTP sink config.
 */
typedef struct sink_config_http {
    sink_config super;
    const char* post_url;
    kv_config* params;
    const char* metrics_name; /* The name of the metric parameter */
    const char* timestamp_name; /* The name of the timestamp */
    const char* timestamp_format; /* The format specifier, strftime format */
    const char* ciphers; /* A platform dependent list of ciphers */
    const char* oauth_key; /* OAuth2 Consumer Key */
    const char* oauth_secret; /* OAuth2 Secret */
    const char* oauth_token_url; /* URL to get a new token from */
    const int max_buffer_size; /* LIFOQ maximum queue size */
} sink_config_http;

// Represents the configuration of a histogram
typedef struct histogram_config {<commit_msg>Remove const on settable config<commit_after>#ifndef CONFIG_H
#define CONFIG_H
#include <stdint.h>
#include <syslog.h>
#include <stdbool.h>
#include "radix.h"

typedef enum {
    UNKNOWN,
    KEY_VAL,
    GAUGE,
    COUNTER,
    TIMER,
    SET,
    GAUGE_DELTA
} metric_type;

typedef enum {
    SINK_TYPE_STREAM,
    SINK_TYPE_HTTP
} sink_type;

#define METRIC_TYPES 7

/**
 * A string-string KV list for loading parameters from a config file
 * before transformation/validation.  Useful if information will be
 * ordered differently and certain fields are required before others.
 */
typedef struct kv_config {
    const char* section;
    const char* k;
    const char* v;
    struct kv_config* next;
} kv_config;

///// SINK CONFIGURATION

/**
 * The sink configuration base type
 */
typedef struct sink_config {
    sink_type type;
    char* name;
    struct sink_config *next;
} sink_config;

/**
 * A stream command sink, with a binary option.
 */
typedef struct sink_config_stream {
    sink_config super;
    bool binary_stream;
    const char* stream_cmd;
} sink_config_stream;

/**
 * An HTTP sink config.
 */
typedef struct sink_config_http {
    sink_config super;
    const char* post_url;
    kv_config* params;
    const char* metrics_name; /* The name of the metric parameter */
    const char* timestamp_name; /* The name of the timestamp */
    const char* timestamp_format; /* The format specifier, strftime format */
    const char* ciphers; /* A platform dependent list of ciphers */
    const char* oauth_key; /* OAuth2 Consumer Key */
    const char* oauth_secret; /* OAuth2 Secret */
    const char* oauth_token_url; /* URL to get a new token from */
    int max_buffer_size; /* LIFOQ maximum queue size */
} sink_config_http;

// Represents the configuration of a histogram
typedef struct histogram_config {
{'fraction_non_alphanumeric': 0.08648056923918993, 'fraction_numerical': 0.0016420361247947454, 'mean_word_length': 3.3203309692671397, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4172911', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1138, 'n_words': 395}