This adds a stub implementation for the storage_proxy. To simplify future implementation, it takes the passed parameter and return the correct types with fixed values. Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
/*
|
|
* Copyright 2015 Cloudius Systems
|
|
*/
|
|
|
|
#include "api.hh"
|
|
#include "http/api_docs.hh"
|
|
#include "storage_service.hh"
|
|
#include "commitlog.hh"
|
|
#include "gossiper.hh"
|
|
#include "failure_detector.hh"
|
|
#include "column_family.hh"
|
|
#include "messaging_service.hh"
|
|
#include "storage_proxy.hh"
|
|
|
|
namespace api {
|
|
|
|
future<> set_server(http_context& ctx) {
|
|
auto rb = std::make_shared < api_registry_builder > ("api/api-doc/");
|
|
|
|
return ctx.http_server.set_routes([rb, &ctx](routes& r) {
|
|
rb->set_api_doc(r);
|
|
rb->register_function(r, "storage_service",
|
|
"The storage service API");
|
|
set_storage_service(ctx,r);
|
|
rb->register_function(r, "commitlog",
|
|
"The commit log API");
|
|
set_commitlog(ctx,r);
|
|
rb->register_function(r, "gossiper",
|
|
"The gossiper API");
|
|
set_gossiper(ctx,r);
|
|
rb->register_function(r, "column_family",
|
|
"The column family API");
|
|
set_column_family(ctx, r);
|
|
rb->register_function(r, "failure_detector",
|
|
"The failure detector API");
|
|
set_failure_detector(ctx,r);
|
|
|
|
rb->register_function(r, "messaging_service",
|
|
"The messaging service API");
|
|
set_messaging_service(ctx, r);
|
|
rb->register_function(r, "storage_proxy",
|
|
"The storage proxy API");
|
|
set_storage_proxy(ctx,r);
|
|
|
|
});
|
|
}
|
|
|
|
}
|
|
|