Files
scylladb/api/api.cc
Avi Kivity b3b553821f Merge branch 'master' of github.com:cloudius-systems/seastar into db
Contains patch from Amnon to update the calls to http set_routes().
2015-04-26 13:16:35 +03:00

24 lines
505 B
C++

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