CernVM-FS
2.12.0
|
#include <object_fetcher.h>
Public Types | |
typedef BaseTN::Failures | Failures |
Public Types inherited from AbstractObjectFetcher< HttpObjectFetcher< CatalogT, HistoryT, ReflogT > > | |
typedef object_fetcher_traits < HttpObjectFetcher< CatalogT, HistoryT, ReflogT > >::CatalogTN | CatalogTN |
typedef object_fetcher_traits < HttpObjectFetcher< CatalogT, HistoryT, ReflogT > >::HistoryTN | HistoryTN |
typedef object_fetcher_traits < HttpObjectFetcher< CatalogT, HistoryT, ReflogT > >::ReflogTN | ReflogTN |
typedef ObjectFetcherFailures::Failures | Failures |
Public Types inherited from ObjectFetcherFailures | |
enum | Failures { kFailOk, kFailNotFound, kFailLocalIO, kFailNetwork, kFailDecompression, kFailManifestNameMismatch, kFailManifestSignatureMismatch, kFailBadData, kFailUnknown, kFailNumEntries } |
Public Member Functions | |
HttpObjectFetcher (const std::string &repo_name, const std::string &repo_url, const std::string &temp_dir, download::DownloadManager *download_mgr, signature::SignatureManager *signature_mgr) | |
Failures | FetchManifest (manifest::Manifest **manifest) |
std::string | GetUrl (const shash::Any &hash) const |
Failures | Fetch (const shash::Any &object_hash, std::string *object_file) |
Failures | Fetch (const std::string &relative_path, const bool decompress, const bool nocache, std::string *file_path) |
Public Member Functions inherited from AbstractObjectFetcher< HttpObjectFetcher< CatalogT, HistoryT, ReflogT > > | |
Failures | FetchManifest (manifest::Manifest **manifest) |
Failures | FetchManifest (UniquePtr< manifest::Manifest > *manifest) |
Failures | FetchHistory (HistoryTN **history, const shash::Any &history_hash=shash::Any()) |
Failures | FetchHistory (UniquePtr< HistoryTN > *history, const shash::Any &history_hash=shash::Any()) |
Failures | FetchCatalog (const shash::Any &catalog_hash, const std::string &catalog_path, CatalogTN **catalog, const bool is_nested=false, CatalogTN *parent=NULL) |
Failures | FetchCatalog (const shash::Any &catalog_hash, const std::string &catalog_path, UniquePtr< CatalogTN > *catalog, const bool is_nested=false, CatalogTN *parent=NULL) |
Failures | FetchReflog (const shash::Any &reflog_hash, ReflogTN **reflog) |
Failures | FetchReflog (const shash::Any &reflog_hash, UniquePtr< ReflogTN > *reflog) |
std::string | GetUrl (const shash::Any &hash) const |
bool | HasHistory () |
const std::string & | temporary_directory () const |
Protected Types | |
typedef HttpObjectFetcher < CatalogT, HistoryT, ReflogT > | ThisTN |
typedef AbstractObjectFetcher < ThisTN > | BaseTN |
Protected Member Functions | |
std::string | BuildUrl (const std::string &relative_path) const |
std::string | BuildRelativeUrl (const shash::Any &hash) const |
Failures | Download (const std::string &relative_path, const bool decompress, const bool nocache, const shash::Any *expected_hash, std::string *file_path) |
Protected Member Functions inherited from AbstractObjectFetcher< HttpObjectFetcher< CatalogT, HistoryT, ReflogT > > | |
AbstractObjectFetcher (const std::string &temp_dir) | |
Failures | Fetch (const shash::Any &object_hash, std::string *file_path) |
Failures | Fetch (const std::string &relative_path, const bool decompress, const bool nocache, std::string *file_path) |
shash::Any | GetHistoryHash () |
Private Attributes | |
const std::string | repo_url_ |
const std::string | repo_name_ |
download::DownloadManager * | download_manager_ |
signature::SignatureManager * | signature_manager_ |
Additional Inherited Members | |
Static Public Attributes inherited from AbstractObjectFetcher< HttpObjectFetcher< CatalogT, HistoryT, ReflogT > > | |
static const std::string | kManifestFilename |
static const std::string | kReflogFilename |
This implements the AbstractObjectFetcher<> to retrieve repository objects from a remote location through HTTP. It verifies the repository's signature and the downloaded data integrity.
Definition at line 452 of file object_fetcher.h.
|
protected |
Definition at line 457 of file object_fetcher.h.
typedef BaseTN::Failures HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::Failures |
Definition at line 460 of file object_fetcher.h.
|
protected |
Definition at line 456 of file object_fetcher.h.
|
inline |
HttpObjectFetcher<> contains external DownloadManager and SignatureManager hence it essentially is a wrapper object and can be copied.
repo_name | the name of the repository to download objects from |
repo_url | the URL to the repository's backend storage |
temp_dir | location to store decompressed tmp data |
download_mgr | pointer to the download manager to be used |
signature_mgr | pointer to the signature manager to be used |
Definition at line 475 of file object_fetcher.h.
|
inlineprotected |
Definition at line 560 of file object_fetcher.h.
Referenced by HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::Fetch(), and HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::GetUrl().
|
inlineprotected |
Definition at line 556 of file object_fetcher.h.
Referenced by HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::Download(), HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::FetchManifest(), and HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::GetUrl().
|
inlineprotected |
Definition at line 564 of file object_fetcher.h.
Referenced by HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::Fetch().
|
inline |
|
inline |
|
inline |
Definition at line 488 of file object_fetcher.h.
Referenced by swissknife::CommandGc::Main(), swissknife::CommandReconstructReflog::Main(), and swissknife::CommandListReflog::Main().
|
inline |
|
private |
Definition at line 648 of file object_fetcher.h.
Referenced by HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::Download(), and HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::FetchManifest().
|
private |
Definition at line 647 of file object_fetcher.h.
Referenced by HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::FetchManifest().
|
private |
Definition at line 646 of file object_fetcher.h.
Referenced by HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::BuildUrl(), and HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::FetchManifest().
|
private |
Definition at line 649 of file object_fetcher.h.
Referenced by HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::FetchManifest().