brbzull0 commented on code in PR #10559:
URL: https://github.com/apache/trafficserver/pull/10559#discussion_r1357988367


##########
plugins/experimental/rate_limit/sni_selector.cc:
##########
@@ -16,117 +16,240 @@
  * limitations under the License.
  */
 #include "tscore/ink_config.h"
+#include <yaml-cpp/yaml.h>
 
-#include <cstring>
-
-#include "sni_limiter.h"
 #include "sni_selector.h"
 
+std::atomic<SniSelector *> SniSelector::_instance = nullptr;
+
 ///////////////////////////////////////////////////////////////////////////////
-// This is the queue management continuation, which gets called periodically
+// YAML parser for the global YAML configuration (via plugin.config)
 //
-static int
-sni_queue_cont(TSCont cont, TSEvent event, void *edata)
+bool
+SniSelector::yamlParser(const std::string &yaml_file)
 {
-  SniSelector *selector = static_cast<SniSelector *>(TSContDataGet(cont));
+  YAML::Node config;
+
+  try {
+    config = YAML::LoadFile(yaml_file);
+  } catch (YAML::BadFile &e) {

Review Comment:
   You are not going to change the exception right? if not then why not `const`.
   the one below too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to