Arachne 1.0
Arachne - the perpetual stitcher of Wikidata entities.
Loading...
Searching...
No Matches
coordinator.cpp File Reference
#include "arachne/coordinator.hpp"
#include "arachne/crypto.hpp"
#include <nlohmann/json.hpp>
#include <sqlite3.h>
#include <algorithm>
#include <array>
#include <atomic>
#include <cctype>
#include <fstream>
#include <iomanip>
#include <limits>
#include <memory>
#include <random>
#include <sstream>
#include <stdexcept>
#include <system_error>
Include dependency graph for coordinator.cpp:

Go to the source code of this file.

Classes

struct  arachne::coordination::anonymous_namespace{coordinator.cpp}::file_fingerprint
struct  arachne::coordination::operational_ledger::implementation

Namespaces

namespace  arachne
namespace  arachne::coordination
namespace  arachne::coordination::anonymous_namespace{coordinator.cpp}

Typedefs

using arachne::coordination::anonymous_namespace{coordinator.cpp}::sqlite_handle = std::unique_ptr<sqlite3, decltype(&sqlite3_close)>
using arachne::coordination::anonymous_namespace{coordinator.cpp}::statement_handle = std::unique_ptr<sqlite3_stmt, decltype(&sqlite3_finalize)>

Functions

void arachne::coordination::anonymous_namespace{coordinator.cpp}::throw_sqlite (sqlite3 *database, std::string_view context)
void arachne::coordination::anonymous_namespace{coordinator.cpp}::execute (sqlite3 *database, std::string_view sql)
statement_handle arachne::coordination::anonymous_namespace{coordinator.cpp}::prepare (sqlite3 *database, std::string_view sql)
void arachne::coordination::anonymous_namespace{coordinator.cpp}::bind_text (sqlite3 *database, sqlite3_stmt *statement, int index, std::string_view value)
void arachne::coordination::anonymous_namespace{coordinator.cpp}::bind_optional (sqlite3 *database, sqlite3_stmt *statement, int index, const std::optional< std::string > &value)
void arachne::coordination::anonymous_namespace{coordinator.cpp}::step_done (sqlite3 *database, sqlite3_stmt *statement)
std::string arachne::coordination::anonymous_namespace{coordinator.cpp}::column_text (sqlite3_stmt *statement, int column)
std::optional< std::string > arachne::coordination::anonymous_namespace{coordinator.cpp}::optional_column_text (sqlite3_stmt *statement, int column)
std::string arachne::coordination::anonymous_namespace{coordinator.cpp}::utc_timestamp ()
std::int64_t arachne::coordination::anonymous_namespace{coordinator.cpp}::unix_seconds ()
bool arachne::coordination::anonymous_namespace{coordinator.cpp}::is_sha256 (std::string_view value)
bool arachne::coordination::anonymous_namespace{coordinator.cpp}::is_safe_identifier (std::string_view value)
bool arachne::coordination::anonymous_namespace{coordinator.cpp}::is_logical_date (std::string_view value)
void arachne::coordination::anonymous_namespace{coordinator.cpp}::validate_run_claim (std::string_view run_id, std::string_view graph_domain, std::string_view logical_date, std::string_view configuration_sha256)
std::string arachne::coordination::anonymous_namespace{coordinator.cpp}::sanitize_filename (std::string value)
void arachne::coordination::anonymous_namespace{coordinator.cpp}::reject_symlink_components (const std::filesystem::path &path, std::string_view context)
std::filesystem::path arachne::coordination::anonymous_namespace{coordinator.cpp}::weakly_canonical_or_absolute (const std::filesystem::path &path)
file_fingerprint arachne::coordination::anonymous_namespace{coordinator.cpp}::fingerprint_regular_file (const std::filesystem::path &path, std::uintmax_t max_bytes, std::string_view context)
std::filesystem::path arachne::coordination::anonymous_namespace{coordinator.cpp}::choose_destination (const intake_request &request, std::string_view payload_hash)
std::string arachne::coordination::anonymous_namespace{coordinator.cpp}::portable_payload_reference (const std::filesystem::path &payload, const std::filesystem::path &ledger_path)
envelope_record arachne::coordination::anonymous_namespace{coordinator.cpp}::read_envelope (sqlite3_stmt *statement, const std::filesystem::path &ledger_path)
std::string_view arachne::coordination::to_string (const cocoon_status status) noexcept
cocoon_status arachne::coordination::cocoon_status_from_string (const std::string_view value)
bool arachne::coordination::can_transition (const cocoon_status from, const cocoon_status to) noexcept
bool arachne::coordination::path_is_within (const std::filesystem::path &path, const std::filesystem::path &possible_parent)
void arachne::coordination::reject_inbox_deletion_target (const std::filesystem::path &target, const std::filesystem::path &inbox_root)

Variables

std::atomic< std::uint64_t > arachne::coordination::anonymous_namespace{coordinator.cpp}::intake_stage_sequence { 0 }
std::atomic< std::uint64_t > arachne::coordination::anonymous_namespace{coordinator.cpp}::lock_token_sequence { 0 }
constexpr std::string_view arachne::coordination::anonymous_namespace{coordinator.cpp}::envelope_select