Namespace faabric::snapshot

namespace snapshot

Enums

enum SnapshotCalls

Values:

enumerator NoSnapshotCall
enumerator PushSnapshot
enumerator PushSnapshotUpdate
enumerator DeleteSnapshot
enumerator ThreadResult

Functions

std::vector<std::pair<std::string, std::shared_ptr<faabric::util::SnapshotData>>> getSnapshotPushes()
std::vector<std::pair<std::string, std::vector<faabric::util::SnapshotDiff>>> getSnapshotDiffPushes()
std::vector<std::pair<std::string, std::string>> getSnapshotDeletes()
std::vector<std::pair<std::string, MockThreadResult>> getThreadResults()
void clearMockSnapshotRequests()
std::shared_ptr<SnapshotClient> getSnapshotClient(const std::string &otherHost)
void clearSnapshotClients()
SnapshotRegistry &getSnapshotRegistry()

Variables

static std::mutex mockMutex
static std::vector<std::pair<std::string, std::shared_ptr<faabric::util::SnapshotData>>> snapshotPushes
static std::vector<std::pair<std::string, std::vector<faabric::util::SnapshotDiff>>> snapshotDiffPushes
static std::vector<std::pair<std::string, std::string>> snapshotDeletes
static std::vector<std::pair<std::string, MockThreadResult>> threadResults
static faabric::util::ConcurrentMap<std::string, std::shared_ptr<faabric::snapshot::SnapshotClient>> snapshotClients
struct MockThreadResult

Public Members

uint32_t msgId = 0
int res = 0
std::string key
std::vector<faabric::util::SnapshotDiff> diffs
class SnapshotClient : public faabric::transport::MessageEndpointClient

Public Functions

explicit SnapshotClient(const std::string &hostIn)
void pushSnapshot(const std::string &key, std::shared_ptr<faabric::util::SnapshotData> data)
void pushSnapshotUpdate(std::string snapshotKey, const std::shared_ptr<faabric::util::SnapshotData> &data, const std::vector<faabric::util::SnapshotDiff> &diffs)
void pushThreadResult(uint32_t appId, uint32_t messageId, int returnValue, const std::string &key, const std::vector<faabric::util::SnapshotDiff> &diffs)
class SnapshotRegistry

Public Functions

SnapshotRegistry() = default
std::shared_ptr<faabric::util::SnapshotData> getSnapshot(const std::string &key)
bool snapshotExists(const std::string &key)
void registerSnapshot(const std::string &key, std::shared_ptr<faabric::util::SnapshotData> data)
void deleteSnapshot(const std::string &key)
size_t getSnapshotCount()
void clear()
class SnapshotServer : public faabric::transport::MessageEndpointServer

Public Functions

SnapshotServer()