ChildConfig.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_SRC_HELPER_CHILDCONFIG_H
10 #define SQUID_SRC_HELPER_CHILDCONFIG_H
11 
12 namespace Helper
13 {
14 
22 {
23 public:
24  ChildConfig();
25  explicit ChildConfig(const unsigned int m);
26 
34  int needNew() const;
35  void parseConfig();
36 
43 
44  /* values from squid.conf */
45 public:
46 
48  unsigned int n_max;
49 
57  unsigned int n_startup;
58 
66  unsigned int n_idle;
67 
72  unsigned int concurrency;
73 
74  /* derived from active operations */
75 
80  unsigned int n_running;
81 
86  unsigned int n_active;
87 
91  unsigned int queue_size;
92 
97  };
100 
107 
109  time_t reservationTimeout = 64; // reservation-timeout
110 };
111 
112 } // namespace Helper
113 
114 /* Legacy parser interface */
115 #define parse_HelperChildConfig(c) (c)->parseConfig()
116 #define dump_HelperChildConfig(e,n,c) storeAppendPrintf((e), "\n%s %d startup=%d idle=%d concurrency=%d\n", (n), (c).n_max, (c).n_startup, (c).n_idle, (c).concurrency)
117 #define free_HelperChildConfig(dummy) // NO.
118 
119 #endif /* SQUID_SRC_HELPER_CHILDCONFIG_H */
120 
unsigned int queue_size
Definition: ChildConfig.h:91
@ actDie
kill the caller process (i.e., Squid worker)
Definition: ChildConfig.h:95
unsigned int n_idle
Definition: ChildConfig.h:66
ChildConfig & updateLimits(const ChildConfig &rhs)
Definition: ChildConfig.cc:45
unsigned int n_running
Definition: ChildConfig.h:80
SubmissionErrorHandlingAction
how to handle a serious problem with a helper request submission
Definition: ChildConfig.h:94
int needNew() const
Definition: ChildConfig.cc:60
unsigned int n_max
Definition: ChildConfig.h:48
helper protocol primitives
Definition: ChildConfig.h:12
time_t reservationTimeout
older stateful helper server reservations may be forgotten
Definition: ChildConfig.h:109
SubmissionErrorHandlingAction onPersistentOverload
how to handle a new request for helper that was overloaded for too long
Definition: ChildConfig.h:99
unsigned int n_startup
Definition: ChildConfig.h:57
@ actErr
drop the request and send an error to the caller
Definition: ChildConfig.h:96
unsigned int concurrency
Definition: ChildConfig.h:72
unsigned int n_active
Definition: ChildConfig.h:86

 

Introduction

Documentation

Support

Miscellaneous