Files
scylladb/api/api.cc
Amnon Heiman c6723d2f61 Adding the commitlog API implementation
This adds the implementation of the commitlog API.
Current implementation contains:
/commitlog/segments/active
That returns a list of the active file names, and
/commitlog/segments/archiving
Which always return an empty list as we archiving is not supported at
the moment

The doc file is under:
/api-doc/commitlog

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-19 15:27:59 +03:00

28 lines
660 B
C++

/*
* Copyright 2015 Cloudius Systems
*/
#include "api.hh"
#include "http/api_docs.hh"
#include "storage_service.hh"
#include "commitlog.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);
});
}
}