|
Squid Web Cache v8/master
|
#include <Notes.h>
Classes | |
| class | Value |
| Stores a value for the note. More... | |
Public Types | |
| typedef RefCount< Note > | Pointer |
| typedef std::vector< Value::Pointer > | Values |
Public Member Functions | |
| Note (const char *aKey, const size_t keyLen) | |
| Note (const SBuf aKey) | |
| Note (const Note &)=delete | |
| Note & | operator= (const Note &)=delete |
| Value::Pointer | addValue (const char *value, const bool quoted, const char *descr, const Value::Method m=Value::mhAppend) |
| bool | match (HttpRequest *request, HttpReply *reply, const AccessLogEntryPointer &al, SBuf &matched) |
| const SBuf & | key () const |
| void | updateNotePairs (NotePairsPointer pairs, const CharacterSet *delimiters, const AccessLogEntryPointer &al) |
| void | printAsNoteDirective (StoreEntry *, const char *directiveName) const |
| Prints key and value(s) using a "note" directive format (including directive name). | |
| void | printAsAnnotationAclParameters (std::ostream &) const |
Private Attributes | |
| SBuf | theKey |
| The note key. | |
| Values | values |
| The possible values list for the note. | |
Used to store a note configuration. The notes are custom key:value pairs ICAP request headers or ECAP options used to pass custom transaction-state related meta information to squid internal subsystems or to adaptation services.
| typedef RefCount<Note> Note::Pointer |
| typedef std::vector<Value::Pointer> Note::Values |
|
delete |
| Note::Value::Pointer Note::addValue | ( | const char * | value, |
| const bool | quoted, | ||
| const char * | descr, | ||
| const Value::Method | m = Value::mhAppend |
||
| ) |
|
inline |
Definition at line 93 of file Notes.h.
References theKey.
Referenced by printAsAnnotationAclParameters(), printAsNoteDirective(), and updateNotePairs().
| bool Note::match | ( | HttpRequest * | request, |
| HttpReply * | reply, | ||
| const AccessLogEntryPointer & | al, | ||
| SBuf & | matched | ||
| ) |
Walks through the possible values list of the note, selects the first value, matching the given HttpRequest and HttpReply and assigns the given 'matched' to it.
Definition at line 70 of file Notes.cc.
References assert, SBuf::clear(), debugs, ACLChecklist::fastCheck(), ACLFilledChecklist::syncAle(), theKey, ACLFilledChecklist::updateAle(), ACLFilledChecklist::updateReply(), and values.
| void Note::printAsAnnotationAclParameters | ( | std::ostream & | os | ) | const |
Prints using "annotate_transaction acl parameter" format, one key=value or key+=value parameter per stored value.
Definition at line 126 of file Notes.cc.
References key(), Note::Value::mhReplace, and values.
| void Note::printAsNoteDirective | ( | StoreEntry * | entry, |
| const char * | directiveName | ||
| ) | const |
Definition at line 106 of file Notes.cc.
References Acl::AllowOrDeny(), key(), ConfigParser::QuoteString(), SBufToString(), Acl::Tree::treeDump(), and values.
| void Note::updateNotePairs | ( | NotePairsPointer | pairs, |
| const CharacterSet * | delimiters, | ||
| const AccessLogEntryPointer & | al | ||
| ) |
Definition at line 92 of file Notes.cc.
References NotePairs::add(), NotePairs::addStrList(), NotePairs::empty(), key(), Note::Value::mhReplace, NotePairs::remove(), theKey, and values.
|
private |
Definition at line 104 of file Notes.h.
Referenced by key(), match(), and updateNotePairs().
|
private |
Definition at line 105 of file Notes.h.
Referenced by addValue(), match(), printAsAnnotationAclParameters(), printAsNoteDirective(), and updateNotePairs().