ServiceConfig.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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_ADAPTATION__SERVICE_CONFIG_H
10 #define SQUID_ADAPTATION__SERVICE_CONFIG_H
11 
12 #include "adaptation/Elements.h"
13 #include "base/RefCount.h"
14 #include "base/YesNoNone.h"
15 #include "security/PeerOptions.h"
16 #include "SquidString.h"
17 
18 namespace Adaptation
19 {
20 
21 // manages adaptation service configuration in squid.conf
23 {
24 public:
25  ServiceConfig();
26 
27  const char *methodStr() const;
28  const char *vectPointStr() const;
29 
30  bool parse();
31 
32 public:
33  String key; // service_configConfig name in the configuration file
34  String uri; // service_configConfig URI
35 
36  // service_configConfig URI components
40  int port;
41 
42  Method method; // what is being adapted (REQMOD vs RESPMOD)
43  VectPoint point; // where the adaptation happens (pre- or post-cache)
44  bool bypass;
45 
46  // options
47  long maxConn;
49  bool routing;
50  bool ipv6;
51 
52  // security settings for adaptation service
55 
56 protected:
57  Method parseMethod(const char *buf) const;
58  VectPoint parseVectPoint(const char *buf) const;
59 
61  bool grokBool(bool &var, const char *name, const char *value);
62  bool grokUri(const char *value);
63  bool grokLong(long &var, const char *name, const char *value);
65  bool grokOnOverload(SrvBehaviour &var, const char *value);
67  virtual bool grokExtension(const char *name, const char *value);
68 };
69 
70 } // namespace Adaptation
71 
72 #endif /* SQUID_ADAPTATION__SERVICE_CONFIG_H */
73 
bool grokOnOverload(SrvBehaviour &var, const char *value)
handle on-overload configuration option
bool routing
whether this service may determine the next service(s)
Definition: ServiceConfig.h:49
bool grokLong(long &var, const char *name, const char *value)
virtual bool grokExtension(const char *name, const char *value)
handle name=value configuration option with name unknown to Squid
const char * methodStr() const
TLS squid.conf settings for a remote server peer.
Definition: PeerOptions.h:22
bool ipv6
whether this service uses IPv6 transport (default IPv4)
Definition: ServiceConfig.h:50
VectPoint parseVectPoint(const char *buf) const
bool grokUri(const char *value)
const char * vectPointStr() const
bool grokBool(bool &var, const char *name, const char *value)
interpret parsed values
void const char * buf
Definition: stub_helper.cc:16
Security::PeerOptions secure
Definition: ServiceConfig.h:53
SrvBehaviour onOverload
how to handle Max-Connections feature
Definition: ServiceConfig.h:48
Method parseMethod(const char *buf) const
long maxConn
maximum number of concurrent service transactions
Definition: ServiceConfig.h:47
YesNoNone connectionEncryption
whether this service uses only secure connections
Definition: ServiceConfig.h:54

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors