File FileLoader.h

Defines

EMPTY_FILE_RESPONSE
IS_DIR_RESPONSE
FILE_PATH_HEADER
SHARED_FILE_PREFIX
SHARED_OBJ_EXT
HASH_EXT
PYTHON_USER
PYTHON_FUNC
PYTHON_FUNC_DIR
namespace storage
class FileLoader

Public Functions

FileLoader()
FileLoader(bool useLocalFsCacheIn)
void clearLocalCache()
std::string getHashFilePath(const std::string &path)
std::string getFunctionFile(const faabric::Message &msg)
std::vector<uint8_t> loadFunctionWasm(const faabric::Message &msg)
void uploadFunction(faabric::Message &msg)
std::string getFunctionObjectFile(const faabric::Message &msg)
std::vector<uint8_t> loadFunctionObjectFile(const faabric::Message &msg)
std::vector<uint8_t> loadFunctionObjectHash(const faabric::Message &msg)
void uploadFunctionObjectFile(const faabric::Message &msg, const std::vector<uint8_t> &objBytes)
void uploadFunctionObjectHash(const faabric::Message &msg, const std::vector<uint8_t> &hash)
std::string getFunctionAotFile(const faabric::Message &msg)
std::vector<uint8_t> loadFunctionWamrAotFile(const faabric::Message &msg)
std::vector<uint8_t> loadFunctionWamrAotHash(const faabric::Message &msg)
void uploadFunctionWamrAotFile(const faabric::Message &msg, const std::vector<uint8_t> &objBytes)
void uploadFunctionWamrAotHash(const faabric::Message &msg, const std::vector<uint8_t> &hash)
std::string getEncryptedFunctionFile(const faabric::Message &msg)
std::string getFunctionSymbolsFile(const faabric::Message &msg)
std::vector<uint8_t> loadSharedObjectWasm(const std::string &path)
std::string getSharedObjectObjectFile(const std::string &realPath)
std::vector<uint8_t> loadSharedObjectObjectFile(const std::string &path)
std::vector<uint8_t> loadSharedObjectObjectHash(const std::string &path)
void uploadSharedObjectObjectFile(const std::string &path, const std::vector<uint8_t> &objBytes)
void uploadSharedObjectObjectHash(const std::string &path, const std::vector<uint8_t> &hash)
std::string getSharedFileFile(const std::string &path)
std::vector<uint8_t> loadSharedFile(const std::string &path)
void deleteSharedFile(const std::string &path)
void uploadSharedFile(const std::string &path, const std::vector<uint8_t> &fileBytes)
std::string getPythonFunctionSharedFilePath(const faabric::Message &msg)
std::string getPythonFunctionRelativePath(const faabric::Message &msg)
std::string getPythonFunctionFile(const faabric::Message &msg)
void uploadPythonFunction(faabric::Message &msg)

Private Functions

std::vector<uint8_t> doCodegen(std::vector<uint8_t> &bytes, const std::string &fileName, bool isSgx = false)
std::vector<uint8_t> loadFileBytes(const std::string &path, const std::string &localCachePath, bool tolerateMissing = false)
std::vector<uint8_t> loadHashFileBytes(const std::string &path, const std::string &localCachePath)
void uploadFileBytes(const std::string &path, const std::string &localCachePath, const std::vector<uint8_t> &bytes)
void uploadHashFileBytes(const std::string &path, const std::string &localCachePath, const std::vector<uint8_t> &bytes)
void uploadFileString(const std::string &path, const std::string &localCachePath, const std::string &bytes)

Private Members

conf::FaasmConfig &conf
storage::S3Wrapper s3
bool useLocalFsCache = true
class SharedFileIsDirectoryException : public FaabricException

Public Functions

inline explicit SharedFileIsDirectoryException(const std::string &filePath)
class SharedFileNotExistsException : public FaabricException

Public Functions

inline explicit SharedFileNotExistsException(const std::string &filePath)