CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
download Namespace Reference

Classes

struct  Counters
 
class  HeaderLists
 
class  CredentialsAttachment
 
class  DownloadManager
 
class  HealthCheck
 
struct  DataTubeElement
 
class  JobInfo
 
class  ShardingPolicy
 

Enumerations

enum  DataTubeAction { kActionStop = 0, kActionContinue, kActionDecompress }
 
enum  Failures {
  kFailOk = 0, kFailLocalIO, kFailBadUrl, kFailProxyResolve,
  kFailHostResolve, kFailHostAfterProxy, kFailProxyConnection, kFailHostConnection,
  kFailProxyHttp, kFailHostHttp, kFailBadData, kFailTooBig,
  kFailOther, kFailUnsupportedProtocol, kFailProxyTooSlow, kFailHostTooSlow,
  kFailProxyShortTransfer, kFailHostShortTransfer, kFailCanceled, kFailNumEntries
}
 
enum  ShardingPolicyReturn { kShardingPolicySucess = 0, kShardingPolicyProxySwitch, kShardingPolicyProxyFail }
 
enum  ShardingPolicySelector { kShardingPolicyExternal }
 

Functions

bool Interrupted (const std::string &fqrn, JobInfo *info)
 
static Failures PrepareDownloadDestination (JobInfo *info)
 
static size_t CallbackCurlHeader (void *ptr, size_t size, size_t nmemb, void *info_link)
 
static size_t CallbackCurlData (void *ptr, size_t size, size_t nmemb, void *info_link)
 
bool IsHostTransferError (const Failures error)
 
bool IsProxyTransferError (const Failures error)
 
const char * Code2Ascii (const Failures error)
 
static int PrintPacError (const char *fmt, va_list argp)
 
static string PacProxy2Cvmfs (const string &pac_proxy, const bool report_errors)
 
static bool ParsePac (const char *pac_data, const size_t size, DownloadManager *download_manager, string *proxies)
 
string AutoProxy (DownloadManager *download_manager)
 
string ResolveProxyDescription (const string &cvmfs_proxies, const std::string &path_fallback_cache, DownloadManager *download_manager)
 
static void AltCvmfsLogger (const LogSource source, const int mask, const char *msg)
 
int MainResolveProxyDescription (int argc, char **argv)
 
std::string ResolveProxyDescription (const std::string &cvmfs_proxies, const std::string &path_fallback_cache, DownloadManager *download_manager)
 

Variables

const char * kAutoPacLocation = "http://wpad/wpad.dat"
 

Detailed Description

This file is part of the CernVM File System.

This file is part of the CernVM File System.

The SimpleCatalogManager is a simplistic concrete implementation of the AbstractCatalogManager and allows for easy-to-use access to the catalog structure of a given repository. This class is tailored for simplicity, not for performance. Have a look into ClientCatalogManager if you are working on the CVMFS client.

Enumeration Type Documentation

Enumerator
kActionStop 
kActionContinue 
kActionDecompress 

Definition at line 34 of file jobinfo.h.

Possible return values. Adjust ObjectFetcher error handling if new network error conditions are added.

Enumerator
kFailOk 
kFailLocalIO 
kFailBadUrl 
kFailProxyResolve 
kFailHostResolve 
kFailHostAfterProxy 
kFailProxyConnection 
kFailHostConnection 
kFailProxyHttp 
kFailHostHttp 
kFailBadData 
kFailTooBig 
kFailOther 
kFailUnsupportedProtocol 
kFailProxyTooSlow 
kFailHostTooSlow 
kFailProxyShortTransfer 
kFailHostShortTransfer 
kFailCanceled 
kFailNumEntries 

Definition at line 14 of file network_errors.h.

Enumerator
kShardingPolicySucess 
kShardingPolicyProxySwitch 
kShardingPolicyProxyFail 

Definition at line 15 of file sharding_policy.h.

Enumerator
kShardingPolicyExternal 

Definition at line 22 of file sharding_policy.h.

