BuildCache
Public Member Functions | Private Member Functions | Private Attributes | List of all members
bcache::s3_cache_provider_t Class Reference
Inheritance diagram for bcache::s3_cache_provider_t:
bcache::http_cache_provider_t bcache::remote_cache_provider_t

Public Member Functions

bool connect (const std::string &host_description) override
 Connect to the remote cache. More...
 
- Public Member Functions inherited from bcache::http_cache_provider_t
bool is_connected () const override
 Check if we have a connection to the remote cache. More...
 
cache_entry_t lookup (const std::string &hash) override
 Check if an entry exists in the cache. More...
 
void add (const std::string &hash, const cache_entry_t &entry, const std::map< std::string, expected_file_t > &expected_files) override
 Adds a set of files to the cache. More...
 
void get_file (const std::string &hash, const std::string &source_id, const std::string &target_path, const bool is_compressed) override
 Copy a cached file to the local file system. More...
 
- Public Member Functions inherited from bcache::remote_cache_provider_t
virtual ~remote_cache_provider_t ()
 De-initialzie the remote cache object.
 

Private Member Functions

std::string sign_string (const std::string &str) const
 Sign a string (to create an AWS authorization string). More...
 
std::vector< std::string > get_header (const std::string &method, const std::string &key) const override
 Get the headers for the HTTP request. More...
 

Private Attributes

std::string m_access
 
std::string m_secret
 

Additional Inherited Members

- Protected Member Functions inherited from bcache::http_cache_provider_t
std::string get_path () const
 Get the path of the destination URL. More...
 
- Static Protected Member Functions inherited from bcache::remote_cache_provider_t
static bool parse_host_description (const std::string &host_description, std::string &host, int &port, std::string &path)
 Parse a host description string. More...
 
static int connection_timeout_ms ()
 Get the timeout for remote connections. More...
 
static int transfer_timeout_ms ()
 Get the timeout for remote transfers. More...
 

Member Function Documentation

◆ connect()

bool bcache::s3_cache_provider_t::connect ( const std::string &  host_description)
overridevirtual

Connect to the remote cache.

Parameters
host_descriptionA string describing the host to connect to (excluding protocol).
Returns
true if the connection was successful.

Reimplemented from bcache::http_cache_provider_t.

◆ get_header()

std::vector< std::string > bcache::s3_cache_provider_t::get_header ( const std::string &  method,
const std::string &  key 
) const
overrideprivatevirtual

Get the headers for the HTTP request.

Parameters
methodThe HTTP method.
keyThe full name of the object.
Returns
a list of headers.

Reimplemented from bcache::http_cache_provider_t.

◆ sign_string()

std::string bcache::s3_cache_provider_t::sign_string ( const std::string &  str) const
private

Sign a string (to create an AWS authorization string).

Parameters
strThe string to sign.
Returns
the signature of the string.

The documentation for this class was generated from the following files: