File Reference
#include "squid.h"
#include "base/AsyncCbdataCalls.h"
#include "base/Packable.h"
#include "comm.h"
#include "comm/Connection.h"
#include "comm/Read.h"
#include "comm/Write.h"
#include "fd.h"
#include "fde.h"
#include "format/Quoting.h"
#include "helper.h"
#include "helper/Reply.h"
#include "helper/Request.h"
#include "MemBuf.h"
#include "SquidConfig.h"
#include "SquidIpc.h"
#include "SquidMath.h"
#include "SquidTime.h"
#include "Store.h"
#include "wordlist.h"
#include "mem/Pool.h"
Include dependency graph for

Go to the source code of this file.


#define HELPER_MAX_ARGS   64
#define MAX_RETRIES   2
 The maximum allowed request retries. More...


const size_t ReadBufSize (32 *1024)
 Helpers input buffer size. More...
static void Enqueue (helper *hlp, Helper::Xaction *r)
 Handles a request when all running helpers, if any, are busy. More...
static helper_serverGetFirstAvailable (const helper *hlp)
static helper_stateful_serverStatefulGetFirstAvailable (statefulhelper *hlp)
static void helperDispatch (helper_server *srv, Helper::Xaction *r)
static void helperStatefulDispatch (helper_stateful_server *srv, Helper::Xaction *r)
static void helperKickQueue (helper *hlp)
static void helperStatefulKickQueue (statefulhelper *hlp)
static void helperStatefulServerDone (helper_stateful_server *srv)
static void StatefulEnqueue (statefulhelper *hlp, Helper::Xaction *r)
 InstanceIdDefinitions (HelperServerBase, "Hlpr")
void helperOpenServers (helper *hlp)
void helperStatefulOpenServers (statefulhelper *hlp)
static void SubmissionFailure (helper *hlp, HLPCB *callback, void *data)
 handles helperSubmit() and helperStatefulSubmit() failures More...
void helperSubmit (helper *hlp, const char *buf, HLPCB *callback, void *data)
void helperStatefulSubmit (statefulhelper *hlp, const char *buf, HLPCB *callback, void *data, const Helper::ReservationId &reservation)
void helperShutdown (helper *hlp)
void helperStatefulShutdown (statefulhelper *hlp)
static void helperReturnBuffer (helper_server *srv, helper *hlp, char *msg, size_t msgSize, char *msgEnd)
 Calls back with a pointer to the buffer with the helper output. More...
static void helperHandleRead (const Comm::ConnectionPointer &conn, char *, size_t len, Comm::Flag flag, int, void *data)
static void helperStatefulHandleRead (const Comm::ConnectionPointer &conn, char *, size_t len, Comm::Flag flag, int, void *data)
static void helperDispatchWriteDone (const Comm::ConnectionPointer &, char *, size_t, Comm::Flag flag, int, void *data)
static void helperStatefulDispatchWriteDone (const Comm::ConnectionPointer &, char *, size_t, Comm::Flag, int, void *)


static IOCB helperHandleRead
static IOCB helperStatefulHandleRead

Macro Definition Documentation


#define HELPER_MAX_ARGS   64

Definition at line 35 of file

Referenced by helperOpenServers(), and helperStatefulOpenServers().


#define MAX_RETRIES   2

Definition at line 38 of file

Referenced by helper_server::checkForTimedOutRequests(), and helperReturnBuffer().

Function Documentation

◆ Enqueue()

◆ GetFirstAvailable()

◆ helperDispatch()

◆ helperDispatchWriteDone()

◆ helperHandleRead()

◆ helperKickQueue()

static void helperKickQueue ( helper hlp)

Definition at line 1480 of file

References GetFirstAvailable(), helperDispatch(), and helper::nextRequest().

Referenced by helperOpenServers(), and helperReturnBuffer().

◆ helperOpenServers()

◆ helperReturnBuffer()

◆ helperShutdown()

◆ helperStatefulDispatch()

◆ helperStatefulDispatchWriteDone()

static void helperStatefulDispatchWriteDone ( const Comm::ConnectionPointer ,
char *  ,
size_t  ,
Comm::Flag  ,
int  ,
void *   

Definition at line 1428 of file

Referenced by helperStatefulDispatch().

◆ helperStatefulHandleRead()

static void helperStatefulHandleRead ( const Comm::ConnectionPointer conn,
char *  ,
size_t  len,
Comm::Flag  flag,
int  ,
void *  data 

◆ helperStatefulKickQueue()

◆ helperStatefulOpenServers()

◆ helperStatefulServerDone()

◆ helperStatefulShutdown()

◆ helperStatefulSubmit()

void helperStatefulSubmit ( statefulhelper hlp,
const char *  buf,
HLPCB callback,
void *  data,
const Helper::ReservationId reservation 

Submit request or callback the caller with a Helper::Error error. If the reservation is not set then reserves a new helper.

Definition at line 562 of file

References SubmissionFailure(), and statefulhelper::trySubmit().

◆ helperSubmit()

void helperSubmit ( helper hlp,
const char *  buf,
HLPCB callback,
void *  data 

Definition at line 468 of file

Referenced by constructHelperQuery().

◆ InstanceIdDefinitions()

InstanceIdDefinitions ( HelperServerBase  ,

◆ ReadBufSize()

const size_t ReadBufSize ( 32 *  1024)

◆ StatefulEnqueue()

◆ StatefulGetFirstAvailable()

◆ SubmissionFailure()

static void SubmissionFailure ( helper hlp,
HLPCB callback,
void *  data 

Definition at line 455 of file

References callback, debugs, Helper::Error, and Helper::Unknown.

Referenced by helperStatefulSubmit(), and helperSubmit().

Variable Documentation

◆ helperHandleRead

IOCB helperHandleRead

Definition at line 43 of file

Referenced by helperHandleRead(), and helperOpenServers().

◆ helperStatefulHandleRead

IOCB helperStatefulHandleRead

Definition at line 44 of file

Referenced by helperStatefulHandleRead(), and helperStatefulOpenServers().






Web Site Translations