5 #ifndef __STDC_FORMAT_MACROS
7 #define __STDC_FORMAT_MACROS
34 : SubscriberSSE(server_url),
35 remounter_(remounter),
42 const std::string& msg_text) {
46 "NotificationClient - could not decode message.");
54 repo_name, 0, NULL, sig_mgr_, dl_mgr_, &ensemble);
58 "NotificationClient - manifest has invalid signature.");
63 reinterpret_cast<const unsigned char*>(msg.
manifest_.data()),
68 "NotificationClient - could not parse manifest.");
72 uint64_t new_revision = manifest->revision();
74 "NotificationClient - repository %s is now at revision %" PRIu64
75 ", root hash: %s", repo_name.c_str(), new_revision,
76 manifest->catalog_hash().ToString().c_str());
85 "NotificationClient - remount failed (no space)");
89 "NotificationClient - catalog up to date");
93 "NotificationClient - in maintenance mode");
110 const std::string& repo_name,
115 repo_name_(repo_name),
116 remounter_(remounter),
137 "NotificationClient - Could not start background thread");
151 "NotificationClient - Entering subscription loop for repository: %s.",
155 const int num_retries = 10;
156 const uint64_t interval = 60;
const manifest::Manifest * manifest() const
static Manifest * LoadMem(const unsigned char *buffer, const unsigned length)
Failures Verify(unsigned char *manifest_data, size_t manifest_size, const std::string &base_url, const std::string &repository_name, const uint64_t minimum_timestamp, const shash::Any *base_catalog, signature::SignatureManager *signature_manager, download::DownloadManager *download_manager, ManifestEnsemble *ensemble)
NotificationClient(const std::string &config, const std::string &repo_name, FuseRemounter *remounter, download::DownloadManager *dl_mgr, signature::SignatureManager *sig_mgr)
virtual ~ActivitySubscriber()
virtual ~NotificationClient()
static void * Run(void *instance)
signature::SignatureManager * sig_mgr_
signature::SignatureManager * sig_mgr_
download::DownloadManager * dl_mgr_
virtual notify::Subscriber::Status Consume(const std::string &repo_name, const std::string &msg_text)
FuseRemounter * remounter_
download::DownloadManager * dl_mgr_
virtual bool FromJSONString(const std::string &s)
FuseRemounter * remounter_
UniquePtr< notify::Subscriber > subscriber_
ActivitySubscriber(const std::string &server_url, FuseRemounter *remounter, download::DownloadManager *dl_mgr, signature::SignatureManager *sig_mgr)
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)