Verified Commit 9d8bdb91 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

RPC definitions are now in gkfs::rpc (client)

parent cc157419
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -49,6 +49,9 @@ hg_proc_void_t(hg_proc_t proc, void *data)

}} // namespace hermes::detail

namespace gkfs {
namespace rpc {

//==============================================================================
// definitions for fs_config
struct fs_config {
@@ -328,5 +331,8 @@ struct create {
    };
};

} // namespace rpc
} // namespace gkfs


#endif // GKFS_RPCS_HPP
+2 −2
Original line number Diff line number Diff line
@@ -190,8 +190,8 @@ bool init_hermes_client(const std::string& transport_prefix) {
        return false;
    }

    rpc_config_id = fs_config::public_id;
    rpc_mk_node_id = create::public_id;
    rpc_config_id = gkfs::rpc::fs_config::public_id;
    rpc_mk_node_id = gkfs::rpc::create::public_id;

    return true;
}
+2 −2
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@ namespace hermes { namespace detail {
//
void
register_user_request_types() {
    (void) registered_requests().add<fs_config>();
    (void) registered_requests().add<create>();
    (void) registered_requests().add<gkfs::rpc::fs_config>();
    (void) registered_requests().add<gkfs::rpc::create>();
}

}} // namespace hermes::detail
+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ namespace rpc_send {
bool get_fs_config() {

    auto endp = CTX->hosts2().at(CTX->local_host_id());
    fs_config::output out;
    gkfs::rpc::fs_config::output out;

    try {
        CTX->log()->debug("{}() Retrieving file system configurations from daemon", __func__);
@@ -40,7 +40,7 @@ bool get_fs_config() {
        // TODO(amiranda): hermes will eventually provide a post(endpoint) 
        // returning one result and a broadcast(endpoint_set) returning a 
        // result_set. When that happens we can remove the .at(0) :/
        out = ld_network_service->post<fs_config>(endp).get().at(0);
        out = ld_network_service->post<gkfs::rpc::fs_config>(endp).get().at(0);
    } catch (const std::exception& ex) {
        CTX->log()->error("{}() Retrieving fs configurations from daemon", __func__);
        return false;
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ int mk_node(const std::string& path, const mode_t mode) {
        // returning one result and a broadcast(endpoint_set) returning a 
        // result_set. When that happens we can remove the .at(0) :/
        auto out = 
            ld_network_service->post<create>(endp, path, mode).get().at(0);
            ld_network_service->post<gkfs::rpc::create>(endp, path, mode).get().at(0);
        err = out.err();
        CTX->log()->debug("{}() Got response success: {}", __func__, err);