Reviewers: mtomic, teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2090
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
#>cpp
|
|
#pragma once
|
|
|
|
#include <optional>
|
|
#include <unordered_map>
|
|
|
|
#include "communication/rpc/messages.hpp"
|
|
#include "durability/distributed/recovery.hpp"
|
|
#include "durability/distributed/serialization.hpp"
|
|
#include "io/network/endpoint.hpp"
|
|
#include "io/network/serialization.hpp"
|
|
cpp<#
|
|
|
|
(lcp:namespace distributed)
|
|
|
|
(lcp:define-rpc register-worker
|
|
(:request
|
|
((desired-worker-id :int16_t)
|
|
(port :uint16_t)
|
|
(durability-directory "std::string")))
|
|
(:response
|
|
((registration-successful :bool)
|
|
(durability-error :bool)
|
|
(snapshot-to-recover "std::optional<std::pair<int64_t, tx::TransactionId>>")
|
|
(workers "std::unordered_map<int, io::network::Endpoint>"))))
|
|
|
|
(lcp:define-rpc cluster-discovery
|
|
(:request
|
|
((worker-id :int16_t)
|
|
(endpoint "::io::network::Endpoint")))
|
|
(:response ()))
|
|
|
|
(lcp:define-rpc stop-worker
|
|
(:request ())
|
|
(:response ()))
|
|
|
|
(lcp:define-rpc notify-worker-recovered
|
|
(:request
|
|
((worker-id :int16_t)
|
|
(recovery-info "std::optional<durability::RecoveryInfo>")))
|
|
(:response ()))
|
|
|
|
(lcp:define-rpc heartbeat
|
|
(:request ())
|
|
(:response ()))
|
|
|
|
(lcp:pop-namespace) ;; distributed
|