]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/History.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / adaptation / History.h
index ffe3198f455ae21e202f0cd98a42521d3654c377..d295c33ff75371c375e8d30f3bd9a234006186cb 100644 (file)
@@ -1,16 +1,24 @@
+/*
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #ifndef SQUID_ADAPT_HISTORY_H
 #define SQUID_ADAPT_HISTORY_H
 
 #include "adaptation/DynamicGroupCfg.h"
-#include "Array.h"
+#include "base/RefCount.h"
 #include "HttpHeader.h"
-#include "RefCount.h"
+#include "Notes.h"
+#include "sbuf/SBuf.h"
 #include "SquidString.h"
 
 namespace Adaptation
 {
 
-
 /// collects information about adaptations related to a master transaction
 class History: public RefCountable
 {
@@ -46,11 +54,18 @@ public:
     /// store the last meta header fields received from the adaptation service
     void recordMeta(const HttpHeader *lm);
 
+    void recordAdaptationService(SBuf &srvId);
 public:
     /// Last received meta header (REQMOD or RESPMOD, whichever comes last).
     HttpHeader lastMeta;
     /// All REQMOD and RESPMOD meta headers merged. Last field wins conflicts.
     HttpHeader allMeta;
+    /// key:value pairs set by adaptation_meta, to be added to
+    /// AccessLogEntry::notes when ALE becomes available
+    NotePairs::Pointer metaHeaders;
+
+    typedef std::vector<SBuf> AdaptationServices;
+    AdaptationServices theAdaptationServices; ///< The service groups used
 
     /// sets future services for the Adaptation::AccessCheck to notice
     void setFutureServices(const DynamicGroupCfg &services);
@@ -79,7 +94,7 @@ private:
         bool retried; ///< whether the xaction was replaced by another
     };
 
-    typedef Vector<Entry> Entries;
+    typedef std::vector<Entry> Entries;
     Entries theEntries; ///< historical record, in the order of xact starts
 
     // theXx* will become a map<string,string>, but we only support one record
@@ -93,3 +108,4 @@ private:
 } // namespace Adaptation
 
 #endif
+