Kafka global structures.
More...
#include <freeradius-devel/kafka/base.h>
#include <freeradius-devel/server/cf_parse.h>
#include <freeradius-devel/server/tmpl.h>
#include <freeradius-devel/util/value.h>
#include <freeradius-devel/util/sbuff.h>
#include <freeradius-devel/util/size.h>
Go to the source code of this file.
|
static int | _kafka_conf_free (fr_kafka_conf_t *kc) |
| Destroy a kafka configuration handle. More...
|
|
static int | _kafka_topic_conf_free (fr_kafka_topic_conf_t *ktc) |
| Destroy a kafka topic configuration handle. More...
|
|
static fr_kafka_conf_t * | kafka_conf_from_cs (CONF_SECTION *cs) |
|
static int | kafka_config_dflt (CONF_PAIR **out, void *parent, CONF_SECTION *cs, fr_token_t quote, conf_parser_t const *rule) |
| Return the default value from the kafka client library. More...
|
|
static int | kafka_config_dflt_single (CONF_PAIR **out, UNUSED void *parent, CONF_SECTION *cs, char const *value, fr_token_t quote, conf_parser_t const *rule) |
| Perform any conversions necessary to map kafka defaults to our values. More...
|
|
static int | kafka_config_parse (TALLOC_CTX *ctx, UNUSED void *out, UNUSED void *base, CONF_ITEM *ci, conf_parser_t const *rule) |
| Translate config items directly to settings in a kafka config struct. More...
|
|
static int | kafka_config_parse_single (char const **out, CONF_PAIR *cp, conf_parser_t const *rule) |
|
static fr_kafka_topic_conf_t * | kafka_topic_conf_from_cs (CONF_SECTION *cs) |
|
static int | kafka_topic_config_dflt (CONF_PAIR **out, void *parent, CONF_SECTION *cs, fr_token_t quote, conf_parser_t const *rule) |
| Return the default value for a topic from the kafka client library. More...
|
|
static int | kafka_topic_config_parse (UNUSED TALLOC_CTX *ctx, UNUSED void *out, UNUSED void *base, CONF_ITEM *ci, conf_parser_t const *rule) |
| Translate config items directly to settings in a kafka topic config struct. More...
|
|
Kafka global structures.
- Id
- 1c5b31927d4e569cd934a3f2d567d2a70091105c
- Copyright
- 2022 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
Definition in file base.c.
◆ fr_kafka_conf_ctx_t
struct fr_kafka_conf_ctx_t |
Definition at line 40 of file base.c.
Data Fields |
bool |
empty_default |
Don't produce messages saying the default is missing. |
fr_table_ptr_sorted_t * |
mapping |
Mapping table between string constant. |
size_t * |
mapping_len |
Length of the mapping tables. |
char const * |
property |
Kafka configuration property. |
size_t |
size_scale |
Divide/multiply FR_TYPE_SIZE by this amount. |
char const * |
string_sep |
Used for multi-value configuration items. Kafka uses ', ' or ';' seemingly at random.
|
◆ fr_kafka_conf_t
Definition at line 32 of file base.c.
Data Fields |
rd_kafka_conf_t * |
conf |
|
◆ fr_kafka_topic_conf_t
struct fr_kafka_topic_conf_t |
Definition at line 36 of file base.c.
Data Fields |
rd_kafka_topic_conf_t * |
conf |
|
◆ BASE_CONFIG
Value:
#define FR_CONF_SUBSECTION_GLOBAL(_name, _flags, _subcs)
conf_parser_t entry which runs conf_parser_t entries for a subsection without any output
@ CONF_FLAG_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
@ CONF_FLAG_MULTI
CONF_PAIR can have multiple copies.
#define FR_CONF_FUNC(_name, _type, _flags, _func, _dflt_func)
conf_parser_t entry which doesn't fill in a pointer or offset, but relies on functions to record valu...
static conf_parser_t const kafka_connection_config[]
static int kafka_config_parse(TALLOC_CTX *ctx, UNUSED void *out, UNUSED void *base, CONF_ITEM *ci, conf_parser_t const *rule)
Translate config items directly to settings in a kafka config struct.
static conf_parser_t const kafka_version_config[]
static conf_parser_t const kafka_tls_config[]
static int kafka_config_dflt(CONF_PAIR **out, void *parent, CONF_SECTION *cs, fr_token_t quote, conf_parser_t const *rule)
Return the default value from the kafka client library.
static conf_parser_t const kafka_metadata_config[]
static conf_parser_t const kafka_sasl_config[]
@ FR_TYPE_STRING
String of printable characters.
@ FR_TYPE_SIZE
Unsigned integer capable of representing any memory address on the local system.
Definition at line 829 of file base.c.
◆ _kafka_conf_free()
Destroy a kafka configuration handle.
- Parameters
-
- Returns
- 0
Definition at line 60 of file base.c.
◆ _kafka_topic_conf_free()
Destroy a kafka topic configuration handle.
- Parameters
-
- Returns
- 0
Definition at line 90 of file base.c.
◆ kafka_conf_from_cs()
◆ kafka_config_dflt()
Return the default value from the kafka client library.
- Parameters
-
[out] | out | Where to write the pair. |
[in] | parent | being populated. |
[in] | cs | to allocate the pair in. |
[in] | quote | to use when allocing the pair. |
[in] | rule | UNUSED. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 210 of file base.c.
◆ kafka_config_dflt_single()
Perform any conversions necessary to map kafka defaults to our values.
- Parameters
-
[out] | out | Where to write the pair. |
[in] | parent | being populated. |
[in] | cs | to allocate the pair in. |
[in] | value | to convert. |
[in] | quote | to use when allocing the pair. |
[in] | rule | UNUSED. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 127 of file base.c.
◆ kafka_config_parse()
Translate config items directly to settings in a kafka config struct.
- Parameters
-
[in] | ctx | to allocate fr_kafka_conf_t in. |
[out] | out | Unused. |
[in] | base | Unused. |
[in] | ci | To parse. |
[in] | rule | describing how to parse the item. |
- Returns
- 0 on success.
- -1 on failure
Definition at line 429 of file base.c.
◆ kafka_config_parse_single()
◆ kafka_topic_conf_from_cs()
◆ kafka_topic_config_dflt()
Return the default value for a topic from the kafka client library.
- Parameters
-
[out] | out | Where to write the pair. |
[in] | parent | being populated. |
[in] | cs | to allocate the pair in. |
[in] | quote | to use when allocing the pair. |
[in] | rule | UNUSED. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 292 of file base.c.
◆ kafka_topic_config_parse()
Translate config items directly to settings in a kafka topic config struct.
- Parameters
-
[in] | ctx | to allocate fr_kafka_conf_t in. |
[out] | out | Unused. |
[in] | base | Unused. |
[in] | ci | To parse. |
[in] | rule | describing how to parse the item. |
- Returns
- 0 on success.
- -1 on failure
Definition at line 501 of file base.c.
◆ kafka_base_consumer_config
◆ kafka_base_consumer_topic_config
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
@ FR_TYPE_UINT32
32 Bit unsigned integer.
Definition at line 895 of file base.c.
◆ kafka_base_consumer_topics_config
Initial value:= {
}
static conf_parser_t const kafka_base_consumer_topic_config[]
Definition at line 924 of file base.c.
◆ kafka_base_producer_config
◆ kafka_base_producer_topic_config
Initial value:= {
}
static int kafka_topic_config_dflt(CONF_PAIR **out, void *parent, CONF_SECTION *cs, fr_token_t quote, conf_parser_t const *rule)
Return the default value for a topic from the kafka client library.
static int kafka_topic_config_parse(UNUSED TALLOC_CTX *ctx, UNUSED void *out, UNUSED void *base, CONF_ITEM *ci, conf_parser_t const *rule)
Translate config items directly to settings in a kafka topic config struct.
@ FR_TYPE_TIME_DELTA
A period of time measured in nanoseconds.
@ FR_TYPE_INT8
8 Bit signed integer.
@ FR_TYPE_INT16
16 Bit signed integer.
Definition at line 1035 of file base.c.
◆ kafka_base_producer_topics_config
Initial value:= {
}
static conf_parser_t const kafka_base_producer_topic_config[]
Definition at line 1086 of file base.c.
◆ kafka_check_cert_cn_table
Initial value:= {
}
#define L(_str)
Helper for initialising arrays of string literals.
Definition at line 617 of file base.c.
◆ kafka_check_cert_cn_table_len
◆ kafka_connection_config
◆ kafka_consumer_group_config
Initial value:
Definition at line 854 of file base.c.
◆ kafka_metadata_config
Initial value:= {
.uctx = &(
fr_kafka_conf_ctx_t){ .property =
"topic.blacklist", .string_sep =
",", .empty_default =
true }},
}
@ FR_TYPE_BOOL
A truth value.
Definition at line 789 of file base.c.
◆ kafka_sasl_config
Initial value:= {
}
@ CONF_FLAG_SECRET
Only print value if debug level >= 3.
static conf_parser_t const kafka_sasl_oauth_config[]
static conf_parser_t const kafka_sasl_kerberos_config[]
Definition at line 591 of file base.c.
◆ kafka_sasl_kerberos_config
Initial value:= {
.uctx = &(
fr_kafka_conf_ctx_t){ .property =
"sasl.kerberos.kinit.keytab", .empty_default =
true }},
}
@ CONF_FLAG_FILE_INPUT
File matching value must exist, and must be readable.
Definition at line 557 of file base.c.
◆ kafka_sasl_oauth_config
Initial value:= {
.uctx = &(
fr_kafka_conf_ctx_t){ .property =
"sasl.oauthbearer.config", .empty_default =
true }},
}
Definition at line 547 of file base.c.
◆ kafka_tls_config
◆ kafka_version_config
Initial value:
Definition at line 761 of file base.c.