46 return command().profile->isAtomic;
52 return command().profile->format;
58 return command().profile->name;
66 return "application/yaml;charset=utf-8";
68 return "text/plain;charset=utf-8";
70 assert(!
"unreachable code");
106 response.
pack(message);
115 fillEntry(entry, writeHttpHeader);
124 if (writeHttpHeader) {
128 const auto &origin = command().params.httpOrigin;
129 const auto originOrNil = origin.size() ? origin.termedBuf() :
nullptr;
static void PutCommonResponseHeaders(HttpReply &, const char *httpOrigin)
void setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires)
static String CoordinatorAddr()
get the IPC message address for coordinator process
RequestId requestId
matches the request[or] with the response
struct msghdr with a known type, fixed-size I/O and control buffers
Cache Manager Action parameters extracted from the user request.
String httpUri
HTTP request URI.
RequestFlags httpFlags
HTTP request flags.
HttpRequestMethod httpMethod
HTTP request method.
Action(const CommandPointer &aCmd)
virtual Format format() const
action report syntax
void fillEntry(StoreEntry *entry, bool writeHttpHeader)
prepare store entry, dump info, close store entry (if possible)
const Command & command() const
the cause of this action
void sendResponse(Ipc::RequestId)
notify Coordinator that this action is done with local processing
virtual void respond(const Request &request)
respond to Coordinator request; default is to collect and sendResponse
StoreEntry * createStoreEntry() const
creates store entry from params
bool atomic() const
dump() call writes everything before returning
const char * contentType() const
HTTP Content-Type header value for this Action report.
const char * name() const
label as seen in the cache manager menu
const CommandPointer cmd
the command that caused this action
virtual void add(const Action &action)
incrementally merge in remote information (of the same action type)
void run(StoreEntry *entry, bool writeHttpHeader)
collect + fillEntry: collect local information and fill the store entry
combined hard-coded action profile with user-supplied action parameters
Comm::ConnectionPointer conn
HTTP client connection descriptor.
void pack(Ipc::TypedMsgHdr &msg) const override
prepare for sendmsg()
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
char const * termedBuf() const
#define debugs(SECTION, LEVEL, CONTENT)
void SendMessage(const String &toAddress, const TypedMsgHdr &message)
void OpenKidSection(StoreEntry *, Format)
Format
whether Action report uses valid YAML or unspecified/legacy formatting
void CloseKidSection(StoreEntry *, Format)
void storeAppendPrintf(StoreEntry *e, const char *fmt,...)
StoreEntry * storeCreateEntry(const char *url, const char *logUrl, const RequestFlags &flags, const HttpRequestMethod &method)
int xclose(int fd)
POSIX close(2) equivalent.