]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/ServiceConfig.h
1 #ifndef SQUID_ADAPTATION__SERVICE_CONFIG_H
2 #define SQUID_ADAPTATION__SERVICE_CONFIG_H
4 #include "adaptation/Elements.h"
5 #include "base/RefCount.h"
6 #include "SquidString.h"
11 // manages adaptation service configuration in squid.conf
12 class ServiceConfig
: public RefCountable
17 const char *methodStr() const;
18 const char *vectPointStr() const;
23 String key
; // service_configConfig name in the configuration file
24 String uri
; // service_configConfig URI
26 // service_configConfig URI components
32 Method method
; // what is being adapted (REQMOD vs RESPMOD)
33 VectPoint point
; // where the adaptation happens (pre- or post-cache)
37 long maxConn
; ///< maximum number of concurrent service transactions
38 SrvBehaviour onOverload
; ///< how to handle Max-Connections feature
39 bool routing
; ///< whether this service may determine the next service(s)
40 bool ipv6
; ///< whether this service uses IPv6 transport (default IPv4)
43 Method
parseMethod(const char *buf
) const;
44 VectPoint
parseVectPoint(const char *buf
) const;
46 /// interpret parsed values
47 bool grokBool(bool &var
, const char *name
, const char *value
);
48 bool grokUri(const char *value
);
49 bool grokLong(long &var
, const char *name
, const char *value
);
50 /// handle on-overload configuration option
51 bool grokOnOverload(SrvBehaviour
&var
, const char *value
);
52 /// handle name=value configuration option with name unknown to Squid
53 virtual bool grokExtension(const char *name
, const char *value
);
56 } // namespace Adaptation
58 #endif /* SQUID_ADAPTATION__SERVICE_CONFIG_H */