Function Documentation

static void download::AltCvmfsLogger ( const LogSource  source,
const int  mask,
const char *  msg 
)
static

Definition at line 259 of file wpad.cc.

Referenced by MainResolveProxyDescription().

Here is the caller graph for this function:

std::string download::AutoProxy ( DownloadManager *  download_manager)

Tries to discover list of proxy description string. See: https://twiki.cern.ch/twiki/bin/view/LCG/HttpProxyDiscoveryProposal

Definition at line 153 of file wpad.cc.

Referenced by ResolveProxyDescription().

Here is the call graph for this function:

Here is the caller graph for this function:

static size_t download::CallbackCurlData ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  info_link 
)
static

Called by curl for every received data chunk.

Definition at line 245 of file download.cc.

Referenced by s3fanout::S3FanoutManager::AcquireCurlHandle(), and download::DownloadManager::AcquireCurlHandle().

Here is the call graph for this function:

Here is the caller graph for this function:

static size_t download::CallbackCurlHeader ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  info_link 
)
static

Called by curl for every HTTP header. Not called for file:// transfers.

Definition at line 138 of file download.cc.

Referenced by s3fanout::S3FanoutManager::AcquireCurlHandle(), and download::DownloadManager::AcquireCurlHandle().

Here is the call graph for this function:

Here is the caller graph for this function:

bool download::Interrupted ( const std::string &  fqrn,
JobInfo *  info 
)

Returns the status if an interrupt happened for a given repository.

Used only in case CVMFS_FAILOVER_INDEFINITELY (failover_indefinitely_) is set where failed downloads are retried indefinitely, unless an interrupt occurred

Note
If you use this functionality you need to change the source code of e.g. cvmfs_config reload to create a sentinel file. See comment below.
Returns
true if an interrupt occurred false otherwise

Definition at line 85 of file download.cc.

Referenced by download::DownloadManager::VerifyAndFinalize().

Here is the call graph for this function:

Here is the caller graph for this function:

bool download::IsHostTransferError ( const Failures  error)
inline
bool download::IsProxyTransferError ( const Failures  error)
inline
int download::MainResolveProxyDescription ( int  argc,
char **  argv 
)

Definition at line 272 of file wpad.cc.

Referenced by AltProcessFlavor().

Here is the call graph for this function:

Here is the caller graph for this function:

static string download::PacProxy2Cvmfs ( const string &  pac_proxy,
const bool  report_errors 
)
static

Definition at line 42 of file wpad.cc.

Referenced by ParsePac().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool download::ParsePac ( const char *  pac_data,
const size_t  size,
DownloadManager *  download_manager,
string *  proxies 
)
static

Definition at line 88 of file wpad.cc.

Referenced by AutoProxy().

Here is the call graph for this function:

Here is the caller graph for this function:

static Failures download::PrepareDownloadDestination ( JobInfo *  info)
static

Definition at line 115 of file download.cc.

Referenced by download::DownloadManager::Fetch().

Here is the call graph for this function:

Here is the caller graph for this function:

static int download::PrintPacError ( const char *  fmt,
va_list  argp 
)
static

Definition at line 30 of file wpad.cc.

Referenced by ParsePac().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string download::ResolveProxyDescription ( const std::string &  cvmfs_proxies,
const std::string &  path_fallback_cache,
DownloadManager *  download_manager 
)

Uses AutoProxy to replace any "auto" proxy by the proxies from the PAC file

string download::ResolveProxyDescription ( const string &  cvmfs_proxies,
const std::string &  path_fallback_cache,
DownloadManager *  download_manager 
)

Definition at line 207 of file wpad.cc.

Referenced by MountPoint::CreateDownloadManagers(), MainResolveProxyDescription(), TalkManager::MainResponder(), and MountPoint::SetupExternalDownloadMgr().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const char* download::kAutoPacLocation = "http://wpad/wpad.dat"

Definition at line 28 of file wpad.cc.

Referenced by AutoProxy().