]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/Inquirer.h
a93af8e23dafc454639451a3e6a4ed71c34dcb05
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 16 Cache Manager API */
11 #ifndef SQUID_MGR_INQUIRER_H
12 #define SQUID_MGR_INQUIRER_H
14 #include "comm/forward.h"
15 #include "ipc/Inquirer.h"
16 #include "mgr/Action.h"
19 class CommCloseCbParams
;
24 /// Coordinator's job that sends a cache manage request to each strand,
25 /// aggregating individual strand responses and dumping the result if needed
26 class Inquirer
: public Ipc::Inquirer
28 CBDATA_CLASS(Inquirer
);
31 Inquirer(Action::Pointer anAction
, const Request
&aCause
,
32 const Ipc::StrandCoords
&coords
);
37 virtual bool doneAll() const;
39 /* Ipc::Inquirer API */
40 virtual void cleanup();
41 virtual void sendResponse();
42 virtual bool aggregate(Ipc::Response::Pointer aResponse
);
45 void noteWroteHeader(const CommIoCbParams
& params
);
46 void noteCommClosed(const CommCloseCbParams
& params
);
47 void removeCloseHandler();
48 Ipc::StrandCoords
applyQueryParams(const Ipc::StrandCoords
& aStrands
,
49 const QueryParams
& aParams
);
51 Action::Pointer aggrAction
; //< action to aggregate
53 Comm::ConnectionPointer conn
; ///< HTTP client socket descriptor
55 AsyncCall::Pointer writer
; ///< comm_write callback
56 AsyncCall::Pointer closer
; ///< comm_close handler
61 #endif /* SQUID_MGR_INQUIRER_H */