@@ -1575,6 +1575,120 @@ bool envoy_dynamic_module_callback_http_get_metadata_string(
15751575 envoy_dynamic_module_type_module_buffer ns, envoy_dynamic_module_type_module_buffer key,
15761576 envoy_dynamic_module_type_envoy_buffer* result);
15771577
1578+ /* *
1579+ * envoy_dynamic_module_callback_http_set_dynamic_metadata_bool is called by the module to set
1580+ * the bool value of the dynamic metadata with the given namespace and key. If the metadata is
1581+ * existing, it will be overwritten.
1582+ *
1583+ * @param filter_envoy_ptr is the pointer to the DynamicModuleHttpFilter object of the
1584+ * corresponding HTTP filter.
1585+ * @param ns is the namespace of the dynamic metadata.
1586+ * @param key is the key of the dynamic metadata.
1587+ * @param value is the bool value of the dynamic metadata to be set.
1588+ */
1589+ void envoy_dynamic_module_callback_http_set_dynamic_metadata_bool (
1590+ envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
1591+ envoy_dynamic_module_type_module_buffer ns, envoy_dynamic_module_type_module_buffer key,
1592+ bool value);
1593+
1594+ /* *
1595+ * envoy_dynamic_module_callback_http_get_metadata_bool is called by the module to get
1596+ * the bool value of the dynamic metadata with the given namespace and key. If the metadata is not
1597+ * accessible, the namespace does not exist, the key does not exist or the value is not a bool,
1598+ * this returns false.
1599+ *
1600+ * @param filter_envoy_ptr is the pointer to the DynamicModuleHttpFilter object of the
1601+ * corresponding HTTP filter.
1602+ * @param metadata_source is the source of the metadata.
1603+ * @param ns is the namespace of the dynamic metadata.
1604+ * @param key is the key of the dynamic metadata.
1605+ * @param result is the pointer to the variable where the bool value of the dynamic metadata will
1606+ * be stored.
1607+ * @return true if the operation is successful, false otherwise.
1608+ */
1609+ bool envoy_dynamic_module_callback_http_get_metadata_bool (
1610+ envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
1611+ envoy_dynamic_module_type_metadata_source metadata_source,
1612+ envoy_dynamic_module_type_module_buffer ns, envoy_dynamic_module_type_module_buffer key,
1613+ bool * result);
1614+
1615+ /* *
1616+ * envoy_dynamic_module_callback_http_get_metadata_keys_count is called by the module to get the
1617+ * number of keys in the metadata namespace. If the metadata is not accessible or the namespace
1618+ * does not exist, this returns 0.
1619+ *
1620+ * @param filter_envoy_ptr is the pointer to the DynamicModuleHttpFilter object of the
1621+ * corresponding HTTP filter.
1622+ * @param metadata_source is the source of the metadata.
1623+ * @param ns is the namespace of the dynamic metadata.
1624+ * @return the number of keys in the metadata namespace.
1625+ */
1626+ size_t envoy_dynamic_module_callback_http_get_metadata_keys_count (
1627+ envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
1628+ envoy_dynamic_module_type_metadata_source metadata_source,
1629+ envoy_dynamic_module_type_module_buffer ns);
1630+
1631+ /* *
1632+ * envoy_dynamic_module_callback_http_get_metadata_keys is called by the module to get all keys
1633+ * in the metadata namespace. The keys are returned as an array of
1634+ * envoy_dynamic_module_type_envoy_buffer.
1635+ *
1636+ * PRECONDITION: The module must ensure that the result_buffer_vector is valid and has enough length
1637+ * to store all the keys. The module can use
1638+ * envoy_dynamic_module_callback_http_get_metadata_keys_count to get the number of
1639+ * keys before calling this function.
1640+ *
1641+ * @param filter_envoy_ptr is the pointer to the DynamicModuleHttpFilter object of the
1642+ * corresponding HTTP filter.
1643+ * @param metadata_source is the source of the metadata.
1644+ * @param ns is the namespace of the dynamic metadata.
1645+ * @param result_buffer_vector is the pointer to the array of envoy_dynamic_module_type_envoy_buffer
1646+ * where the key strings will be stored. The lifetime of the buffer is guaranteed until the
1647+ * end of the current event hook unless the setter callback is called.
1648+ * @return true if the operation is successful, false otherwise.
1649+ */
1650+ bool envoy_dynamic_module_callback_http_get_metadata_keys (
1651+ envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
1652+ envoy_dynamic_module_type_metadata_source metadata_source,
1653+ envoy_dynamic_module_type_module_buffer ns,
1654+ envoy_dynamic_module_type_envoy_buffer* result_buffer_vector);
1655+
1656+ /* *
1657+ * envoy_dynamic_module_callback_http_get_metadata_namespaces_count is called by the module to get
1658+ * the number of namespaces in the metadata. If the metadata is not accessible, this returns 0.
1659+ *
1660+ * @param filter_envoy_ptr is the pointer to the DynamicModuleHttpFilter object of the
1661+ * corresponding HTTP filter.
1662+ * @param metadata_source is the source of the metadata.
1663+ * @return the number of namespaces in the metadata.
1664+ */
1665+ size_t envoy_dynamic_module_callback_http_get_metadata_namespaces_count (
1666+ envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
1667+ envoy_dynamic_module_type_metadata_source metadata_source);
1668+
1669+ /* *
1670+ * envoy_dynamic_module_callback_http_get_metadata_namespaces is called by the module to get all
1671+ * namespace names in the metadata. The namespaces are returned as an array of
1672+ * envoy_dynamic_module_type_envoy_buffer.
1673+ *
1674+ * PRECONDITION: The module must ensure that the result_buffer_vector is valid and has enough length
1675+ * to store all the namespaces. The module can use
1676+ * envoy_dynamic_module_callback_http_get_metadata_namespaces_count to get the number of
1677+ * namespaces before calling this function.
1678+ *
1679+ * @param filter_envoy_ptr is the pointer to the DynamicModuleHttpFilter object of the
1680+ * corresponding HTTP filter.
1681+ * @param metadata_source is the source of the metadata.
1682+ * @param result_buffer_vector is the pointer to the array of envoy_dynamic_module_type_envoy_buffer
1683+ * where the namespace strings will be stored. The lifetime of the buffer is guaranteed until the
1684+ * end of the current event hook unless the setter callback is called.
1685+ * @return true if the operation is successful, false otherwise.
1686+ */
1687+ bool envoy_dynamic_module_callback_http_get_metadata_namespaces (
1688+ envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
1689+ envoy_dynamic_module_type_metadata_source metadata_source,
1690+ envoy_dynamic_module_type_envoy_buffer* result_buffer_vector);
1691+
15781692// -------------------------- Filter State Callbacks ---------------------------
15791693
15801694/* *
@@ -1773,6 +1887,24 @@ bool envoy_dynamic_module_callback_http_filter_get_attribute_int(
17731887 envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
17741888 envoy_dynamic_module_type_attribute_id attribute_id, uint64_t * result);
17751889
1890+ /* *
1891+ * envoy_dynamic_module_callback_http_filter_get_attribute_bool is called by the module to get
1892+ * a boolean attribute value. If the attribute is not accessible or the
1893+ * value is not a boolean, this returns false.
1894+ *
1895+ * @param filter_envoy_ptr is the pointer to the DynamicModuleHttpFilter object of the
1896+ * corresponding HTTP filter.
1897+ * @param attribute_id is the ID of the attribute.
1898+ * @param result is the pointer to the variable where the bool value of the attribute will be
1899+ * stored.
1900+ * @return true if the operation is successful, false otherwise.
1901+ *
1902+ * Note: currently, not all attributes are implemented.
1903+ */
1904+ bool envoy_dynamic_module_callback_http_filter_get_attribute_bool (
1905+ envoy_dynamic_module_type_http_filter_envoy_ptr filter_envoy_ptr,
1906+ envoy_dynamic_module_type_attribute_id attribute_id, bool * result);
1907+
17761908/* *
17771909 * envoy_dynamic_module_callback_http_filter_http_callout is called by the module to initiate
17781910 * an HTTP callout. The callout is initiated by the HTTP filter and the response is received in
0 commit comments