]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/helper/ChildConfig.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / helper / ChildConfig.h
index ed09989ef6ae8a28dd7fae4fcb94442ece973a83..a2d62f26731cfe5144ed821186e7b7e70822c226 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -84,6 +84,29 @@ public:
      * This includes both idle and in-use children.
      */
     unsigned int n_active;
+
+    /**
+     * The requests queue size. By default it is of size 2*n_max
+     */
+    unsigned int queue_size;
+
+    /// how to handle a serious problem with a helper request submission
+    enum SubmissionErrorHandlingAction {
+        actDie, ///< kill the caller process (i.e., Squid worker)
+        actErr  ///< drop the request and send an error to the caller
+    };
+    /// how to handle a new request for helper that was overloaded for too long
+    SubmissionErrorHandlingAction onPersistentOverload;
+
+    /**
+     * True if the default queue size is used.
+     * Needed in the cases where we need to adjust default queue_size in
+     * special configurations, for example when redirector_bypass is used.
+     */
+    bool defaultQueueSize;
+
+    /// older stateful helper server reservations may be forgotten
+    time_t reservationTimeout = 64; // reservation-timeout
 };
 
 } // namespace Helper
@@ -94,3 +117,4 @@ public:
 #define free_HelperChildConfig(dummy)  // NO.
 
 #endif /* _SQUID_SRC_HELPER_CHILDCONFIG_H */
+