ecoli_config(3)
ecoli_config(3) โ Node configuration ๐ (Libecoli)
NAME
ecoli_config โ Node configuration ๐ฆ
- Configure nodes behavior through generic API.
SYNOPSIS
okay bestie, here's the whole lineup โ every single thing this page ships with. ๐
๐ฆ Data Structures
struct ec_config_schemastruct ec_config
๐ข Enumerations
enum ec_config_type { EC_CONFIG_TYPE_NONE = 0, EC_CONFIG_TYPE_BOOL,
EC_CONFIG_TYPE_INT64, EC_CONFIG_TYPE_UINT64, EC_CONFIG_TYPE_STRING,
EC_CONFIG_TYPE_NODE, EC_CONFIG_TYPE_LIST, EC_CONFIG_TYPE_DICT }
enum ec_config_flags { EC_CONFIG_F_MANDATORY = 1 << 0 }
๐ ๏ธ Functions
int ec_config_schema_validate (const struct ec_config_schema *schema)
void ec_config_schema_dump (FILE *out, const struct ec_config_schema
*schema, const char *name)
const struct ec_config_schema * ec_config_schema_lookup (const struct
ec_config_schema *schema, const char *key)
enum ec_config_type ec_config_schema_type (const struct ec_config_schema
*schema_elt)
const struct ec_config_schema * ec_config_schema_sub (const struct
ec_config_schema *schema_elt)
bool ec_config_key_is_reserved (const char *name)
enum ec_config_type ec_config_get_type (const struct ec_config *config)
struct ec_config * ec_config_bool (bool boolean)
struct ec_config * ec_config_i64 (int64_t i64)
struct ec_config * ec_config_u64 (uint64_t u64)
struct ec_config * ec_config_string (const char *string)
struct ec_config * ec_config_node (struct ec_node *node)
struct ec_config * ec_config_dict (void)
struct ec_config * ec_config_list (void)
int ec_config_list_add (struct ec_config *list, struct ec_config *value)
int ec_config_list_del (struct ec_config *list, struct ec_config
*config)
ssize_t ec_config_count (const struct ec_config *config)
int ec_config_validate (const struct ec_config *dict, const struct
ec_config_schema *schema)
int ec_config_dict_set (struct ec_config *dict, const char *key, struct
ec_config *value)
int ec_config_dict_del (struct ec_config *dict, const char *key)
int ec_config_cmp (const struct ec_config *config1, const struct
ec_config *config2)
struct ec_config * ec_config_dict_get (const struct ec_config *config,
const char *key)
struct ec_config * ec_config_list_first (struct ec_config *list)
struct ec_config * ec_config_list_next (struct ec_config *list, struct
ec_config *config)
void ec_config_free (struct ec_config *config)
struct ec_config * ec_config_dup (const struct ec_config *config)
void ec_config_dump (FILE *out, const struct ec_config *config)
struct ec_node ** ec_node_config_node_list_to_table (const struct
ec_config *config, size_t *len)
struct ec_config * ec_node_config_node_list_from_vargs (va_list ap)
๐ธ Variables
const char * ec_config_reserved_keys []
DETAILED DESCRIPTION ๐
okay so the whole vibe here is: configure nodes behavior through generic API. These are helpers that are commonly used in nodes โ iykyk. โจ
ENUMERATION TYPE DOCUMENTATION ๐
enum ec_config_type
this enum is literally the type identifier for a config value. periodt. ๐
Definition at line 25 of file config.h.
enum ec_config_flags
these are the flags related to a configuration schema. slay. ๐
Definition at line 39 of file config.h.
โจ FUNCTION DOCUMENTATION โจ
okay so this is the function buffet, bestie โ every single one is here, no skipping, no cap. ๐
๐ int ec_config_schema_validate (const struct ec_config_schema * schema)
Runs a whole vibe check on a configuration schema array. โจ
- Parameters:
schemaโ pointer to the first element of the schema array. The array must be terminated by a sentinel entry{.type = EC_CONFIG_TYPE_NONE}. periodt.
- Returns:
0if the schema is valid, or-1on error (errnois set). ๐ญ
๐ void ec_config_schema_dump (FILE * out, const struct ec_config_schema * schema, const char * name)
Dumps a configuration schema array. cute.
- Parameters:
outโ output stream on which the dump will be sent.schemaโ pointer to the first element of the schema array. The array must be terminated by a sentinel entry{.type == EC_CONFIG_TYPE_NONE}.nameโ the name of the schema. ๐ซ
๐ const struct ec_config_schema* ec_config_schema_lookup (const struct ec_config_schema * schema, const char * key)
Finds the schema entry that matches the key. It browses the schema array and looks up the given key โ lowkey detective energy. ๐ต๏ธโโ๏ธ
- Parameters:
schemaโ pointer to the first element of the schema array. The array must be terminated by a sentinel entry{.type == EC_CONFIG_TYPE_NONE}.keyโ schema key name.
- Returns: the schema entry if it matches a key, or
NULLif not found. ๐ซถ
๐ enum ec_config_type ec_config_schema_type (const struct ec_config_schema * schema_elt)
Gets the type of a schema entry. slay.
- Parameters:
schema_eltโ pointer to an element of the schema array.
- Returns: the type of the schema entry. ๐ธ
๐ฆ const struct ec_config_schema* ec_config_schema_sub (const struct ec_config_schema * schema_elt)
Gets the subschema of a schema entry. iykyk.
- Parameters:
schema_eltโ pointer to an element of the schema array.
- Returns: the subschema if any, or
NULL. ๐
๐ bool ec_config_key_is_reserved (const char * name)
Checks if a key name is reserved in a config dict. Some key names are reserved and should not be used in configs โ respect the reserve list, bestie. ๐ซ
- Parameters:
nameโ the name of the key to test.
- Returns:
Trueif the key name is reserved and must not be used, elsefalse. โจ
๐ enum ec_config_type ec_config_get_type (const struct ec_config * config)
Gets the type of the configuration. iconic.
- Parameters:
configโ the configuration.
- Returns: the configuration type. ๐
๐ struct ec_config* ec_config_bool (bool boolean)
Creates a boolean configuration value. yes maโam.
- Parameters:
booleanโ the boolean value to be set.
- Returns: the configuration object, or
NULLon error (errnois set). ๐ญ
๐ง struct ec_config* ec_config_i64 (int64_t i64)
Creates a signed integer configuration value. signed and sealed. ๐
- Parameters:
i64โ the signed integer value to be set.
- Returns: the configuration object, or
NULLon error (errnois set). โจ
๐ฆ struct ec_config* ec_config_u64 (uint64_t u64)
Creates an unsigned configuration value. unsigned rights. ๐
- Parameters:
u64โ the unsigned integer value to be set.
- Returns: the configuration object, or
NULLon error (errnois set). ๐ธ
๐ struct ec_config* ec_config_string (const char * string)
Creates a string configuration value. the string gets copied into the configuration object, so no sharing drama. ๐ซถ
- Parameters:
stringโ the string value to be set. The string is copied into the configuration object.
- Returns: the configuration object, or
NULLon error (errnois set). ๐
๐ struct ec_config* ec_config_node (struct ec_node * node)
Creates a node configuration value. important bestie: the node is consumed by the function and should not be used by the caller, even on error. if you need to keep a reference, the caller can use ec_node_clone(). no take-backs. ๐ค
- Parameters:
nodeโ the node pointer to be set. The node is'consumed'by the function and should not be used by the caller, even on error. The caller can useec_node_clone()to keep a reference on the node.
- Returns: the configuration object, or
NULLon error (errnois set). โจ
๐ฅ struct ec_config* ec_config_dict (void)
Creates a hash table configuration value. main character hash table energy. ๐
- Returns: a configuration object containing an empty hash table, or
NULLon error (errnois set). ๐
๐ธ struct ec_config* ec_config_list (void)
Creates a list configuration value. empty list, loaded potential. โจ
- Returns: the configuration object containing an empty list, or
NULLon error (errnois set). ๐
๐ int ec_config_list_add (struct ec_config * list, struct ec_config * value)
Adds a config object into a list. yup, thatโs the whole assignment. ๐
- Parameters:
listโ the list configuration in which the value will be added.valueโ the value configuration to add in the list. The value object will be freed when freeing the list object. On error, the value object is also freed.
- Returns:
0on success, else-1(errnois set). ๐ญ
๐ฆ int ec_config_list_del (struct ec_config * list, struct ec_config * config)
Removes an element from a list. the element is freed and should not be accessed โ do not touch, bestie. ๐ซ
- Parameters:
listโ the list configuration.configโ the element to remove from the list.
- Returns:
0on success,-1on error (errnois set). ๐
๐ ssize_t ec_config_count (const struct ec_config * config)
Counts the number of elements in a list or dict. math but make it cute. ๐งฎ
- Parameters:
configโ the configuration that must be a list or a dict.
- Returns: the number of elements, or
-1on error (errnois set). โจ
๐ง int ec_config_validate (const struct ec_config * dict, const struct ec_config_schema * schema)
Validates a configuration. the ultimate vibe check for your dict. โ
- Parameters:
dictโ a hash table configuration to validate.schemaโ pointer to the first element of the schema array. The array must be terminated by a sentinel entry (type == EC_CONFIG_TYPE_NONE).
- Returns:
0on success,-1on error (errnois set). ๐
๐ int ec_config_dict_set (struct ec_config * dict, const char * key, struct ec_config * value)
Sets a value in a hash table configuration. put it in the dict, slay. ๐
- Parameters:
dictโ the hash table configuration.keyโ the key to update.valueโ the value to set. The value object will be freed when freeing the dict object. On error, the value object is also freed.
- Returns:
0on success,-1on error (errnois set). ๐ธ
๐ int ec_config_dict_del (struct ec_config * dict, const char * key)
Removes an element from a hash table configuration. the element is freed and should not be accessed โ no peeking after delete. ๐
- Parameters:
dictโ the hash table configuration.keyโ the key of the configuration to delete.
- Returns:
0on success,-1on error (errnois set). ๐
๐ฅ int ec_config_cmp (const struct ec_config * config1, const struct ec_config * config2)
Compare two configurations. And because the page said it twice: compare two configurations. ๐
- Returns:
0if the configurations are equal, else-1. โจ
๐ struct ec_config* ec_config_dict_get (const struct ec_config * config, const char * key)
Get configuration value. thatโs the whole description, no extra param or return deets on this one โ iykyk. ๐ซถ
๐ struct ec_config* ec_config_list_first (struct ec_config * list)
Gets the first element of a list. starter energy. โจ
Example of use:
for (config = ec_config_list_first(list);
config != NULL;
config = ec_config_list_next(list, config)) {
...
}
- Parameters:
listโ the list configuration to iterate.
- Returns: the first configuration element, or
NULLon error (errnois set). ๐
๐ฆ struct ec_config* ec_config_list_next (struct ec_config * list, struct ec_config * config)
Gets the next element in a list. keep it moving, bestie. ๐
- Parameters:
listโ the list configuration being iterated.configโ the current configuration element.
- Returns: the next configuration element, or
NULLif there is no more element. ๐ธ
๐ void ec_config_free (struct ec_config * config)
Frees a configuration. release it, periodt. ๐๏ธ
- Parameters:
configโ the element to free. ๐
๐ง struct ec_config* ec_config_dup (const struct ec_config * config)
Duplicates a configuration. twin where? ๐ฏโโ๏ธ
- Parameters:
configโ the configuration to duplicate.
- Returns: the duplicated configuration, or
NULLon error (errnois set). โจ
๐ void ec_config_dump (FILE * out, const struct ec_config * config)
Dumps a configuration. show us whatโs inside. ๐
- Parameters:
outโ output stream on which the dump will be sent.configโ the configuration to dump. ๐
๐ struct ec_node** ec_node_config_node_list_to_table (const struct ec_config * config, size_t * len)
Builds a node table from a node list in an ec_config. The function takes a node configuration as parameter, which must be a node list. From it, a node table is built. A reference is taken for each node. On error, no reference is taken. no half-done slay. โจ
- Parameters:
configโ the configuration (type must be a list of nodes). If it isNULL, an error is returned.lenโ the length of the allocated table on success, or0on error.
- Returns: the allocated node table, that must be freed by the caller: each entry must be freed with
ec_node_free()and the table withfree(). On error,NULLis returned anderrnois set. ๐ญ
๐ธ struct ec_config* ec_node_config_node_list_from_vargs (va_list ap)
Builds a list of config nodes from variable arguments. The va_list argument is a list of pointer to ec_node structures, terminated with EC_VA_END. This helper is used by nodes that contain a list of nodes, like 'seq', 'or', ... โ the group chat of nodes, fr fr. ๐ฌ
- Parameters:
apโ list of pointer toec_nodestructures, terminated withEC_VA_END.
- Returns: a pointer to an
ec_configstructure. In this case, the nodes will be freed when the config structure will be freed. On error,NULLis returned (anderrnois set), and the nodes are freed. ๐
๐ VARIABLE DOCUMENTATION ๐
const char* ec_config_reserved_keys[][extern]โ array of reserved key names. the no-go list, bestie. ๐ซโจ
๐ AUTHOR ๐
Generated automatically by Doxygen for Libecoli from the source code. iconic behavior. ๐
mwah ๐ โ this cutie came from the Libecoli source code, version 0.11.3, dated Thu Apr 9 2026, and yes itโs ecoli_config(3). periodt โจ
๐ฆ where this page comes from
- epel 9: libecoli-devel 0.11.3-1.el9 ยท BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms