+/*
+ * 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
{
/// 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);
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
} // namespace Adaptation
#endif
+